@redneckz/wildless-cms-uni-blocks 0.14.587 → 0.14.589

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 (355) hide show
  1. package/bundle/api/RetailApi/RetailApi.d.ts +3 -1
  2. package/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +188 -58
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  7. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  8. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  9. package/bundle/icons/IconName.d.ts +4 -2
  10. package/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  11. package/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  12. package/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  13. package/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  14. package/bundle/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  15. package/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  16. package/bundle/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  17. package/bundle/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  18. package/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  19. package/bundle/ui-kit/FormField/validators.d.ts +2 -0
  20. package/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  21. package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  22. package/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  23. package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  24. package/cosmos-static/icons/RefreshIcon.svg +1 -0
  25. package/cosmos-static/icons/sprites.svg +1 -0
  26. package/dist/api/RetailApi/RetailApi.d.ts +3 -1
  27. package/dist/api/RetailApi/RetailApi.js +15 -1
  28. package/dist/api/RetailApi/RetailApi.js.map +1 -1
  29. package/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
  30. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  31. package/dist/components/ApplicationForm/ApplicationFormContent.js +1 -0
  32. package/dist/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
  33. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  34. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  35. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  36. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
  37. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  38. package/dist/icons/IconName.d.ts +4 -2
  39. package/dist/icons/IconName.js +3 -1
  40. package/dist/icons/IconName.js.map +1 -1
  41. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  42. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
  43. package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
  44. package/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  45. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
  46. package/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
  47. package/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  48. package/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
  49. package/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
  50. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  51. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
  52. package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
  53. package/dist/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  54. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js +9 -0
  55. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
  56. package/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  57. package/dist/ui-kit/FormField/Fields/DulIssuedBy.js +9 -0
  58. package/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
  59. package/dist/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  60. package/dist/ui-kit/FormField/Fields/DulNumberField.js +9 -0
  61. package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
  62. package/dist/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  63. package/dist/ui-kit/FormField/Fields/DulSerieField.js +9 -0
  64. package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
  65. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  66. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +9 -0
  67. package/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
  68. package/dist/ui-kit/FormField/getField.js +10 -0
  69. package/dist/ui-kit/FormField/getField.js.map +1 -1
  70. package/dist/ui-kit/FormField/getObjectValidator.js +5 -0
  71. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  72. package/dist/ui-kit/FormField/validators.d.ts +2 -0
  73. package/dist/ui-kit/FormField/validators.js +3 -1
  74. package/dist/ui-kit/FormField/validators.js.map +1 -1
  75. package/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  76. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
  77. package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  78. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  79. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
  80. package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  81. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  82. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
  83. package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
  84. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
  85. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  86. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  87. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
  88. package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
  89. package/lib/api/RetailApi/RetailApi.d.ts +3 -1
  90. package/lib/api/RetailApi/RetailApi.js +15 -1
  91. package/lib/api/RetailApi/RetailApi.js.map +1 -1
  92. package/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
  93. package/lib/common.css +1 -1
  94. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  95. package/lib/components/ApplicationForm/ApplicationFormContent.js +1 -0
  96. package/lib/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
  97. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  98. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  99. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  100. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
  101. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  102. package/lib/icons/IconName.d.ts +4 -2
  103. package/lib/icons/IconName.js +3 -1
  104. package/lib/icons/IconName.js.map +1 -1
  105. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  106. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.fixture.d.ts +6 -0
  107. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
  108. package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
  109. package/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  110. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
  111. package/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
  112. package/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  113. package/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
  114. package/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
  115. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  116. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
  117. package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
  118. package/lib/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  119. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js +7 -0
  120. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
  121. package/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  122. package/lib/ui-kit/FormField/Fields/DulIssuedBy.js +7 -0
  123. package/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
  124. package/lib/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  125. package/lib/ui-kit/FormField/Fields/DulNumberField.js +7 -0
  126. package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
  127. package/lib/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  128. package/lib/ui-kit/FormField/Fields/DulSerieField.js +7 -0
  129. package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
  130. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  131. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +7 -0
  132. package/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
  133. package/lib/ui-kit/FormField/getField.js +10 -0
  134. package/lib/ui-kit/FormField/getField.js.map +1 -1
  135. package/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  136. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  137. package/lib/ui-kit/FormField/validators.d.ts +2 -0
  138. package/lib/ui-kit/FormField/validators.js +2 -0
  139. package/lib/ui-kit/FormField/validators.js.map +1 -1
  140. package/lib/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  141. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
  142. package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  143. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  144. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
  145. package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  146. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  147. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
  148. package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
  149. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
  150. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  151. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  152. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
  153. package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
  154. package/mobile/bundle/api/RetailApi/RetailApi.d.ts +3 -1
  155. package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
  156. package/mobile/bundle/bundle.umd.js +188 -58
  157. package/mobile/bundle/bundle.umd.min.js +1 -1
  158. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  159. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  160. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  161. package/mobile/bundle/icons/IconName.d.ts +4 -2
  162. package/mobile/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  163. package/mobile/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  164. package/mobile/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  165. package/mobile/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  166. package/mobile/bundle/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  167. package/mobile/bundle/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  168. package/mobile/bundle/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  169. package/mobile/bundle/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  170. package/mobile/bundle/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  171. package/mobile/bundle/ui-kit/FormField/validators.d.ts +2 -0
  172. package/mobile/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  173. package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  174. package/mobile/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  175. package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  176. package/mobile/dist/api/RetailApi/RetailApi.d.ts +3 -1
  177. package/mobile/dist/api/RetailApi/RetailApi.js +15 -1
  178. package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
  179. package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
  180. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  181. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.js +1 -0
  182. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
  183. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  184. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  185. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  186. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
  187. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  188. package/mobile/dist/icons/IconName.d.ts +4 -2
  189. package/mobile/dist/icons/IconName.js +3 -1
  190. package/mobile/dist/icons/IconName.js.map +1 -1
  191. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  192. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
  193. package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
  194. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  195. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
  196. package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
  197. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  198. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
  199. package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
  200. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  201. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
  202. package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
  203. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  204. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js +9 -0
  205. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
  206. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  207. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js +9 -0
  208. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
  209. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  210. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +9 -0
  211. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
  212. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  213. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +9 -0
  214. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
  215. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  216. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js +9 -0
  217. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
  218. package/mobile/dist/ui-kit/FormField/getField.js +10 -0
  219. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  220. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +5 -0
  221. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  222. package/mobile/dist/ui-kit/FormField/validators.d.ts +2 -0
  223. package/mobile/dist/ui-kit/FormField/validators.js +3 -1
  224. package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
  225. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  226. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
  227. package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  228. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  229. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
  230. package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  231. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  232. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
  233. package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
  234. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
  235. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  236. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  237. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
  238. package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
  239. package/mobile/lib/api/RetailApi/RetailApi.d.ts +3 -1
  240. package/mobile/lib/api/RetailApi/RetailApi.js +15 -1
  241. package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
  242. package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
  243. package/mobile/lib/common.css +1 -1
  244. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
  245. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.js +1 -0
  246. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.js.map +1 -1
  247. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -2
  248. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +5 -0
  249. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  250. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
  251. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  252. package/mobile/lib/icons/IconName.d.ts +4 -2
  253. package/mobile/lib/icons/IconName.js +3 -1
  254. package/mobile/lib/icons/IconName.js.map +1 -1
  255. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
  256. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
  257. package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
  258. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
  259. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
  260. package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
  261. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
  262. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
  263. package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
  264. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
  265. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
  266. package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
  267. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.d.ts +2 -0
  268. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js +7 -0
  269. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -0
  270. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.d.ts +2 -0
  271. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js +7 -0
  272. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedBy.js.map +1 -0
  273. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.d.ts +2 -0
  274. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +7 -0
  275. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -0
  276. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.d.ts +2 -0
  277. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +7 -0
  278. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -0
  279. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.d.ts +2 -0
  280. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js +7 -0
  281. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCode.js.map +1 -0
  282. package/mobile/lib/ui-kit/FormField/getField.js +10 -0
  283. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  284. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +6 -1
  285. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  286. package/mobile/lib/ui-kit/FormField/validators.d.ts +2 -0
  287. package/mobile/lib/ui-kit/FormField/validators.js +2 -0
  288. package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
  289. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
  290. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
  291. package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
  292. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
  293. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
  294. package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
  295. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
  296. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
  297. package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
  298. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
  299. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
  300. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
  301. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
  302. package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
  303. package/mobile/src/api/RetailApi/RetailApi.ts +18 -1
  304. package/mobile/src/api/RetailApi/RetailApiTypes.ts +4 -0
  305. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +7 -1
  306. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -1
  307. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -0
  308. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
  309. package/mobile/src/icons/IconName.ts +5 -5
  310. package/mobile/src/icons/RefreshIcon.svg +3 -0
  311. package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
  312. package/mobile/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
  313. package/mobile/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
  314. package/mobile/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
  315. package/mobile/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +12 -0
  316. package/mobile/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +12 -0
  317. package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +13 -0
  318. package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +13 -0
  319. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +17 -0
  320. package/mobile/src/ui-kit/FormField/getField.tsx +10 -0
  321. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +7 -0
  322. package/mobile/src/ui-kit/FormField/validators.ts +8 -0
  323. package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
  324. package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
  325. package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
  326. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
  327. package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
  328. package/package.json +2 -2
  329. package/src/api/RetailApi/RetailApi.ts +18 -1
  330. package/src/api/RetailApi/RetailApiTypes.ts +4 -0
  331. package/src/components/ApplicationForm/ApplicationFormContent.ts +7 -1
  332. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +6 -1
  333. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +5 -0
  334. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
  335. package/src/icons/IconName.ts +353 -6
  336. package/src/icons/RefreshIcon.svg +3 -0
  337. package/src/ui-kit/CaptchaDialog/CaptchaDialog.fixture.tsx +11 -0
  338. package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
  339. package/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
  340. package/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
  341. package/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
  342. package/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +12 -0
  343. package/src/ui-kit/FormField/Fields/DulIssuedBy.tsx +12 -0
  344. package/src/ui-kit/FormField/Fields/DulNumberField.tsx +13 -0
  345. package/src/ui-kit/FormField/Fields/DulSerieField.tsx +13 -0
  346. package/src/ui-kit/FormField/Fields/DulSubdivisionCode.tsx +17 -0
  347. package/src/ui-kit/FormField/getField.tsx +10 -0
  348. package/src/ui-kit/FormField/getObjectValidator.tsx +7 -0
  349. package/src/ui-kit/FormField/validators.ts +8 -0
  350. package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
  351. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +11 -8
  352. package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
  353. package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
  354. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
  355. package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleSendCode.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/handleSendCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAgB3D,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,EACnC,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,UAAU,GACU,EAAE,EAAE;IACxB,IAAI;QACF,MAAM,UAAU,CAAC,QAAQ,CAAC;YACxB,WAAW,EAAE,WAAW;YACxB,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE;SAC3C,CAAC,CAAC;QACH,UAAU,CAAC,CAAC,CAAC,CAAC;QACd,cAAc,CAAC,GAAG,CAAC,CAAC;QACpB,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAAC,OAAO,CAAM,EAAE;QACf,IAAI,CAAC,EAAE,MAAM,KAAK,GAAG,EAAE;YACrB,aAAa,CAAC,IAAI,EAAE,CAAC;SACtB;KACF;AACH,CAAC,CAAC"}
