@redneckz/wildless-cms-uni-blocks 0.14.730 → 0.14.731

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 (333) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +11 -37
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  5. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  6. package/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  7. package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  8. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  9. package/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  10. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  11. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  12. package/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  13. package/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  14. package/bundle/components/CreditCardForm/renderInfo.d.ts +2 -2
  15. package/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  16. package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  17. package/bundle/components/CreditForm/CreditFormStep.d.ts +2 -2
  18. package/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -2
  19. package/bundle/components/CreditForm/renderInfo.d.ts +2 -2
  20. package/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  21. package/bundle/components/CreditForm/renderStep.d.ts +2 -2
  22. package/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  23. package/bundle/model/FormTypeFieldDef.d.ts +2 -0
  24. package/bundle/model/InputSectionsType.d.ts +10 -1
  25. package/bundle/services/retail/model/RetailFormContent.d.ts +1 -17
  26. package/bundle/services/retail/utils/calculateInputs.d.ts +3 -2
  27. package/bundle/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  28. package/bundle/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  29. package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  30. package/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  31. package/bundle/ui-kit/FormField/getPremium.d.ts +2 -2
  32. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  33. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  34. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  35. package/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  36. package/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -2
  37. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  38. package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  39. package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  40. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  41. package/dist/components/ApplicationLeadForm/getInitialFormState.js +6 -35
  42. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  43. package/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  44. package/dist/components/ApplicationLeadForm/renderInputs.js +2 -2
  45. package/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  46. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  47. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  48. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  49. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  50. package/dist/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  51. package/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  52. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  53. package/dist/components/CreditCardForm/renderInfo.d.ts +2 -2
  54. package/dist/components/CreditCardForm/renderInfo.js.map +1 -1
  55. package/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  56. package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  57. package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  58. package/dist/components/CreditForm/CreditFormStep.d.ts +2 -2
  59. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  60. package/dist/components/CreditForm/creditFormStepsData.d.ts +2 -2
  61. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  62. package/dist/components/CreditForm/renderInfo.d.ts +2 -2
  63. package/dist/components/CreditForm/renderInfo.js.map +1 -1
  64. package/dist/components/CreditForm/renderInputs.d.ts +2 -2
  65. package/dist/components/CreditForm/renderStep.d.ts +2 -2
  66. package/dist/components/CreditForm/renderStep.js.map +1 -1
  67. package/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  68. package/dist/model/FormTypeFieldDef.d.ts +2 -0
  69. package/dist/model/FormTypeFieldDef.js +2 -0
  70. package/dist/model/FormTypeFieldDef.js.map +1 -0
  71. package/dist/model/InputSectionsType.d.ts +10 -1
  72. package/dist/services/retail/model/RetailFormContent.d.ts +1 -17
  73. package/dist/services/retail/model/RetailFormContent.js +0 -2
  74. package/dist/services/retail/model/RetailFormContent.js.map +1 -1
  75. package/dist/services/retail/utils/calculateInputs.d.ts +3 -2
  76. package/dist/services/retail/utils/calculateInputs.js.map +1 -1
  77. package/dist/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  78. package/dist/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  79. package/dist/ui-kit/FormField/getField.js.map +1 -1
  80. package/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  81. package/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  82. package/dist/ui-kit/FormField/getPremium.d.ts +2 -2
  83. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  84. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  85. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  86. package/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  87. package/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -2
  88. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  89. package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  90. package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  91. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  92. package/lib/components/ApplicationLeadForm/getInitialFormState.js +6 -35
  93. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  94. package/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  95. package/lib/components/ApplicationLeadForm/renderInputs.js +2 -2
  96. package/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  97. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  98. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  99. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  100. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  101. package/lib/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  102. package/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  103. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  104. package/lib/components/CreditCardForm/renderInfo.d.ts +2 -2
  105. package/lib/components/CreditCardForm/renderInfo.js.map +1 -1
  106. package/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  107. package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  108. package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  109. package/lib/components/CreditForm/CreditFormStep.d.ts +2 -2
  110. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  111. package/lib/components/CreditForm/creditFormStepsData.d.ts +2 -2
  112. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  113. package/lib/components/CreditForm/renderInfo.d.ts +2 -2
  114. package/lib/components/CreditForm/renderInfo.js.map +1 -1
  115. package/lib/components/CreditForm/renderInputs.d.ts +2 -2
  116. package/lib/components/CreditForm/renderStep.d.ts +2 -2
  117. package/lib/components/CreditForm/renderStep.js.map +1 -1
  118. package/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  119. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  120. package/lib/model/FormTypeFieldDef.d.ts +2 -0
  121. package/lib/model/FormTypeFieldDef.js +2 -0
  122. package/lib/model/FormTypeFieldDef.js.map +1 -0
  123. package/lib/model/InputSectionsType.d.ts +10 -1
  124. package/lib/services/retail/model/RetailFormContent.d.ts +1 -17
  125. package/lib/services/retail/model/RetailFormContent.js +0 -2
  126. package/lib/services/retail/model/RetailFormContent.js.map +1 -1
  127. package/lib/services/retail/utils/calculateInputs.d.ts +3 -2
  128. package/lib/services/retail/utils/calculateInputs.js.map +1 -1
  129. package/lib/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  130. package/lib/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  131. package/lib/ui-kit/FormField/getField.js.map +1 -1
  132. package/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  133. package/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  134. package/lib/ui-kit/FormField/getPremium.d.ts +2 -2
  135. package/mobile/bundle/bundle.umd.js +11 -37
  136. package/mobile/bundle/bundle.umd.min.js +1 -1
  137. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  138. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  139. package/mobile/bundle/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  140. package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  141. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  142. package/mobile/bundle/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  143. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  144. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  145. package/mobile/bundle/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  146. package/mobile/bundle/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  147. package/mobile/bundle/components/CreditCardForm/renderInfo.d.ts +2 -2
  148. package/mobile/bundle/components/CreditCardForm/renderInputs.d.ts +2 -2
  149. package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  150. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +2 -2
  151. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -2
  152. package/mobile/bundle/components/CreditForm/renderInfo.d.ts +2 -2
  153. package/mobile/bundle/components/CreditForm/renderInputs.d.ts +2 -2
  154. package/mobile/bundle/components/CreditForm/renderStep.d.ts +2 -2
  155. package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  156. package/mobile/bundle/model/FormTypeFieldDef.d.ts +2 -0
  157. package/mobile/bundle/model/InputSectionsType.d.ts +10 -1
  158. package/mobile/bundle/services/retail/model/RetailFormContent.d.ts +1 -17
  159. package/mobile/bundle/services/retail/utils/calculateInputs.d.ts +3 -2
  160. package/mobile/bundle/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  161. package/mobile/bundle/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  162. package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  163. package/mobile/bundle/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  164. package/mobile/bundle/ui-kit/FormField/getPremium.d.ts +2 -2
  165. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  166. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  167. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  168. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  169. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +2 -2
  170. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  171. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  172. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  173. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  174. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +6 -35
  175. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  176. package/mobile/dist/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  177. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js +2 -2
  178. package/mobile/dist/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  179. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  180. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  181. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  182. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  183. package/mobile/dist/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  184. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  185. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  186. package/mobile/dist/components/CreditCardForm/renderInfo.d.ts +2 -2
  187. package/mobile/dist/components/CreditCardForm/renderInfo.js.map +1 -1
  188. package/mobile/dist/components/CreditCardForm/renderInputs.d.ts +2 -2
  189. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  190. package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  191. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +2 -2
  192. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  193. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +2 -2
  194. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  195. package/mobile/dist/components/CreditForm/renderInfo.d.ts +2 -2
  196. package/mobile/dist/components/CreditForm/renderInfo.js.map +1 -1
  197. package/mobile/dist/components/CreditForm/renderInputs.d.ts +2 -2
  198. package/mobile/dist/components/CreditForm/renderStep.d.ts +2 -2
  199. package/mobile/dist/components/CreditForm/renderStep.js.map +1 -1
  200. package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  201. package/mobile/dist/model/FormTypeFieldDef.d.ts +2 -0
  202. package/mobile/dist/model/FormTypeFieldDef.js +2 -0
  203. package/mobile/dist/model/FormTypeFieldDef.js.map +1 -0
  204. package/mobile/dist/model/InputSectionsType.d.ts +10 -1
  205. package/mobile/dist/services/retail/model/RetailFormContent.d.ts +1 -17
  206. package/mobile/dist/services/retail/model/RetailFormContent.js +0 -2
  207. package/mobile/dist/services/retail/model/RetailFormContent.js.map +1 -1
  208. package/mobile/dist/services/retail/utils/calculateInputs.d.ts +3 -2
  209. package/mobile/dist/services/retail/utils/calculateInputs.js.map +1 -1
  210. package/mobile/dist/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  211. package/mobile/dist/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  212. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  213. package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  214. package/mobile/dist/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  215. package/mobile/dist/ui-kit/FormField/getPremium.d.ts +2 -2
  216. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -3
  217. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  218. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +3 -60
  219. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.d.ts +2 -3
  220. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +2 -2
  221. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  222. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +2 -2
  223. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  224. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +2 -2
  225. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +6 -35
  226. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  227. package/mobile/lib/components/ApplicationLeadForm/renderInputs.d.ts +1 -1
  228. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js +2 -2
  229. package/mobile/lib/components/ApplicationLeadForm/renderInputs.js.map +1 -1
  230. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  231. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  232. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +2 -2
  233. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  234. package/mobile/lib/components/CreditCardForm/CreditCardFormContent.d.ts +4 -5
  235. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.d.ts +2 -2
  236. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  237. package/mobile/lib/components/CreditCardForm/renderInfo.d.ts +2 -2
  238. package/mobile/lib/components/CreditCardForm/renderInfo.js.map +1 -1
  239. package/mobile/lib/components/CreditCardForm/renderInputs.d.ts +2 -2
  240. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +2 -2
  241. package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
  242. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +2 -2
  243. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  244. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +2 -2
  245. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  246. package/mobile/lib/components/CreditForm/renderInfo.d.ts +2 -2
  247. package/mobile/lib/components/CreditForm/renderInfo.js.map +1 -1
  248. package/mobile/lib/components/CreditForm/renderInputs.d.ts +2 -2
  249. package/mobile/lib/components/CreditForm/renderStep.d.ts +2 -2
  250. package/mobile/lib/components/CreditForm/renderStep.js.map +1 -1
  251. package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +2 -2
  252. package/mobile/lib/model/FormTypeFieldDef.d.ts +2 -0
  253. package/mobile/lib/model/FormTypeFieldDef.js +2 -0
  254. package/mobile/lib/model/FormTypeFieldDef.js.map +1 -0
  255. package/mobile/lib/model/InputSectionsType.d.ts +10 -1
  256. package/mobile/lib/services/retail/model/RetailFormContent.d.ts +1 -17
  257. package/mobile/lib/services/retail/model/RetailFormContent.js +0 -2
  258. package/mobile/lib/services/retail/model/RetailFormContent.js.map +1 -1
  259. package/mobile/lib/services/retail/utils/calculateInputs.d.ts +3 -2
  260. package/mobile/lib/services/retail/utils/calculateInputs.js.map +1 -1
  261. package/mobile/lib/ui-kit/FormField/CustomFieldProps.d.ts +5 -2
  262. package/mobile/lib/ui-kit/FormField/getConsentDataProcessing.d.ts +1 -1
  263. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  264. package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  265. package/mobile/lib/ui-kit/FormField/getObjectValidator.d.ts +1 -1
  266. package/mobile/lib/ui-kit/FormField/getPremium.d.ts +2 -2
  267. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -22
  268. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -2
  269. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +4 -72
  270. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +48 -54
  271. package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -2
  272. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -43
  273. package/mobile/src/components/ApplicationLeadForm/renderInputs.tsx +5 -5
  274. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
  275. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -2
  276. package/mobile/src/components/CreditCardForm/CreditCardFormContent.ts +4 -5
  277. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +4 -3
  278. package/mobile/src/components/CreditCardForm/renderInfo.tsx +2 -2
  279. package/mobile/src/components/CreditCardForm/renderInputs.tsx +2 -2
  280. package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
  281. package/mobile/src/components/CreditForm/CreditFormStep.tsx +4 -4
  282. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +2 -2
  283. package/mobile/src/components/CreditForm/renderInfo.tsx +2 -2
  284. package/mobile/src/components/CreditForm/renderInputs.tsx +2 -2
  285. package/mobile/src/components/CreditForm/renderStep.tsx +2 -2
  286. package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +2 -2
  287. package/mobile/src/model/FormTypeFieldDef.ts +20 -0
  288. package/mobile/src/model/InputSectionsType.ts +12 -1
  289. package/mobile/src/services/retail/model/RetailFormContent.ts +1 -42
  290. package/mobile/src/services/retail/utils/calculateInputs.ts +3 -2
  291. package/mobile/src/ui-kit/FormField/CustomFieldProps.ts +6 -5
  292. package/mobile/src/ui-kit/FormField/Fields/AddressBranchField.tsx +2 -2
  293. package/mobile/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
  294. package/mobile/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
  295. package/mobile/src/ui-kit/FormField/getConsentDataProcessing.tsx +1 -1
  296. package/mobile/src/ui-kit/FormField/getField.tsx +3 -5
  297. package/mobile/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
  298. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
  299. package/mobile/src/ui-kit/FormField/getPremium.tsx +2 -2
  300. package/package.json +1 -1
  301. package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -22
  302. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +3 -2
  303. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +4 -72
  304. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +48 -54
  305. package/src/components/ApplicationLeadForm/applicationFormData.tsx +2 -2
  306. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -43
  307. package/src/components/ApplicationLeadForm/renderInputs.tsx +5 -5
  308. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +2 -2
  309. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +2 -2
  310. package/src/components/CreditCardForm/CreditCardFormContent.ts +4 -5
  311. package/src/components/CreditCardForm/CreditCardFormStep.tsx +4 -3
  312. package/src/components/CreditCardForm/renderInfo.tsx +2 -2
  313. package/src/components/CreditCardForm/renderInputs.tsx +2 -2
  314. package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +2 -2
  315. package/src/components/CreditForm/CreditFormStep.tsx +4 -4
  316. package/src/components/CreditForm/creditFormStepsData.tsx +2 -2
  317. package/src/components/CreditForm/renderInfo.tsx +2 -2
  318. package/src/components/CreditForm/renderInputs.tsx +2 -2
  319. package/src/components/CreditForm/renderStep.tsx +2 -2
  320. package/src/components/CreditForm/useCreditFormAPI.tsx +2 -2
  321. package/src/model/FormTypeFieldDef.ts +20 -0
  322. package/src/model/InputSectionsType.ts +12 -1
  323. package/src/services/retail/model/RetailFormContent.ts +1 -42
  324. package/src/services/retail/utils/calculateInputs.ts +3 -2
  325. package/src/ui-kit/FormField/CustomFieldProps.ts +6 -5
  326. package/src/ui-kit/FormField/Fields/AddressBranchField.tsx +2 -2
  327. package/src/ui-kit/FormField/Fields/EmailField.tsx +1 -1
  328. package/src/ui-kit/FormField/Fields/PartnerCommentsField.tsx +1 -1
  329. package/src/ui-kit/FormField/getConsentDataProcessing.tsx +1 -1
  330. package/src/ui-kit/FormField/getField.tsx +3 -5
  331. package/src/ui-kit/FormField/getNamesFromInput.tsx +1 -1
  332. package/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
  333. package/src/ui-kit/FormField/getPremium.tsx +2 -2
