@redneckz/wildless-cms-uni-blocks 0.14.602 → 0.14.604

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 (394) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +369 -58
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  5. package/bundle/components/ApplicationForm/renderInputs.d.ts +3 -0
  6. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  7. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  8. package/bundle/components/CreditForm/CreditForm.d.ts +13 -0
  9. package/bundle/components/CreditForm/CreditFormContent.d.ts +28 -0
  10. package/bundle/components/CreditForm/CreditFormProgress.d.ts +6 -0
  11. package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  12. package/bundle/components/CreditForm/creditFormStepsData.d.ts +140 -0
  13. package/bundle/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  14. package/bundle/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  15. package/bundle/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  16. package/bundle/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  17. package/bundle/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  18. package/bundle/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  19. package/bundle/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  20. package/bundle/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  21. package/bundle/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  22. package/bundle/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  23. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  24. package/bundle/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  25. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  26. package/dist/components/ApplicationForm/renderInputs.d.ts +3 -0
  27. package/dist/components/ApplicationForm/renderInputs.js +16 -0
  28. package/dist/components/ApplicationForm/renderInputs.js.map +1 -0
  29. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -12
  30. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  31. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  32. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  33. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  34. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  35. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  36. package/dist/components/Blocks.js +2 -0
  37. package/dist/components/Blocks.js.map +1 -1
  38. package/dist/components/Blocks.mobile.js +2 -0
  39. package/dist/components/Blocks.mobile.js.map +1 -1
  40. package/dist/components/CreditForm/CreditForm.d.ts +13 -0
  41. package/dist/components/CreditForm/CreditForm.js +40 -0
  42. package/dist/components/CreditForm/CreditForm.js.map +1 -0
  43. package/dist/components/CreditForm/CreditFormContent.d.ts +28 -0
  44. package/dist/components/CreditForm/CreditFormContent.js +2 -0
  45. package/dist/components/CreditForm/CreditFormContent.js.map +1 -0
  46. package/dist/components/CreditForm/CreditFormProgress.d.ts +6 -0
  47. package/dist/components/CreditForm/CreditFormProgress.js +11 -0
  48. package/dist/components/CreditForm/CreditFormProgress.js.map +1 -0
  49. package/dist/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  50. package/dist/components/CreditForm/StepsNavigationButtons.js +20 -0
  51. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -0
  52. package/dist/components/CreditForm/creditFormStepsData.d.ts +140 -0
  53. package/dist/components/CreditForm/creditFormStepsData.js +217 -0
  54. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -0
  55. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  56. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +9 -0
  57. package/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -0
  58. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  59. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +9 -0
  60. package/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -0
  61. package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  62. package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +14 -0
  63. package/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -0
  64. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  65. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +9 -0
  66. package/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -0
  67. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  68. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +11 -0
  69. package/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -0
  70. package/dist/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  71. package/dist/ui-kit/FormField/Fields/MandatoryIncome.js +9 -0
  72. package/dist/ui-kit/FormField/Fields/MandatoryIncome.js.map +1 -0
  73. package/dist/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  74. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js +9 -0
  75. package/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -0
  76. package/dist/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  77. package/dist/ui-kit/FormField/Fields/OtherPayments.js +9 -0
  78. package/dist/ui-kit/FormField/Fields/OtherPayments.js.map +1 -0
  79. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  80. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +9 -0
  81. package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -0
  82. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  83. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +9 -0
  84. package/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -0
  85. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  86. package/dist/ui-kit/FormField/getField.js +20 -0
  87. package/dist/ui-kit/FormField/getField.js.map +1 -1
  88. package/dist/ui-kit/FormField/getObjectValidator.js +9 -0
  89. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  90. package/dist/ui-kit/FormField/validators.js +1 -1
  91. package/dist/ui-kit/FormField/validators.js.map +1 -1
  92. package/dist/ui-kit/InfoCard/InfoCard.js +1 -1
  93. package/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  94. package/dist/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  95. package/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
  96. package/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  97. package/lib/common.css +1 -1
  98. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  99. package/lib/components/ApplicationForm/renderInputs.d.ts +2 -0
  100. package/lib/components/ApplicationForm/renderInputs.js +13 -0
  101. package/lib/components/ApplicationForm/renderInputs.js.map +1 -0
  102. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -11
  103. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  104. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  105. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  106. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  107. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  108. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  109. package/lib/components/Blocks.js +2 -0
  110. package/lib/components/Blocks.js.map +1 -1
  111. package/lib/components/Blocks.mobile.js +2 -0
  112. package/lib/components/Blocks.mobile.js.map +1 -1
  113. package/lib/components/CreditForm/CreditForm.d.ts +13 -0
  114. package/lib/components/CreditForm/CreditForm.fixture.d.ts +6 -0
  115. package/lib/components/CreditForm/CreditForm.js +38 -0
  116. package/lib/components/CreditForm/CreditForm.js.map +1 -0
  117. package/lib/components/CreditForm/CreditFormContent.d.ts +28 -0
  118. package/lib/components/CreditForm/CreditFormContent.js +2 -0
  119. package/lib/components/CreditForm/CreditFormContent.js.map +1 -0
  120. package/lib/components/CreditForm/CreditFormProgress.d.ts +6 -0
  121. package/lib/components/CreditForm/CreditFormProgress.js +9 -0
  122. package/lib/components/CreditForm/CreditFormProgress.js.map +1 -0
  123. package/lib/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  124. package/lib/components/CreditForm/StepsNavigationButtons.js +18 -0
  125. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -0
  126. package/lib/components/CreditForm/creditFormStepsData.d.ts +140 -0
  127. package/lib/components/CreditForm/creditFormStepsData.js +215 -0
  128. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -0
  129. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  130. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +7 -0
  131. package/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -0
  132. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  133. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +7 -0
  134. package/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -0
  135. package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  136. package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +12 -0
  137. package/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -0
  138. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  139. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +7 -0
  140. package/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -0
  141. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  142. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +9 -0
  143. package/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -0
  144. package/lib/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  145. package/lib/ui-kit/FormField/Fields/MandatoryIncome.js +7 -0
  146. package/lib/ui-kit/FormField/Fields/MandatoryIncome.js.map +1 -0
  147. package/lib/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  148. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js +7 -0
  149. package/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -0
  150. package/lib/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  151. package/lib/ui-kit/FormField/Fields/OtherPayments.js +7 -0
  152. package/lib/ui-kit/FormField/Fields/OtherPayments.js.map +1 -0
  153. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  154. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +7 -0
  155. package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -0
  156. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  157. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +7 -0
  158. package/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -0
  159. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  160. package/lib/ui-kit/FormField/getField.js +20 -0
  161. package/lib/ui-kit/FormField/getField.js.map +1 -1
  162. package/lib/ui-kit/FormField/getObjectValidator.js +9 -0
  163. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  164. package/lib/ui-kit/FormField/validators.js +1 -1
  165. package/lib/ui-kit/FormField/validators.js.map +1 -1
  166. package/lib/ui-kit/InfoCard/InfoCard.js +1 -1
  167. package/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  168. package/lib/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  169. package/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
  170. package/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  171. package/mobile/bundle/bundle.umd.js +369 -58
  172. package/mobile/bundle/bundle.umd.min.js +1 -1
  173. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  174. package/mobile/bundle/components/ApplicationForm/renderInputs.d.ts +3 -0
  175. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  176. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  177. package/mobile/bundle/components/CreditForm/CreditForm.d.ts +13 -0
  178. package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +28 -0
  179. package/mobile/bundle/components/CreditForm/CreditFormProgress.d.ts +6 -0
  180. package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  181. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +140 -0
  182. package/mobile/bundle/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  183. package/mobile/bundle/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  184. package/mobile/bundle/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  185. package/mobile/bundle/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  186. package/mobile/bundle/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  187. package/mobile/bundle/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  188. package/mobile/bundle/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  189. package/mobile/bundle/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  190. package/mobile/bundle/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  191. package/mobile/bundle/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  192. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  193. package/mobile/bundle/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  194. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  195. package/mobile/dist/components/ApplicationForm/renderInputs.d.ts +3 -0
  196. package/mobile/dist/components/ApplicationForm/renderInputs.js +16 -0
  197. package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -0
  198. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -12
  199. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  200. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  201. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  202. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  203. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  204. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  205. package/mobile/dist/components/Blocks.js +2 -0
  206. package/mobile/dist/components/Blocks.js.map +1 -1
  207. package/mobile/dist/components/CreditForm/CreditForm.d.ts +13 -0
  208. package/mobile/dist/components/CreditForm/CreditForm.js +40 -0
  209. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -0
  210. package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +28 -0
  211. package/mobile/dist/components/CreditForm/CreditFormContent.js +2 -0
  212. package/mobile/dist/components/CreditForm/CreditFormContent.js.map +1 -0
  213. package/mobile/dist/components/CreditForm/CreditFormProgress.d.ts +6 -0
  214. package/mobile/dist/components/CreditForm/CreditFormProgress.js +11 -0
  215. package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -0
  216. package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  217. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +20 -0
  218. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -0
  219. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +140 -0
  220. package/mobile/dist/components/CreditForm/creditFormStepsData.js +217 -0
  221. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -0
  222. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  223. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js +9 -0
  224. package/mobile/dist/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -0
  225. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  226. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js +9 -0
  227. package/mobile/dist/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -0
  228. package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  229. package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js +14 -0
  230. package/mobile/dist/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -0
  231. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  232. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js +9 -0
  233. package/mobile/dist/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -0
  234. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  235. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js +11 -0
  236. package/mobile/dist/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -0
  237. package/mobile/dist/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  238. package/mobile/dist/ui-kit/FormField/Fields/MandatoryIncome.js +9 -0
  239. package/mobile/dist/ui-kit/FormField/Fields/MandatoryIncome.js.map +1 -0
  240. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  241. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js +9 -0
  242. package/mobile/dist/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -0
  243. package/mobile/dist/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  244. package/mobile/dist/ui-kit/FormField/Fields/OtherPayments.js +9 -0
  245. package/mobile/dist/ui-kit/FormField/Fields/OtherPayments.js.map +1 -0
  246. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  247. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +9 -0
  248. package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -0
  249. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  250. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js +9 -0
  251. package/mobile/dist/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -0
  252. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  253. package/mobile/dist/ui-kit/FormField/getField.js +20 -0
  254. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  255. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +9 -0
  256. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  257. package/mobile/dist/ui-kit/FormField/validators.js +1 -1
  258. package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
  259. package/mobile/dist/ui-kit/InfoCard/InfoCard.js +1 -1
  260. package/mobile/dist/ui-kit/InfoCard/InfoCard.js.map +1 -1
  261. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  262. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js +1 -1
  263. package/mobile/dist/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  264. package/mobile/lib/common.css +1 -1
  265. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +9 -1
  266. package/mobile/lib/components/ApplicationForm/renderInputs.d.ts +3 -0
  267. package/mobile/lib/components/ApplicationForm/renderInputs.js +13 -0
  268. package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -0
  269. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -11
  270. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  271. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +11 -3
  272. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +10 -0
  273. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  274. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +1 -1
  275. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  276. package/mobile/lib/components/Blocks.js +2 -0
  277. package/mobile/lib/components/Blocks.js.map +1 -1
  278. package/mobile/lib/components/CreditForm/CreditForm.d.ts +13 -0
  279. package/mobile/lib/components/CreditForm/CreditForm.js +38 -0
  280. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -0
  281. package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +28 -0
  282. package/mobile/lib/components/CreditForm/CreditFormContent.js +2 -0
  283. package/mobile/lib/components/CreditForm/CreditFormContent.js.map +1 -0
  284. package/mobile/lib/components/CreditForm/CreditFormProgress.d.ts +6 -0
  285. package/mobile/lib/components/CreditForm/CreditFormProgress.js +9 -0
  286. package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -0
  287. package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +6 -0
  288. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +18 -0
  289. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -0
  290. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +140 -0
  291. package/mobile/lib/components/CreditForm/creditFormStepsData.js +215 -0
  292. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -0
  293. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.d.ts +2 -0
  294. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js +7 -0
  295. package/mobile/lib/ui-kit/FormField/Fields/BankEmployeeCodeField.js.map +1 -0
  296. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.d.ts +2 -0
  297. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js +7 -0
  298. package/mobile/lib/ui-kit/FormField/Fields/BankruptcyFlgField.js.map +1 -0
  299. package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.d.ts +2 -0
  300. package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js +12 -0
  301. package/mobile/lib/ui-kit/FormField/Fields/CreditInRshbCdField.js.map +1 -0
  302. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.d.ts +2 -0
  303. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js +7 -0
  304. package/mobile/lib/ui-kit/FormField/Fields/DisablePeopleFlgField.js.map +1 -0
  305. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.d.ts +2 -0
  306. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js +9 -0
  307. package/mobile/lib/ui-kit/FormField/Fields/LegalEntityNameField.js.map +1 -0
  308. package/mobile/lib/ui-kit/FormField/Fields/MandatoryIncome.d.ts +2 -0
  309. package/mobile/lib/ui-kit/FormField/Fields/MandatoryIncome.js +7 -0
  310. package/mobile/lib/ui-kit/FormField/Fields/MandatoryIncome.js.map +1 -0
  311. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.d.ts +2 -0
  312. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js +7 -0
  313. package/mobile/lib/ui-kit/FormField/Fields/OtherIncomeField.js.map +1 -0
  314. package/mobile/lib/ui-kit/FormField/Fields/OtherPayments.d.ts +2 -0
  315. package/mobile/lib/ui-kit/FormField/Fields/OtherPayments.js +7 -0
  316. package/mobile/lib/ui-kit/FormField/Fields/OtherPayments.js.map +1 -0
  317. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.d.ts +2 -0
  318. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +7 -0
  319. package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -0
  320. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.d.ts +2 -0
  321. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js +7 -0
  322. package/mobile/lib/ui-kit/FormField/Fields/ShareholderFlgField.js.map +1 -0
  323. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  324. package/mobile/lib/ui-kit/FormField/getField.js +20 -0
  325. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  326. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +9 -0
  327. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  328. package/mobile/lib/ui-kit/FormField/validators.js +1 -1
  329. package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
  330. package/mobile/lib/ui-kit/InfoCard/InfoCard.js +1 -1
  331. package/mobile/lib/ui-kit/InfoCard/InfoCard.js.map +1 -1
  332. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.d.ts +1 -0
  333. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js +1 -1
  334. package/mobile/lib/ui-kit/ProgressBar/ProgressBar.js.map +1 -1
  335. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +11 -1
  336. package/mobile/src/components/ApplicationForm/renderInputs.tsx +25 -0
  337. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -26
  338. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +12 -2
  339. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +10 -0
  340. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +1 -1
  341. package/mobile/src/components/Blocks.ts +2 -0
  342. package/mobile/src/components/CreditForm/CreditForm.tsx +76 -0
  343. package/mobile/src/components/CreditForm/CreditFormContent.ts +34 -0
  344. package/mobile/src/components/CreditForm/CreditFormProgress.tsx +27 -0
  345. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +47 -0
  346. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +215 -0
  347. package/mobile/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +15 -0
  348. package/mobile/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +12 -0
  349. package/mobile/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +22 -0
  350. package/mobile/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +12 -0
  351. package/mobile/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +15 -0
  352. package/mobile/src/ui-kit/FormField/Fields/MandatoryIncome.tsx +15 -0
  353. package/mobile/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +15 -0
  354. package/mobile/src/ui-kit/FormField/Fields/OtherPayments.tsx +15 -0
  355. package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +15 -0
  356. package/mobile/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +12 -0
  357. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +11 -1
  358. package/mobile/src/ui-kit/FormField/getField.tsx +21 -0
  359. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +9 -0
  360. package/mobile/src/ui-kit/FormField/validators.ts +1 -1
  361. package/mobile/src/ui-kit/InfoCard/InfoCard.tsx +1 -1
  362. package/mobile/src/ui-kit/ProgressBar/ProgressBar.tsx +13 -10
  363. package/package.json +2 -2
  364. package/src/components/ApplicationForm/ApplicationFormContent.ts +11 -1
  365. package/src/components/ApplicationForm/renderInputs.tsx +25 -0
  366. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -26
  367. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +12 -2
  368. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +10 -0
  369. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +1 -1
  370. package/src/components/Blocks.mobile.ts +2 -0
  371. package/src/components/Blocks.ts +2 -0
  372. package/src/components/CreditForm/CreditForm.fixture.tsx +6 -0
  373. package/src/components/CreditForm/CreditForm.tsx +76 -0
  374. package/src/components/CreditForm/CreditFormContent.ts +34 -0
  375. package/src/components/CreditForm/CreditFormProgress.tsx +27 -0
  376. package/src/components/CreditForm/StepsNavigationButtons.tsx +47 -0
  377. package/src/components/CreditForm/creditFormStepsData.tsx +215 -0
  378. package/src/icons/IconName.ts +6 -356
  379. package/src/ui-kit/FormField/Fields/BankEmployeeCodeField.tsx +15 -0
  380. package/src/ui-kit/FormField/Fields/BankruptcyFlgField.tsx +12 -0
  381. package/src/ui-kit/FormField/Fields/CreditInRshbCdField.tsx +22 -0
  382. package/src/ui-kit/FormField/Fields/DisablePeopleFlgField.tsx +12 -0
  383. package/src/ui-kit/FormField/Fields/LegalEntityNameField.tsx +15 -0
  384. package/src/ui-kit/FormField/Fields/MandatoryIncome.tsx +15 -0
  385. package/src/ui-kit/FormField/Fields/OtherIncomeField.tsx +15 -0
  386. package/src/ui-kit/FormField/Fields/OtherPayments.tsx +15 -0
  387. package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +15 -0
  388. package/src/ui-kit/FormField/Fields/ShareholderFlgField.tsx +12 -0
  389. package/src/ui-kit/FormField/NameFieldDef.ts +11 -1
  390. package/src/ui-kit/FormField/getField.tsx +21 -0
  391. package/src/ui-kit/FormField/getObjectValidator.tsx +9 -0
  392. package/src/ui-kit/FormField/validators.ts +1 -1
  393. package/src/ui-kit/InfoCard/InfoCard.tsx +1 -1
  394. package/src/ui-kit/ProgressBar/ProgressBar.tsx +13 -10
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-lines */
1
2
  import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