@@ -4,7 +4,7 @@ import { VerifyPhoneDialog } from './VerifyPhoneDialog.js';
4
4
  export const useVerifyPhoneDialog = (props) => {
5
5
  const { open, close } = useDialogManager();
6
6
  return {
7
- open: (options = {}) => open(_jsx(VerifyPhoneDialog, { ...props }), options),
7
+ open: (options = {}) => open(_jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
8
8
  close,
9
9
  };
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useVerifyPhoneDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAC,iBAAiB,OAAK,KAAK,GAAI,EAAE,OAAO,CAAC;QACtF,KAAK;KACN,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"useVerifyPhoneDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAErF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAE3C,OAAO;QACL,IAAI,EAAE,CAAC,UAAyB,EAAE,EAAE,EAAE,CACpC,IAAI,CAAC,KAAC,iBAAiB,IAAC,OAAO,EAAE,KAAK,KAAM,KAAK,GAAI,EAAE,OAAO,CAAC;QACjE,KAAK;KACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ declare type useVerifyPhoneDialogSubmitProps = {
2
+ values: string[];
3
+ close?: () => void;
4
+ };
5
+ export declare const useVerifyPhoneDialogSubmit: ({ close, values }: useVerifyPhoneDialogSubmitProps) => {
6
+ handleSubmit: () => Promise<void>;
7
+ hasError: boolean;
8
+ errorText: string;
9
+ isLoading: boolean;
10
+ timeNextReq: number;
11
+ isSubmitButtonDisabled: boolean;
12
+ setTimeNextReq: (value: number | ((prevState: number) => number)) => void;
13
+ setIsTimerStarted: (value: boolean | ((prevState: boolean) => boolean)) => void;
14
+ setAttemps: (value: number | ((prevState: number) => number)) => void;
15
+ };
16
+ export {};
@@ -0,0 +1,56 @@
1
+ import { useCallback, useEffect, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
2
+ import { RETAIL_API } from '../../api/RetailApi/RetailApi.js';
3
+ export const useVerifyPhoneDialogSubmit = ({ close, values }) => {
4
+ const [hasError, setHasError] = useState(false);
5
+ const [errorText, setErrorText] = useState('');
6
+ const [isLoading, setIsLoading] = useState(false);
7
+ const [timeNextReq, setTimeNextReq] = useState(0);
8
+ const [isTimerStarted, setIsTimerStarted] = useState(false);
9
+ const [attemps, setAttemps] = useState(0);
10
+ const resetError = useCallback(() => {
11
+ setHasError(false);
12
+ setErrorText('');
13
+ }, []);
14
+ const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
15
+ const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
16
+ const handleSubmit = useCallback(async () => {
17
+ try {
18
+ setIsTimerStarted(false);
19
+ setTimeNextReq(0);
20
+ setAttemps(attemps + 1);
21
+ setIsLoading(true);
22
+ await RETAIL_API.CheckCode({
23
+ smsText: values.join(''),
24
+ smsCodesSetName: { key: 'AUTHENTICATION' },
25
+ });
26
+ resetError();
27
+ close && close();
28
+ }
29
+ catch {
30
+ setIsLoading(false);
31
+ attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
32
+ setHasError(true);
33
+ }
34
+ }, [values, attemps]);
35
+ useEffect(() => {
36
+ if (isTimeExpired) {
37
+ setHasError(true);
38
+ setErrorText('Код просрочен');
39
+ }
40
+ else {
41
+ setHasError(false);
42
+ }
43
+ }, [isTimeExpired]);
44
+ return {
45
+ handleSubmit,
46
+ hasError,
47
+ errorText,
48
+ isLoading,
49
+ timeNextReq,
50
+ isSubmitButtonDisabled,
51
+ setTimeNextReq,
52
+ setIsTimerStarted,
53
+ setAttemps,
54
+ };
55
+ };
56
+ //# sourceMappingURL=useVerifyPhoneDialogSubmit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVerifyPhoneDialogSubmit.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAO3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAmC,EAAE,EAAE;IAC/F,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE1C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnB,YAAY,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,WAAW,KAAK,CAAC,IAAI,cAAc,EACzC,CAAC,WAAW,EAAE,cAAc,CAAC,CAC9B,CAAC;IAEF,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,aAAa,EAC5D,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1C,IAAI;YACF,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,cAAc,CAAC,CAAC,CAAC,CAAC;YAClB,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;YACxB,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,UAAU,CAAC,SAAS,CAAC;gBACzB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE;aAC3C,CAAC,CAAC;YACH,UAAU,EAAE,CAAC;YACb,KAAK,IAAI,KAAK,EAAE,CAAC;SAClB;QAAC,MAAM;YACN,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;YAC3F,WAAW,CAAC,IAAI,CAAC,CAAC;SACnB;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,EAAE;YACjB,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,YAAY,CAAC,eAAe,CAAC,CAAC;SAC/B;aAAM;YACL,WAAW,CAAC,KAAK,CAAC,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO;QACL,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,WAAW;QACX,sBAAsB;QACtB,cAAc;QACd,iBAAiB;QACjB,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type CheckCodeBody, type CreateDraftTaskBody, type CreateDraftTaskResponse, type CreateUserProfileBody, type CreateUserProfileResponse, type SendCodeBody, type UpdateUserProfileBody, type UpdateUserTaskBody } from './RetailApiTypes';
1
+ import { type CapchaTextType, type CheckCodeBody, type CreateDraftTaskBody, type CreateDraftTaskResponse, type CreateUserProfileBody, type CreateUserProfileResponse, type SendCodeBody, type UpdateUserProfileBody, type UpdateUserTaskBody } from './RetailApiTypes';
2
2
  export declare const RETAIL_API: {
3
3
  CreateUserProfile: (body: CreateUserProfileBody) => Promise<CreateUserProfileResponse>;
4
4
  UpdateUserProfile: (body: UpdateUserProfileBody) => Promise<unknown>;
@@ -6,4 +6,6 @@ export declare const RETAIL_API: {
6
6
  UpdateUserTask: (body: UpdateUserTaskBody) => Promise<unknown>;
7
7
  SendCode: (body: SendCodeBody) => Promise<unknown>;
8
8
  CheckCode: (body: CheckCodeBody) => Promise<void>;
9
+ CreateCaptcha: (phoneNumber: string) => Promise<Response>;
10
+ CheckCaptcha: (body: CapchaTextType) => Promise<Response>;
9
11
  };
@@ -81,3 +81,6 @@ export declare type CheckCodeResponse = {
81
81
  expires_in: number;
82
82
  refresh_token: string;
83
83
  };
84
+ export declare type CapchaTextType = {
85
+ captchaText: string;
86
+ };
@@ -1130,9 +1130,9 @@
1130
1130
  onChange && onChange(!value);
1131
1131
  }, [onChange, disabled, value]);
1132
1132
  const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
1133
- return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$2(text)] }) }));
1133
+ return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$3(text)] }) }));
1134
1134
  });