@@ -1,11 +1,11 @@
1
- import { type SectionsProps } from '../../model/InputSectionsType';
1
+ import { type SectionsRetailProps } from '../../model/InputSectionsType';
2
2
  import {
3
3
  CALCULATOR_CONTENT,
4
4
  COMMON_RETAIL_CONTENT,
5
5
  DELIVERY_CREDIT_CONTENT,
6
6
  } from '../../services/retail/content';
7
7
 
8
- export const stepsSectionsMap: SectionsProps[][] = [
8
+ export const stepsSectionsMap: SectionsRetailProps[][] = [
9
9
  CALCULATOR_CONTENT,
10
10
  ...COMMON_RETAIL_CONTENT,
11
11
  DELIVERY_CREDIT_CONTENT,
@@ -1,7 +1,7 @@
1
- import { type FieldDef } from '../../services/retail/model/RetailFormContent';
1
+ import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
2
2
  import { InfoCard } from '../../ui-kit/InfoCard/InfoCard';
3
3
 
4
- export const renderInfo = (inputs: FieldDef[] = []) => {
4
+ export const renderInfo = (inputs: FieldRetailDef[] = []) => {
5
5
  const infoInputs = inputs.filter((_) => _.fieldType === 'info');
6
6
 
7
7
  return infoInputs.length
@@ -1,11 +1,11 @@
1
1
  import { type FormFieldRegisterer } from '../../hooks/useForm';
2
2
  import { InputsRetailMap } from '../../services/retail/inputs';
3
3
  import { type LeadFormState } from '../../services/retail/model/LeadFormState';
4
- import { type FieldDef } from '../../services/retail/model/RetailFormContent';
4
+ import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
5
5
  import { getField } from '../../ui-kit/FormField/getField';
6
6
 
7
7
  export interface RenderInputsProps {
8
- inputs: FieldDef[];
8
+ inputs: FieldRetailDef[];
9
9
  field: FormFieldRegisterer<LeadFormState>;
10
10
  params?: Record<string, any>;
11
11
  }
@@ -1,17 +1,17 @@
1
1
  import { type FormFieldRegisterer, type FormOperatorProps } from '../../hooks/useForm';
2
+ import { type SectionsRetailProps } from '../../model/InputSectionsType';
2
3
  import { type LeadFormState } from '../../services/retail/model/LeadFormState';
3
4
  import { calculateInputs, type GetValue } from '../../services/retail/utils/calculateInputs';
4
5
  import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
5
6
  import { renderTitle } from '../../ui-kit/FormField/renderTitle';
6
7
  import { style } from '../../utils/style';
7
- import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
8
8
  import { renderInfo } from './renderInfo';
9
9
  import { renderInputs } from './renderInputs';
10
10
 
11
11
  export type CustomSubmit = FormOperatorProps<LeadFormState>['onSubmit'];
12
12
 
13
13
  export interface StepProps {
14
- sections?: SectionsProps[];
14
+ sections?: SectionsRetailProps[];
15
15
  field: FormFieldRegisterer<LeadFormState>;
16
16
  step: number;
17
17
  params?: Record<string, any>;
@@ -4,7 +4,7 @@ import { updateUserTask } from '../../api/RetailAPI/updateUserTask';
4
4
  import { useRetailFormStore } from '../../hooks/useRetailFormStore';
5
5
  import { getCreditFormTaskData } from '../../services/retail/adaptors/getCreditFormTaskData';
6
6
  import { type LeadFormState } from '../../services/retail/model/LeadFormState';
7
- import { type FieldDef } from '../../services/retail/model/RetailFormContent';
7
+ import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
8
8
  import { calculateInputs, type GetValue } from '../../services/retail/utils/calculateInputs';
9
9
  import { getObjectValidator } from '../../ui-kit/FormField/getObjectValidator';
10
10
  import { objectValidator } from '../../validation/objectValidator';
@@ -13,7 +13,7 @@ import { getInitialFormState } from './getInitialFormState';
13
13
 
14
14
  interface CreditFormApiProps {
15
15
  step: number;
16
- inputs: FieldDef[];
16
+ inputs: FieldRetailDef[];
17
17
  onNextStep: () => void;
18
18
  onFinish?: () => void;
19
19
  }
@@ -0,0 +1,20 @@
1
+ /** @hidden */
2
+ export type FormTypeFieldDef =
3
+ | ''
4
+ | 'ACQR'
5
+ | 'ANALITIC'
6
+ | 'ANTIFRAUD'
7
+ | 'BCRD'
8
+ | 'BROK'
9
+ | 'BROKACCOUNT'
10
+ | 'COLLECTION'
11
+ | 'CORRUPTION'
12
+ | 'CRED'
13
+ | 'DPST'
14
+ | 'PRODUCT'
15
+ | 'SELFCOLLECTION'
16
+ | 'KVED'
17
+ | 'ULTRASERVICE'
18
+ | 'FEEDBACK'
19
+ | 'FEEDBACK_QS'
20
+ | 'OUTSERVICE';
@@ -1,4 +1,5 @@
1
- import { type FieldDef } from '../components/ApplicationLeadForm/ApplicationLeadFormContent';
1
+ import { type FieldDef } from '../components/ApplicationForm/ApplicationFormContent';
2
+ import { type FieldRetailDef } from '../services/retail/model/RetailFormContent';
2
3
  import { type ColumnsCount } from './ColumnCount';
3
4
  import { type TitleProps } from './HeadlineType';
4
5
 
@@ -14,3 +15,13 @@ export interface InputSectionsType {
14
15
  /** @hidden */
15
16
  sections?: SectionsProps[];
16
17
  }
18
+
19
+ export type SectionsRetailProps = TitleProps & {
20
+ columns?: ColumnsCount;
21
+ inputs?: FieldRetailDef[];
22
+ };
23
+
24
+ export interface InputRetailSectionsType {
25
+ /** @hidden */
26
+ sections?: SectionsRetailProps[];
27
+ }
@@ -1,6 +1,3 @@
1
- /* eslint-disable max-lines */
2
- /* eslint-disable max-len */
3
-
4
1
  import { type LabelProps, type LinkButtonVersion, type TextProps } from '../external/types';
5
2
  import { type NameFieldDef } from './LeadFormState';
6
3
 
@@ -45,22 +42,6 @@ export type FieldCommonDef = FieldDefaultDef & {
45
42
  fieldType: 'common';
46
43
  };
47
44
 
48
- /**
49
- * @title Значение по умолчанию
50
- * @enumNames ["Валютный контроль","Документарные операции","Конверсионные операции","Иные вопросы ВЭД"]
51
- */
52
- type VedTypes = 'currencyControl' | 'documentOperations' | 'conversionTransactions' | 'otherIssues';
53
-
54
- /**
55
- * @title Поле ввода ВЭД
56
- * @default {"fieldType": "ved", "name": "vedTypes", "defaultValue": "currencyControl"}
57
- */
58
- export type FieldVedDef = FieldDefaultDef & {
59
- /** @default "ved" */
60
- fieldType: 'ved';
61
- defaultValue?: VedTypes;
62
- };
63
-
64
45
  /**
65
46
  * @title Текст для отображения в карточке информации
66
47
  * @default {"fieldType": "info"}
@@ -76,26 +57,4 @@ export type FieldInfoDef = FieldDefaultDef &
76
57
  * @default { "fieldType": "common" }
77
58
  */
78
59
 
79
- export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
80
-
81
- /** @hidden */
82
- export type TypeFormFieldDef =
83
- | ''
84
- | 'ACQR'
85
- | 'ANALITIC'
86
- | 'ANTIFRAUD'
87
- | 'BCRD'
88
- | 'BROK'
89
- | 'BROKACCOUNT'
90
- | 'COLLECTION'
91
- | 'CORRUPTION'
92
- | 'CRED'
93
- | 'DPST'
94
- | 'PRODUCT'
95
- | 'SELFCOLLECTION'
96
- | 'KVED'
97
- | 'ULTRASERVICE'
98
- | 'PREMIUMSERVICE'
99
- | 'FEEDBACK'
100
- | 'FEEDBACK_QS'
101
- | 'OUTSERVICE';
60
+ export type FieldRetailDef = FieldCommonDef | FieldInfoDef;
@@ -1,10 +1,11 @@
1
+ import { type FieldDef } from '../../../components/ApplicationForm/ApplicationFormContent';
1
2
  import { type Option } from '../../../ui-kit/Select/Option';
2
3
  import { type LeadFormState } from '../model/LeadFormState';
3
- import { type FieldDef } from '../model/RetailFormContent';
4
+ import { type FieldRetailDef } from '../model/RetailFormContent';
4
5
 
5
6
  export type GetValue = <K extends keyof LeadFormState>(name: K) => LeadFormState[K];
6
7
 
7
- export const calculateInputs = (getValue: GetValue) => (inputs: FieldDef[], step: number) =>
8
+ export const calculateInputs = (getValue: GetValue) => (inputs: FieldRetailDef[], step: number) =>
8
9
  inputs
9
10
  .filter((_) => _)
10
11
  .map((_) => {
@@ -1,13 +1,14 @@
1
+ import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
1
2
  import { type FormFieldRegisterer } from '../../hooks/useForm';
2
- import {
3
- type FieldDef,
4
- type TypeFormFieldDef,
5
- } from '../../services/retail/model/RetailFormContent';
3
+ import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
6
4
 
7
5
  export interface CustomFieldProps {
8
6
  field: FormFieldRegisterer<any>;
9
7
  input?: FieldDef;
10
8
  url?: string;
11
9
  params?: Record<string, any>;
12
- typeForm?: TypeFormFieldDef;
10
+ }
11
+
12
+ export interface CustomFieldPropsWithTypeForm extends CustomFieldProps {
13
+ typeForm?: FormTypeFieldDef;
13
14
  }
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useBranches } from '../../../hooks/useBranches';
4
4
  import { useBranchesByRegions } from '../../../hooks/useBranchesByRegions';
5
- import { type TypeFormFieldDef } from '../../../services/retail/model/RetailFormContent';
5
+ import { type FormTypeFieldDef } from '../../../model/FormTypeFieldDef';
6
6
  import { SelectControl } from '../../Select/SelectControl';
7
7
  import { type CustomFieldProps } from '../CustomFieldProps';
8
8
  import { validatorObj } from '../getObjectValidator';
@@ -14,7 +14,7 @@ interface RegionFieldProps extends CustomFieldProps {
14
14
  }
15
15
 
16
16
  export const AddressBranchField = JSX<RegionFieldProps>(({ field, input, params }) => {
17
- const isPremium = getPremium(params?.typeForm as TypeFormFieldDef);
17
+ const isPremium = getPremium(params?.typeForm as FormTypeFieldDef);
18
18
 
19
19
  const fieldRegion = field('region');
20
20
  const regionKey = fieldRegion?.value?.key as string;
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type FieldDef } from '../../../services/retail/model/RetailFormContent';
2
+ import { type FieldDef } from '../../../components/ApplicationForm/ApplicationFormContent';
3
3
  import { InputControl } from '../../Input/InputControl';
4
4
  import { type CustomFieldProps } from '../CustomFieldProps';
5
5
  import { validatorObj } from '../getObjectValidator';
@@ -1,5 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type FieldDef } from '../../../services/retail/model/RetailFormContent';
2
+ import { type FieldDef } from '../../../components/ApplicationForm/ApplicationFormContent';
3
3
  import { InputControl } from '../../Input/InputControl';
4
4
  import { type CustomFieldProps } from '../CustomFieldProps';
5
5
  import { validatorObj } from '../getObjectValidator';
@@ -1,4 +1,4 @@
1
- import type { FieldDef } from '../../components/ApplicationLeadForm/ApplicationLeadFormContent';
1
+ import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
2
2
 
3
3
  export const getConsentDataProcessing = (inputs: FieldDef[]) =>
4
4
  inputs?.find((_) => _?.name === 'consentDataProcessing');
@@ -1,9 +1,7 @@
1
1
  //TODO: Убрать обращение к компонентам т.к. ApplicationForm
2
- import {
3
- type FieldDef,
4
- type TypeFormFieldDef,
5
- } from '../../components/ApplicationForm/ApplicationFormContent';
2
+ import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
6
3
  import { type FormFieldRegisterer } from '../../hooks/useForm';
4
+ import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
7
5
  import { type VNode } from '../../model/VNode';
8
6
  import { InputControl } from '../Input/InputControl';
9
7
  import { type CustomFieldProps } from './CustomFieldProps';
@@ -70,7 +68,7 @@ const InputsMap = {
70
68
  <InputControl label="Дата и время обращения в Банк" {...props} />
71
69
  ),
72
70
  region: (props: CustomFieldProps) =>
73
- getPremium(props?.params?.typeForm as TypeFormFieldDef) ? (
71
+ getPremium(props?.params?.typeForm as FormTypeFieldDef) ? (
74
72
  <RegionPremiumField {...props} />
75
73
  ) : (
76
74
  <RegionField {...props} />
@@ -1,4 +1,4 @@
1
- import { type FieldDef } from '../../services/retail/model/RetailFormContent';
1
+ import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
2
2
 
3
3
  export const getNamesFromInput = (inputs: FieldDef[]) =>
4
4
  Object.values(inputs.filter((_) => _))?.map((_) => _.name);
@@ -1,4 +1,4 @@
1
- import { type FieldDef } from '../../services/retail/model/RetailFormContent';
1
+ import { type FieldDef } from '../../components/ApplicationForm/ApplicationFormContent';
2
2
  import { type Validator } from '../../validation/validator';
3
3
  import { getNamesFromInput } from './getNamesFromInput';
4
4
  import {
@@ -1,3 +1,3 @@
1
- import { type TypeFormFieldDef } from '../../services/retail/model/RetailFormContent';
1
+ import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
2
2
 
3
- export const getPremium = (typeForm: TypeFormFieldDef = ''): boolean => typeForm === 'ULTRASERVICE';
3
+ export const getPremium = (typeForm: FormTypeFieldDef = ''): boolean => typeForm === 'ULTRASERVICE';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.730",
3
+ "version": "0.14.731",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -3,6 +3,7 @@
3
3
 
4
4
  import { type AspectsProps } from '../../model/AspectsProps';
5
5
  import { type ColumnsCount } from '../../model/ColumnCount';
6
+ import { type FormTypeFieldDef } from '../../model/FormTypeFieldDef';
6
7
  import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
7
8
  import { type InputSectionsType } from '../../model/InputSectionsType';
8
9
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
@@ -83,27 +84,6 @@ export type FieldInfoDef = FieldDefaultDef &
83
84
 
84
85
  export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
85
86
 
86
- /** @hidden */
87
- export type TypeFormFieldDef =
88
- | ''
89
- | 'ACQR'
90
- | 'ANALITIC'
91
- | 'ANTIFRAUD'
92
- | 'BCRD'
93
- | 'BROK'
94
- | 'BROKACCOUNT'
95
- | 'COLLECTION'
96
- | 'CORRUPTION'
97
- | 'CRED'
98
- | 'DPST'
99
- | 'PRODUCT'
100
- | 'SELFCOLLECTION'
101
- | 'KVED'
102
- | 'ULTRASERVICE'
103
- | 'FEEDBACK'
104
- | 'FEEDBACK_QS'
105
- | 'OUTSERVICE';
106
-
107
87
  /** @hidden */
108
88
  export type EndpointType = 'lead' | 'sendcorporatelead';
109
89
 
@@ -157,7 +137,7 @@ export type ApplicationFormContent = UniBlockContent &
157
137
  /** @default "" */
158
138
  target?: Target;
159
139
  };
160
- typeForm?: TypeFormFieldDef;
140
+ typeForm?: FormTypeFieldDef;
161
141
  endpoint?: EndpointType;
162
142
  /** @title Дополнительные параметры формы */
163
143
  additionalParams?: additionalParamsType;
@@ -1,6 +1,7 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useForm } from '../../hooks/useForm';
4
+ import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
4
5
  import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
5
6
  import { useDialog } from '../../ui-kit/DialogManager/useDialog';
6
7
  import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
@@ -10,7 +11,7 @@ import { ResponseTypeDialog } from '../../ui-kit/ResponseTypeDialog/ResponseType
10
11
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
11
12
  import { style } from '../../utils/style';
12
13
  import { applicationFormData } from './applicationFormData';
13
- import { type ApplicationLeadFormContent, type FieldDef } from './ApplicationLeadFormContent';
14
+ import { type ApplicationLeadFormContent } from './ApplicationLeadFormContent';
14
15
  import { renderInputs } from './renderInputs';
15
16
  import { renderSubmitButton } from './renderSubmitButton';
16
17
  import { useApplicationLeadApi } from './useApplicationLeadApi';
@@ -21,7 +22,7 @@ interface ApplicationLeadFormProps extends ApplicationLeadFormContent, UniBlockP
21
22
  export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
22
23
  ({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
23
24
  const inputs = useMemo(
24
- () => (applicationFormData?.flatMap((_) => _?.inputs) || []) as FieldDef[],
25
+ () => (applicationFormData?.flatMap((_) => _?.inputs) || []) as FieldRetailDef[],
25
26
  [applicationFormData],
26
27
  );
27
28
 
@@ -1,87 +1,19 @@
1
- import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
2
- import { type InputSectionsType } from '../../model/InputSectionsType';
1
+ import { type TextProps, type TitleProps } from '../../model/HeadlineType';
2
+ import { type InputRetailSectionsType } from '../../model/InputSectionsType';
3
3
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
4
- import { type NameFieldDef } from '../../ui-kit/FormField/NameFieldDef';
5
- import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
6
4
 
7
- interface Required {
8
- /** @title Обязательно для заполнения */
9
- required?: boolean;
10
- }
5
+ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
11
6
 
12
7
  export type SubmitButtonProps = TextProps & {
13
8
  version?: LinkButtonVersion;
14
9
  };
15
10
 
16
- export type ConditionFieldProps = {
17
- /** @title Условия отображения полей формы */
18
- condition?: {
19
- name: NameFieldDef;
20
- /** @title Значения при которых отображаются поля */
21
- values: string[];
22
- };
23
- };
24
-
25
- export type FilledByEsiaProps = {
26
- /** @title Заполняется через госуслуги */
27
- filledByEsia?: boolean;
28
- };
29
-
30
- export type FieldDefaultDef = Required &
31
- TextProps &
32
- LabelProps &
33
- ConditionFieldProps &
34
- FilledByEsiaProps & {
35
- name?: NameFieldDef;
36
- };
37
-
38
- /**
39
- * @title Поля ввода по умолчанию
40
- * @default {"fieldType": "common"}
41
- */
42
- export type FieldCommonDef = FieldDefaultDef & {
43
- /** @default "common" */
44
- fieldType: 'common';
45
- dadata?: boolean;
46
- };
47
-
48
- /**
49
- * @title Значение по умолчанию
50
- * @enumNames ["Валютный контроль","Документарные операции","Конверсионные операции","Иные вопросы ВЭД"]
51
- */
52
- type VedTypes = 'currencyControl' | 'documentOperations' | 'conversionTransactions' | 'otherIssues';
53
-
54
- /**
55
- * @title Поле ввода ВЭД
56
- * @default {"fieldType": "ved", "name": "vedTypes", "defaultValue": "currencyControl"}
57
- */
58
- export type FieldVedDef = FieldDefaultDef & {
59
- /** @default "ved" */
60
- fieldType: 'ved';
61
- defaultValue?: VedTypes;
62
- };
63
-
64
- /**
65
- * @title Текст для отображения в карточке информации
66
- * @default {"fieldType": "info"}
67
- */
68
- export type FieldInfoDef = FieldDefaultDef & {
69
- /** @default "info" */
70
- fieldType: 'info';
71
- };
72
-
73
- /**
74
- * @title Поле
75
- * @default { "fieldType": "common" }
76
- */
77
- export type FieldDef = FieldCommonDef | FieldVedDef | FieldInfoDef;
78
-
79
11
  /**
80
12
  * @title Форма заявки настраиваемая
81
13
  */
82
14
  export type ApplicationLeadFormContent = UniBlockContent &
83
15
  TitleProps &
84
- InputSectionsType & {
16
+ InputRetailSectionsType & {
85
17
  /** @title Кнопка */
86
18
  button?: SubmitButtonProps;
87
19
  /** @title Номер кредитной программы */
@@ -3,10 +3,7 @@ import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type FormFieldRegisterer, type VNode } from '../../services/retail/external/types';
4
4
  import { InputsConsentsMap } from '../../services/retail/inputs';
5
5
  import { type LeadFormState } from '../../services/retail/model/LeadFormState';
6
- import {
7
- type FieldDef,
8
- type TypeFormFieldDef,
9
- } from '../../services/retail/model/RetailFormContent';
6
+ import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
10
7
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
11
8
  import { Foldable } from '../../ui-kit/Foldable/Foldable';
12
9
  import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
@@ -18,66 +15,63 @@ import { renderErrorText } from '../../ui-kit/Input/renderErrorText';
18
15
  import { withValidator } from '../../validation/withValidator';
19
16
 
20
17
  export interface GroupedConsentsProps {
21
- inputs?: FieldDef[];
22
- typeForm?: TypeFormFieldDef;
18
+ inputs?: FieldRetailDef[];
23
19
  field: FormFieldRegisterer<LeadFormState>;
24
20
  }
25
21
 
26
22
  const CONSENT_ALL_DOCS_TEXT = 'Согласие на все документы';
27
23
  const CONSENT_REQUIRED = 'Отметьте все обязательные соглашения';
28
24
 
29
- export const GroupedConsents = JSX<GroupedConsentsProps>(
30
- ({ inputs = [], typeForm = '', field, key }) => {
31
- const isChecked = inputs.every((_) => Boolean(field(_.name as keyof LeadFormState).value));
25
+ export const GroupedConsents = JSX<GroupedConsentsProps>(({ inputs = [], field, key }) => {
26
+ const isChecked = inputs.every((_) => Boolean(field(_.name as keyof LeadFormState).value));
32
27
 
33
- const handleGeneralToggle = (value: boolean) => {
34
- for (const item of inputs) {
35
- const itemField = field(item.name as keyof LeadFormState);
36
- itemField?.onChange && itemField.onChange(value);
37
- }
38
- };
28
+ const handleGeneralToggle = (value: boolean) => {
29
+ for (const item of inputs) {
30
+ const itemField = field(item.name as keyof LeadFormState);
31
+ itemField?.onChange && itemField.onChange(value);
32
+ }
33
+ };
39
34
 
40
- const hasValidationErrors = useMemo(
41
- () =>
42
- inputs
43
- ?.filter((_) => _.required)
44
- ?.some((_) =>
45
- Boolean(
46
- withValidator(
47
- field(_?.name as keyof LeadFormState),
48
- validatorObj[_?.name as keyof LeadFormState],
49
- ).error,
50
- ),
35
+ const hasValidationErrors = useMemo(
36
+ () =>
37
+ inputs
38
+ ?.filter((_) => _.required)
39
+ ?.some((_) =>
40
+ Boolean(
41
+ withValidator(
42
+ field(_?.name as keyof LeadFormState),
43
+ validatorObj[_?.name as keyof LeadFormState],
44
+ ).error,
51
45
  ),
52
- [inputs],
53
- );
46
+ ),
47
+ [inputs],
48
+ );
54
49
 
55
- return (
56
- <div className="w-fit">
57
- <Foldable
58
- isFoldButtonOnTop
59
- unfoldedByDefault
60
- renderFoldableSection={({ isUnfolded }) => (
61
- <FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
62
- {inputs.map(getField(field, { typeForm }, InputsConsentsMap))}
63
- </FoldableSection>
64
- )}
65
- renderFoldButton={renderGeneralCheckbox(
66
- <div>
67
- <Checkbox
68
- value={isChecked}
69
- onChange={handleGeneralToggle}
70
- text={CONSENT_ALL_DOCS_TEXT}
71
- key={key}
72
- />
73
- {renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')}
74
- </div>,
75
- )}
76
- />
77
- </div>
78
- );
79
- },
80
- );
50
+ return (
51
+ <div className="w-fit">
52
+ <Foldable
53
+ isFoldButtonOnTop
54
+ unfoldedByDefault
55
+ renderFoldableSection={({ isUnfolded }) => (
56
+ <FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
57
+ {inputs.map(getField(field, {}, InputsConsentsMap))}
58
+ </FoldableSection>
59
+ )}
60
+ renderFoldButton={renderGeneralCheckbox(
61
+ <div>
62
+ <Checkbox
63
+ value={isChecked}
64
+ onChange={handleGeneralToggle}
65
+ text={CONSENT_ALL_DOCS_TEXT}
66
+ key={key}
67
+ />
68
+ {renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')}
69
+ </div>,
70
+ )}
71
+ />
72
+ </div>
73
+ );
74
+ });
81
75
 
82
76
  const renderGeneralCheckbox =
83
77
  (generalCheckBox: VNode) =>
@@ -1,6 +1,6 @@
1
- import { type SectionsProps } from '../../model/InputSectionsType';
1
+ import { type SectionsRetailProps } from '../../model/InputSectionsType';
2
2
 
3
- export const applicationFormData: SectionsProps[] = [
3
+ export const applicationFormData: SectionsRetailProps[] = [
4
4
  {
5
5
  columns: 2,
6
6
  inputs: [