@redneckz/wildless-cms-uni-blocks 0.14.646 → 0.14.648

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 (290) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +106 -54
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  5. package/bundle/components/ApplicationForm/renderInputs.d.ts +5 -1
  6. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  7. package/bundle/model/DefaultControlType.d.ts +1 -0
  8. package/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  9. package/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  10. package/bundle/ui-kit/DatePicker/renderDatePickerForm.d.ts +10 -0
  11. package/bundle/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  12. package/bundle/ui-kit/FormField/getField.d.ts +1 -1
  13. package/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  14. package/bundle/ui-kit/FormField/validators.d.ts +1 -1
  15. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  16. package/dist/components/ApplicationForm/renderInputs.d.ts +5 -1
  17. package/dist/components/ApplicationForm/renderInputs.js +2 -2
  18. package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  19. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  20. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  21. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  22. package/dist/components/CreditForm/creditFormStepsData.js +37 -12
  23. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  24. package/dist/model/DefaultControlType.d.ts +1 -0
  25. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
  26. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  27. package/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  28. package/dist/ui-kit/DatePicker/DatePicker.js +5 -8
  29. package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  30. package/dist/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  31. package/dist/ui-kit/DatePicker/DatePickerInput.js +2 -2
  32. package/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
  33. package/dist/ui-kit/DatePicker/renderDatePickerForm.d.ts +10 -0
  34. package/dist/ui-kit/DatePicker/renderDatePickerForm.js +11 -0
  35. package/dist/ui-kit/DatePicker/renderDatePickerForm.js.map +1 -0
  36. package/dist/ui-kit/FormField/Fields/AddressField.js +2 -1
  37. package/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  38. package/dist/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  39. package/dist/ui-kit/FormField/Fields/BirthdayField.js +16 -1
  40. package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  41. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js +2 -1
  42. package/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  43. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js +2 -1
  44. package/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  45. package/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -1
  46. package/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  47. package/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -1
  48. package/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  49. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -1
  50. package/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  51. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js +12 -3
  52. package/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  53. package/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  54. package/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  55. package/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  56. package/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  57. package/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  58. package/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  59. package/dist/ui-kit/FormField/getField.d.ts +1 -1
  60. package/dist/ui-kit/FormField/getField.js +2 -4
  61. package/dist/ui-kit/FormField/getField.js.map +1 -1
  62. package/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  63. package/dist/ui-kit/FormField/isEsiaAuthorize.js +5 -0
  64. package/dist/ui-kit/FormField/isEsiaAuthorize.js.map +1 -0
  65. package/dist/ui-kit/FormField/validators.d.ts +1 -1
  66. package/dist/ui-kit/FormField/validators.js +1 -1
  67. package/dist/ui-kit/FormField/validators.js.map +1 -1
  68. package/lib/common.css +1 -1
  69. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  70. package/lib/components/ApplicationForm/renderInputs.d.ts +5 -1
  71. package/lib/components/ApplicationForm/renderInputs.js +2 -2
  72. package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  73. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  74. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  75. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  76. package/lib/components/CreditForm/creditFormStepsData.js +37 -12
  77. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  78. package/lib/model/DefaultControlType.d.ts +1 -0
  79. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
  80. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  81. package/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  82. package/lib/ui-kit/DatePicker/DatePicker.js +4 -7
  83. package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  84. package/lib/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  85. package/lib/ui-kit/DatePicker/DatePickerInput.js +2 -2
  86. package/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
  87. package/lib/ui-kit/DatePicker/renderDatePickerForm.d.ts +9 -0
  88. package/lib/ui-kit/DatePicker/renderDatePickerForm.js +8 -0
  89. package/lib/ui-kit/DatePicker/renderDatePickerForm.js.map +1 -0
  90. package/lib/ui-kit/FormField/Fields/AddressField.js +2 -1
  91. package/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  92. package/lib/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  93. package/lib/ui-kit/FormField/Fields/BirthdayField.js +16 -1
  94. package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  95. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js +2 -1
  96. package/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  97. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js +2 -1
  98. package/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  99. package/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -1
  100. package/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  101. package/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -1
  102. package/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  103. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -1
  104. package/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  105. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js +12 -3
  106. package/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  107. package/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  108. package/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  109. package/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  110. package/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  111. package/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  112. package/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  113. package/lib/ui-kit/FormField/getField.d.ts +1 -1
  114. package/lib/ui-kit/FormField/getField.js +2 -4
  115. package/lib/ui-kit/FormField/getField.js.map +1 -1
  116. package/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  117. package/lib/ui-kit/FormField/isEsiaAuthorize.js +2 -0
  118. package/lib/ui-kit/FormField/isEsiaAuthorize.js.map +1 -0
  119. package/lib/ui-kit/FormField/validators.d.ts +1 -1
  120. package/lib/ui-kit/FormField/validators.js +1 -1
  121. package/lib/ui-kit/FormField/validators.js.map +1 -1
  122. package/mobile/bundle/bundle.umd.js +106 -54
  123. package/mobile/bundle/bundle.umd.min.js +1 -1
  124. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  125. package/mobile/bundle/components/ApplicationForm/renderInputs.d.ts +5 -1
  126. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  127. package/mobile/bundle/model/DefaultControlType.d.ts +1 -0
  128. package/mobile/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  129. package/mobile/bundle/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  130. package/mobile/bundle/ui-kit/DatePicker/renderDatePickerForm.d.ts +10 -0
  131. package/mobile/bundle/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  132. package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
  133. package/mobile/bundle/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  134. package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -1
  135. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  136. package/mobile/dist/components/ApplicationForm/renderInputs.d.ts +5 -1
  137. package/mobile/dist/components/ApplicationForm/renderInputs.js +2 -2
  138. package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  139. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  140. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  141. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  142. package/mobile/dist/components/CreditForm/creditFormStepsData.js +37 -12
  143. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  144. package/mobile/dist/model/DefaultControlType.d.ts +1 -0
  145. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
  146. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  147. package/mobile/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  148. package/mobile/dist/ui-kit/DatePicker/DatePicker.js +5 -8
  149. package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  150. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  151. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js +2 -2
  152. package/mobile/dist/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
  153. package/mobile/dist/ui-kit/DatePicker/renderDatePickerForm.d.ts +10 -0
  154. package/mobile/dist/ui-kit/DatePicker/renderDatePickerForm.js +11 -0
  155. package/mobile/dist/ui-kit/DatePicker/renderDatePickerForm.js.map +1 -0
  156. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js +2 -1
  157. package/mobile/dist/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  158. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  159. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +16 -1
  160. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  161. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js +2 -1
  162. package/mobile/dist/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  163. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js +2 -1
  164. package/mobile/dist/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  165. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js +2 -1
  166. package/mobile/dist/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  167. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js +2 -1
  168. package/mobile/dist/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  169. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -1
  170. package/mobile/dist/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  171. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js +12 -3
  172. package/mobile/dist/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  173. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  174. package/mobile/dist/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  175. package/mobile/dist/ui-kit/FormField/Fields/NameField.js +2 -1
  176. package/mobile/dist/ui-kit/FormField/Fields/NameField.js.map +1 -1
  177. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js +2 -1
  178. package/mobile/dist/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  179. package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
  180. package/mobile/dist/ui-kit/FormField/getField.js +2 -4
  181. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  182. package/mobile/dist/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  183. package/mobile/dist/ui-kit/FormField/isEsiaAuthorize.js +5 -0
  184. package/mobile/dist/ui-kit/FormField/isEsiaAuthorize.js.map +1 -0
  185. package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -1
  186. package/mobile/dist/ui-kit/FormField/validators.js +1 -1
  187. package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
  188. package/mobile/lib/common.css +1 -1
  189. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +5 -1
  190. package/mobile/lib/components/ApplicationForm/renderInputs.d.ts +5 -1
  191. package/mobile/lib/components/ApplicationForm/renderInputs.js +2 -2
  192. package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  193. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  194. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  195. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +5 -1
  196. package/mobile/lib/components/CreditForm/creditFormStepsData.js +37 -12
  197. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  198. package/mobile/lib/model/DefaultControlType.d.ts +1 -0
  199. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
  200. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  201. package/mobile/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
  202. package/mobile/lib/ui-kit/DatePicker/DatePicker.js +4 -7
  203. package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  204. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.d.ts +1 -0
  205. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js +2 -2
  206. package/mobile/lib/ui-kit/DatePicker/DatePickerInput.js.map +1 -1
  207. package/mobile/lib/ui-kit/DatePicker/renderDatePickerForm.d.ts +10 -0
  208. package/mobile/lib/ui-kit/DatePicker/renderDatePickerForm.js +8 -0
  209. package/mobile/lib/ui-kit/DatePicker/renderDatePickerForm.js.map +1 -0
  210. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js +2 -1
  211. package/mobile/lib/ui-kit/FormField/Fields/AddressField.js.map +1 -1
  212. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
  213. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +16 -1
  214. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  215. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js +2 -1
  216. package/mobile/lib/ui-kit/FormField/Fields/DulIssueDateField.js.map +1 -1
  217. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js +2 -1
  218. package/mobile/lib/ui-kit/FormField/Fields/DulIssuedByField.js.map +1 -1
  219. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js +2 -1
  220. package/mobile/lib/ui-kit/FormField/Fields/DulNumberField.js.map +1 -1
  221. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js +2 -1
  222. package/mobile/lib/ui-kit/FormField/Fields/DulSerieField.js.map +1 -1
  223. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js +2 -1
  224. package/mobile/lib/ui-kit/FormField/Fields/DulSubdivisionCodeField.js.map +1 -1
  225. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js +12 -3
  226. package/mobile/lib/ui-kit/FormField/Fields/FamilyMembersField.js.map +1 -1
  227. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js +2 -1
  228. package/mobile/lib/ui-kit/FormField/Fields/MiddleNameField.js.map +1 -1
  229. package/mobile/lib/ui-kit/FormField/Fields/NameField.js +2 -1
  230. package/mobile/lib/ui-kit/FormField/Fields/NameField.js.map +1 -1
  231. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js +2 -1
  232. package/mobile/lib/ui-kit/FormField/Fields/SurnameField.js.map +1 -1
  233. package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
  234. package/mobile/lib/ui-kit/FormField/getField.js +2 -4
  235. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  236. package/mobile/lib/ui-kit/FormField/isEsiaAuthorize.d.ts +1 -0
  237. package/mobile/lib/ui-kit/FormField/isEsiaAuthorize.js +2 -0
  238. package/mobile/lib/ui-kit/FormField/isEsiaAuthorize.js.map +1 -0
  239. package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -1
  240. package/mobile/lib/ui-kit/FormField/validators.js +1 -1
  241. package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
  242. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +8 -1
  243. package/mobile/src/components/ApplicationForm/renderInputs.tsx +12 -3
  244. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  245. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +7 -1
  246. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +37 -12
  247. package/mobile/src/model/DefaultControlType.ts +1 -0
  248. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +10 -3
  249. package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +5 -33
  250. package/mobile/src/ui-kit/DatePicker/DatePickerInput.tsx +4 -2
  251. package/mobile/src/ui-kit/DatePicker/renderDatePickerForm.tsx +35 -0
  252. package/mobile/src/ui-kit/FormField/Fields/AddressField.tsx +2 -0
  253. package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +32 -6
  254. package/mobile/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -0
  255. package/mobile/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -0
  256. package/mobile/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -0
  257. package/mobile/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -0
  258. package/mobile/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -0
  259. package/mobile/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +23 -12
  260. package/mobile/src/ui-kit/FormField/Fields/MiddleNameField.tsx +3 -0
  261. package/mobile/src/ui-kit/FormField/Fields/NameField.tsx +3 -0
  262. package/mobile/src/ui-kit/FormField/Fields/SurnameField.tsx +3 -0
  263. package/mobile/src/ui-kit/FormField/getField.tsx +4 -4
  264. package/mobile/src/ui-kit/FormField/isEsiaAuthorize.ts +2 -0
  265. package/mobile/src/ui-kit/FormField/validators.ts +2 -2
  266. package/package.json +1 -1
  267. package/src/components/ApplicationForm/ApplicationFormContent.ts +8 -1
  268. package/src/components/ApplicationForm/renderInputs.tsx +12 -3
  269. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  270. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +7 -1
  271. package/src/components/CreditForm/creditFormStepsData.tsx +37 -12
  272. package/src/model/DefaultControlType.ts +1 -0
  273. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +10 -3
  274. package/src/ui-kit/DatePicker/DatePicker.tsx +5 -33
  275. package/src/ui-kit/DatePicker/DatePickerInput.tsx +4 -2
  276. package/src/ui-kit/DatePicker/renderDatePickerForm.tsx +35 -0
  277. package/src/ui-kit/FormField/Fields/AddressField.tsx +2 -0
  278. package/src/ui-kit/FormField/Fields/BirthdayField.tsx +32 -6
  279. package/src/ui-kit/FormField/Fields/DulIssueDateField.tsx +2 -0
  280. package/src/ui-kit/FormField/Fields/DulIssuedByField.tsx +2 -0
  281. package/src/ui-kit/FormField/Fields/DulNumberField.tsx +2 -0
  282. package/src/ui-kit/FormField/Fields/DulSerieField.tsx +2 -0
  283. package/src/ui-kit/FormField/Fields/DulSubdivisionCodeField.tsx +2 -0
  284. package/src/ui-kit/FormField/Fields/FamilyMembersField.tsx +23 -12
  285. package/src/ui-kit/FormField/Fields/MiddleNameField.tsx +3 -0
  286. package/src/ui-kit/FormField/Fields/NameField.tsx +3 -0
  287. package/src/ui-kit/FormField/Fields/SurnameField.tsx +3 -0
  288. package/src/ui-kit/FormField/getField.tsx +4 -4
  289. package/src/ui-kit/FormField/isEsiaAuthorize.ts +2 -0
  290. package/src/ui-kit/FormField/validators.ts +2 -2
