@redneckz/wildless-cms-uni-blocks 0.14.683 → 0.14.684

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 (515) hide show
  1. package/bundle/api/RetailAPI/updateUserTask.d.ts +5 -4
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +696 -653
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  6. package/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  7. package/bundle/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  8. package/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  9. package/bundle/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  10. package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -1
  11. package/bundle/components/CreditCardForm/renderStep.d.ts +2 -2
  12. package/bundle/components/CreditForm/CreditForm.d.ts +5 -2
  13. package/bundle/components/CreditForm/CreditFormContent.d.ts +4 -5
  14. package/bundle/components/CreditForm/CreditFormStep.d.ts +2 -3
  15. package/bundle/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  16. package/bundle/components/CreditForm/getCalcData.d.ts +3 -0
  17. package/bundle/components/CreditForm/getZeroStepData.d.ts +1 -1
  18. package/bundle/components/CreditForm/renderInputs.d.ts +2 -1
  19. package/bundle/components/CreditForm/renderStep.d.ts +2 -2
  20. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  21. package/bundle/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  22. package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  23. package/bundle/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  24. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  25. package/bundle/ui-kit/FormField/getField.d.ts +1 -1
  26. package/dist/api/RetailAPI/getCardTypes.js +1 -1
  27. package/dist/api/RetailAPI/getCardTypes.js.map +1 -1
  28. package/dist/api/RetailAPI/updateUserTask.d.ts +5 -4
  29. package/dist/api/RetailAPI/updateUserTask.js +1 -1
  30. package/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  31. package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  32. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  33. package/dist/components/ApplicationForm/renderInputs.js +1 -1
  34. package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  35. package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  36. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  37. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  38. package/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
  39. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  40. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
  41. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  42. package/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  43. package/dist/components/CalculatorCredit/CalculatorCredit.js +5 -3
  44. package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  45. package/dist/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  46. package/dist/components/CalculatorCredit/defaultValueAdapter.js +18 -0
  47. package/dist/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
  48. package/dist/components/CreditCardForm/CreditCardForm.js +4 -4
  49. package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  50. package/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  51. package/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -1
  52. package/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
  53. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
  54. package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  55. package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -14
  56. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  57. package/dist/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  58. package/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
  59. package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  60. package/dist/components/CreditCardForm/renderInputs.d.ts +2 -1
  61. package/dist/components/CreditCardForm/renderInputs.js +1 -1
  62. package/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  63. package/dist/components/CreditCardForm/renderStep.d.ts +2 -2
  64. package/dist/components/CreditCardForm/renderStep.js +2 -2
  65. package/dist/components/CreditCardForm/renderStep.js.map +1 -1
  66. package/dist/components/CreditForm/CreditForm.d.ts +5 -2
  67. package/dist/components/CreditForm/CreditForm.js +6 -20
  68. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  69. package/dist/components/CreditForm/CreditFormContent.d.ts +4 -5
  70. package/dist/components/CreditForm/CreditFormStatusTracker.js +10 -10
  71. package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  72. package/dist/components/CreditForm/CreditFormStep.d.ts +2 -3
  73. package/dist/components/CreditForm/CreditFormStep.js +5 -10
  74. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  75. package/dist/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  76. package/dist/components/CreditForm/ProgramsSourceProps.js +2 -0
  77. package/dist/components/CreditForm/ProgramsSourceProps.js.map +1 -0
  78. package/dist/components/CreditForm/creditFormStepsData.js +9 -1
  79. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  80. package/dist/components/CreditForm/formStateMap.js +9 -7
  81. package/dist/components/CreditForm/formStateMap.js.map +1 -1
  82. package/dist/components/CreditForm/getCalcData.d.ts +3 -0
  83. package/dist/components/CreditForm/getCalcData.js +16 -0
  84. package/dist/components/CreditForm/getCalcData.js.map +1 -0
  85. package/dist/components/CreditForm/getCreditFormTaskData.js +3 -2
  86. package/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  87. package/dist/components/CreditForm/getSecondStepData.js +0 -1
  88. package/dist/components/CreditForm/getSecondStepData.js.map +1 -1
  89. package/dist/components/CreditForm/getZeroStepData.d.ts +1 -1
  90. package/dist/components/CreditForm/getZeroStepData.js +3 -8
  91. package/dist/components/CreditForm/getZeroStepData.js.map +1 -1
  92. package/dist/components/CreditForm/renderInputs.d.ts +2 -1
  93. package/dist/components/CreditForm/renderInputs.js +1 -1
  94. package/dist/components/CreditForm/renderInputs.js.map +1 -1
  95. package/dist/components/CreditForm/renderStep.d.ts +2 -2
  96. package/dist/components/CreditForm/renderStep.js +2 -2
  97. package/dist/components/CreditForm/renderStep.js.map +1 -1
  98. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  99. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -6
  100. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  101. package/dist/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  102. package/dist/components/OfficesAtmsMap/filterItems.js +9 -0
  103. package/dist/components/OfficesAtmsMap/filterItems.js.map +1 -0
  104. package/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js +3 -3
  105. package/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
  106. package/dist/hooks/useJSONRef/useJSONRef.js +13 -3
  107. package/dist/hooks/useJSONRef/useJSONRef.js.map +1 -1
  108. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
  109. package/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  110. package/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  111. package/dist/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  112. package/dist/ui-kit/FormField/Fields/CreditCalcField.js +15 -0
  113. package/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
  114. package/dist/ui-kit/FormField/Fields/RegionField.js +3 -1
  115. package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  116. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  117. package/dist/ui-kit/FormField/SelectField.js +4 -6
  118. package/dist/ui-kit/FormField/SelectField.js.map +1 -1
  119. package/dist/ui-kit/FormField/getField.d.ts +1 -1
  120. package/dist/ui-kit/FormField/getField.js +5 -4
  121. package/dist/ui-kit/FormField/getField.js.map +1 -1
  122. package/lib/api/RetailAPI/getCardTypes.js +1 -1
  123. package/lib/api/RetailAPI/getCardTypes.js.map +1 -1
  124. package/lib/api/RetailAPI/updateUserTask.d.ts +5 -4
  125. package/lib/api/RetailAPI/updateUserTask.js +2 -2
  126. package/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  127. package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  128. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  129. package/lib/components/ApplicationForm/renderInputs.js +1 -1
  130. package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  131. package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  132. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  133. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  134. package/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
  135. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  136. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
  137. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  138. package/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  139. package/lib/components/CalculatorCredit/CalculatorCredit.js +5 -3
  140. package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  141. package/lib/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  142. package/lib/components/CalculatorCredit/defaultValueAdapter.js +15 -0
  143. package/lib/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
  144. package/lib/components/CreditCardForm/CreditCardForm.js +4 -4
  145. package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  146. package/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  147. package/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -1
  148. package/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
  149. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
  150. package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  151. package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -14
  152. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  153. package/lib/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  154. package/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
  155. package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  156. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -1
  157. package/lib/components/CreditCardForm/renderInputs.js +1 -1
  158. package/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  159. package/lib/components/CreditCardForm/renderStep.d.ts +2 -2
  160. package/lib/components/CreditCardForm/renderStep.js +2 -2
  161. package/lib/components/CreditCardForm/renderStep.js.map +1 -1
  162. package/lib/components/CreditForm/CreditForm.d.ts +5 -2
  163. package/lib/components/CreditForm/CreditForm.js +6 -20
  164. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  165. package/lib/components/CreditForm/CreditFormContent.d.ts +4 -5
  166. package/lib/components/CreditForm/CreditFormStatusTracker.js +11 -11
  167. package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  168. package/lib/components/CreditForm/CreditFormStep.d.ts +2 -3
  169. package/lib/components/CreditForm/CreditFormStep.js +6 -11
  170. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  171. package/lib/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  172. package/lib/components/CreditForm/ProgramsSourceProps.js +2 -0
  173. package/lib/components/CreditForm/ProgramsSourceProps.js.map +1 -0
  174. package/lib/components/CreditForm/creditFormStepsData.js +9 -1
  175. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  176. package/lib/components/CreditForm/formStateMap.js +9 -7
  177. package/lib/components/CreditForm/formStateMap.js.map +1 -1
  178. package/lib/components/CreditForm/getCalcData.d.ts +3 -0
  179. package/lib/components/CreditForm/getCalcData.js +13 -0
  180. package/lib/components/CreditForm/getCalcData.js.map +1 -0
  181. package/lib/components/CreditForm/getCreditFormTaskData.js +3 -2
  182. package/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  183. package/lib/components/CreditForm/getSecondStepData.js +0 -1
  184. package/lib/components/CreditForm/getSecondStepData.js.map +1 -1
  185. package/lib/components/CreditForm/getZeroStepData.d.ts +1 -1
  186. package/lib/components/CreditForm/getZeroStepData.js +3 -8
  187. package/lib/components/CreditForm/getZeroStepData.js.map +1 -1
  188. package/lib/components/CreditForm/renderInputs.d.ts +2 -1
  189. package/lib/components/CreditForm/renderInputs.js +1 -1
  190. package/lib/components/CreditForm/renderInputs.js.map +1 -1
  191. package/lib/components/CreditForm/renderStep.d.ts +2 -2
  192. package/lib/components/CreditForm/renderStep.js +2 -2
  193. package/lib/components/CreditForm/renderStep.js.map +1 -1
  194. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  195. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +0 -4
  196. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  197. package/lib/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  198. package/lib/components/OfficesAtmsMap/filterItems.js +6 -0
  199. package/lib/components/OfficesAtmsMap/filterItems.js.map +1 -0
  200. package/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js +1 -1
  201. package/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
  202. package/lib/hooks/useJSONRef/useJSONRef.js +13 -3
  203. package/lib/hooks/useJSONRef/useJSONRef.js.map +1 -1
  204. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
  205. package/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  206. package/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  207. package/lib/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  208. package/lib/ui-kit/FormField/Fields/CreditCalcField.js +13 -0
  209. package/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
  210. package/lib/ui-kit/FormField/Fields/RegionField.js +3 -1
  211. package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  212. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  213. package/lib/ui-kit/FormField/SelectField.js +4 -6
  214. package/lib/ui-kit/FormField/SelectField.js.map +1 -1
  215. package/lib/ui-kit/FormField/getField.d.ts +1 -1
  216. package/lib/ui-kit/FormField/getField.js +5 -4
  217. package/lib/ui-kit/FormField/getField.js.map +1 -1
  218. package/mobile/bundle/api/RetailAPI/updateUserTask.d.ts +5 -4
  219. package/mobile/bundle/bundle.umd.js +698 -655
  220. package/mobile/bundle/bundle.umd.min.js +1 -1
  221. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  222. package/mobile/bundle/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  223. package/mobile/bundle/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  224. package/mobile/bundle/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  225. package/mobile/bundle/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  226. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -1
  227. package/mobile/bundle/components/CreditCardForm/renderStep.d.ts +2 -2
  228. package/mobile/bundle/components/CreditForm/CreditForm.d.ts +5 -2
  229. package/mobile/bundle/components/CreditForm/CreditFormContent.d.ts +4 -5
  230. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +2 -3
  231. package/mobile/bundle/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  232. package/mobile/bundle/components/CreditForm/getCalcData.d.ts +3 -0
  233. package/mobile/bundle/components/CreditForm/getZeroStepData.d.ts +1 -1
  234. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -1
  235. package/mobile/bundle/components/CreditForm/renderStep.d.ts +2 -2
  236. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  237. package/mobile/bundle/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  238. package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  239. package/mobile/bundle/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  240. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  241. package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
  242. package/mobile/dist/api/RetailAPI/getCardTypes.js +1 -1
  243. package/mobile/dist/api/RetailAPI/getCardTypes.js.map +1 -1
  244. package/mobile/dist/api/RetailAPI/updateUserTask.d.ts +5 -4
  245. package/mobile/dist/api/RetailAPI/updateUserTask.js +1 -1
  246. package/mobile/dist/api/RetailAPI/updateUserTask.js.map +1 -1
  247. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  248. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  249. package/mobile/dist/components/ApplicationForm/renderInputs.js +1 -1
  250. package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  251. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  252. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  253. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  254. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +0 -1
  255. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  256. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
  257. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  258. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  259. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +5 -3
  260. package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  261. package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  262. package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.js +18 -0
  263. package/mobile/dist/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
  264. package/mobile/dist/components/CreditCardForm/CreditCardForm.js +4 -4
  265. package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
  266. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  267. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js +3 -1
  268. package/mobile/dist/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
  269. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
  270. package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  271. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -14
  272. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  273. package/mobile/dist/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  274. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +2 -2
  275. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  276. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -1
  277. package/mobile/dist/components/CreditCardForm/renderInputs.js +1 -1
  278. package/mobile/dist/components/CreditCardForm/renderInputs.js.map +1 -1
  279. package/mobile/dist/components/CreditCardForm/renderStep.d.ts +2 -2
  280. package/mobile/dist/components/CreditCardForm/renderStep.js +2 -2
  281. package/mobile/dist/components/CreditCardForm/renderStep.js.map +1 -1
  282. package/mobile/dist/components/CreditForm/CreditForm.d.ts +5 -2
  283. package/mobile/dist/components/CreditForm/CreditForm.js +6 -20
  284. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  285. package/mobile/dist/components/CreditForm/CreditFormContent.d.ts +4 -5
  286. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +10 -10
  287. package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  288. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +2 -3
  289. package/mobile/dist/components/CreditForm/CreditFormStep.js +5 -10
  290. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  291. package/mobile/dist/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  292. package/mobile/dist/components/CreditForm/ProgramsSourceProps.js +2 -0
  293. package/mobile/dist/components/CreditForm/ProgramsSourceProps.js.map +1 -0
  294. package/mobile/dist/components/CreditForm/creditFormStepsData.js +9 -1
  295. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  296. package/mobile/dist/components/CreditForm/formStateMap.js +9 -7
  297. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
  298. package/mobile/dist/components/CreditForm/getCalcData.d.ts +3 -0
  299. package/mobile/dist/components/CreditForm/getCalcData.js +16 -0
  300. package/mobile/dist/components/CreditForm/getCalcData.js.map +1 -0
  301. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js +3 -2
  302. package/mobile/dist/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  303. package/mobile/dist/components/CreditForm/getSecondStepData.js +0 -1
  304. package/mobile/dist/components/CreditForm/getSecondStepData.js.map +1 -1
  305. package/mobile/dist/components/CreditForm/getZeroStepData.d.ts +1 -1
  306. package/mobile/dist/components/CreditForm/getZeroStepData.js +3 -8
  307. package/mobile/dist/components/CreditForm/getZeroStepData.js.map +1 -1
  308. package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -1
  309. package/mobile/dist/components/CreditForm/renderInputs.js +1 -1
  310. package/mobile/dist/components/CreditForm/renderInputs.js.map +1 -1
  311. package/mobile/dist/components/CreditForm/renderStep.d.ts +2 -2
  312. package/mobile/dist/components/CreditForm/renderStep.js +2 -2
  313. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
  314. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  315. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +1 -6
  316. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  317. package/mobile/dist/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  318. package/mobile/dist/components/OfficesAtmsMap/filterItems.js +9 -0
  319. package/mobile/dist/components/OfficesAtmsMap/filterItems.js.map +1 -0
  320. package/mobile/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js +3 -3
  321. package/mobile/dist/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
  322. package/mobile/dist/hooks/useJSONRef/useJSONRef.js +13 -3
  323. package/mobile/dist/hooks/useJSONRef/useJSONRef.js.map +1 -1
  324. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
  325. package/mobile/dist/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  326. package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  327. package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  328. package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js +15 -0
  329. package/mobile/dist/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
  330. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +3 -1
  331. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  332. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  333. package/mobile/dist/ui-kit/FormField/SelectField.js +4 -6
  334. package/mobile/dist/ui-kit/FormField/SelectField.js.map +1 -1
  335. package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
  336. package/mobile/dist/ui-kit/FormField/getField.js +5 -4
  337. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  338. package/mobile/lib/api/RetailAPI/getCardTypes.js +1 -1
  339. package/mobile/lib/api/RetailAPI/getCardTypes.js.map +1 -1
  340. package/mobile/lib/api/RetailAPI/updateUserTask.d.ts +5 -4
  341. package/mobile/lib/api/RetailAPI/updateUserTask.js +2 -2
  342. package/mobile/lib/api/RetailAPI/updateUserTask.js.map +1 -1
  343. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  344. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  345. package/mobile/lib/components/ApplicationForm/renderInputs.js +1 -1
  346. package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  347. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
  348. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  349. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +13 -7
  350. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +0 -1
  351. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  352. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +4 -2
  353. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  354. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.d.ts +2 -3
  355. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +5 -3
  356. package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
  357. package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.d.ts +11 -0
  358. package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.js +15 -0
  359. package/mobile/lib/components/CalculatorCredit/defaultValueAdapter.js.map +1 -0
  360. package/mobile/lib/components/CreditCardForm/CreditCardForm.js +4 -4
  361. package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
  362. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.d.ts +1 -0
  363. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js +3 -1
  364. package/mobile/lib/components/CreditCardForm/CreditCardFormStatus.js.map +1 -1
  365. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +14 -12
  366. package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
  367. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -14
  368. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  369. package/mobile/lib/components/CreditCardForm/PendingStatusContent.d.ts +3 -1
  370. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +2 -2
  371. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  372. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -1
  373. package/mobile/lib/components/CreditCardForm/renderInputs.js +1 -1
  374. package/mobile/lib/components/CreditCardForm/renderInputs.js.map +1 -1
  375. package/mobile/lib/components/CreditCardForm/renderStep.d.ts +2 -2
  376. package/mobile/lib/components/CreditCardForm/renderStep.js +2 -2
  377. package/mobile/lib/components/CreditCardForm/renderStep.js.map +1 -1
  378. package/mobile/lib/components/CreditForm/CreditForm.d.ts +5 -2
  379. package/mobile/lib/components/CreditForm/CreditForm.js +6 -20
  380. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  381. package/mobile/lib/components/CreditForm/CreditFormContent.d.ts +4 -5
  382. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +11 -11
  383. package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
  384. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +2 -3
  385. package/mobile/lib/components/CreditForm/CreditFormStep.js +6 -11
  386. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  387. package/mobile/lib/components/CreditForm/ProgramsSourceProps.d.ts +16 -0
  388. package/mobile/lib/components/CreditForm/ProgramsSourceProps.js +2 -0
  389. package/mobile/lib/components/CreditForm/ProgramsSourceProps.js.map +1 -0
  390. package/mobile/lib/components/CreditForm/creditFormStepsData.js +9 -1
  391. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  392. package/mobile/lib/components/CreditForm/formStateMap.js +9 -7
  393. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
  394. package/mobile/lib/components/CreditForm/getCalcData.d.ts +3 -0
  395. package/mobile/lib/components/CreditForm/getCalcData.js +13 -0
  396. package/mobile/lib/components/CreditForm/getCalcData.js.map +1 -0
  397. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js +3 -2
  398. package/mobile/lib/components/CreditForm/getCreditFormTaskData.js.map +1 -1
  399. package/mobile/lib/components/CreditForm/getSecondStepData.js +0 -1
  400. package/mobile/lib/components/CreditForm/getSecondStepData.js.map +1 -1
  401. package/mobile/lib/components/CreditForm/getZeroStepData.d.ts +1 -1
  402. package/mobile/lib/components/CreditForm/getZeroStepData.js +3 -8
  403. package/mobile/lib/components/CreditForm/getZeroStepData.js.map +1 -1
  404. package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -1
  405. package/mobile/lib/components/CreditForm/renderInputs.js +1 -1
  406. package/mobile/lib/components/CreditForm/renderInputs.js.map +1 -1
  407. package/mobile/lib/components/CreditForm/renderStep.d.ts +2 -2
  408. package/mobile/lib/components/CreditForm/renderStep.js +2 -2
  409. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
  410. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +0 -1
  411. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +0 -4
  412. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  413. package/mobile/lib/components/OfficesAtmsMap/filterItems.d.ts +2 -0
  414. package/mobile/lib/components/OfficesAtmsMap/filterItems.js +6 -0
  415. package/mobile/lib/components/OfficesAtmsMap/filterItems.js.map +1 -0
  416. package/mobile/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js +1 -1
  417. package/mobile/lib/components/OfficesAtmsMap/useOfficesAtmsMapData.js.map +1 -1
  418. package/mobile/lib/hooks/useJSONRef/useJSONRef.js +13 -3
  419. package/mobile/lib/hooks/useJSONRef/useJSONRef.js.map +1 -1
  420. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js +14 -9
  421. package/mobile/lib/ui-kit/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  422. package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +1 -0
  423. package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.d.ts +2 -0
  424. package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js +13 -0
  425. package/mobile/lib/ui-kit/FormField/Fields/CreditCalcField.js.map +1 -0
  426. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +3 -1
  427. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  428. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  429. package/mobile/lib/ui-kit/FormField/SelectField.js +4 -6
  430. package/mobile/lib/ui-kit/FormField/SelectField.js.map +1 -1
  431. package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
  432. package/mobile/lib/ui-kit/FormField/getField.js +5 -4
  433. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  434. package/mobile/src/api/RetailAPI/getCardTypes.ts +1 -1
  435. package/mobile/src/api/RetailAPI/updateUserTask.ts +6 -5
  436. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  437. package/mobile/src/components/ApplicationForm/renderInputs.tsx +2 -2
  438. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
  439. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +13 -7
  440. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +19 -7
  441. package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +7 -5
  442. package/mobile/src/components/CalculatorCredit/defaultValueAdapter.ts +26 -0
  443. package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +4 -8
  444. package/mobile/src/components/CreditCardForm/CreditCardFormStatus.tsx +7 -1
  445. package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +14 -8
  446. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -18
  447. package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +24 -21
  448. package/mobile/src/components/CreditCardForm/renderInputs.tsx +3 -2
  449. package/mobile/src/components/CreditCardForm/renderStep.tsx +3 -4
  450. package/mobile/src/components/CreditForm/CreditForm.tsx +12 -30
  451. package/mobile/src/components/CreditForm/CreditFormContent.ts +5 -8
  452. package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +14 -13
  453. package/mobile/src/components/CreditForm/CreditFormStep.tsx +10 -24
  454. package/mobile/src/components/CreditForm/ProgramsSourceProps.tsx +20 -0
  455. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +9 -1
  456. package/mobile/src/components/CreditForm/formStateMap.tsx +9 -7
  457. package/mobile/src/components/CreditForm/getCalcData.ts +19 -0
  458. package/mobile/src/components/CreditForm/getCreditFormTaskData.ts +3 -2
  459. package/mobile/src/components/CreditForm/getSecondStepData.tsx +0 -1
  460. package/mobile/src/components/CreditForm/getZeroStepData.ts +7 -11
  461. package/mobile/src/components/CreditForm/renderInputs.tsx +3 -2
  462. package/mobile/src/components/CreditForm/renderStep.tsx +3 -3
  463. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +0 -9
  464. package/mobile/src/components/OfficesAtmsMap/filterItems.tsx +11 -0
  465. package/mobile/src/components/OfficesAtmsMap/useOfficesAtmsMapData.tsx +1 -1
  466. package/mobile/src/hooks/useJSONRef/useJSONRef.ts +21 -4
  467. package/mobile/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +14 -10
  468. package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
  469. package/mobile/src/ui-kit/FormField/Fields/CreditCalcField.tsx +24 -0
  470. package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +4 -1
  471. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +1 -0
  472. package/mobile/src/ui-kit/FormField/SelectField.tsx +4 -6
  473. package/mobile/src/ui-kit/FormField/getField.tsx +5 -4
  474. package/package.json +3 -2
  475. package/src/api/RetailAPI/getCardTypes.ts +1 -1
  476. package/src/api/RetailAPI/updateUserTask.ts +6 -5
  477. package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  478. package/src/components/ApplicationForm/renderInputs.tsx +2 -2
  479. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -1
  480. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +13 -7
  481. package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +19 -7
  482. package/src/components/CalculatorCredit/CalculatorCredit.tsx +7 -5
  483. package/src/components/CalculatorCredit/defaultValueAdapter.ts +26 -0
  484. package/src/components/CreditCardForm/CreditCardForm.tsx +4 -8
  485. package/src/components/CreditCardForm/CreditCardFormStatus.tsx +7 -1
  486. package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +14 -8
  487. package/src/components/CreditCardForm/CreditCardFormStep.tsx +3 -18
  488. package/src/components/CreditCardForm/PendingStatusContent.tsx +24 -21
  489. package/src/components/CreditCardForm/renderInputs.tsx +3 -2
  490. package/src/components/CreditCardForm/renderStep.tsx +3 -4
  491. package/src/components/CreditForm/CreditForm.fixture.tsx +6 -1
  492. package/src/components/CreditForm/CreditForm.tsx +12 -30
  493. package/src/components/CreditForm/CreditFormContent.ts +5 -8
  494. package/src/components/CreditForm/CreditFormStatusTracker.tsx +14 -13
  495. package/src/components/CreditForm/CreditFormStep.tsx +10 -24
  496. package/src/components/CreditForm/ProgramsSourceProps.tsx +20 -0
  497. package/src/components/CreditForm/creditFormStepsData.tsx +9 -1
  498. package/src/components/CreditForm/formStateMap.tsx +9 -7
  499. package/src/components/CreditForm/getCalcData.ts +19 -0
  500. package/src/components/CreditForm/getCreditFormTaskData.ts +3 -2
  501. package/src/components/CreditForm/getSecondStepData.tsx +0 -1
  502. package/src/components/CreditForm/getZeroStepData.ts +7 -11
  503. package/src/components/CreditForm/renderInputs.tsx +3 -2
  504. package/src/components/CreditForm/renderStep.tsx +3 -3
  505. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +0 -9
  506. package/src/components/OfficesAtmsMap/filterItems.tsx +11 -0
  507. package/src/components/OfficesAtmsMap/useOfficesAtmsMapData.tsx +1 -1
  508. package/src/hooks/useJSONRef/useJSONRef.ts +21 -4
  509. package/src/ui-kit/ConsentBkiDialog/useConsentBkiDialog.tsx +14 -10
  510. package/src/ui-kit/FormField/CustomFieldProps.ts +1 -0
  511. package/src/ui-kit/FormField/Fields/CreditCalcField.tsx +24 -0
  512. package/src/ui-kit/FormField/Fields/RegionField.tsx +4 -1
  513. package/src/ui-kit/FormField/NameFieldDef.ts +1 -0
  514. package/src/ui-kit/FormField/SelectField.tsx +4 -6
  515. package/src/ui-kit/FormField/getField.tsx +5 -4