2
3
  import { getRegionUrl } from '../../components/ApplicationForm/getRegionUrl';
3
4
  import { type FormFieldRegisterer } from '../../hooks/useForm';
@@ -8,7 +9,9 @@ import { AmountField } from './Fields/AmountField';
8
9
  import { AmountWorkersField } from './Fields/AmountWorkersField';
9
10
  import { AnnualRevenueField } from './Fields/AnnualRevenueField';
10
11
  import { ArmyIdFlgField } from './Fields/ArmyIdFlgField';
12
+ import { BankEmpoleeCodeField } from './Fields/BankEmployeeCodeField';
11
13
  import { BankEmpoleeField } from './Fields/BankEmpoleeField';
14
+ import { BankruptcyFlgField } from './Fields/BankruptcyFlgField';
12
15
  import { BeginDateField } from './Fields/BeginDateField';
13
16
  import { BirthdayField } from './Fields/BirthdayField';
14
17
  import { BirthPlaceField } from './Fields/BirthPlaceField';
@@ -17,8 +20,10 @@ import { CollectionCountField } from './Fields/CollectionCountField';
17
20
  import { CommentField } from './Fields/CommentField';
18
21
  import { ConscriptionField } from './Fields/ConscriptionField';
19
22
  import { ConsentField } from './Fields/ConsentField';