@@ -1,16 +1,27 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
2
3
  import { InputControl } from '../../Input/InputControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
- import { validatorObj } from '../getObjectValidator';
5
- import { getValidation } from '../getValidation';
6
5
 
7
- export const FamilyMembersField = JSX<CustomFieldProps>(({ field, input }) => (
8
- <InputControl
9
- label="Количество членов семьи"
10
- placeholder="Введите значение"
11
- type="number"
12
- inputLength={2}
13
- {...getValidation(field('familyMembers'), validatorObj.familyMembers, input?.required)}
14
- {...input}
15
- />
16
- ));
6
+ export const FamilyMembersField = JSX<CustomFieldProps>(({ field }) => {
7
+ const { value, onChange } = field('familyMembers');
8
+ const adultsCount = field('familyStatus')?.value?.key === 'В браке' ? 2 : 1;
9
+ const childrenCount = Number(field('children')?.value);
10
+ const dependentsCount = Number(field('dependents')?.value);
11
+ const totalCount = adultsCount + childrenCount + dependentsCount;
12
+
13
+ useEffect(() => {
14
+ field?.('familyMembers')?.onChange?.(totalCount);
15
+ }, [field('familyStatus')?.value?.key, childrenCount, dependentsCount]);
16
+
17
+ return (
18
+ <InputControl
19
+ label="Количество членов семьи"
20
+ placeholder="Введите значение"
21
+ type="number"
22
+ disabled={true}
23
+ value={value}
24
+ onChange={(_) => onChange?.(_)}
25
+ />
26
+ );
27
+ });
@@ -3,10 +3,13 @@ import { InputControl } from '../../Input/InputControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const MiddleNameField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <InputControl
9
10
  label="Отчество (Обязательно, при наличии)"
