@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
@@ -1122,9 +1122,9 @@
1122
1122
  onChange && onChange(!value);
1123
1123
  }, [onChange, disabled, value]);
1124
1124
  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" }));
1125
- 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$1(text)] }) }));
1125
+ 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)] }) }));
1126
1126
  });
1127
- const renderText$1 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
1127
+ const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
1128
1128
  const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
1129
1129
  const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
1130
1130
  const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
@@ -1421,6 +1421,8 @@
1421
1421
  const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1422
1422
  const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1423
1423
  const lengthStringValidator = (maxLength) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(ERROR_MESSAGE);
1424
+ const serieValidator = validator((_) => typeof _ === 'string' && _.length === 4)(ERROR_MESSAGE);
1425
+ const numberValidator = validator((_) => typeof _ === 'string' && _.length === 6)(ERROR_MESSAGE);
1424
1426
  const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1425
1427
  const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1426
1428
  const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
@@ -1463,6 +1465,11 @@
1463
1465
  employerOrganization: defaultValidator,
1464
1466
  positionOrganization: defaultValidator,
1465
1467
  email: emailValidator,
1468
+ dulSerie: serieValidator,
1469
+ dulNumber: numberValidator,
1470
+ dulIssueDateField: defaultValidator,
1471
+ dulSubdivisionCode: numberValidator,
1472
+ dulIssuedBy: defaultValidator,
1466
1473
  fullName: nameValidator,
1467
1474
  inn: innValidator,
1468
1475
  legalForm: defaultValidator,
@@ -1910,6 +1917,16 @@
1910
1917
 
1911
1918
  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) })));
1912
1919
 
1920
+ 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) })));
1921
+
1922
+ const DulIssuedBy = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required) })));
1923
+
1924
+ 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) })));
1925
+
1926
+ 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) })));
1927
+
1928
+ 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) })));
1929
+
1913
1930
  const EducationField = JSX(({ field, input }) => {
1914
1931
  const { data: education } = useLeadFormData('EDUCATION_LEVEL');
1915
1932
  return (jsx(SelectField, { field: field, source: education, label: "\u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435", fieldName: "education", input: input }));
@@ -2216,6 +2233,11 @@
2216
2233
  snils: jsx(SnilsField, { field: field, input: input }),
2217
2234
  conscription: jsx(ConscriptionField, { field: field, input: input }),
2218
2235
  armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
2236
+ dulSerie: jsx(DulSerieField, { field: field, input: input }),
2237
+ dulNumber: jsx(DulNumberField, { field: field, input: input }),
2238
+ dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
2239
+ dulSubdivisionCode: jsx(DulSubdivisionCode, { field: field, input: input }),
2240
+ dulIssuedBy: jsx(DulIssuedBy, { field: field, input: input }),
2219
2241
  };
2220
2242
  return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
2221
2243
  };
@@ -2528,6 +2550,7 @@
2528
2550
 
2529
2551
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
2530
2552
 
2553
+ const getResponse = (response) => (isJSON(response) ? response.json() : response);
2531
2554
  const getAthorizationHeaders = () => {
2532
2555
  const token = sessionStorage.getItem('accessToken');
2533
2556
  return token ? { Authorization: `Bearer ${token}` } : null;
@@ -2541,7 +2564,18 @@
2541
2564
  },
2542
2565
  credentials: 'include',
2543
2566
  body: body ? JSON.stringify(body) : null,
2544
- }).then((response) => (isJSON(response) ? response.json() : response));
2567
+ })
2568
+ .then((response) => {
2569
+ if (response.ok) {
2570
+ return getResponse(response);
2571
+ }
2572
+ else {
2573
+ throw response;
2574
+ }
2575
+ })
2576
+ .catch((error) => {
2577
+ throw error;
2578
+ });
2545
2579
  const saveToken = (data) => {
2546
2580
  sessionStorage.setItem('accessToken', data.access_token);
2547
2581
  sessionStorage.setItem('refreshToken', data.refresh_token);
@@ -2553,6 +2587,8 @@
2553
2587
  UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
2554
2588
  SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
2555
2589
  CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
2590
+ CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
2591
+ CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
2556
2592
  };
2557
2593
 
2558
2594
  const getUpdateUserProfileData = (profileId, formData) => {
@@ -2617,6 +2653,71 @@
2617
2653
  },
2618
2654
  });
2619
2655
 