1135
- const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
1135
+ const renderText$3 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
1136
1136
  const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
1137
1137
  const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
1138
1138
  const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
@@ -1429,6 +1429,8 @@
1429
1429
  const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1430
1430
  const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1431
1431
  const lengthStringValidator = (maxLength) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(ERROR_MESSAGE);
1432
+ const serieValidator = validator((_) => typeof _ === 'string' && _.length === 4)(ERROR_MESSAGE);
1433
+ const numberValidator = validator((_) => typeof _ === 'string' && _.length === 6)(ERROR_MESSAGE);
1432
1434
  const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1433
1435
  const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1434
1436
  const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
@@ -1471,6 +1473,11 @@
1471
1473
  employerOrganization: defaultValidator,
1472
1474
  positionOrganization: defaultValidator,
1473
1475
  email: emailValidator,
1476
+ dulSerie: serieValidator,
1477
+ dulNumber: numberValidator,
1478
+ dulIssueDateField: defaultValidator,
1479
+ dulSubdivisionCode: numberValidator,
1480
+ dulIssuedBy: defaultValidator,
1474
1481
  fullName: nameValidator,
1475
1482
  inn: innValidator,
1476
1483
  legalForm: defaultValidator,
@@ -1918,6 +1925,16 @@
1918
1925
 