11
+ inputLength={60}
12
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
10
13
  {...getValidation(field('middleName'), validatorObj.middleName)}
11
14
  {...input}
12
15
  />
@@ -3,10 +3,13 @@ import { InputControl } from '../../Input/InputControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const NameField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <InputControl
9
10
  label="Имя"
11
+ inputLength={60}
12
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
10
13
  {...getValidation(field('name'), validatorObj.name, input?.required)}
11
14
  {...input}
12
15
  />
@@ -3,10 +3,13 @@ import { InputControl } from '../../Input/InputControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const SurnameField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <InputControl
9
10
  label="Фамилия"
11
+ inputLength={60}
12
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
10
13
  {...getValidation(field('surname'), validatorObj.surname, input?.required)}
11
14
  {...input}
12
15
  />
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable max-lines */
2
+ /* eslint-disable max-lines-per-function */
2
3
  import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
3
4
  import { getRegionUrl } from '../../components/ApplicationForm/getRegionUrl';
4
5
  import { type FormFieldRegisterer } from '../../hooks/useForm';
@@ -93,8 +94,8 @@ const PRODUCT_REF = {
93
94
  };
94
95
 
95
96
  export const getField =
96
- // eslint-disable-next-line max-lines-per-function
97
- (field: FormFieldRegisterer<any>, typeForm: string) => (input: FieldDef, i: number) => {
97
+ (field: FormFieldRegisterer<any>, typeForm: string, isRetailForm = false) =>
98
+ (input: FieldDef, i: number) => {
98
99
  const isPremium = typeForm === 'ULTRASERVICE' || typeForm === 'PREMIUMSERVICE';
99
100
 
100
101
  const InputsMap = {
@@ -118,7 +119,7 @@ export const getField =
118
119
  comment: <CommentField field={field} input={input} />,
119
120
  addressBranch: <AddressBranchField field={field} input={input} isPremium={isPremium} />,
120
121
  sex: <SexField field={field} input={input} />,
121
- birthday: <BirthdayField field={field} input={input} />,
122
+ birthday: <BirthdayField field={field} input={input} isRetailForm={isRetailForm} />,
122
123
  birthPlace: <BirthPlaceField field={field} input={input} />,
123
124
  desiredMeetingDate: <DesiredMeetingDateField field={field} input={input} />,
124
125
  product: <ProductField field={field} source={PRODUCT_REF} />,
@@ -147,7 +148,6 @@ export const getField =
147
148
  applicationDate: (
148
149
  <InputControl label="Дата и время обращения в Банк" {...field('applicationDate')} />
149
150
  ),
150
-
151
151
  region: isPremium ? (
152
152
  <RegionPremiumField field={field} />
153
153
  ) : (
@@ -0,0 +1,2 @@
1
+ export const isEsiaAuthorize = () =>
2
+ JSON.parse(globalThis.localStorage?.getItem('leadForm') ?? '{}')?.esiaId;
@@ -18,8 +18,8 @@ export const jobNumberValidator = (errorMsg?: string) =>
18
18
  export const nameValidator = (errorMsg?: string) =>
19
19
  validator((_) => typeof _ === 'string' && _.length > 1)(errorMsg ?? ERROR_MESSAGE);
20
20
 
21
- export const lengthStringValidator = (maxLength: number, errorMsg?: string) =>
22
- validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= maxLength)(
21
+ export const lengthStringValidator = (inputLength: number, errorMsg?: string) =>
22
+ validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= inputLength)(
23
23
  errorMsg ?? ERROR_MESSAGE,
24
24
  );
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.646",
3
+ "version": "0.14.648",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -27,9 +27,15 @@ export type ConditionFieldProps = {
27
27
  };
28
28
  };
29
29
 
30
+ export type FilledByEsiaProps = {
31
+ /** @title Заполняется через госуслуги */
32
+ filledByEsia?: boolean;
33
+ };
34
+
30
35
  export type FieldDefaultDef = Required &
31
36
  LabelProps &
32
- ConditionFieldProps & {
37
+ ConditionFieldProps &
38
+ FilledByEsiaProps & {
33
39
  name?: NameFieldDef;
34
40
  dadata?: boolean;
35
41
  };
@@ -73,6 +79,7 @@ export type FieldInfoDef = FieldDefaultDef &
73
79
  * @title Поле
74
80
  * @default { "fieldType": "common" }
75
81
  */
82
+
76
83
  export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
77
84
 
78
85
  /** @hidden */
@@ -6,16 +6,25 @@ import type {
6
6
  import { CONSENTS } from '../ApplicationLeadForm/consents';
7
7
  import { GroupedConsents } from '../ApplicationLeadForm/GroupedConsents';
8
8
 
9
- export const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsProps) => {
9
+ type RenderInputsProps = GroupedConsentsProps & {
10
+ isRetailForm?: boolean;
11
+ };
12
+
13
+ export const renderInputs = ({
14
+ field,
15
+ typeForm = '',
16
+ inputs,
17
+ isRetailForm = false,
18
+ }: RenderInputsProps) => {
10
19
  const { consentInputs, restInputs } = splitInputs(inputs || []);
11
20
 
12
21
  return consentInputs.length > 2 ? (
13
22
  <div>
14
- {restInputs.map(getField(field, typeForm))}
23
+ {restInputs.map(getField(field, typeForm, isRetailForm))}
15
24
  <GroupedConsents inputs={consentInputs} field={field} />
16
25
  </div>
17
26
  ) : (
18
- (inputs || [])?.map(getField(field, typeForm))
27
+ (inputs || [])?.map(getField(field, typeForm, isRetailForm))
19
28
  );
20
29
  };
21
30
 
@@ -69,7 +69,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
69
69
  className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}
70
70
  >
71
71
  {renderTitle(_.title)}
72
- {renderInputs({ field, inputs: _?.inputs })}
72
+ {renderInputs({ field, inputs: _?.inputs, isRetailForm: true })}
73
73
  </div>
74
74
  ))}