2656
+ const ICON_SIZE$1 = { width: '118', height: '24' };
2657
+
2658
+ const logoTitleSizeStyle = '';
2659
+
2660
+ const ICON_VERSION_MAP = {
2661
+ 'bg-white': 'color',
2662
+ transparent: 'white',
2663
+ };
2664
+ const SVG_COLOR = {
2665
+ 'bg-white': 'text-primary-main',
2666
+ transparent: 'text-white',
2667
+ };
2668
+ const renderImage = (bgColor, image, size) => {
2669
+ const img = image?.src
2670
+ ? image
2671
+ : {
2672
+ icon: image?.icon || 'LogoIcon',
2673
+ iconVersion: ICON_VERSION_MAP[bgColor],
2674
+ };
2675
+ return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
2676
+ };
2677
+
2678
+ const TEXT_COLOR = {
2679
+ 'bg-white': 'text-primary-text',
2680
+ transparent: 'text-white',
2681
+ };
2682
+ 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
2683
+ ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
2684
+ : null] })));
2685
+
2686
+ const checkCaptcha = async ({ code, setHasError, close, sendCode = noop, }) => {
2687
+ const response = await RETAIL_API.CheckCaptcha({ captchaText: code });
2688
+ if ((await response.text()) === 'ERROR') {
2689
+ setHasError(true);
2690
+ }
2691
+ else {
2692
+ sendCode();
2693
+ close?.();
2694
+ }
2695
+ };
2696
+
2697
+ const createCaptcha = async (setCaptcha, phoneNumber) => {
2698
+ const response = await RETAIL_API.CreateCaptcha(phoneNumber);
2699
+ setCaptcha(URL.createObjectURL(await response.blob()));
2700
+ };
2701
+
2702
+ const CaptchaDialog = JSX(({ phoneNumber, close, sendCode, onClose }) => {
2703
+ const [captcha, setCaptcha] = useState('');
2704
+ const [code, setCode] = useState('');
2705
+ const [hasError, setHasError] = useState(false);
2706
+ useEffect(() => {
2707
+ createCaptcha(setCaptcha, phoneNumber);
2708
+ }, []);
2709
+ 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" })] })] }) }));
2710
+ });
2711
+
2712
+ const useCaptchaDialog = (initialProps, onClose) => {
2713
+ const { open, close, closeAll } = useDialogManager();
2714
+ return {
2715
+ open: () => open(jsx(CaptchaDialog, { close: close, onClose: onClose, ...initialProps })),
2716
+ close,
2717
+ closeAll,
2718
+ };
2719
+ };
2720
+
2620
2721
  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, {
2621
2722
  'backdrop-blur': blur,
2622
2723
  }), 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" }) })));
@@ -2641,7 +2742,24 @@
2641
2742
  return `${minutes}:${seconds}`;
2642
2743
  };
2643
2744
 
2644
- const InputCode = JSX(({ values, setValues, hasError }) => {
2745
+ const handleSendCode = async ({ phoneNumber, captchaDialog, setTimeNextReq, setIsTimerStarted, setAttemps, }) => {
2746
+ try {
2747
+ await RETAIL_API.SendCode({
2748
+ phoneNumber: phoneNumber,
2749
+ smsCodesSetName: { key: 'AUTHENTICATION' },
2750
+ });
2751
+ setAttemps(0);
2752
+ setTimeNextReq(180);
2753
+ setIsTimerStarted(true);
2754
+ }
2755
+ catch (e) {
2756
+ if (e?.status === 429) {
2757
+ captchaDialog.open();
2758
+ }
2759
+ }
2760
+ };
2761
+
2762
+ const InputCode = JSX(({ values, setValues, hasError, errorText }) => {
2645
2763
  const [activeIndex, setActiveIndex] = useState(0);
2646
2764
  const inputRefs = useRef([]);
2647
2765
  useEffect(() => {
@@ -2678,7 +2796,7 @@
2678
2796
  inputRefs.current = [];
2679
2797
  }
2680
2798
  inputRefs.current[index] = ref;
2681
- }, 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] }));
2799
+ }, onFocus: (event) => event.target.select(), onKeyDown: handleKeyDown(index), className: getInputStyle(index, values, hasError) }, index))) }), hasError ? jsx("div", { className: "text-error", children: errorText }) : null] }));
2682
2800
  });
2683
2801
  const getInputStyle = (index, values, hasError = false) => {
2684
2802
  const isInputEmpty = !values[index];
@@ -2689,42 +2807,85 @@
2689
2807
  return (jsx(Button, { type: "button", onClick: onClick, disabled: isDisabled, children: jsx(Text, { font: "font-medium", children: text }) }));
2690
2808
  });
2691
2809
 