23
+ import { CreditInRshbCdField } from './Fields/CreditInRshbCdField';
20
24
  import { DependentsField } from './Fields/DependentsField';
21
25
  import { DesiredMeetingDateField } from './Fields/DesiredMeetingDateField';
26
+ import { DisablePeopleFlgField } from './Fields/DisablePeopleFlgField';
22
27
  import { DulIssueDateField } from './Fields/DulIssueDateField';
23
28
  import { DulIssuedByField } from './Fields/DulIssuedByField';
24
29
  import { DulNumberField } from './Fields/DulNumberField';
@@ -42,13 +47,17 @@ import { InnField } from './Fields/InnField';
42
47
  import { IsClientField } from './Fields/IsClientField';
43
48
  import { JobsNumberField } from './Fields/JobsNumberField';
44
49
  import { LastJobExperienceField } from './Fields/LastJobExperienceField';
50
+ import { LegalEntityNameField } from './Fields/LegalEntityNameField';
45
51
  import { LegalFormField } from './Fields/LegalFormField';
46
52
  import { LocalitiesField } from './Fields/LocalitiesField';
53
+ import { MandatoryIncomeField } from './Fields/MandatoryIncome';
47
54
  import { MiddleNameField } from './Fields/MiddleNameField';
48
55
  import { NameField } from './Fields/NameField';