@@ -4,15 +4,32 @@ import { useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
4
4
  import { fetchRefs } from './fetchRefs';
5
5
  import { resolveBlockProps } from './resolveBlockProps';
6
6
 
7
+ type RefsMap = Record<string, JSONNode>;
8
+
7
9
  export const useJSONRef = <C>(content: C, fallback?: Record<string, unknown>): C => {
8
10
  const refs = collectRef(content as JSONNode);
9
11
 
10
- const [refsMap, setRefsMap] = useState<Record<string, JSONNode>>({});
12
+ const [refsMap, setRefsMap] = useState<RefsMap>({});
11
13
  useEffect(() => {
12
- if (refs.length) {
13
- fetchRefs(refs).then(setRefsMap);
14
- }
14
+ resolveRefs(refs).then(setRefsMap);
15
15
  }, [refs.join()]);
16
16
 
17
17
  return refs.length ? resolveBlockProps(content, { ...fallback, ...refsMap }) : content;
18
18
  };
19
+
20
+ const resolveRefs = async (refs: string[], parentRefsMap: RefsMap = {}): Promise<RefsMap> => {
21
+ if (refs.length) {
22
+ const refsMap = await fetchRefs(refs);
23
+ const unionRefsMap = { ...parentRefsMap, ...refsMap };
24
+
25
+ const additRefs = Object.entries(refsMap).flatMap(([, v]) => collectRef(v));
26
+
27
+ if (additRefs.length) {
28
+ return resolveRefs(additRefs, unionRefsMap);
29
+ }
30
+
31
+ return unionRefsMap;
32
+ }
33
+
34
+ return parentRefsMap;
35
+ };
@@ -9,17 +9,21 @@ export const useConsentBkiDialog = (onClose: () => void) => {
9
9
  const verifyPhoneDialog = useVerifyPhoneDialog();
10
10
 
11
11
  const handleSuccessVerify = (profileId?: number) => async (smsCode?: string) => {
12
- if (profileId) {
13
- await updateUserProfile({
14
- profile: {
15
- id: profileId,
16
- consentBkiFlg: true,
17
- smsConsentBki: smsCode,
18
- },
19
- });
20
- }
12
+ try {
13
+ if (profileId) {
14
+ await updateUserProfile({
15
+ profile: {
16
+ id: profileId,
17
+ consentBkiFlg: true,
18
+ smsConsentBki: smsCode,
19
+ },
20
+ });
21
+ }
21
22
 
22
- onClose();
23
+ onClose();
24
+ } catch (ex) {
25
+ console.log(ex);
26
+ }
23
27
  };
24
28
 
25
29
  const handleSubmitBkiConstent =
@@ -5,4 +5,5 @@ export interface CustomFieldProps {
5
5
  field: FormFieldRegisterer<any>;
6
6
  input?: FieldDef;
7
7
  url?: string;
8
+ params?: Record<string, any>;
8
9
  }
@@ -0,0 +1,24 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { CalculatorCredit } from '../../../components/CalculatorCredit/CalculatorCredit';
4
+ import { type CreditCalculatorUserInputParams } from '../../../components/CalculatorCredit/CalculatorCreditContent';
5
+ import { defaultValueAdapter } from '../../../components/CalculatorCredit/defaultValueAdapter';
6
+ import { type CustomFieldProps } from '../CustomFieldProps';
7
+
8
+ const FIELD_NAME = 'calculator';
9
+
10
+ export const CreditCalcField = JSX<CustomFieldProps>(({ field, params }) => {
11
+ const handleChange = useCallback((_: CreditCalculatorUserInputParams) => {
12
+ field(FIELD_NAME).onChange?.(_);
13
+ }, []);
14
+
15
+ return (
16
+ <CalculatorCredit
17
+ {...params?.calcData}
18
+ defaultParams={defaultValueAdapter(
19
+ field(FIELD_NAME).value as CreditCalculatorUserInputParams,
20
+ )}
21
+ onChange={handleChange}
22
+ />
23
+ );
24
+ });
@@ -1,12 +1,15 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { getRegionUrl } from '../../../components/ApplicationForm/getRegionUrl';
3
4
  import { useRegions } from '../../../hooks/useRegions';
4
5
  import { SelectControl } from '../../Select/SelectControl';
5
6
  import { type CustomFieldProps } from '../CustomFieldProps';
6
7
  import { validatorObj } from '../getObjectValidator';
7
8
  import { getValidation } from '../getValidation';
8
9
 
9
- export const RegionField = JSX<CustomFieldProps>(({ field, input, url }) => {
10
+ export const RegionField = JSX<CustomFieldProps>(({ field, input, params }) => {
11
+ const url = getRegionUrl(params?.typeForm as string | undefined);
12
+
10
13
  const regions = useRegions(url);
11
14
 
12
15
  return (
@@ -100,4 +100,5 @@ export type NameFieldDef =
100
100
  | 'currency'
101
101
  | 'cardCategory'
102
102
  | 'codeWord'
103
+ | 'calculator'
103
104
  | 'confirmationIncome';
@@ -33,12 +33,10 @@ export const SelectField = UniBlock<SelectFieldProps>(
33
33
  isSearch = false,
34
34
  }) => {
35
35
  const leadOptions: Option[] =
36
- (source &&
37
- source?.map((_: LeadProps) => ({
38
- key: _.key || '',
39
- text: _.value,
40
- }))) ||
41
- [];
36
+ source?.map((_: LeadProps) => ({
37
+ key: _.key || '',
38
+ text: _.value,
39
+ })) || [];
42
40
 
43
41
  return (
44
42
  <SelectControl
@@ -2,7 +2,6 @@
2
2
  /* eslint-disable max-lines-per-function */
3
3
  //TODO: Убрать обращение к компонентам т.к. ApplicationForm
4
4
  import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
5
- import { getRegionUrl } from '../../components/ApplicationForm/getRegionUrl';
6
5
  import { type FormFieldRegisterer } from '../../hooks/useForm';
7
6
  import { InputControl } from '../Input/InputControl';
8
7
  import { AcquiringField } from './Fields/AcquiringField';
@@ -29,6 +28,7 @@ import { CommentField } from './Fields/CommentField';
29
28
  import { ConfirmationIncomeField } from './Fields/ConfirmationIncomeField';
30
29
  import { ConscriptionField } from './Fields/ConscriptionField';
31
30
  import { ConsentField } from './Fields/ConsentField';
31
+ import { CreditCalcField } from './Fields/CreditCalcField';
32
32
  import { CreditInRshbCdField } from './Fields/CreditInRshbCdField';
33
33
  import { CurrencyField } from './Fields/CurrencyField';
34
34
  import { DeliveryDateFiels } from './Fields/DeliveryDateFiels';
@@ -99,9 +99,9 @@ const PRODUCT_REF = {
99
99
  };
100
100
 
101
101
  export const getField =
102
- (field: FormFieldRegisterer<any>, typeForm = '') =>
102
+ (field: FormFieldRegisterer<any>, params?: Record<string, any>) =>
103
103
  (input: FieldDef, i: number) => {
104
- const isPremium = typeForm === 'ULTRASERVICE' || typeForm === 'PREMIUMSERVICE';
104
+ const isPremium = params?.typeForm === 'ULTRASERVICE' || params?.typeForm === 'PREMIUMSERVICE';
105
105
 
106
106
  const InputsMap = {
107
107
  surname: <SurnameField field={field} input={input} />,
@@ -157,7 +157,7 @@ export const getField =
157
157
  region: isPremium ? (
158
158
  <RegionPremiumField field={field} />
159
159
  ) : (
160
- <RegionField field={field} input={input} url={getRegionUrl(typeForm)} />
160
+ <RegionField field={field} input={input} params={params} />
161
161
  ),
162
162
  education: <EducationField field={field} input={input} />,
163
163
  housing: <HousingField field={field} input={input} />,
@@ -205,6 +205,7 @@ export const getField =
205
205
  confirmationIncome: <ConfirmationIncomeField field={field} input={input} />,
206
206
  methodObtain: <MethodObtainField field={field} input={input} />,
207
207
  deliveryDate: <DeliveryDateFiels field={field} input={input} />,
208
+ calculator: <CreditCalcField field={field} params={params} />,
208
209
  };
209
210
 
210
211
  return isRenderField({ input, field }) ? (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.683",
3
+ "version": "0.14.684",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -132,6 +132,7 @@
132
132
  "peerDependencies": {
133
133
  "cypress": "^13.13.0",
134
134
  "cypress-visual-regression": "5.0.0",
135
+ "cypress-wait-until": "^3.0.1",
135
136
  "react": ">=18.3.1",
136
137
  "react-dom": ">=18.3.1"
137
138
  },
@@ -214,7 +215,7 @@
214
215
  "path": "lib/common.css"
215
216
  },
216
217
  {
217
- "limit": "92 kB",
218
+ "limit": "100 kB",
218
219
  "path": "bundle/bundle.umd.min.js"
219
220
  }
220
221
  ],
@@ -16,5 +16,5 @@ export const getCardTypes = async (paymentSystemType: string) => {
16
16
 
17
17
  const data: CardTypeData[] = await response?.json();
18
18
 
19
- return data;
19
+ return Array.isArray(data) ? data : [];
20
20
  };
@@ -1,5 +1,5 @@
1
1
  import { type Option } from '../../ui-kit/Select/Option';
2
- import { fetchRetailJSON } from './doRequest';
2
+ import { doRequest } from './doRequest';
3
3
 
4
4
  type ParticipantAddress = {
5
5
  addressType: {
@@ -83,6 +83,7 @@ export type Participant = {
83
83
  participantAddresses?: ParticipantAddress[];
84
84
  participantIncomes?: ParticipantIncome[];
85
85
  payrollCardRshbFlg?: boolean;
86
+ consentInsuranceFlg?: boolean;
86
87
  positionCd?: Option;
87
88
  registrationDate?: string;
88
89
  seniority?: string;
@@ -107,9 +108,6 @@ export type Participant = {
107
108
  paymentSystemTypeCd?: string;
108
109
  classCard?: Option;
109
110
  codeWord?: string;
110
- loanAmount?: number;
111
- creditPeriod?: number;
112
- paymentTypeCd?: PaymentType;
113
111
  };
114
112
 
115
113
  export type UpdateUserTaskBody = {
@@ -131,6 +129,9 @@ export type UpdateUserTaskBody = {
131
129
  esiaAccountTypeCd?: {
132
130
  key: 'VERIFIED' | 'STANDARD' | 'SIMPLIFIED';
133
131
  };
132
+ loanAmount?: number;
133
+ creditPeriod?: number;
134
+ paymentTypeCd?: PaymentType;
134
135
  };
135
136
  };
136
137
 
@@ -141,4 +142,4 @@ export type CreateUserProfileResponse = {
141
142
  };
142
143
 
143
144
  export const updateUserTask = (body: UpdateUserTaskBody) =>
144
- fetchRetailJSON<CreateUserProfileResponse>('/user-data/updateUserTask', 'PUT', body);
145
+ doRequest('/user-data/updateUserTask', 'PUT', body);
@@ -92,7 +92,7 @@ export const ApplicationForm = JSX<ApplicationFormProps>(
92
92
  className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}
93
93
  >
94
94
  {renderTitle(_.title)}
95
- {(_?.inputs || [])?.map(getField(field, typeForm))}
95
+ {(_?.inputs || [])?.map(getField(field, { typeForm }))}
96
96
  </div>
97
97
  ))}
98
98
  {renderAgreementSubmit(
@@ -11,11 +11,11 @@ export const renderInputs = ({ field, typeForm = '', inputs }: GroupedConsentsPr
11
11
 
12
12
  return consentInputs.length > 2 ? (
13
13
  <div>
14
- {restInputs.map(getField(field, typeForm))}
14
+ {restInputs.map(getField(field, { typeForm }))}
15
15
  <GroupedConsents inputs={consentInputs} field={field} />
16
16
  </div>
17
17
  ) : (
18
- (inputs || [])?.map(getField(field, typeForm))
18
+ (inputs || [])?.map(getField(field, { typeForm }))
19
19
  );
20
20
  };
21
21
 
@@ -49,7 +49,7 @@ export const GroupedConsents = JSX<GroupedConsentsProps>(
49
49
  unfoldedByDefault
50
50
  renderFoldableSection={({ isUnfolded }) => (
51
51
  <FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
52
- {inputs.map(getField(field, typeForm))}
52
+ {inputs.map(getField(field, { typeForm }))}
53
53
  </FoldableSection>
54
54
  )}
55
55
  renderFoldButton={renderGeneralCheckbox(
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable max-lines */
2
+ import { type PaymentType } from '../../api/RetailAPI/updateUserTask';
2
3
  import {
3
4
  FEEDBACK_METHOD,
4
5
  SERVICE_DIRECTIONS,
@@ -143,14 +144,19 @@ export interface FormState extends FormConsents, FormStateDeliveryType {
143
144
  cardCategory?: Option;
144
145
  codeWord?: string;
145
146
  esiaAccountTypeCd?: Option;
146
- moneyValue?: number;
147
- monthsValue?: number;
148
- isAnnuity?: boolean;
149
- isInsurance?: boolean;
150
- isSalaryClient?: boolean;
151
- isPensionClient?: boolean;
152
- isStateEmployee?: boolean;
147
+ calculator?: {
148
+ moneyValue?: number;
149
+ monthsValue?: number;
150
+ isAnnuity?: boolean;
151
+ isInsurance?: boolean;
152
+ isSalaryClient?: boolean;
153
+ isPensionClient?: boolean;
154
+ isStateEmployee?: boolean;
155
+ };
153
156
  addressRetail?: Option;
157
+ loanAmount?: number;
158
+ creditPeriod?: number;
159
+ paymentTypeCd?: PaymentType;
154
160
  }
155
161
 
156
162
  const initialFormState = {
@@ -24,6 +24,13 @@ type ApplicationLeadApiProps = {
24
24
  saveForm: (value: FormState) => void;
25
25
  };
26
26
 
27
+ type UserData = {
28
+ participantId: number;
29
+ taskId: number;
30
+ profileId: number;
31
+ programId: string;
32
+ };
33
+
27
34
  export const useApplicationLeadApi = ({
28
35
  inputs,
29
36
  programId,
@@ -34,15 +41,20 @@ export const useApplicationLeadApi = ({
34
41
  const [, setTaskId] = useLocalStorage<number>('taskId');
35
42
  const [, setProfileId] = useLocalStorage<number>('profileId');
36
43
  const [, setParticipantId] = useLocalStorage<number>('participantId');
44
+ const [, setProgramId] = useLocalStorage<string>('programId');
37
45
  const esiaLoginDialog = useEsiaLoginDialog(nextStepLink);
38
46
  const consentBkiDialog = useConsentBkiDialog(esiaLoginDialog.open);
39
47
  const verifyPhoneDialog = useVerifyPhoneDialog();
40
48
 
41
- const saveUserData = useCallback((participantId: number, taskId: number, profileId: number) => {
42
- setParticipantId(participantId);
43
- setTaskId(taskId);
44
- setProfileId(profileId);
45
- }, []);
49
+ const saveUserData = useCallback(
50
+ ({ participantId, taskId, profileId, programId: programNumber }: UserData) => {
51
+ setParticipantId(participantId);
52
+ setTaskId(taskId);
53
+ setProfileId(profileId);
54
+ setProgramId(programNumber);
55
+ },
56
+ [],
57
+ );
46
58
 
47
59
  // eslint-disable-next-line consistent-return
48
60
  const handleSubmit = useCallback(async (formData: FormState) => {
@@ -103,7 +115,7 @@ const updateUserData = async ({
103
115
  programId: string;
104
116
  profileId: number;
105
117
  formData: FormState;
106
- saveUserData: (participantId: number, taskId: number, profileId: number) => void;
118
+ saveUserData: (userData: UserData) => void;
107
119
  saveForm: (formData: FormState) => void;
108
120
  }) => {
109
121
  const transformedForm = transformOtherConsentsField(formData);
@@ -124,7 +136,7 @@ const updateUserData = async ({
124
136
  }),
125
137
  );
126
138
 
127
- saveUserData(participantId, taskId, profileId);
139
+ saveUserData({ participantId, taskId, profileId, programId });
128
140
  saveForm(formData);
129
141
  };
130
142
 
@@ -18,7 +18,6 @@ import { renderWantedSumInput } from '../../ui-kit/Calculator/renderWantedSumInp
18
18
  import { setDefaultParamsCalc } from '../../ui-kit/Calculator/setDefaultParamsCalc';
19
19
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
20
20
  import { renderButtonsSection } from '../../ui-kit/LinkButton/renderButtonsSection';
21
- import { type PreventableEvent } from '../../ui-kit/PreventableEvent';
22
21
  import { UniBlock } from '../../UniBlock/UniBlock';
23
22
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
24
23
  import { clamp } from '../../utils/clamp';
@@ -29,6 +28,7 @@ import {
29
28
  type CreditCalculatorParams,
30
29
  type CreditCalculatorParamsViewSettings,
31
30
  type CreditCalculatorSourceBookParams,
31
+ type CreditCalculatorUserInputParams,
32
32
  } from './CalculatorCreditContent';
33
33
  import { getCreditCalculatorParams } from './getCreditCalculatorParams';
34
34
  import { isDefaultParams } from './isDefaultParams';
@@ -45,7 +45,7 @@ const MAP = {
45
45
  export interface CalculatorDepositProps extends CalculatorCreditContent, UniBlockProps {
46
46
  className?: string;
47
47
  calcSource?: CreditCalculatorData & JSONRefObject;
48
- registerSubmit?: (submit: ((ev: PreventableEvent) => Record<string, any>) | undefined) => void;
48
+ onChange?: (params: CreditCalculatorUserInputParams) => void;
49
49
  }
50
50
 
51
51
  export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
@@ -57,12 +57,12 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
57
57
  footnote,
58
58
  paramsViewSettings,
59
59
  defaultParams,
60
- registerSubmit,
60
+ onChange,
61
61
  ...rest
62
62
  }) => {
63
63
  const defaultParamsCals = getDefaultParamsMin(calcSource?.rateRows);
64
64
 
65
- const [userInputParams, { field, onSubmit }] = useForm({
65
+ const [userInputParams, { field, isDirty }] = useForm({
66
66
  moneyValue: getMoneyDefaultValue(defaultParams, CREDIT_DEFAULT_SUM),
67
67
  monthsValue: getMonthsDefaultValue(defaultParams, DEFAULT_MONTHS),
68
68
  isAnnuity: Boolean(defaultParams?.isAnnuity),
@@ -72,7 +72,9 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
72
72
  isStateEmployee: Boolean(defaultParams?.isEnableStateEmployee),
73
73
  });
74
74
 
75
- registerSubmit?.(onSubmit);
75
+ useEffect(() => {
76
+ isDirty && onChange?.(userInputParams);
77
+ }, [userInputParams, isDirty]);
76
78
 
77
79
  const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
78
80
  const paymentTypeElement = renderPaymentType({
@@ -0,0 +1,26 @@
1
+ import {
2
+ type CreditCalculatorUserInputParams,
3
+ type CreditDefaultParams,
4
+ } from './CalculatorCreditContent';
5
+
6
+ export const PARAMS_MAP = {
7
+ moneyValue: 'sum',
8
+ monthsValue: 'period',
9
+ isInsurance: 'isEnableInsurance',
10
+ isPensionClient: 'isEnablePensionClient',
11
+ isStateEmployee: 'isEnableStateEmployee',
12
+ isSalaryClient: 'isEnableSalaryClient',
13
+ isAnnuity: 'isAnnuity',
14
+ };
15
+
16
+ export const defaultValueAdapter = (
17
+ value?: CreditCalculatorUserInputParams,
18
+ isInverse = false,
19
+ ): CreditDefaultParams => {
20
+ const keysMap = isInverse ? swap(PARAMS_MAP) : PARAMS_MAP;
21
+
22
+ return Object.fromEntries(Object.entries(value ?? {}).map(([k, v]) => [keysMap[k], v]));
23
+ };
24
+
25
+ const swap = (_: Record<string, string>) =>
26
+ Object.fromEntries(Object.entries(_).map(([k, v]) => [v, k]));
@@ -11,9 +11,9 @@ import { stepsSectionsMap } from './creditCardFormStepsData';
11
11
 
12
12
  interface CreditCardFormWizardProps extends CreditCardFormContent, UniBlockProps {}
13
13
 
14
- const WIZARD_STEPS = 6;
14
+ const STEPS = 6;
15
15
 
16
- const WIZARD_TITLES = [
16
+ const TITLES = [
17
17
  'Параметры карты',
18
18
  'Персональные данные',
19
19
  'Данные о трудоустройстве',
@@ -34,7 +34,7 @@ export const CreditCardForm = JSX<CreditCardFormWizardProps>(({ className, ...re
34
34
  useEffect(updateRefreshToken, []);
35
35
 
36
36
  const handleNextStep = useCallback(() => {
37
- setStep((_) => Math.min(_ + 1, WIZARD_STEPS));
37
+ setStep((_) => Math.min(_ + 1, STEPS));
38
38
  scrollToTop();
39
39
  }, []);
40
40
 
@@ -52,11 +52,7 @@ export const CreditCardForm = JSX<CreditCardFormWizardProps>(({ className, ...re
52
52
  <BlockWrapper className={style('bg-transparent', className)} defaultPadding="p-0" {...rest}>
53
53
  <div ref={formContainerRef} className="container grid grid-cols-12">
54
54
  {isFormFinished ? null : (
55
- <CreditCardFormProgress
56
- stepsTitles={WIZARD_TITLES}
57
- step={step}
58
- totalSteps={WIZARD_STEPS}
59
- />
55
+ <CreditCardFormProgress stepsTitles={TITLES} step={step} totalSteps={STEPS} />
60
56
  )}
61
57
  <div className="py-lg px-5xl mt-2xs bg-white col-span-12">
62
58
  <CreditCardFormStep
@@ -15,6 +15,7 @@ type CreditCardFormStatusProps = UniBlockProps & {
15
15
  title?: string;
16
16
  description?: string;
17
17
  interval?: number;
18
+ intervalExpireAction?: () => void;
18
19
  sectionInfoTitle?: string;
19
20
  sectionInfo?: (LabelProps & DescriptionProps)[];
20
21
  sectionAdditionalTitle?: string;
@@ -34,6 +35,9 @@ export const CreditCardFormStatus = JSX<CreditCardFormStatusProps>(
34
35
  sectionInfoAdditional,
35
36
  buttonText,
36
37
  interval,
38
+ intervalExpireAction = () => {
39
+ return;
40
+ },
37
41
  ...props
38
42
  }) => (
39
43
  <BlockWrapper {...props}>
@@ -46,7 +50,9 @@ export const CreditCardFormStatus = JSX<CreditCardFormStatusProps>(
46
50
  padding="p-xl"
47
51
  className="w-full"
48
52
  />
49
- {interval ? <TimerCircle interval={interval} /> : null}
53
+ {interval ? (
54
+ <TimerCircle interval={interval} intervalExpireAction={intervalExpireAction} />
55
+ ) : null}
50
56
  </div>
51
57
  <SectionInfo title={sectionInfoTitle} items={sectionInfo} />
52
58
  <SectionInfo title={sectionAdditionalTitle} items={sectionInfoAdditional} countColumns />
@@ -2,6 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { getTaskStatus, STATUS_TYPE } from '../../api/RetailAPI/getTaskStatus';
4
4
  import { sendSignalToProcess, type SignalType } from '../../api/RetailAPI/sendSignalToProcess';
5
+ import { useInterval } from '../../hooks/useInterval';
5
6
  import { useLocalStorage } from '../../hooks/useLocalStorage';
6
7
  import { type VNode } from '../../model/VNode';
7
8
  import { FailedStatusContent } from './FailedStatusContent';
@@ -24,25 +25,30 @@ export const CreditCardFormStatusTracker = JSX(() => {
24
25
  await sendSignalToProcess({ signalType, taskId });
25
26
  }
26
27
  })();
28
+ }, [taskId]);
27
29
 
28
- const trackStatus = useCallback(async () => {
30
+ const trackStatus = useCallback(
31
+ async (stopInterval: () => void) => {
29
32
  const res = await getTaskStatus({ taskId });
30
33
 
31
34
  if (res && res?.statusCd !== STATUS_TYPE.process) {
32
- clearInterval(pullingInterval);
35
+ stopInterval();
33
36
  setStatus(res.statusCd);
34
37
  }
35
- }, []);
38
+ },
39
+ [taskId],
40
+ );
36
41
 
37
- const pullingInterval = setInterval(trackStatus, 30000);
38
- }, []);
42
+ useInterval(trackStatus, 30000);
39
43
 
40
- return renderStatus(status);
44
+ const handleExpire = () => setStatus(STATUS_TYPE.rework);
45
+
46
+ return renderStatus(status, handleExpire);
41
47
  });
42
48
 
43
- const renderStatus = (status: STATUS_TYPE) => {
49
+ const renderStatus = (status: STATUS_TYPE, handleExpire: () => void) => {
44
50
  const statusesMap: Record<STATUS_TYPE, VNode> = {
45
- IN_PROCESS: <PendingStatusContent />,
51
+ IN_PROCESS: <PendingStatusContent handleExpireTimer={handleExpire} />,
46
52
  CANCELLED: <FailedStatusContent />,
47
53
  APPROVED: <SuccessStatusContent />,
48
54
  REVISION: <ReworkStatusContent />,
@@ -1,13 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useCallback, useRef } from '@redneckz/uni-jsx/lib/hooks';
3
2
  import { useForm } from '../../hooks/useForm';
4
3
  import { useLocalStorage } from '../../hooks/useLocalStorage';
5
4
  import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
6
5
  import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
7
- import { type FormState } from '../ApplicationLeadForm/getInitialFormState';
8
6
  import { CreditCardFormStatusTracker } from './CreditCardFormStatusTracker';
9
7
  import { getInitialFormState } from './getInitialFormState';
10
- import { renderStep, type CustomSubmit } from './renderStep';
8
+ import { renderStep } from './renderStep';
11
9
  import { StepsNavigationButtons } from './StepsNavigationButtons';
12
10
  import { useCreditCardFormAPI } from './useCreditCardFormAPI';
13
11
 
@@ -25,14 +23,8 @@ export const CreditCardFormStep = JSX<CreditCardFormStepProps>(
25
23
  const [localStorageData, saveStep] = useLocalStorage<Record<string, any>>('leadForm');
26
24
  const initialState = getInitialFormState(step, localStorageData);
27
25
 
28
- const customSubmit = useRef<CustomSubmit | undefined>(undefined);
29
-
30
26
  const inputs = (sections?.flatMap((_: SectionsProps) => _?.inputs) || []) as FieldDef[];
31
27
 
32
- const registerSubmit = useCallback((submit?: CustomSubmit) => {
33
- customSubmit.current = submit;
34
- }, []);
35
-
36
28
  const { handleSubmit } = useCreditCardFormAPI({
37
29
  step,
38
30
  inputs,
@@ -42,21 +34,14 @@ export const CreditCardFormStep = JSX<CreditCardFormStepProps>(
42
34
  });
43
35
 
44
36
  const [, { field, onSubmit }] = useForm(initialState, {
45
- onSubmit: (formData, ev) => {
46
- handleSubmit({ ...formData, ...customSubmit.current?.(ev) } as FormState);
47
- },
37
+ onSubmit: handleSubmit,
48
38
  });
49
39
 
50
40
  return isFormFinished ? (
51
41
  <CreditCardFormStatusTracker />
52
42
  ) : (
53
43
  <form onSubmit={onSubmit} className="space-y-m">
54
- {renderStep({
55
- sections,
56
- field,
57
- step,
58
- registerSubmit,
59
- })}
44
+ {renderStep({ sections, field, step })}
60
45
  <StepsNavigationButtons step={step} onPrevStep={onPrevStep} />
61
46
  </form>
62
47
  );