2692
- const VerifyPhoneDialog = JSX(({ title, phone, description, __html, code = true, codeLength = 4, textButton = '', onClose, href = '', }) => {
2693
- const { close } = useDialogManager();
2694
- const [values, setValues] = useState(Array(codeLength).fill(''));
2810
+ const useVerifyPhoneDialogSubmit = ({ close, values }) => {
2695
2811
  const [hasError, setHasError] = useState(false);
2812
+ const [errorText, setErrorText] = useState('');
2696
2813
  const [isLoading, setIsLoading] = useState(false);
2697
- const [timeNextReq, setTimeNextReq] = useState(180);
2698
- const isValidCode = useMemo(() => values.every(Boolean), [values]);
2699
- useEffect(() => {
2700
- RETAIL_API.SendCode({
2701
- phoneNumber: phone,
2702
- smsCodesSetName: { key: 'AUTHENTICATION' },
2703
- });
2814
+ const [timeNextReq, setTimeNextReq] = useState(0);
2815
+ const [isTimerStarted, setIsTimerStarted] = useState(false);
2816
+ const [attemps, setAttemps] = useState(0);
2817
+ const resetError = useCallback(() => {
2818
+ setHasError(false);
2819
+ setErrorText('');
2704
2820
  }, []);
2821
+ const isTimeExpired = useMemo(() => timeNextReq === 0 && isTimerStarted, [timeNextReq, isTimerStarted]);
2822
+ const isSubmitButtonDisabled = useMemo(() => attemps > 2 || !values.every(Boolean) || isTimeExpired, [values]);
2705
2823
  const handleSubmit = useCallback(async () => {
2706
2824
  try {
2825
+ setIsTimerStarted(false);
2826
+ setTimeNextReq(0);
2827
+ setAttemps(attemps + 1);
2707
2828
  setIsLoading(true);
2708
2829
  await RETAIL_API.CheckCode({
2709
2830
  smsText: values.join(''),
2710
2831
  smsCodesSetName: { key: 'AUTHENTICATION' },
2711
2832
  });
2712
- globalThis.location.href = href;
2713
- close();
2714
- onClose && onClose();
2833
+ resetError();
2834
+ close && close();
2715
2835
  }
2716
2836
  catch {
2717
2837
  setIsLoading(false);
2838
+ attemps > 1 ? setErrorText('Исчерпан лимит ввода смс-кода') : setErrorText('Неверный код');
2718
2839
  setHasError(true);
2719
2840
  }
2720
- }, [values]);
2721
- 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] }) }));
2841
+ }, [values, attemps]);
2842
+ useEffect(() => {
2843
+ if (isTimeExpired) {
2844
+ setHasError(true);
2845
+ setErrorText('Код просрочен');
2846
+ }
2847
+ else {
2848
+ setHasError(false);
2849
+ }
2850
+ }, [isTimeExpired]);
2851
+ return {
2852
+ handleSubmit,
2853
+ hasError,
2854
+ errorText,
2855
+ isLoading,
2856
+ timeNextReq,
2857
+ isSubmitButtonDisabled,
2858
+ setTimeNextReq,
2859
+ setIsTimerStarted,
2860
+ setAttemps,
2861
+ };
2862
+ };
2863
+
2864
+ const VerifyPhoneDialog = JSX(({ close = noop, onClose = noop, title, description, __html, code = true, codeLength = 4, textButton = '', phoneNumber = '+79999999999', }) => {
2865
+ const [values, setValues] = useState(Array(codeLength).fill(''));
2866
+ const { handleSubmit, hasError, errorText, isLoading, timeNextReq, isSubmitButtonDisabled, setTimeNextReq, setIsTimerStarted, setAttemps, } = useVerifyPhoneDialogSubmit({ values, close });
2867
+ const sendCode = useCallback(() => {
2868
+ handleSendCode({
2869
+ phoneNumber,
2870
+ captchaDialog,
2871
+ setTimeNextReq,
2872
+ setIsTimerStarted,
2873
+ setAttemps,
2874
+ });
2875
+ }, []);
2876
+ const captchaDialog = useCaptchaDialog({ phoneNumber, sendCode }, onClose);
2877
+ useEffect(() => {
2878
+ sendCode();
2879
+ }, []);
2880
+ 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$1(timeNextReq, setTimeNextReq, sendCode), jsx(RichText, { itemSize: "list-s", __html: __html }), renderTextButton(textButton, isSubmitButtonDisabled, handleSubmit), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
2722
2881
  });
2882
+ const renderTextButton = (textButton, isDisabled, handleSubmit) => textButton ? (jsx(SubmitButton, { isDisabled: isDisabled, onClick: handleSubmit, text: textButton })) : null;
2883
+ const renderText$1 = (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" }));
2723
2884
 
2724
2885
  const useVerifyPhoneDialog = (props) => {
2725
2886
  const { open, close } = useDialogManager();
2726
2887
  return {
2727
- open: (options = {}) => open(jsx(VerifyPhoneDialog, { ...props }), options),
2888
+ open: (options = {}) => open(jsx(VerifyPhoneDialog, { onClose: close, ...props }), options),
2728
2889
  close,
2729
2890
  };
2730
2891
  };
@@ -2751,7 +2912,7 @@
2751
2912
  programId,
2752
2913
  });