49
56
  import { OnlineCheckoutField } from './Fields/OnlineCheckoutField';
50
57
  import { OrganizationField } from './Fields/OrganizationField';
51
58
  import { OrganizationNameField } from './Fields/OrganizationNameField';
59
+ import { OtherIncomeField } from './Fields/OtherIncomeField';
60
+ import { OtherPaymentsField } from './Fields/OtherPayments';
52
61
  import { ParticipantAddressField } from './Fields/ParticipantAddressField';
53
62
  import { ParticipantDateRegistrationField } from './Fields/ParticipantDateRegistrationField';
54
63
  import { PartnerCommentsField } from './Fields/PartnerCommentsField';
@@ -58,9 +67,11 @@ import { PosTerminalField } from './Fields/PosTerminalField';
58
67
  import { ProductField } from './Fields/ProductField';
59
68
  import { RegionField } from './Fields/RegionField';
60
69
  import { RegionPremiumField } from './Fields/RegionPremiumField';
70
+ import { RetirementIncomeField } from './Fields/RetirementIncomeField';
61
71
  import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
62
72
  import { ServiceDirectionField } from './Fields/ServiceDirectionField';
63
73
  import { SexField } from './Fields/SexField';
74
+ import { ShareholderFlgField } from './Fields/ShareholderFlgField';
64
75
  import { SnilsField } from './Fields/SnilsField';