75
75
  {renderSubmitButton(button)}
@@ -24,10 +24,16 @@ export type ConditionFieldProps = {
24
24
  };
25
25
  };
26
26
 
27
+ export type FilledByEsiaProps = {
28
+ /** @title Заполняется через госуслуги */
29
+ filledByEsia?: boolean;
30
+ };
31
+
27
32
  export type FieldDefaultDef = Required &
28
33
  TextProps &
29
34
  LabelProps &
30
- ConditionFieldProps & {
35
+ ConditionFieldProps &
36
+ FilledByEsiaProps & {
31
37
  name?: NameFieldDef;
32
38
  };
33
39
 
@@ -12,11 +12,17 @@ export const stepsSectionsMap: SectionsProps[][] = [
12
12
  title: 'Персональные данные',
13
13
  columns: 2,
14
14
  inputs: [
15
- { fieldType: 'common', name: 'surname', required: true, dadata: true },
16
- { fieldType: 'common', name: 'name', required: true, dadata: true },
17
- { fieldType: 'common', name: 'middleName', dadata: true },
15
+ {
16
+ fieldType: 'common',
17
+ name: 'surname',
18
+ required: true,
19
+ dadata: true,
20
+ filledByEsia: true,
21
+ },
22
+ { fieldType: 'common', name: 'name', required: true, dadata: true, filledByEsia: true },
23
+ { fieldType: 'common', name: 'middleName', dadata: true, filledByEsia: true },
18
24
  { fieldType: 'common', name: 'sex', required: true },
19
- { fieldType: 'common', name: 'birthday', required: true },
25
+ { fieldType: 'common', name: 'birthday', required: true, filledByEsia: true },
20
26
  { fieldType: 'common', name: 'birthPlace', required: true },
21
27
  { fieldType: 'common', name: 'phone', required: true },
22
28
  { fieldType: 'common', name: 'email', required: true, dadata: true },
@@ -26,18 +32,31 @@ export const stepsSectionsMap: SectionsProps[][] = [
26
32
  title: 'Паспортные данные',
27
33
  columns: 2,
28
34
  inputs: [
29
- { fieldType: 'common', name: 'dulSerie', required: true },
30
- { fieldType: 'common', name: 'dulNumber', required: true },
31
- { fieldType: 'common', name: 'dulIssueDateField', required: true },
32
- { fieldType: 'common', name: 'dulSubdivisionCode', required: true, dadata: true },
35
+ { fieldType: 'common', name: 'dulSerie', required: true, filledByEsia: true },
36
+ { fieldType: 'common', name: 'dulNumber', required: true, filledByEsia: true },
37
+ { fieldType: 'common', name: 'dulIssueDateField', required: true, filledByEsia: true },
38
+ {
39
+ fieldType: 'common',
40
+ name: 'dulSubdivisionCode',
41
+ required: true,
42
+ dadata: true,
43
+ filledByEsia: true,
44
+ },
33
45
  ],
34
46
  },
35
47
  {
36
48
  inputs: [
37
- { fieldType: 'common', name: 'dulIssuedBy', required: true, dadata: true },
49
+ {
50
+ fieldType: 'common',
51
+ name: 'dulIssuedBy',
52
+ required: true,
53
+ dadata: true,
54
+ filledByEsia: true,
55
+ },
38
56
  {
39
57
  fieldType: 'common',
40
58
  name: 'education',
59
+ required: true,
41
60
  },
42
61
  ],
43
62
  },
@@ -48,7 +67,13 @@ export const stepsSectionsMap: SectionsProps[][] = [
48
67
  },
49
68
  {
50
69
  inputs: [
51
- { fieldType: 'common', name: 'addressRegistration', required: true, dadata: true },
70
+ {
71
+ fieldType: 'common',
72
+ name: 'addressRegistration',
73
+ required: true,
74
+ dadata: true,
75
+ filledByEsia: true,
76
+ },
52
77
  { fieldType: 'common', name: 'addressMatch' },
53
78
  ],
54
79
  },
@@ -62,7 +87,7 @@ export const stepsSectionsMap: SectionsProps[][] = [
62
87
  },
63
88
  {
64
89
  columns: 2,
65
- inputs: [{ fieldType: 'common', name: 'housing' }],
90
+ inputs: [{ fieldType: 'common', name: 'housing', required: true }],
66
91
  },
67
92
  {
68
93
  inputs: [{ fieldType: 'common', name: 'addressFact', required: true, dadata: true }],
@@ -152,7 +177,7 @@ export const stepsSectionsMap: SectionsProps[][] = [
152
177
  {
153
178
  columns: 2,
154
179
  inputs: [
155
- { fieldType: 'common', name: 'familyMembers', required: true },
180
+ { fieldType: 'common', name: 'familyMembers' },
156
181
  { fieldType: 'common', name: 'children', required: true },
157
182
  ],
158
183
  },
@@ -4,4 +4,5 @@ export interface DefaultControlType {
4
4
  error?: string;
5
5
  errors?: string[];
6
6
  placeholder?: string;
7
+ disabled?: boolean;
7
8
  }
@@ -46,10 +46,17 @@ export const ConsentBkiDialog = JSX<ConsentBkiDialogProps>(function ({
46
46
  const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
47
47
 
48
48
  return (
49
- <Dialog className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg" onClose={onClose}>
50
- <div className="flex flex-col gap-lg items-center">
49
+ <Dialog
50
+ className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl"
51
+ onClose={onClose}
52
+ >
53
+ <div className="flex flex-col gap-xl items-center">
51
54
  <div role="button" onClick={() => openDocument(open, CONSENT_BKI_ID, isMobile)}>
52
- <Heading className="text-center text-balance" title={consentText.title} />
55
+ <Heading
56
+ className="text-center text-balance"
57
+ headingType="h2"
58
+ title={consentText.title}
59
+ />
53
60
  </div>
54
61
  <Paragraph align="text-center">{consentText.description}</Paragraph>
55
62
  <RadioButtonGroup
@@ -4,7 +4,6 @@ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
4
4
  import { useElementSpace } from '../../hooks/useElementSpace';
5
5
  import { type LabelProps } from '../../model/HeadlineType';
6
6
  import { type IconVersion } from '../../model/IconVersion';
7
- import { formatDate } from '../../utils/formatDate';
8
7
  import { style } from '../../utils/style';
9
8
  import { type ControlProps } from '../ControlProps';
10
9
  import { Icon } from '../Icon/Icon';
@@ -12,8 +11,8 @@ import { type IconName } from '../Icon/IconProps';
12
11
  import { renderLabel } from '../Input/renderLabel';
13
12
  import { Select } from '../Select/Select';
14
13
  import { Calendar } from './Calendar';
15
- import { DatePickerInput } from './DatePickerInput';
16
14
  import { months } from './months';
15
+ import { renderDatePickerForm } from './renderDatePickerForm';
17
16
  import { useDatePickerManager } from './useDatePickerManager';
18
17
 
19
18
  const ICON_PROPS: { name: IconName; iconVersion: IconVersion; width: string; height: string } = {
@@ -29,20 +28,17 @@ const SELECT_PROPS: { className: string; iconVersion: IconVersion; isBorder: boo
29
28
  isBorder: false,
30
29
  };
31
30
 
32
- const formStyle =
33
- 'flex justify-between items-center h-14 py-s border rounded-md cursor-pointer ' +
34
- 'hover:border-black active:border-black focus:border-black';
35
-
36
31
  interface DatePickerProps extends ControlProps<Date>, LabelProps {
37
32
  className?: string;
38
33
  minDate?: Date;
39
34
  maxDate?: Date;
40
35
  valid?: boolean;
36
+ disabled?: boolean;
41
37
  }
42
38
 
43
39
  export const DatePicker = JSX<DatePickerProps>(
44
40
  // eslint-disable-next-line max-lines-per-function
45
- ({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
41
+ ({ className = '', label = '', value, valid = true, minDate, maxDate, disabled, onChange }) => {
46
42
  const [showCalendar, { setValue }] = useBool(false);
47
43
  const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
48
44
  const [selectedYear, setSelectedYear] = useState(
@@ -80,10 +76,11 @@ export const DatePicker = JSX<DatePickerProps>(
80
76
  value,
81
77
  valid,
82
78
  onChange,
79
+ disabled,
83
80
  setSelectedMonth,
84
81
  setSelectedYear,
85
82
  })}
86
- {showCalendar ? (
83
+ {showCalendar && !disabled ? (
87
84
  <div
88
85
  className={style('absolute bg-white z-20 select-none', {
89
86
  'bottom-full': spaceAbove,
@@ -125,28 +122,3 @@ export const DatePicker = JSX<DatePickerProps>(
125
122
  );
126
123
  },
127
124
  );
128
-
129
- const renderDatePickerForm = ({
130
- handleChangeVisibleCalendar,
131
- value,
132
- valid,
133
- onChange,
134
- setSelectedMonth,
135
- setSelectedYear,
136
- }: {
137
- handleChangeVisibleCalendar: () => void;
138
- value: Date | undefined;
139
- valid: boolean;
140
- setSelectedMonth: (selectedMonth: number) => void;
141
- setSelectedYear: (selectedYear: number) => void;
142
- onChange?: (value: Date) => void;
143
- }) => (
144
- <DatePickerInput
145
- onChange={onChange}
146
- onClick={handleChangeVisibleCalendar}
147
- value={value && formatDate(value)}
148
- setSelectedMonth={setSelectedMonth}
149
- setSelectedYear={setSelectedYear}
150
- className={style(formStyle, valid ? 'border-gray' : 'border-error')}
151
- ></DatePickerInput>
152
- );
@@ -21,10 +21,11 @@ interface DatePickerInputProps {
21
21
  value?: string;
22
22
  onChange?: (value: Date) => void;
23
23
  onClick?: () => void;
24
+ disabled?: boolean;
24
25
  }
25
26
 
26
27
  export const DatePickerInput = JSX<DatePickerInputProps>(
27
- ({ setSelectedMonth, setSelectedYear, className, value, onChange, onClick }) => {
28
+ ({ setSelectedMonth, setSelectedYear, className, value, disabled, onChange, onClick }) => {
28
29
  const ref = useRef<HTMLInputElement | null>(null);
29
30
  const [inputValue, setInputValue] = useState<string>(value || '');
30
31
 
@@ -66,8 +67,9 @@ export const DatePickerInput = JSX<DatePickerInputProps>(
66
67
  type="text"
67
68
  onChange={handleChange}
68
69
  onBlur={onBlur}
70
+ disabled={disabled}
69
71
  />
70
- <Icon className="mr-s" {...ICON_PROPS} />
72
+ {disabled ? null : <Icon className="mr-s" {...ICON_PROPS} />}
71
73
  </div>
72
74
  );
73
75
  },
@@ -0,0 +1,35 @@
1
+ import { formatDate } from '../../utils/formatDate';
2
+ import { style } from '../../utils/style';
3
+ import { DatePickerInput } from './DatePickerInput';
4
+
5
+ const formStyle =
6
+ 'flex justify-between items-center h-14 border rounded-md cursor-pointer ' +
7
+ 'hover:border-black active:border-black focus:border-black';
8
+
9
+ export const renderDatePickerForm = ({
10
+ handleChangeVisibleCalendar,
11
+ value,
12
+ valid,
13
+ onChange,
14
+ setSelectedMonth,
15
+ setSelectedYear,
16
+ disabled = false,
17
+ }: {
18
+ handleChangeVisibleCalendar: () => void;
19
+ value: Date | undefined;
20
+ valid: boolean;
21
+ setSelectedMonth: (selectedMonth: number) => void;
22
+ setSelectedYear: (selectedYear: number) => void;
23
+ onChange?: (value: Date) => void;
24
+ disabled?: boolean;
25
+ }) => (
26
+ <DatePickerInput
27
+ onChange={onChange}
28
+ disabled={disabled}
29
+ onClick={handleChangeVisibleCalendar}
30
+ value={value && formatDate(value)}
31
+ setSelectedMonth={setSelectedMonth}
32
+ setSelectedYear={setSelectedYear}
33
+ className={style(formStyle, valid ? 'border-gray' : 'border-error')}
34
+ ></DatePickerInput>
35
+ );
@@ -6,6 +6,7 @@ import { calculateIsRequired } from '../calculateIsRequired';
6
6
  import { type CustomFieldProps } from '../CustomFieldProps';
7
7
  import { validatorObj } from '../getObjectValidator';
8
8
  import { getValidation } from '../getValidation';
9
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
9
10
 
10
11
  export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
11
12
  const fieldName = input?.name || 'addressRegistration';
@@ -40,6 +41,7 @@ export const AddressField = JSX<CustomFieldProps>(({ field, input }) => {
40
41
 
41
42
  return (
42
43
  <InputControl
44
+ disabled={fieldName === 'addressRegistration' && isEsiaAuthorize() && input?.filledByEsia}
43
45
  label="Адрес"
44
46
  {...getValidation(
45
47
  field(fieldName),
@@ -4,9 +4,35 @@ import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
6
 
7
- export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
8
- <DatePickerControl
9
- label="Дата рождения"
10
- {...getValidation(field('birthday'), validatorObj.birthday, input?.required)}
11
- />
12
- ));
7
+ const MIN_AGE = 23;
8
+ const MAX_AGE = 75;
9
+ const AGE_ERROR_MESSAGE = 'Допустимый возраст заёмщика - от 23 до 75 лет';
10
+
11
+ interface BirthdayFieldProps extends CustomFieldProps {
12
+ isRetailForm?: boolean;
13
+ }
14
+
15
+ export const BirthdayField = JSX<BirthdayFieldProps>(({ field, input, isRetailForm = false }) => {
16
+ const { value } = field('birthday');
17
+
18
+ return (
19
+ <DatePickerControl
20
+ label="Дата рождения"
21
+ {...getValidation(field('birthday'), validatorObj.birthday, input?.required)}
22
+ error={isRetailForm && value && !birthdayValidate(value as Date) ? AGE_ERROR_MESSAGE : ''}
23
+ />
24
+ );
25
+ });
26
+
27
+ const birthdayValidate = (date?: Date) => {
28
+ const today = new Date();
29
+
30
+ const minDate = new Date(today.getFullYear() - MIN_AGE, today.getMonth(), today.getDate());
31
+ const maxDate = new Date(today.getFullYear() - MAX_AGE, today.getMonth(), today.getDate());
32
+
33
+ if (!date || date > minDate || date < maxDate) {
34
+ return false;
35
+ }
36
+
37
+ return true;
38
+ };
@@ -3,10 +3,12 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const DulIssueDateField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <DatePickerControl
9
10
  label="Дата выдачи"
10
11
  {...getValidation(field('dulIssueDateField'), validatorObj.dulIssueDateField, input?.required)}
12
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
11
13
  />
12
14
  ));
@@ -5,6 +5,7 @@ import { InputControl } from '../../Input/InputControl';
5
5
  import { type CustomFieldProps } from '../CustomFieldProps';
6
6
  import { validatorObj } from '../getObjectValidator';
7
7
  import { getValidation } from '../getValidation';
8
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
8
9
 
9
10
  export const DulIssuedByField = JSX<CustomFieldProps>(({ field, input }) => {
10
11
  const { value: dulSubdivisionCode, onChange: changeDulSubdivisionCode } =
@@ -16,6 +17,7 @@ export const DulIssuedByField = JSX<CustomFieldProps>(({ field, input }) => {
16
17
 
17
18
  return (
18
19
  <InputControl
20
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
19
21
  label="Кем выдан"
20
22
  {...input}
21
23
  {...getValidation(field('dulIssuedBy'), validatorObj.dulIssuedBy, input?.required)}
@@ -3,9 +3,11 @@ import { InputControl } from '../../Input/InputControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const DulNumberField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <InputControl
10
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
9
11
  label="Номер документа"
10
12
  type="number"
11
13
  inputLength={6}
@@ -3,9 +3,11 @@ import { InputControl } from '../../Input/InputControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
  import { validatorObj } from '../getObjectValidator';
5
5
  import { getValidation } from '../getValidation';
6
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
6
7
 
7
8
  export const DulSerieField = JSX<CustomFieldProps>(({ field, input }) => (
8
9
  <InputControl
10
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
9
11
  label="Серия документа"
10
12
  type="number"
11
13
  inputLength={4}
@@ -5,6 +5,7 @@ import { InputControl } from '../../Input/InputControl';
5
5
  import { type CustomFieldProps } from '../CustomFieldProps';
6
6
  import { validatorObj } from '../getObjectValidator';
7
7
  import { getValidation } from '../getValidation';
8
+ import { isEsiaAuthorize } from '../isEsiaAuthorize';
8
9
 
9
10
  export const DulSubdivisionCodeField = JSX<CustomFieldProps>(({ field, input }) => {
10
11
  const onDaDataChange = useCallback((item: DaDataSuggestion) => {
@@ -13,6 +14,7 @@ export const DulSubdivisionCodeField = JSX<CustomFieldProps>(({ field, input })
13
14
 
14
15
  return (
15
16
  <InputControl
17
+ disabled={isEsiaAuthorize() && input?.filledByEsia}
16
18
  label="Код подразделения"
17
19
  type="number"
18
20
  inputLength={6}