2753
2914
  await RETAIL_API.UpdateUserTask(getUpdateUserTaskData(participantId, taskId, profileId, formData));
2754
- setResponseStatus('OK');
2915
+ globalThis.location.href = '/credit-lead';
2755
2916
  }
2756
2917
  catch {
2757
2918
  setResponseStatus('Fail');
@@ -2759,7 +2920,7 @@
2759
2920
  };
2760
2921
  // eslint-disable-next-line react-hooks/rules-of-hooks
2761
2922
  const verifyPhoneDialog = useVerifyPhoneDialog({
2762
- onClose: handleSuccessVerify,
2923
+ close: handleSuccessVerify,
2763
2924
  ...verifyPhoneContent(formData?.phone),
2764
2925
  });
2765
2926
  verifyPhoneDialog.open();
@@ -2777,14 +2938,13 @@
2777
2938
  const verifyPhoneContent = (phone) => ({
2778
2939
  title: 'Подтвердите номер телефона',
2779
2940
  description: `Мы отправили код на ${phone}`,
2780
- phone: formatPhone(phone),
2941
+ phoneNumber: formatPhone(phone),
2781
2942
  textButton: 'Оформить',
2782
2943
  __html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>
2783
2944
  <ul><li>соглашение о порядке использования простой электронной подписи,
2784
2945
  </li><li>согласие на обработку персональных данных,
2785
2946
  </li><li>предоставление и подписание прочих согласий Банка,
2786
2947
  </li><li>согласие на запрос в ПФР</li></ul>`,
2787
- href: '/credit-lead',
2788
2948
  });
2789
2949
 
2790
2950
  const useInitApplicationLead = () => {
@@ -4533,7 +4693,7 @@
4533
4693
  return null;
4534
4694
  };
4535
4695
 
4536
- const ICON_SIZE$1 = { width: '24', height: '24' };
4696
+ const ICON_SIZE = { width: '24', height: '24' };
4537
4697
  const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
4538
4698
  const pages = useMemo(() => Array.from({ length: totalPages }).fill({
4539
4699
  currentPage,
@@ -4552,7 +4712,7 @@
4552
4712
  }, [currentPage, totalPages]);
4553
4713
  const handleFirstPage = useCallback(() => onPageChange(1), []);
4554
4714
  const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
4555
- 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 }) })] }));
4715
+ 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 }) })] }));
4556
4716
  };
4557
4717
  const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
4558
4718
 
@@ -4873,36 +5033,6 @@
4873
5033
 
4874
5034
  const LEFT_COLUMN_STYLE = 'w-full lg:w-52';
4875
5035
 
4876
- const ICON_SIZE = { width: '118', height: '24' };
4877
-
4878
- const logoTitleSizeStyle = '';
4879
-
4880
- const ICON_VERSION_MAP = {
4881
- 'bg-white': 'color',
4882
- transparent: 'white',
4883
- };
4884
- const SVG_COLOR = {
4885
- 'bg-white': 'text-primary-main',
4886
- transparent: 'text-white',
4887
- };
4888
- const renderImage = (bgColor, image, size) => {
4889
- const img = image?.src
4890
- ? image
4891
- : {
4892
- icon: image?.icon || 'LogoIcon',
4893
- iconVersion: ICON_VERSION_MAP[bgColor],
4894
- };
4895
- return (jsx(Img, { image: img, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height }));
4896
- };
4897
-
4898
- const TEXT_COLOR = {
4899
- 'bg-white': 'text-primary-text',
4900
- transparent: 'text-white',
4901
- };
4902
- 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
4903
- ? children ?? (jsx("div", { className: "ml-s", children: jsx(Text, { font: "font-medium", color: TEXT_COLOR[bgColor], size: logoTitleSizeStyle, children: logo?.title ?? 'Россельхозбанк' }) }))
4904
- : null] })));
4905
-
4906
5036
  function useDebouncedEffect(effect, deps, delay = 300) {
4907
5037
  useEffect(() => {
4908
5038
  const timerId = globalThis.setTimeout(effect, delay);
@@ -7281,7 +7411,7 @@
7281
7411
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
7282
7412
  });
7283
7413
 
7284
- const packageVersion = "0.14.586";
7414
+ const packageVersion = "0.14.588";
7285
7415
 
7286
7416
  exports.Blocks = Blocks;
7287
7417
  exports.ContentPage = ContentPage;