65
76
  import { SurnameField } from './Fields/SurnameField';
66
77
  import { TermField } from './Fields/TermField';
@@ -159,6 +170,16 @@ export const getField =
159
170
  dulIssuedBy: <DulIssuedByField field={field} input={input} />,
160
171
  participantAddress: <ParticipantAddressField field={field} input={input} />,
161
172
  participantDateRegistration: <ParticipantDateRegistrationField field={field} input={input} />,
173
+ retirementIncome: <RetirementIncomeField field={field} input={input} />,
174
+ otherIncome: <OtherIncomeField field={field} input={input} />,
175
+ mandatoryIncome: <MandatoryIncomeField field={field} input={input} />,
176
+ otherPayments: <OtherPaymentsField field={field} input={input} />,
177
+ disablePeopleFlg: <DisablePeopleFlgField field={field} input={input} />,
178
+ bankruptcyFlg: <BankruptcyFlgField field={field} input={input} />,
179
+ shareholderFlg: <ShareholderFlgField field={field} input={input} />,
180
+ legalEntityName: <LegalEntityNameField field={field} input={input} />,
181
+ creditInRshbCd: <CreditInRshbCdField field={field} input={input} />,
182
+ bankEmployeeCode: <BankEmpoleeCodeField field={field} input={input} />,
162
183
  };
163
184
 