1919
1926
  const DesiredMeetingDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required) })));
1920
1927
 
1928
+ const DulIssueDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...getValidation(field('dulIssueDateField'), validatorObj.dulIssueDateField, input?.required) })));
1929
+
1930
+ const DulIssuedBy = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required) })));
1931
+
1932
+ const DulNumberField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", type: "number", ...getValidation(field('dulNumber'), validatorObj.dulNumber, input?.required) })));
1933
+
1934
+ const DulSerieField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", type: "number", ...getValidation(field('dulSerie'), validatorObj.dulSerie, input?.required) })));
1935
+
1936
+ const DulSubdivisionCode = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", type: "number", ...getValidation(field('dulSubdivisionCode'), validatorObj.dulSubdivisionCode, input?.required) })));
1937
+
1921
1938
  const EducationField = JSX(({ field, input }) => {
1922
1939
  const { data: education } = useLeadFormData('EDUCATION_LEVEL');
1923
1940
  return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
@@ -2224,6 +2241,11 @@
2224
2241
  snils: jsx(SnilsField, { field: field, input: input }),
2225
2242
  conscription: jsx(ConscriptionField, { field: field, input: input }),
2226
2243
  armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
2244
+ dulSerie: jsx(DulSerieField, { field: field, input: input }),
2245
+ dulNumber: jsx(DulNumberField, { field: field, input: input }),
2246
+ dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
2247
+ dulSubdivisionCode: jsx(DulSubdivisionCode, { field: field, input: input }),
2248
+ dulIssuedBy: jsx(DulIssuedBy, { field: field, input: input }),
2227
2249
  };
2228
2250
  return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
2229
2251
  };