164
185
  return isRenderField({ input, field }) ? (
@@ -82,6 +82,15 @@ export const validatorObj: Record<string, Validator> = {
82
82
  sex: defaultValidator('Укажите свой пол'),
83
83
  participantAddress: defaultValidator('Необходимо выбрать адрес'),
84
84
  participantDateRegistration: defaultValidator('Укажите дату регистрации'),
85
+ retirementIncome: defaultValidator(),
86
+ otherIncome: defaultValidator(),
87
+ mandatoryIncome: defaultValidator(),
88
+ otherPayments: defaultValidator(),
89
+ disablePeopleFlg: defaultValidator(),
90
+ bankruptcyFlg: defaultValidator(),
91
+ shareholderFlg: defaultValidator(),
92
+ legalEntityName: defaultValidator(),
93
+ bankEmployeeCode: defaultValidator(),
85
94
  };
86
95
 
87
96
  export const getObjectValidator = (inputs: FieldDef[]): Record<string, Validator> => {
@@ -55,7 +55,7 @@ const snilsValidate = (snils: string) => {
55
55
 
56
56
  export const snilsValidator = (errorMsg: string) => validator(snilsValidate)(errorMsg);
57
57
 
58
- const emailValidate = (email: string) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(email);
58
+ const emailValidate = (email: string) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(email);
59
59
 
60
60
  export const emailValidator = (errorMsg: string) =>
61
61
  validator((_: string) => emailValidate(_))(errorMsg);
@@ -11,7 +11,7 @@ interface InfoCardProps {
11
11
  }
12
12
 
13
13
  export const InfoCard = JSX<InfoCardProps>(({ __html, icon, iconVersion = 'black' }) => (
14
- <div className="flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m justify-evenly p-m">
14
+ <div className="flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m">
15
15
  <div className="rounded-full bg-white p-xs">
16
16
  <Icon name={icon} width="24" height="24" iconVersion={iconVersion} />
17
17
  </div>
@@ -4,16 +4,19 @@ import { JSX } from '@redneckz/uni-jsx';
4
4
  interface ProgressBarProps {
5
5
  step?: number;
6
6
  description?: string;
7
+ showPercentage?: boolean;
7
8
  }
8
9
 
9
- export const ProgressBar = JSX<ProgressBarProps>(({ step = 10, description }) => (
10
- <div>
11
- <div className="h-4 w-full bg-gray relative">
12
- <div className="h-4 bg-green" style={{ width: `${step}%` }} />
10
+ export const ProgressBar = JSX<ProgressBarProps>(
11
+ ({ step = 10, description, showPercentage = true }) => (
12
+ <div>
13
+ <div className="h-4 w-full bg-gray relative">
14
+ <div className="h-4 bg-green" style={{ width: `${step}%` }} />
15
+ </div>
16
+ <div className="relative">
17
+ {showPercentage ? <div className="absolute left-2/4 text-green">{step}%</div> : null}
18
+ {description ? <div className="text-right mr-4 text-gray">{description}</div> : null}
19
+ </div>
13
20
  </div>
14
- <div className="relative">
15
- <div className="absolute left-2/4 text-green">{step}%</div>
16
- {description ? <div className="text-right mr-4 text-gray">{description}</div> : null}
17
- </div>
18
- </div>
19
- ));
21
+ ),
22
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.602",
3
+ "version": "0.14.604",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -210,7 +210,7 @@
210
210
  "path": "lib/common.css"
211
211
  },
212
212
  {
213
- "limit": "77 kB",
213
+ "limit": "79 kB",
214
214
  "path": "bundle/bundle.umd.min.js"
215
215
  }
216
216
  ],
@@ -58,11 +58,21 @@ export type FieldVedDef = FieldDefaultDef & {
58
58
  defaultValue?: VedTypes;
59
59
  };
60
60
 
61
+ /**
62
+ * @title Текст для отображения в карточке информации
63
+ * @default {"fieldType": "info"}
64
+ */
65
+ export type FieldInfoDef = FieldDefaultDef &
66
+ TextProps & {
67
+ /** @default "info" */
68
+ fieldType: 'info';
69
+ };
70
+
61
71
  /**
62
72
  * @title Поле
63
73
  * @default { "fieldType": "common" }
64
74
  */
65
- export type FieldDef = FieldCommonDef | FieldVedDef;
75
+ export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
66
76
 
67
77
  /** @hidden */
68
78
  type TypeFormFieldDef =
@@ -0,0 +1,25 @@
1
+ import { getField } from '../../ui-kit/FormField/getField';
2
+ import type {
3
+ FieldDef,
4
+ GroupedConsentsProps,
5
+ } from '../ApplicationLeadForm/ApplicationLeadFormContent';
6
+ import { CONSENTS } from '../ApplicationLeadForm/consents';
7
+ import { GroupedConsents } from '../ApplicationLeadForm/GroupedConsents';
8
+
9
+ export const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsProps) => {
10
+ const { consentInputs, restInputs } = splitInputs(inputs || []);
11
+
12
+ return consentInputs.length > 2 ? (
13
+ <div>
14
+ {restInputs.map(getField(field, typeForm))}
15
+ <GroupedConsents inputs={consentInputs} field={field} />
16
+ </div>
17
+ ) : (
18
+ (inputs || [])?.map(getField(field, typeForm))
19
+ );
20
+ };
21
+
22
+ const splitInputs = (inputs?: FieldDef[]) => ({
23
+ consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
24
+ restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
25
+ });
@@ -3,20 +3,14 @@ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useForm } from '../../hooks/useForm';
4
4
  import { useLocalStorage } from '../../hooks/useLocalStorage';
5
5
  import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
6
- import { getField } from '../../ui-kit/FormField/getField';
7
6
  import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
8
7
  import { renderTitle } from '../../ui-kit/FormField/renderTitle';
9
8
  import { useResponseTypeDialog } from '../../ui-kit/ResponseTypeDialog/useResponseTypeDialog';
10
9
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
11
10
  import { style } from '../../utils/style';
12
- import {
13
- type ApplicationLeadFormContent,
14
- type FieldDef,
15
- type GroupedConsentsProps,
16
- } from './ApplicationLeadFormContent';
17
- import { CONSENTS } from './consents';
11
+ import { renderInputs } from '../ApplicationForm/renderInputs';
12
+ import { type ApplicationLeadFormContent, type FieldDef } from './ApplicationLeadFormContent';
18
13
  import { getInitialFormState } from './getInitialFormState';
19
- import { GroupedConsents } from './GroupedConsents';
20
14
  import { renderSubmitButton } from './renderSubmitButton';
21
15
  import { useApplicationLeadApi } from './useApplicationLeadApi';
22
16
  import { useInitApplicationLead } from './useInitApplicationLead';
@@ -72,21 +66,3 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
72
66
  );
73
67
  },
74
68
  );
75
-
76
- const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsProps) => {
77
- const { consentInputs, restInputs } = splitInputs(inputs || []);
78
-
79
- return consentInputs.length > 2 ? (
80
- <div>
81
- {restInputs.map(getField(field, typeForm))}
82
- <GroupedConsents inputs={consentInputs} field={field} />
83
- </div>
84
- ) : (
85
- (inputs || [])?.map(getField(field, typeForm))
86
- );
87
- };
88
-
89
- const splitInputs = (inputs?: FieldDef[]) => ({
90
- consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
91
- restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
92
- });
@@ -25,6 +25,7 @@ export type ConditionFieldProps = {
25
25
  };
26
26
 
27
27
  export type FieldDefaultDef = Required &
28
+ TextProps &
28
29
  LabelProps &
29
30
  ConditionFieldProps & {
30
31
  name: NameFieldDef;
@@ -56,14 +57,23 @@ export type FieldVedDef = FieldDefaultDef & {
56
57
  defaultValue?: VedTypes;
57
58
  };
58
59
 
60
+ /**
61
+ * @title Текст для отображения в карточке информации
62
+ * @default {"fieldType": "info"}
63
+ */
64
+ export type FieldInfoDef = FieldDefaultDef & {
65
+ /** @default "info" */
66
+ fieldType: 'info';
67
+ };
68
+
59
69
  /**
60
70
  * @title Поле
61
71
  * @default { "fieldType": "common" }
62
72
  */
63
- export type FieldDef = FieldCommonDef | FieldVedDef;
73
+ export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
64
74
 
65
75
  /** @hidden */
66
- type TypeFormFieldDef =
76
+ export type TypeFormFieldDef =
67
77
  | 'ACQR'
68
78
  | 'ANALITIC'
69
79
  | 'ANTIFRAUD'
@@ -87,6 +87,16 @@ export interface FormState extends FormConsents {
87
87
  armyIdFlg?: boolean;
88
88
  participantAddress?: string;
89
89
  participantDateRegistration?: Date;
90
+ retirementIncome?: number;
91
+ otherIncome?: number;
92
+ mandatoryIncome?: number;
93
+ otherPayments?: number;
94
+ creditInRshbCd?: string;
95
+ disablePeopleFlg?: boolean;
96
+ bankruptcyFlg?: boolean;
97
+ shareholderFlg?: boolean;
98
+ legalEntityName?: string;
99
+ bankEmployeeCode?: number;
90
100
  }
91
101
 
92
102
  const initialFormState = {
@@ -65,7 +65,7 @@ export const useApplicationLeadApi = ({ inputs, programId, saveForm }: Applicati
65
65
 
66
66
  const acceptedConsents: string[] = Object.keys(CONSENTS)
67
67
  .filter((_) => formData[_])
68
- .map((_) => CONSENTS[_]);
68
+ .map((_) => CONSENTS[_]?.text);
69
69
 
70
70
  // eslint-disable-next-line react-hooks/rules-of-hooks
71
71
  const verifyPhoneDialog = useVerifyPhoneDialog({
@@ -19,6 +19,7 @@ import { CarouselCatalogCard } from './CarouselCatalogCard/CarouselCatalogCard';
19
19
  import { CarouselLinks } from './CarouselLinks/CarouselLinks';
20
20
  import { CarouselRecommendationCard } from './CarouselRecommendationCard/CarouselRecommendationCard';
21
21
  import { CarouselTariffsCard } from './CarouselTariffsCard/CarouselTariffsCard';
22
+ import { CreditForm } from './CreditForm/CreditForm';
22
23
  import { DepositFiltration } from './DepositFiltration/DepositFiltration';
23
24
  import { Depository } from './Depository/Depository';
24
25
  import { ErrorBlock } from './ErrorBlock/ErrorBlock';
@@ -68,6 +69,7 @@ export const Blocks: BlocksRegistry = {
68
69
  CarouselLinks,
69
70
  CarouselRecommendationCard,
70
71
  CarouselTariffsCard,
72
+ CreditForm,
71
73
  DepositFiltration,
72
74
  Depository,
73
75
  ErrorBlock,
@@ -20,6 +20,7 @@ import { CarouselLinks } from './CarouselLinks/CarouselLinks';
20
20
  import { CarouselRecommendationCard } from './CarouselRecommendationCard/CarouselRecommendationCard';
21
21
  import { CarouselTariffsCard } from './CarouselTariffsCard/CarouselTariffsCard';
22
22
  import { ContactsBlock } from './ContactsBlock/ContactsBlock';
23
+ import { CreditForm } from './CreditForm/CreditForm';
23
24
  import { DepositFiltration } from './DepositFiltration/DepositFiltration';
24
25
  import { Depository } from './Depository/Depository';
25
26
  import { ErrorBlock } from './ErrorBlock/ErrorBlock';
@@ -74,6 +75,7 @@ export const Blocks: BlocksRegistry = {
74
75
  CarouselRecommendationCard,
75
76
  CarouselTariffsCard,
76
77
  ContactsBlock,
78
+ CreditForm,
77
79
  DepositFiltration,
78
80
  Depository,
79
81
  ErrorBlock,
@@ -0,0 +1,6 @@
1
+ import '../../setup-fixture';
2
+ import { CreditForm } from './CreditForm';
3
+
4
+ export default {
5
+ default: <CreditForm className="col-span-12" />,
6
+ };
@@ -0,0 +1,76 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useState } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useForm, type FormFieldRegisterer } from '../../hooks/useForm';
4
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
6
+ import { renderTitle } from '../../ui-kit/FormField/renderTitle';
7
+ import { InfoCard } from '../../ui-kit/InfoCard/InfoCard';
8
+ import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
9
+ import { style } from '../../utils/style';
10
+ import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
11
+ import { type FormState } from '../ApplicationForm/getInitialFormState';
12
+ import { renderInputs } from '../ApplicationForm/renderInputs';
13
+ import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
14
+ import { getInitialFormState } from '../ApplicationLeadForm/getInitialFormState';
15
+ import { type CreditFormContent } from './CreditFormContent';
16
+ import { CreditFormProgress } from './CreditFormProgress';
17
+ import { stepsSectionsMap } from './creditFormStepsData';
18
+ import { StepsNavigationButtons } from './StepsNavigationButtons';
19
+
20
+ const STEPS_COUNT = 5;
21
+ const STEPS_TITLES = [
22
+ 'Персональные данные',
23
+ 'Данные о трудоустройстве',
24
+ 'Данные о доходах и расходах',
25
+ 'Дополнительные сведения',
26
+ 'Отделение Банка',
27
+ ];
28
+
29
+ export interface StepProps {
30
+ typeForm: string;
31
+ sections: SectionsProps[];
32
+ field: FormFieldRegisterer<FormState>;
33
+ }
34
+
35
+ export interface CreditFormProps extends CreditFormContent, UniBlockProps {}
36
+
37
+ export const CreditForm = JSX<CreditFormProps>(
38
+ ({ className, typeForm = '', sections = [], ...rest }) => {
39
+ const [step, setStep] = useState(1);
40
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []) as FieldDef[];
41
+ const initialFormState = getInitialFormState(inputs, typeForm);
42
+ const handleSubmit = () => false;
43
+
44
+ const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
45
+
46
+ return (
47
+ <BlockWrapper className={style('bg-transparent', className)} defaultPadding="p-6xl" {...rest}>
48
+ <div className="container grid grid-cols-12">
49
+ <CreditFormProgress stepsTitles={STEPS_TITLES} step={step} totalSteps={STEPS_COUNT} />
50
+ <div className="py-lg px-5xl mt-2xs bg-white col-span-12">
51
+ <form onSubmit={onSubmit} className="space-y-m">
52
+ {renderStep({ sections: stepsSectionsMap[step], typeForm, field })}
53
+ <StepsNavigationButtons step={step} setStep={setStep} totalSteps={STEPS_COUNT} />
54
+ </form>
55
+ </div>
56
+ </div>
57
+ </BlockWrapper>
58
+ );
59
+ },
60
+ );
61
+
62
+ const renderStep = ({ sections, field, typeForm }: StepProps) => {
63
+ return sections.map((_, i) => (
64
+ <div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}>
65
+ {renderInfo(_?.inputs)}
66
+ {renderTitle(_?.title)}
67
+ {renderInputs({ field, typeForm, inputs: _?.inputs })}
68
+ </div>
69
+ ));
70
+ };
71
+
72
+ const renderInfo = (inputs: FieldDef[] = []) => {
73
+ const infoInputs = inputs.filter((_) => _.fieldType === 'info');
74
+
75
+ return infoInputs.length ? infoInputs.map(({ text }) => <InfoCard __html={text} />) : null;
76
+ };
@@ -0,0 +1,34 @@
1
+ import { type TextProps, type TitleProps } from '../../model/HeadlineType';
2
+ import { type Target } from '../../model/LinkProps';
3
+ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
4
+ import {
5
+ type EndpointType,
6
+ type SectionsProps,
7
+ type SubmitButtonProps,
8
+ } from '../ApplicationForm/ApplicationFormContent';
9
+ import { type TypeFormFieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
10
+
11
+ /**
12
+ * @title Форма заявки на потребительский кредит настраиваемая
13
+ */
14
+ export type CreditFormContent = UniBlockContent &
15
+ TitleProps & {
16
+ /** @title Кнопка */
17
+ button?: SubmitButtonProps;
18
+ /**
19
+ * @title Условия передачи данных
20
+ * @required ["text", "href"]
21
+ */
22
+ link?: TextProps & {
23
+ /** @title URL (href) */
24
+ href?: string;
25
+ /** @default "" */
26
+ target?: Target;
27
+ };
28
+ /** @title Номер кредитной программы */
29
+ programId?: string;
30
+ typeForm?: TypeFormFieldDef;
31
+ /** @hidden */
32
+ sections?: SectionsProps[];
33
+ endpoint?: EndpointType;
34
+ };
@@ -0,0 +1,27 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { ProgressBar } from '../../ui-kit/ProgressBar/ProgressBar';
4
+
5
+ export interface CreditFormProgressProps {
6
+ step: number;
7
+ totalSteps: number;
8
+ stepsTitles?: string[];
9
+ }
10
+
11
+ export const CreditFormProgress = JSX<CreditFormProgressProps>(
12
+ ({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
13
+ const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
14
+
15
+ return (
16
+ <div className="py-lg px-5xl bg-white col-span-12">
17
+ <div>
18
+ <span className="font-bold">
19
+ Шаг {step} из {totalSteps}.
20
+ </span>{' '}
21
+ {stepsTitles[step - 1] || null}
22
+ <ProgressBar step={progress} showPercentage={false} />
23
+ </div>
24
+ </div>
25
+ );
26
+ },
27
+ );
@@ -0,0 +1,47 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Button } from '../../ui-kit/Button/Button';
3
+ import { style } from '../../utils/style';
4
+
5
+ export interface StepsNavigationButtonsProps {
6
+ step: number;
7
+ setStep: (step: number) => void;
8
+ totalSteps: number;
9
+ }
10
+
11
+ export const StepsNavigationButtons = JSX<StepsNavigationButtonsProps>(
12
+ ({ step, setStep, totalSteps }) => {
13
+ const handleNext = () => {
14
+ if (step < totalSteps) {
15
+ setStep(step + 1);
16
+ }
17
+ };
18
+
19
+ const handlePrev = () => {
20
+ if (step > 1) {
21
+ setStep(step - 1);
22
+ }
23
+ };
24
+
25
+ return (
26
+ <div className={'flex justify-between'}>
27
+ <Button
28
+ onClick={handlePrev}
29
+ className={style('w-full @xl:w-auto')}
30
+ type="button"
31
+ version="secondary"
32
+ disabled={step === 1}
33
+ >
34
+ Назад
35
+ </Button>
36
+ <Button
37
+ onClick={handleNext}
38
+ className={style('w-full @xl:w-auto')}
39
+ type="button"
40
+ disabled={step === totalSteps}
41
+ >
42
+ Далее
43
+ </Button>
44
+ </div>
45
+ );
46
+ },
47
+ );