@@ -2536,6 +2558,7 @@
2536
2558
 
2537
2559
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
2538
2560
 
2561
+ const getResponse = (response) => (isJSON(response) ? response.json() : response);
2539
2562
  const getAthorizationHeaders = () => {
2540
2563
  const token = sessionStorage.getItem('accessToken');
2541
2564
  return token ? { Authorization: `Bearer ${token}` } : null;
@@ -2549,7 +2572,18 @@
2549
2572
  },
2550
2573
  credentials: 'include',
2551
2574
  body: body ? JSON.stringify(body) : null,
2552
- }).then((response) => (isJSON(response) ? response.json() : response));
2575
+ })
2576
+ .then((response) => {
2577
+ if (response.ok) {
2578
+ return getResponse(response);
2579
+ }
2580
+ else {
2581
+ throw response;
2582
+ }
2583
+ })
2584
+ .catch((error) => {
2585
+ throw error;
2586
+ });
2553
2587
  const saveToken = (data) => {
2554
2588
  sessionStorage.setItem('accessToken', data.access_token);
2555
2589
  sessionStorage.setItem('refreshToken', data.refresh_token);
@@ -2561,6 +2595,8 @@
2561
2595
  UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
2562
2596
  SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
2563
2597
  CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
2598
+ CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
2599
+ CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
2564
2600
  };
2565
2601
 
2566
2602
  const getUpdateUserProfileData = (profileId, formData) => {
@@ -2625,6 +2661,71 @@
2625
2661
  },
2626
2662
  });
2627
2663
 
2664
+ const ICON_SIZE$1 = { width: '103', height: '21' };
2665
+
2666
+ const logoTitleSizeStyle = 'text-s';
2667
+
2668
+ const ICON_VERSION_MAP = {
2669
+ 'bg-white': 'color',
2670
+ transparent: 'white',
2671
+ };
2672
+ const SVG_COLOR = {
2673
+ 'bg-white': 'text-primary-main',
2674
+ transparent: 'text-white',
2675
+ };
2676
+ const renderImage = (bgColor, image, size) => {
2677
+ const img = image?.src
2678
+ ? image
2679
+ : {
2680
+ icon: image?.icon || 'LogoIcon',
2681
+ iconVersion: ICON_VERSION_MAP[bgColor],
2682
+ };
2683
+ return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
2684
+ };
2685
+
2686
+ const TEXT_COLOR = {
2687
+ 'bg-white': 'text-primary-text',
2688
+ transparent: 'text-white',
2689
+ };
2690
+ const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE$1), showTitle
2691
+ ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
2692
+ : null] })));
2693
+
2694
+ const checkCaptcha = async ({ code, setHasError, close, sendCode = noop, }) => {
2695
+ const response = await RETAIL_API.CheckCaptcha({ captchaText: code });
2696
+ if ((await response.text()) === 'ERROR') {
2697
+ setHasError(true);
2698
+ }
2699
+ else {
2700
+ sendCode();
2701
+ close?.();
2702
+ }
2703
+ };
2704
+
2705
+ const createCaptcha = async (setCaptcha, phoneNumber) => {
2706
+ const response = await RETAIL_API.CreateCaptcha(phoneNumber);
2707
+ setCaptcha(URL.createObjectURL(await response.blob()));
2708
+ };
2709
+
2710
+ const CaptchaDialog = JSX(({ phoneNumber, close, sendCode, onClose }) => {
2711
+ const [captcha, setCaptcha] = useState('');
2712
+ const [code, setCode] = useState('');
2713
+ const [hasError, setHasError] = useState(false);
2714
+ useEffect(() => {
2715
+ createCaptcha(setCaptcha, phoneNumber);
2716
+ }, []);
2717
+ return (jsx(Dialog, { head: jsx(Logo, {}), onClose: onClose, className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-[140px] w-[300px]", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: () => createCaptcha(setCaptcha, phoneNumber), className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: () => checkCaptcha({ code, setHasError, close, sendCode }), version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
2718
+ });
2719
+
2720
+ const useCaptchaDialog = (initialProps, onClose) => {
2721
+ const { open, close, closeAll } = useDialogManager();
2722
+ return {
2723
+ open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
2724
+ close,
2725
+ closeAll,
2726
+ };
2727
+ };
2728
+
2628
2729
  const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
2629
2730
  'backdrop-blur': blur,
2630
2731
  }), children: jsx("div", { className: style('inline-block h-28 w-28', 'animate-spin rounded-full', 'border-8 border-solid border-current', 'border-r-transparent', color), role: "status" }) })));
@@ -2649,7 +2750,24 @@
2649
2750
  return `${minutes}:${seconds}`;
2650
2751
  };
2651
2752
 
2652
- const InputCode = JSX(({ values, setValues, hasError }) => {
2753
+ const handleSendCode = async ({ phoneNumber, captchaDialog, setTimeNextReq, setIsTimerStarted, setAttemps, }) => {
2754
+ try {
2755
+ await RETAIL_API.SendCode({
2756
+ phoneNumber: phoneNumber,
2757
+ smsCodesSetName: { key: 'AUTHENTICATION' },
2758
+ });
2759
+ setAttemps(0);
2760
+ setTimeNextReq(180);
2761
+ setIsTimerStarted(true);
2762
+ }
2763
+ catch (e) {
2764
+ if (e?.status === 429) {
2765
+ captchaDialog.open();
2766
+ }
2767
+ }
2768
+ };
2769
+
2770
+ const InputCode = JSX(({ values, setValues, hasError, errorText }) => {
2653
2771
  const [activeIndex, setActiveIndex] = useState(0);
2654
2772
  const inputRefs = useRef([]);
2655
2773
  useEffect(() => {
@@ -2686,7 +2804,7 @@
2686
2804
  inputRefs.current = [];
2687
2805
  }
2688
2806
  inputRefs.current[index] = ref;
2689
- }, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null] }));
2807
+ }, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children: errorText }) : null] }));
2690
2808
  });
2691
2809
  const getInputStyle = (index, values, hasError = false) => {
2692
2810
  const isInputEmpty = !values[index];
@@ -2697,42 +2815,85 @@
2697
2815
  return (jsx(Button, { type: "button", onClick: onClick, disabled: isDisabled, children: jsx(Text, { font: "font-medium", children: text }) }));
2698
2816
  });
2699
2817
 
2700
- const VerifyPhoneDialog = JSX(({ title, phone, description, __html, code = true, codeLength = 4, textButton = '', onClose, href = '', }) => {
2701
- const { close } = useDialogManager();
2702
- const [values, setValues] = useState(Array(codeLength).fill(''));
2818
+ const useVerifyPhoneDialogSubmit = ({ close, values }) => {
2703
2819
  const [hasError, setHasError] = useState(false);
2820
+ const [errorText, setErrorText] = useState('');
2704
2821
  const [isLoading, setIsLoading] = useState(false);
2705
- const [timeNextReq, setTimeNextReq] = useState(180);
2706
- const isValidCode = useMemo(() => values.every(Boolean), [values]);
2707
- useEffect(() => {
2708
- RETAIL_API.SendCode({
2709
- phoneNumber: phone,
2710
- smsCodesSetName: { key: 'AUTHENTICATION' },
2711
- });
2822
+ const [timeNextReq, setTimeNextReq] = useState(0);
2823
+ const [isTimerStarted, setIsTimerStarted] = useState(false);
2824
+ const [attemps, setAttemps] = useState(0);
2825
+ const resetError = useCallback(() => {
2826
+ setHasError(false);
2827
+ setErrorText('');
2712
2828
  }, []);
2829
+ const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
2830
+ const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
2713
2831
  const handleSubmit = useCallback(async () => {
2714
2832
  try {
2833
+ setIsTimerStarted(false);
2834
+ setTimeNextReq(0);
2835
+ setAttemps(attemps + 1);
2715
2836
  setIsLoading(true);
2716
2837
  await RETAIL_API.CheckCode({
2717
2838
  smsText: values.join(''),
2718
2839
  smsCodesSetName: { key: 'AUTHENTICATION' },
2719
2840
  });
2720
- globalThis.location.href = href;
2721
- close();
2722
- onClose && onClose();
2841
+ resetError();
2842
+ close && close();
2723
2843
  }
2724
2844
  catch {
2725
2845
  setIsLoading(false);
2846
+ attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
2726
2847
  setHasError(true);
2727
2848
  }
2728
- }, [values]);
2729
- return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "S", isEmbedded: true }), code ? jsx(InputCode, { values: values, setValues: setValues, hasError: hasError }) : null, timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-primary-main", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-primary-main ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" })), jsx(RichText, { itemSize: "list-s", __html: __html }), textButton ? (jsx(SubmitButton, { isDisabled: !isValidCode, onClick: handleSubmit, text: textButton })) : null, isLoading ? jsx(Loader, { blur: false }) : null] }) }));
2849
+ }, [values, attemps]);
2850
+ useEffect(() => {
2851
+ if (isTimeExpired) {
2852
+ setHasError(true);
2853
+ setErrorText('Код просрочен');
2854
+ }
2855
+ else {
2856
+ setHasError(false);
2857
+ }
2858
+ }, [isTimeExpired]);
2859
+ return {
2860
+ handleSubmit,
2861
+ hasError,
2862
+ errorText,
2863
+ isLoading,
2864
+ timeNextReq,
2865
+ isSubmitButtonDisabled,
2866
+ setTimeNextReq,
2867
+ setIsTimerStarted,
2868
+ setAttemps,
2869
+ };
2870
+ };
2871
+
2872
+ const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
2873
+ const [values, setValues] = useState(Array(codeLength).fill(''));
2874
+ const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
2875
+ const sendCode = useCallback(() => {
2876
+ handleSendCode({
2877
+ phoneNumber,
2878
+ captchaDialog,
2879
+ setTimeNextReq,
2880
+ setIsTimerStarted,
2881
+ setAttemps,
2882
+ });
2883
+ }, []);
2884
+ const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
2885
+ useEffect(() => {
2886
+ sendCode();
2887
+ }, []);
2888
+ return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsx(Headline, { className: "w-full", title: title, description: description, headlineVersion: "S", isEmbedded: true }), code ? (jsx(InputCode, { values: values, setValues: setValues, errorText: errorText, hasError: hasError })) : null, renderText$2(timeNextReq, setTimeNextReq, sendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
2730
2889
  });
2890
+ const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
2891
+ const renderText$2 = (timeNextReq, setTimeNextReq, sendCode) => timeNextReq ? (jsxs("div", { className: "flex flex-row text-l font-light text-primary-main", children: ["\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437", jsx(Timer, { className: "text-primary-main ml-1", time: timeNextReq, setTime: setTimeNextReq })] })) : (jsx(LinkButton, { onClick: sendCode, className: "text-primary-main", children: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434" }));
2731
2892
 
2732
2893
  const useVerifyPhoneDialog = (props) => {
2733
2894
  const { open, close } = useDialogManager();
2734
2895
  return {
2735
- open: (options = {}) => open(jsx(VerifyPhoneDialog, { ...props }), options),
2896
+ open: (options = {}) => open(jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
2736
2897
  close,
2737
2898
  };
2738
2899
  };
@@ -2759,7 +2920,7 @@
2759
2920
  programId,
2760
2921
  });
2761
2922
  await RETAIL_API.UpdateUserTask(getUpdateUserTaskData(participantId, taskId, profileId, formData));
2762
- setResponseStatus('OK');
2923
+ globalThis.location.href = '/credit-lead';
2763
2924
  }
2764
2925
  catch {
2765
2926
  setResponseStatus('Fail');
@@ -2767,7 +2928,7 @@
2767
2928
  };
2768
2929
  // eslint-disable-next-line react-hooks/rules-of-hooks
2769
2930
  const verifyPhoneDialog = useVerifyPhoneDialog({
2770
- onClose: handleSuccessVerify,
2931
+ close: handleSuccessVerify,
2771
2932
  ...verifyPhoneContent(formData?.phone),
2772
2933
  });
2773
2934
  verifyPhoneDialog.open();
@@ -2785,14 +2946,13 @@
2785
2946
  const verifyPhoneContent = (phone) => ({
2786
2947
  title: 'Подтвердите номер телефона',
2787
2948
  description: `Мы отправили код на ${phone}`,
2788
- phone: formatPhone(phone),
2949
+ phoneNumber: formatPhone(phone),
2789
2950
  textButton: 'Оформить',
2790
2951
  __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
2791
2952
  <ul><li>соглашение о порядке использования простой электронной подписи,
2792
2953
  </li><li>согласие на обработку персональных данных,
2793
2954
  </li><li>предоставление и подписание прочих согласий Банка,
2794
2955
  </li><li>согласие на запрос в ПФР</li></ul>`,
2795
- href: '/credit-lead',
2796
2956
  });
2797
2957
 
2798
2958
  const useInitApplicationLead = () => {
@@ -4525,7 +4685,7 @@
4525
4685
  return null;
4526
4686
  };
4527
4687
 
4528
- const ICON_SIZE$1 = { width: '24', height: '24' };
4688
+ const ICON_SIZE = { width: '24', height: '24' };
4529
4689
  const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
4530
4690
  const pages = useMemo(() => Array.from({ length: totalPages }).fill({
4531
4691
  currentPage,
@@ -4544,7 +4704,7 @@
4544
4704
  }, [currentPage, totalPages]);
4545
4705
  const handleFirstPage = useCallback(() => onPageChange(1), []);
4546
4706
  const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
4547
- return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex @lg:gap-2xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 3 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 2 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }));
4707
+ return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE }) }), jsxs("div", { className: "flex @lg:gap-2xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 3 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 2 ? jsx("div", { className: "py-m @lg:px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE }) })] }));
4548
4708
  };
4549
4709
  const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
4550
4710
 
@@ -4920,36 +5080,6 @@
4920
5080
  return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), data: getAspectsWithInclude(data, region?.key), children: buttonText }) })) : null] }) }));
4921
5081
  });
4922
5082
 
4923
- const ICON_SIZE = { width: '103', height: '21' };
4924
-
4925
- const logoTitleSizeStyle = 'text-s';
4926
-
4927
- const ICON_VERSION_MAP = {
4928
- 'bg-white': 'color',
4929
- transparent: 'white',
4930
- };
4931
- const SVG_COLOR = {
4932
- 'bg-white': 'text-primary-main',
4933
- transparent: 'text-white',
4934
- };
4935
- const renderImage = (bgColor, image, size) => {
4936
- const img = image?.src
4937
- ? image
4938
- : {
4939
- icon: image?.icon || 'LogoIcon',
4940
- iconVersion: ICON_VERSION_MAP[bgColor],
4941
- };
4942
- return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
4943
- };
4944
-
4945
- const TEXT_COLOR = {
4946
- 'bg-white': 'text-primary-text',
4947
- transparent: 'text-white',
4948
- };
4949
- const Logo = JSX(({ className, href = '/', logo, children, targetBlank, bgColor = 'bg-white', showTitle = true, data, }) => (jsxs("a", { className: style('inline-flex items-center font-sans no-underline', className), href: logo?.href ?? href, target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title ?? 'Россельхозбанк', ...getAspectsAttributes(data), children: [renderImage(bgColor, logo?.image, ICON_SIZE), showTitle
4950
- ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
4951
- : null] })));
4952
-
4953
5083
  const BUTTON_STYLE = {
4954
5084
  default: 'bg-main-divider text-primary-main rounded hover:text-primary-main',
4955
5085
  transparent: 'backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white',
@@ -6908,7 +7038,7 @@
6908
7038
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6909
7039
  });
6910
7040
 
6911
- const packageVersion = "0.14.586";
7041
+ const packageVersion = "0.14.588";
6912
7042
 
6913
7043
  exports.Blocks = Blocks;
6914
7044
  exports.ContentPage = ContentPage;