@redneckz/wildless-cms-uni-blocks 0.14.201 → 0.14.202

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 (455) hide show
  1. package/bin/migration-scripts/0.14.198.js +96 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +170 -210
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  6. package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  7. package/bundle/components/ApplicationForm/RegionField.d.ts +2 -0
  8. package/bundle/components/ApplicationForm/formStyle.d.ts +1 -1
  9. package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  10. package/bundle/components/ApplicationFormCustom/contants.d.ts +2 -0
  11. package/bundle/components/ApplicationFormCustom/getField.d.ts +2 -1
  12. package/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  13. package/bundle/ui-kit/Input/renderLabel.d.ts +2 -0
  14. package/bundle/ui-kit/Select/Select.d.ts +1 -0
  15. package/{lib/components/ApplicationForm → bundle/ui-kit/Select}/SelectControl.d.ts +1 -1
  16. package/dist/components/ApplicationForm/AddressBranchField.js +3 -2
  17. package/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  18. package/dist/components/ApplicationForm/ApplicationFieldsetLayout.js +1 -1
  19. package/dist/components/ApplicationForm/ApplicationFieldsetLayout.js.map +1 -1
  20. package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  21. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  22. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  23. package/dist/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  24. package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  25. package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
  26. package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
  27. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  28. package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  29. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  31. package/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
  32. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  33. package/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  34. package/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
  35. package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  36. package/dist/components/ApplicationForm/RegionField.d.ts +2 -0
  37. package/dist/components/ApplicationForm/RegionField.js +3 -3
  38. package/dist/components/ApplicationForm/RegionField.js.map +1 -1
  39. package/dist/components/ApplicationForm/RegionPremiumField.js +1 -1
  40. package/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -1
  41. package/dist/components/ApplicationForm/formStyle.d.ts +1 -1
  42. package/dist/components/ApplicationForm/formStyle.js +1 -1
  43. package/dist/components/ApplicationForm/formStyle.js.map +1 -1
  44. package/dist/components/ApplicationForm/renderAcquiringRegion.js +1 -1
  45. package/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  46. package/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  47. package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  48. package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  49. package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  50. package/dist/components/ApplicationForm/renderUserData.js +1 -1
  51. package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  52. package/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  53. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  54. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -3
  55. package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  56. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  57. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +1 -0
  58. package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -1
  59. package/dist/components/ApplicationFormCustom/contants.d.ts +2 -0
  60. package/dist/components/ApplicationFormCustom/contants.js +7 -0
  61. package/dist/components/ApplicationFormCustom/contants.js.map +1 -0
  62. package/dist/components/ApplicationFormCustom/getField.d.ts +2 -1
  63. package/dist/components/ApplicationFormCustom/getField.js +13 -13
  64. package/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  65. package/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  66. package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  67. package/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  68. package/dist/components/ApplicationFormCustom/getObjectValidator.js +6 -4
  69. package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  70. package/dist/ui-kit/DatePicker/DatePicker.js +2 -2
  71. package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  72. package/dist/ui-kit/DatePicker/DatePickerControl.js +9 -0
  73. package/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -0
  74. package/dist/ui-kit/Input/Input.js +2 -3
  75. package/dist/ui-kit/Input/Input.js.map +1 -1
  76. package/dist/ui-kit/Input/renderErrorText.js +1 -1
  77. package/dist/ui-kit/Input/renderLabel.d.ts +2 -0
  78. package/dist/ui-kit/Input/renderLabel.js +7 -0
  79. package/dist/ui-kit/Input/renderLabel.js.map +1 -0
  80. package/dist/ui-kit/Select/Select.d.ts +1 -0
  81. package/dist/ui-kit/Select/Select.js +8 -5
  82. package/dist/ui-kit/Select/Select.js.map +1 -1
  83. package/dist/{components/ApplicationForm → ui-kit/Select}/SelectControl.d.ts +1 -1
  84. package/dist/{components/ApplicationForm → ui-kit/Select}/SelectControl.js +2 -2
  85. package/dist/ui-kit/Select/SelectControl.js.map +1 -0
  86. package/lib/common.css +1 -1
  87. package/lib/components/ApplicationForm/AddressBranchField.js +3 -2
  88. package/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  89. package/lib/components/ApplicationForm/ApplicationFieldsetLayout.js +1 -1
  90. package/lib/components/ApplicationForm/ApplicationFieldsetLayout.js.map +1 -1
  91. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +0 -2
  92. package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +0 -2
  93. package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  94. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  95. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  96. package/lib/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  97. package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  98. package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
  99. package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
  100. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  101. package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  102. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  103. package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  104. package/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
  105. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  106. package/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  107. package/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
  108. package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  109. package/lib/components/ApplicationForm/RegionField.d.ts +2 -0
  110. package/lib/components/ApplicationForm/RegionField.js +3 -3
  111. package/lib/components/ApplicationForm/RegionField.js.map +1 -1
  112. package/lib/components/ApplicationForm/RegionPremiumField.js +1 -1
  113. package/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -1
  114. package/lib/components/ApplicationForm/formStyle.d.ts +1 -1
  115. package/lib/components/ApplicationForm/formStyle.js +1 -1
  116. package/lib/components/ApplicationForm/formStyle.js.map +1 -1
  117. package/lib/components/ApplicationForm/renderAcquiringRegion.js +1 -1
  118. package/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  119. package/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  120. package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  121. package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  122. package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  123. package/lib/components/ApplicationForm/renderUserData.js +1 -1
  124. package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  125. package/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  126. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  127. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +3 -2
  128. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -3
  129. package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  130. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  131. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +1 -0
  132. package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -1
  133. package/lib/components/ApplicationFormCustom/contants.d.ts +2 -0
  134. package/lib/components/ApplicationFormCustom/contants.js +5 -0
  135. package/lib/components/ApplicationFormCustom/contants.js.map +1 -0
  136. package/lib/components/ApplicationFormCustom/getField.d.ts +1 -1
  137. package/lib/components/ApplicationFormCustom/getField.js +13 -13
  138. package/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  139. package/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  140. package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  141. package/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  142. package/lib/components/ApplicationFormCustom/getObjectValidator.js +6 -4
  143. package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  144. package/lib/ui-kit/DatePicker/DatePicker.js +2 -2
  145. package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  146. package/lib/ui-kit/DatePicker/DatePickerControl.js +7 -0
  147. package/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -0
  148. package/lib/ui-kit/Input/Input.js +2 -3
  149. package/lib/ui-kit/Input/Input.js.map +1 -1
  150. package/lib/ui-kit/Input/renderErrorText.js +1 -1
  151. package/lib/ui-kit/Input/renderLabel.d.ts +1 -0
  152. package/lib/ui-kit/Input/renderLabel.js +4 -0
  153. package/lib/ui-kit/Input/renderLabel.js.map +1 -0
  154. package/lib/ui-kit/Select/Select.d.ts +1 -0
  155. package/lib/ui-kit/Select/Select.js +8 -5
  156. package/lib/ui-kit/Select/Select.js.map +1 -1
  157. package/{mobile/bundle/components/ApplicationForm → lib/ui-kit/Select}/SelectControl.d.ts +1 -1
  158. package/lib/{components/ApplicationForm → ui-kit/Select}/SelectControl.js +2 -2
  159. package/lib/ui-kit/Select/SelectControl.js.map +1 -0
  160. package/mobile/bundle/bundle.umd.js +170 -210
  161. package/mobile/bundle/bundle.umd.min.js +1 -1
  162. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  163. package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  164. package/mobile/bundle/components/ApplicationForm/RegionField.d.ts +2 -0
  165. package/mobile/bundle/components/ApplicationForm/formStyle.d.ts +1 -1
  166. package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  167. package/mobile/bundle/components/ApplicationFormCustom/contants.d.ts +2 -0
  168. package/mobile/bundle/components/ApplicationFormCustom/getField.d.ts +2 -1
  169. package/mobile/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  170. package/mobile/bundle/ui-kit/Input/renderLabel.d.ts +2 -0
  171. package/mobile/bundle/ui-kit/Select/Select.d.ts +1 -0
  172. package/{bundle/components/ApplicationForm → mobile/bundle/ui-kit/Select}/SelectControl.d.ts +1 -1
  173. package/mobile/dist/components/ApplicationForm/AddressBranchField.js +3 -2
  174. package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
  175. package/mobile/dist/components/ApplicationForm/ApplicationFieldsetLayout.js +1 -1
  176. package/mobile/dist/components/ApplicationForm/ApplicationFieldsetLayout.js.map +1 -1
  177. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
  178. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  179. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  180. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  181. package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  182. package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
  183. package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
  184. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  185. package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  186. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  187. package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  188. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
  189. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  190. package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  191. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
  192. package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  193. package/mobile/dist/components/ApplicationForm/RegionField.d.ts +2 -0
  194. package/mobile/dist/components/ApplicationForm/RegionField.js +3 -3
  195. package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
  196. package/mobile/dist/components/ApplicationForm/RegionPremiumField.js +1 -1
  197. package/mobile/dist/components/ApplicationForm/RegionPremiumField.js.map +1 -1
  198. package/mobile/dist/components/ApplicationForm/formStyle.d.ts +1 -1
  199. package/mobile/dist/components/ApplicationForm/formStyle.js +1 -1
  200. package/mobile/dist/components/ApplicationForm/formStyle.js.map +1 -1
  201. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js +1 -1
  202. package/mobile/dist/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  203. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  204. package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  205. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  206. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  207. package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
  208. package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
  209. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  210. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  211. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -3
  212. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  213. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  214. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +1 -0
  215. package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -1
  216. package/mobile/dist/components/ApplicationFormCustom/contants.d.ts +2 -0
  217. package/mobile/dist/components/ApplicationFormCustom/contants.js +7 -0
  218. package/mobile/dist/components/ApplicationFormCustom/contants.js.map +1 -0
  219. package/mobile/dist/components/ApplicationFormCustom/getField.d.ts +2 -1
  220. package/mobile/dist/components/ApplicationFormCustom/getField.js +13 -13
  221. package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -1
  222. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  223. package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  224. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  225. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +6 -4
  226. package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  227. package/mobile/dist/ui-kit/DatePicker/DatePicker.js +2 -2
  228. package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  229. package/mobile/dist/ui-kit/DatePicker/DatePickerControl.js +9 -0
  230. package/mobile/dist/ui-kit/DatePicker/DatePickerControl.js.map +1 -0
  231. package/mobile/dist/ui-kit/Input/Input.js +2 -3
  232. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  233. package/mobile/dist/ui-kit/Input/renderErrorText.js +1 -1
  234. package/mobile/dist/ui-kit/Input/renderLabel.d.ts +2 -0
  235. package/mobile/dist/ui-kit/Input/renderLabel.js +7 -0
  236. package/mobile/dist/ui-kit/Input/renderLabel.js.map +1 -0
  237. package/mobile/dist/ui-kit/Select/Select.d.ts +1 -0
  238. package/mobile/dist/ui-kit/Select/Select.js +8 -5
  239. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  240. package/mobile/dist/ui-kit/Select/SelectControl.d.ts +9 -0
  241. package/mobile/dist/{components/ApplicationForm → ui-kit/Select}/SelectControl.js +2 -2
  242. package/mobile/dist/ui-kit/Select/SelectControl.js.map +1 -0
  243. package/mobile/lib/common.css +1 -1
  244. package/mobile/lib/components/ApplicationForm/AddressBranchField.js +3 -2
  245. package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
  246. package/mobile/lib/components/ApplicationForm/ApplicationFieldsetLayout.js +1 -1
  247. package/mobile/lib/components/ApplicationForm/ApplicationFieldsetLayout.js.map +1 -1
  248. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
  249. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  250. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
  251. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +1 -1
  252. package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
  253. package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
  254. package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
  255. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
  256. package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
  257. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
  258. package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
  259. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
  260. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  261. package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
  262. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
  263. package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
  264. package/mobile/lib/components/ApplicationForm/RegionField.d.ts +2 -0
  265. package/mobile/lib/components/ApplicationForm/RegionField.js +3 -3
  266. package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
  267. package/mobile/lib/components/ApplicationForm/RegionPremiumField.js +1 -1
  268. package/mobile/lib/components/ApplicationForm/RegionPremiumField.js.map +1 -1
  269. package/mobile/lib/components/ApplicationForm/formStyle.d.ts +1 -1
  270. package/mobile/lib/components/ApplicationForm/formStyle.js +1 -1
  271. package/mobile/lib/components/ApplicationForm/formStyle.js.map +1 -1
  272. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js +1 -1
  273. package/mobile/lib/components/ApplicationForm/renderAcquiringRegion.js.map +1 -1
  274. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
  275. package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
  276. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  277. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  278. package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
  279. package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
  280. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
  281. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  282. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +4 -3
  283. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
  284. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +12 -6
  285. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +1 -0
  286. package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -1
  287. package/mobile/lib/components/ApplicationFormCustom/contants.d.ts +2 -0
  288. package/mobile/lib/components/ApplicationFormCustom/contants.js +5 -0
  289. package/mobile/lib/components/ApplicationFormCustom/contants.js.map +1 -0
  290. package/mobile/lib/components/ApplicationFormCustom/getField.d.ts +2 -1
  291. package/mobile/lib/components/ApplicationFormCustom/getField.js +13 -13
  292. package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -1
  293. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +1 -0
  294. package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
  295. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +1 -0
  296. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +6 -4
  297. package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -1
  298. package/mobile/lib/ui-kit/DatePicker/DatePicker.js +2 -2
  299. package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  300. package/mobile/lib/ui-kit/DatePicker/DatePickerControl.js +7 -0
  301. package/mobile/lib/ui-kit/DatePicker/DatePickerControl.js.map +1 -0
  302. package/mobile/lib/ui-kit/Input/Input.js +2 -3
  303. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  304. package/mobile/lib/ui-kit/Input/renderErrorText.js +1 -1
  305. package/mobile/lib/ui-kit/Input/renderLabel.d.ts +2 -0
  306. package/mobile/lib/ui-kit/Input/renderLabel.js +4 -0
  307. package/mobile/lib/ui-kit/Input/renderLabel.js.map +1 -0
  308. package/mobile/lib/ui-kit/Select/Select.d.ts +1 -0
  309. package/mobile/lib/ui-kit/Select/Select.js +8 -5
  310. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  311. package/mobile/lib/ui-kit/Select/SelectControl.d.ts +9 -0
  312. package/mobile/lib/{components/ApplicationForm → ui-kit/Select}/SelectControl.js +2 -2
  313. package/mobile/lib/ui-kit/Select/SelectControl.js.map +1 -0
  314. package/mobile/src/components/ApplicationForm/AddressBranchField.tsx +18 -19
  315. package/mobile/src/components/ApplicationForm/ApplicationFieldsetLayout.tsx +1 -1
  316. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +1 -1
  317. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  318. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +0 -20
  319. package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +1 -1
  320. package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
  321. package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
  322. package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
  323. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  324. package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
  325. package/mobile/src/components/ApplicationForm/RegionField.tsx +5 -3
  326. package/mobile/src/components/ApplicationForm/RegionPremiumField.tsx +1 -1
  327. package/mobile/src/components/ApplicationForm/formStyle.ts +1 -1
  328. package/mobile/src/components/ApplicationForm/renderAcquiringRegion.tsx +1 -1
  329. package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  330. package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
  331. package/mobile/src/components/ApplicationForm/renderUserData.tsx +1 -1
  332. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
  333. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +158 -68
  334. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +19 -8
  335. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.ui.json +1 -0
  336. package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +24 -7
  337. package/mobile/src/components/ApplicationFormCustom/contants.tsx +6 -0
  338. package/mobile/src/components/ApplicationFormCustom/getField.tsx +25 -19
  339. package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
  340. package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +7 -3
  341. package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +35 -35
  342. package/mobile/src/ui-kit/DatePicker/DatePickerControl.tsx +26 -0
  343. package/mobile/src/ui-kit/Input/Input.tsx +3 -11
  344. package/mobile/src/ui-kit/Input/renderErrorText.tsx +1 -1
  345. package/mobile/src/ui-kit/Input/renderLabel.tsx +8 -0
  346. package/mobile/src/ui-kit/Select/Select.tsx +18 -20
  347. package/mobile/src/{components/ApplicationForm → ui-kit/Select}/SelectControl.tsx +2 -2
  348. package/package.json +1 -1
  349. package/src/components/ApplicationForm/AddressBranchField.tsx +18 -19
  350. package/src/components/ApplicationForm/ApplicationFieldsetLayout.tsx +1 -1
  351. package/src/components/ApplicationForm/ApplicationForm.example.json +1 -1
  352. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +0 -25
  353. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +0 -24
  354. package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
  355. package/src/components/ApplicationForm/ApplicationFormContent.ts +0 -20
  356. package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +1 -1
  357. package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
  358. package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
  359. package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
  360. package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  361. package/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
  362. package/src/components/ApplicationForm/RegionField.tsx +5 -3
  363. package/src/components/ApplicationForm/RegionPremiumField.tsx +1 -1
  364. package/src/components/ApplicationForm/formStyle.ts +1 -1
  365. package/src/components/ApplicationForm/renderAcquiringRegion.tsx +1 -1
  366. package/src/components/ApplicationForm/renderAgreementSubmit.tsx +1 -1
  367. package/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
  368. package/src/components/ApplicationForm/renderUserData.tsx +1 -1
  369. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
  370. package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +158 -68
  371. package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +101 -64
  372. package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +19 -8
  373. package/src/components/ApplicationFormCustom/ApplicationFormCustom.ui.json +1 -0
  374. package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +24 -7
  375. package/src/components/ApplicationFormCustom/contants.tsx +6 -0
  376. package/src/components/ApplicationFormCustom/getField.tsx +25 -19
  377. package/src/components/ApplicationFormCustom/getInitialFormState.tsx +1 -0
  378. package/src/components/ApplicationFormCustom/getObjectValidator.tsx +7 -3
  379. package/src/ui-kit/DatePicker/DatePicker.tsx +35 -35
  380. package/src/ui-kit/DatePicker/DatePickerControl.tsx +26 -0
  381. package/src/ui-kit/Input/Input.tsx +3 -11
  382. package/src/ui-kit/Input/renderErrorText.tsx +1 -1
  383. package/src/ui-kit/Input/renderLabel.tsx +8 -0
  384. package/src/ui-kit/Select/Select.tsx +18 -20
  385. package/src/{components/ApplicationForm → ui-kit/Select}/SelectControl.tsx +2 -2
  386. package/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  387. package/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  388. package/bundle/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  389. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  390. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +0 -40
  391. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +0 -1
  392. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  393. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +0 -37
  394. package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +0 -1
  395. package/dist/components/ApplicationForm/DatePickerControl.js +0 -10
  396. package/dist/components/ApplicationForm/DatePickerControl.js.map +0 -1
  397. package/dist/components/ApplicationForm/SelectControl.js.map +0 -1
  398. package/dist/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  399. package/dist/components/ApplicationFormCustom/columnStyle.js +0 -7
  400. package/dist/components/ApplicationFormCustom/columnStyle.js.map +0 -1
  401. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  402. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +0 -38
  403. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +0 -1
  404. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  405. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +0 -35
  406. package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +0 -1
  407. package/lib/components/ApplicationForm/DatePickerControl.js +0 -8
  408. package/lib/components/ApplicationForm/DatePickerControl.js.map +0 -1
  409. package/lib/components/ApplicationForm/SelectControl.js.map +0 -1
  410. package/lib/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  411. package/lib/components/ApplicationFormCustom/columnStyle.js +0 -5
  412. package/lib/components/ApplicationFormCustom/columnStyle.js.map +0 -1
  413. package/mobile/bundle/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  414. package/mobile/bundle/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  415. package/mobile/bundle/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  416. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  417. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +0 -40
  418. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +0 -1
  419. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  420. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +0 -37
  421. package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +0 -1
  422. package/mobile/dist/components/ApplicationForm/DatePickerControl.js +0 -10
  423. package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +0 -1
  424. package/mobile/dist/components/ApplicationForm/SelectControl.d.ts +0 -9
  425. package/mobile/dist/components/ApplicationForm/SelectControl.js.map +0 -1
  426. package/mobile/dist/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  427. package/mobile/dist/components/ApplicationFormCustom/columnStyle.js +0 -7
  428. package/mobile/dist/components/ApplicationFormCustom/columnStyle.js.map +0 -1
  429. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.d.ts +0 -11
  430. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +0 -38
  431. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +0 -1
  432. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.d.ts +0 -10
  433. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +0 -35
  434. package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +0 -1
  435. package/mobile/lib/components/ApplicationForm/DatePickerControl.js +0 -8
  436. package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +0 -1
  437. package/mobile/lib/components/ApplicationForm/SelectControl.d.ts +0 -9
  438. package/mobile/lib/components/ApplicationForm/SelectControl.js.map +0 -1
  439. package/mobile/lib/components/ApplicationFormCustom/columnStyle.d.ts +0 -2
  440. package/mobile/lib/components/ApplicationFormCustom/columnStyle.js +0 -5
  441. package/mobile/lib/components/ApplicationFormCustom/columnStyle.js.map +0 -1
  442. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +0 -75
  443. package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +0 -64
  444. package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +0 -30
  445. package/mobile/src/components/ApplicationFormCustom/columnStyle.tsx +0 -6
  446. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +0 -75
  447. package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +0 -64
  448. package/src/components/ApplicationForm/DatePickerControl.tsx +0 -30
  449. package/src/components/ApplicationFormCustom/columnStyle.tsx +0 -6
  450. /package/bundle/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
  451. /package/dist/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
  452. /package/lib/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
  453. /package/mobile/bundle/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
  454. /package/mobile/dist/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
  455. /package/mobile/lib/{components/ApplicationForm → ui-kit/DatePicker}/DatePickerControl.d.ts +0 -0
@@ -547,13 +547,13 @@
547
547
  const handleClick = useCallback(() => {
548
548
  router.back();
549
549
  }, []);
550
- return (jsxs("div", { className: getStyle(padding, defaultPadding, className), children: [backwardButton ? renderBackwardButton(version, handleClick) : null, title ? jsx("div", { className: "relative h-full", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', leftImage ? 'self-start @xl:w-auto' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow', 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
550
+ return (jsxs("div", { className: getStyle$1(padding, defaultPadding, className), children: [backwardButton ? renderBackwardButton(version, handleClick) : null, title ? jsx("div", { className: "relative h-full", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', leftImage ? 'self-start @xl:w-auto' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow', 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
551
551
  'auto-rows-[max-content_1fr]'), children: [jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderUnitBlock(renderChildren({ ...rest, extraProps: { className: '@container-normal' } })), renderImageContainer(rightImage, {
552
552
  className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), imageSecondaryStyle(isImageSecondary)),
553
553
  imageAlign,
554
554
  }), renderButtons(buttons)] })] })] }));
555
555
  });
556
- const getStyle = (padding = '', defaultPadding = '', className = '') => style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className);
556
+ const getStyle$1 = (padding = '', defaultPadding = '', className = '') => style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className);
557
557
  const rowSpanStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'row-span-2' : '@xl:row-span-2';
558
558
  const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'col-start-2 self-center' : '';
559
559
  const renderButtons = (buttons) => buttons ? jsx("div", { className: "self-end", children: buttons }) : null;
@@ -925,13 +925,15 @@
925
925
  [];
926
926
 
927
927
  const isValidationSuccess = (info) => !info?.length;
928
- const validator$1 = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
928
+ const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
929
929
 
930
930
  const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text }), link ? (jsx(LinkButton, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target || '', className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
931
931
 
932
- const formStyle$1 = 'container space-y-lg';
932
+ const formStyle$1 = 'container space-y-m';
933
933
  const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
934
934
 
935
+ const renderLabel = (label) => label ? (jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label })) : null;
936
+
935
937
  const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
936
938
  const inputRef = useRef(null);
937
939
  const handleChange = useCallback((e) => {
@@ -945,14 +947,13 @@
945
947
  const defaultStyle = 'w-full border rounded-md text-primary-text outline-none p-m';
946
948
  const paddingStyle = children ? 'pr-3xl' : '';
947
949
  const validStyle = getValidStyle(valid);
948
- return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? renderLabel$1(label) : null, isTextarea ? (jsx("textarea", { className: style('block resize-y min-h-24', defaultStyle, validStyle), id: style('textarea', id), name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur }, key)) : (jsx("input", { type: type, className: style('h-14', defaultStyle, paddingStyle, validStyle), ref: inputRef, id: id, name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key))] }), children] }));
950
+ return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { className: "space-y-xs", children: [renderLabel(label), isTextarea ? (jsx("textarea", { className: style('block resize-y min-h-24', defaultStyle, validStyle), id: style('textarea', id), name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur }, key)) : (jsx("input", { type: type, className: style('h-14', defaultStyle, paddingStyle, validStyle), ref: inputRef, id: id, name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key))] }), children] }));
949
951
  });
950
- const renderLabel$1 = (label) => (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) }));
951
952
  const getValidStyle = (valid) => valid
952
953
  ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
953
954
  : 'border-error';
954
955
 
955
- const renderErrorText = (error) => (jsx("div", { className: "h-4", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
956
+ const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
956
957
 
957
958
  const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
958
959
 
@@ -966,7 +967,7 @@
966
967
  };
967
968
  };
968
969
 
969
- const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
970
+ const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-m border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
970
971
  const formChildrenStyle = '@xl:w-1/2 space-y-s';
971
972
 
972
973
  const isPlaceholder = (_) => _ === '_';
@@ -990,111 +991,20 @@
990
991
 
991
992
  const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
992
993
 
993
- const pattern = (regexp) => validator$1((_) => typeof _ === 'string' && regexp.test(_));
994
+ const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
994
995
 
995
- const required = validator$1((_) => _ !== null && _ !== undefined && _ !== '');
996
+ const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
996
997
 
997
998
  const ERROR_MESSAGE = 'Некорректно заполненное поле';
998
999
  const defaultValidator = required(ERROR_MESSAGE);
999
- const defaultSelectValidator = validator$1((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1000
- const nameValidator = validator$1((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1001
- const innValidator = validator$1((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1000
+ const defaultSelectValidator = validator((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
1001
+ const nameValidator = validator((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
1002
+ const innValidator = validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
1002
1003
  const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
1003
- const checkboxValidator = validator$1((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
1004
+ const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
1004
1005
 
1005
1006
  const renderAcquiringDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
1006
1007
 
1007
- const ACQUIRING_TYPES = [
1008
- {
1009
- text: 'Торговый эквайринг',
1010
- key: 'trade',
1011
- },
1012
- {
1013
- text: 'СБП-эквайринг',
1014
- key: 'sbp',
1015
- },
1016
- {
1017
- text: 'Интернет-эквайринг',
1018
- key: 'internet',
1019
- },
1020
- {
1021
- text: 'Все виды эквайринга',
1022
- key: 'all',
1023
- },
1024
- ];
1025
-
1026
- const isFilled = (_) => _ !== null && _ !== undefined;
1027
-
1028
- const defaultCache = new Map();
1029
- const applyCache = (fetcher, cache = defaultCache) => (args) => {
1030
- const key = computeKey(args);
1031
- const cachedData = cache.get(key);
1032
- if (key && isFilled(cachedData)) {
1033
- return cachedData;
1034
- }
1035
- const data = fetcher(...args);
1036
- if (key && isFilled(data)) {
1037
- cache.set(key, Promise.resolve(data));
1038
- }
1039
- return data;
1040
- };
1041
- const isKey = (args) => Boolean(args?.every(_ => (Array.isArray(_) ? isKey(_) : !_ || typeof _ === 'string')));
1042
- const computeKey = (args) => (isKey(args) ? args.toString() : '');
1043
-
1044
- const isFallbackKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
1045
- function useAsyncData(key, fetcher, { fallback, cache } = {}) {
1046
- const args = useMemo(() => keyToArgs(key), [key]);
1047
- const [data, setData] = useState(undefined);
1048
- const [error, setError] = useState(undefined);
1049
- useEffect(() => {
1050
- const isEmptyKey = !args.some(isFilled);
1051
- if (isEmptyKey) {
1052
- return;
1053
- }
1054
- let canceled = false;
1055
- const setResult = (newData, err) => {
1056
- if (!canceled) {
1057
- setData(newData);
1058
- setError(err);
1059
- }
1060
- };
1061
- (async () => {
1062
- try {
1063
- setResult(await applyCache(fetcher, cache)(args));
1064
- }
1065
- catch (err) {
1066
- setResult(undefined, err);
1067
- }
1068
- })();
1069
- return () => {
1070
- canceled = true;
1071
- };
1072
- }, [fetcher, cache, args]);
1073
- const fallbackData = fallback && isFallbackKey(args) && fallback[args[0]];
1074
- return {
1075
- data: !data && fallbackData ? fallbackData : data,
1076
- error,
1077
- mutate: () => Promise.resolve(undefined) // TODO Clean up cache
1078
- };
1079
- }
1080
- function keyToArgs(key) {
1081
- if (Array.isArray(key)) {
1082
- return key;
1083
- }
1084
- else if (key instanceof Function) {
1085
- return keyToArgs(key());
1086
- }
1087
- else {
1088
- return [key];
1089
- }
1090
- }
1091
-
1092
- const REGIONS_URL$1 = '/api/v1/regions';
1093
- function useRegions() {
1094
- const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1095
- return data || [];
1096
- }
1097
-
1098
1008
  function useBool(defaultValue = false) {
1099
1009
  const [value, setValue] = useState(defaultValue);
1100
1010
  const setTrue = useCallback(() => setValue(true), []);
@@ -1175,9 +1085,13 @@
1175
1085
  return inputRef;
1176
1086
  }
1177
1087
 
1178
- const Select = JSX(({ className, label, options = [], value, valid = true, isBorder = true, placeholder = '', isSearch = false, iconVersion, onChange, }) => {
1088
+ const Select = JSX(
1089
+ // eslint-disable-next-line complexity
1090
+ ({ className, label, options = [], value, valid = true, isBorder = true, placeholder = '', isSearch = false, iconVersion, onChange, disabled, }) => {
1179
1091
  const [isOpen, { setFalse: close, setTrue: open }] = useBool();
1180
1092
  const [query, setQuery] = useState('');
1093
+ const isDisabled = disabled || options.length === 0;
1094
+ const hasOpen = isOpen && !isDisabled;
1181
1095
  const handleClose = useCallback(() => {
1182
1096
  setQuery('');
1183
1097
  close();
@@ -1191,17 +1105,127 @@
1191
1105
  onClose: handleClose,
1192
1106
  iconVersion,
1193
1107
  });
1194
- return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle$1(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-8 flex items-center overflow-hidden text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1108
+ return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text relative z-10', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-8 flex items-center overflow-hidden text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1195
1109
  });
1196
- const renderLabel = (label) => label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null;
1197
1110
  const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1198
- const getBorderStyle$1 = (isBorder, valid) => style(isBorder ? 'border rounded-md hover:border-primary-hover' : '', valid ? ' border-gray' : 'border-error');
1111
+ const getStyle = (isBorder, valid, disabled) => style(isBorder ? 'border rounded-md ' : '', isBorder && !disabled ? 'hover:border-primary-hover' : '', disabled ? 'bg-main-divider' : 'cursor-pointer ', valid ? 'border-gray' : 'border-error');
1199
1112
 
1200
1113
  const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
1201
1114
 
1115
+ const ACQUIRING_TYPES = [
1116
+ {
1117
+ text: 'Торговый эквайринг',
1118
+ key: 'trade',
1119
+ },
1120
+ {
1121
+ text: 'СБП-эквайринг',
1122
+ key: 'sbp',
1123
+ },
1124
+ {
1125
+ text: 'Интернет-эквайринг',
1126
+ key: 'internet',
1127
+ },
1128
+ {
1129
+ text: 'Все виды эквайринга',
1130
+ key: 'all',
1131
+ },
1132
+ ];
1133
+
1134
+ const isFilled = (_) => _ !== null && _ !== undefined;
1135
+
1136
+ const defaultCache = new Map();
1137
+ const applyCache = (fetcher, cache = defaultCache) => (args) => {
1138
+ const key = computeKey(args);
1139
+ const cachedData = cache.get(key);
1140
+ if (key && isFilled(cachedData)) {
1141
+ return cachedData;
1142
+ }
1143
+ const data = fetcher(...args);
1144
+ if (key && isFilled(data)) {
1145
+ cache.set(key, Promise.resolve(data));
1146
+ }
1147
+ return data;
1148
+ };
1149
+ const isKey = (args) => Boolean(args?.every(_ => (Array.isArray(_) ? isKey(_) : !_ || typeof _ === 'string')));
1150
+ const computeKey = (args) => (isKey(args) ? args.toString() : '');
1151
+
1152
+ const isFallbackKey = (args) => Boolean(args && Array.isArray(args) && args.length === 1 && typeof args[0] === 'string');
1153
+ function useAsyncData(key, fetcher, { fallback, cache } = {}) {
1154
+ const args = useMemo(() => keyToArgs(key), [key]);
1155
+ const [data, setData] = useState(undefined);
1156
+ const [error, setError] = useState(undefined);
1157
+ useEffect(() => {
1158
+ const isEmptyKey = !args.some(isFilled);
1159
+ if (isEmptyKey) {
1160
+ return;
1161
+ }
1162
+ let canceled = false;
1163
+ const setResult = (newData, err) => {
1164
+ if (!canceled) {
1165
+ setData(newData);
1166
+ setError(err);
1167
+ }
1168
+ };
1169
+ (async () => {
1170
+ try {
1171
+ setResult(await applyCache(fetcher, cache)(args));
1172
+ }
1173
+ catch (err) {
1174
+ setResult(undefined, err);
1175
+ }
1176
+ })();
1177
+ return () => {
1178
+ canceled = true;
1179
+ };
1180
+ }, [fetcher, cache, args]);
1181
+ const fallbackData = fallback && isFallbackKey(args) && fallback[args[0]];
1182
+ return {
1183
+ data: !data && fallbackData ? fallbackData : data,
1184
+ error,
1185
+ mutate: () => Promise.resolve(undefined) // TODO Clean up cache
1186
+ };
1187
+ }
1188
+ function keyToArgs(key) {
1189
+ if (Array.isArray(key)) {
1190
+ return key;
1191
+ }
1192
+ else if (key instanceof Function) {
1193
+ return keyToArgs(key());
1194
+ }
1195
+ else {
1196
+ return [key];
1197
+ }
1198
+ }
1199
+
1200
+ const REGIONS_URL$1 = '/api/v1/regions';
1201
+ function useRegions() {
1202
+ const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
1203
+ return data || [];
1204
+ }
1205
+
1206
+ const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
1207
+
1208
+ const validatorObj = {
1209
+ typeForm: defaultValidator,
1210
+ surname: nameValidator,
1211
+ name: nameValidator,
1212
+ region: defaultSelectValidator,
1213
+ phone: phoneValidator,
1214
+ birthday: defaultValidator,
1215
+ email: defaultValidator,
1216
+ fullName: defaultValidator,
1217
+ inn: innValidator,
1218
+ comment: defaultValidator,
1219
+ consentDataProcessing: checkboxValidator,
1220
+ };
1221
+ const getObjectValidator = (inputs) => {
1222
+ const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
1223
+ return Object.fromEntries(requiredInputs.map((_) => [_, validatorObj?.[_]]));
1224
+ };
1225
+
1202
1226
  const RegionField = JSX(({ field }) => {
1203
1227
  const regions = useRegions();
1204
- return (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultSelectValidator) }));
1228
+ return (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), validatorObj.region) }));
1205
1229
  });
1206
1230
 
1207
1231
  const renderAcquiringRegion = ({ field, title }) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(SelectControl, { label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433", options: ACQUIRING_TYPES, ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) })] }));
@@ -1238,7 +1262,7 @@
1238
1262
 
1239
1263
  const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
1240
1264
 
1241
- const initialFormState$9 = {
1265
+ const initialFormState$7 = {
1242
1266
  typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
1243
1267
  acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
1244
1268
  fullName: '',
@@ -1270,35 +1294,12 @@
1270
1294
  };
1271
1295
  isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
1272
1296
  }, [onSubmit]);
1273
- const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
1297
+ const [, { field, ...formProps }] = useForm(initialFormState$7, { onSubmit: handleSubmit });
1274
1298
  const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
1275
1299
  return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ? (jsxs("div", { role: "radiogroup", children: [jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] })) : null, renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1276
1300
  });
1277
1301
  const getSlideCheckboxes = (type) => type === 'all' || type === 'trade';
1278
1302
 
1279
- const initialFormState$8 = {
1280
- typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
1281
- name: '',
1282
- phone: '',
1283
- inn: '',
1284
- email: '',
1285
- };
1286
- const businessCardValidator = objectValidator({
1287
- region: defaultValidator,
1288
- name: nameValidator,
1289
- phone: phoneValidator,
1290
- inn: innValidator,
1291
- email: defaultValidator,
1292
- });
1293
- const ApplicationFormBusinessCard = JSX((props) => {
1294
- const { button, link, onSubmit } = props;
1295
- const handleSubmit = useCallback((formState) => {
1296
- isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
1297
- }, [onSubmit]);
1298
- const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
1299
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1300
- });
1301
-
1302
1303
  const BRANCHES_URL = '/api/v1/branches';
1303
1304
  const EMPTY_VALUE$3 = [];
1304
1305
  function useBranches(regionCode) {
@@ -1316,7 +1317,8 @@
1316
1317
  return data || [];
1317
1318
  }
1318
1319
 
1319
- const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
1320
+ const AddressBranchField = JSX(({ field, isPremium = false }) => {
1321
+ const regionKey = field('region')?.value?.key;
1320
1322
  const addressBranch = isPremium
1321
1323
  ? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
1322
1324
  : useBranches(regionKey).filter((branch) => branch?.address);
@@ -1395,7 +1397,7 @@
1395
1397
 
1396
1398
  const renderCreditParameters = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') }) }), jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') }) })] }));
1397
1399
 
1398
- const initialFormState$7 = {
1400
+ const initialFormState$6 = {
1399
1401
  typeForm: { key: 'cred', text: 'Кредит' },
1400
1402
  amount: MIN_CREDIT_AMOUNT,
1401
1403
  term: 12,
@@ -1424,13 +1426,13 @@
1424
1426
  partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
1425
1427
  });
1426
1428
  }, [onSubmit]);
1427
- const [formState, { field, ...formProps }] = useForm(initialFormState$7, {
1429
+ const [formState, { field, ...formProps }] = useForm(initialFormState$6, {
1428
1430
  onSubmit: handleSubmit,
1429
1431
  });
1430
1432
  return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderCreditParameters(field, 'Параметры'), renderCreditDataOrganization(field, 'Данные организации'), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: formState.region?.key }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
1431
1433
  });
1432
1434
 
1433
- const initialFormState$6 = {
1435
+ const initialFormState$5 = {
1434
1436
  typeForm: { key: 'dpst', text: 'Заявка на депозит' },
1435
1437
  name: '',
1436
1438
  phone: '',
@@ -1443,7 +1445,7 @@
1443
1445
  const handleSubmit = useCallback((formState) => {
1444
1446
  isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
1445
1447
  }, [onSubmit]);
1446
- const [, { field, ...formProps }] = useForm(initialFormState$6, {
1448
+ const [, { field, ...formProps }] = useForm(initialFormState$5, {
1447
1449
  onSubmit: handleSubmit,
1448
1450
  resetOnSubmit: false,
1449
1451
  });
@@ -1498,7 +1500,7 @@
1498
1500
  const role = (isRadio) => (isRadio ? 'radio' : 'checkbox');
1499
1501
  const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
1500
1502
 
1501
- const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с';
1503
+ const agreementText = 'Нажимая кнопку, вы подтверждаете согласие с ';
1502
1504
  const renderAgreementSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [consentDataProcessing ? (jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] })) : (jsx(Footnote, { text: agreementText, link: link })), renderSubmitButton(button)] }));
1503
1505
 
1504
1506
  const formatDate = (date, toTimeStamp = false) => {
@@ -1650,11 +1652,11 @@
1650
1652
  selectedMonth,
1651
1653
  showCalendar,
1652
1654
  });
1653
- return (jsxs("div", { className: style(className, 'relative'), ref: ref, children: [jsx(Text, { size: "text-m", "font-weight": "font-light", children: label }), renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-20 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] }));
1655
+ return (jsxs("div", { className: style('space-y-xs', className), ref: ref, children: [renderLabel(label), jsxs("div", { className: "relative", children: [renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-20 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] })] }));
1654
1656
  });
1655
1657
  const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
1656
1658
 
1657
- const DatePickerControl = JSX(({ className, label, value = undefined, error, onChange, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: rest?.errors ? `${label}*` : label }) })) : null, jsx(DatePicker, { value: value, onChange: onChange, valid: Boolean(!error) }), renderErrorText(error)] })));
1659
+ const DatePickerControl = JSX(({ className, label, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(DatePicker, { label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), ...rest }), renderErrorText(error)] })));
1658
1660
 
1659
1661
  const initialUserFormState = {
1660
1662
  surname: '',
@@ -1663,7 +1665,7 @@
1663
1665
  };
1664
1666
  const renderUserData = (field, isBirthday = true) => (jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), isBirthday ? (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) })) : null] }));
1665
1667
 
1666
- const initialFormState$5 = {
1668
+ const initialFormState$4 = {
1667
1669
  ...initialUserFormState,
1668
1670
  typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
1669
1671
  serviceDirection: { key: 'Физическое лицо' },
@@ -1689,7 +1691,7 @@
1689
1691
  const handleSubmit = useCallback((feedbackFormState) => {
1690
1692
  handleSubmitFeedback(feedbackFormState, onSubmit);
1691
1693
  }, [onSubmit]);
1692
- const [formState, { field, ...formProps }] = useForm(initialFormState$5, {
1694
+ const [formState, { field, ...formProps }] = useForm(initialFormState$4, {
1693
1695
  onSubmit: handleSubmit,
1694
1696
  });
1695
1697
  const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
@@ -1731,7 +1733,7 @@
1731
1733
  return (jsxs("div", { className: "container space-y-s", children: [regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: button?.text ? button.text : 'Перейти' }) })) : null] }));
1732
1734
  });
1733
1735
 
1734
- const initialFormState$4 = {
1736
+ const initialFormState$3 = {
1735
1737
  ...initialUserFormState,
1736
1738
  phone: '',
1737
1739
  email: '',
@@ -1755,29 +1757,8 @@
1755
1757
  product,
1756
1758
  }, true);
1757
1759
  }, [onSubmit]);
1758
- const [, { field, ...formProps }] = useForm(initialFormState$4, { onSubmit: handleSubmit });
1759
- return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
1760
- });
1761
-
1762
- const initialFormState$3 = {
1763
- typeForm: { key: 'SELFCOLLECTION', text: 'Самоинкассация' },
1764
- fullName: '',
1765
- phone: '',
1766
- consentDataProcessing: false,
1767
- };
1768
- const feedbackValidator = objectValidator({
1769
- typeForm: defaultValidator,
1770
- region: defaultValidator,
1771
- fullName: defaultValidator,
1772
- phone: phoneValidator,
1773
- consentDataProcessing: checkboxValidator,
1774
- });
1775
- const ApplicationFormSelfCollection = JSX(({ button, link, onSubmit }) => {
1776
- const handleSubmit = useCallback((formState) => {
1777
- isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
1778
- }, [onSubmit]);
1779
1760
  const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
1780
- return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }) }) }));
1761
+ return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementSubmit(field('consentDataProcessing'), link, button)] }));
1781
1762
  });
1782
1763
 
1783
1764
  const RegionPremiumField = JSX(({ field }) => {
@@ -1827,12 +1808,12 @@
1827
1808
 
1828
1809
  const renderQuestionsInterested = (field) => {
1829
1810
  const { value, onChange } = field('vedTypes');
1830
- return (jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: "gap-xl grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: (_) => onChange && onChange(_) })] }) }));
1811
+ return (jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: "gap-m grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: (_) => onChange && onChange(_) })] }) }));
1831
1812
  };
1832
1813
 
1833
1814
  const renderWedDataOrganization = ({ field }) => {
1834
1815
  const isCurrencyControl = field('vedTypes').value === 'currencyControl';
1835
- return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-lg gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
1816
+ return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-m gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
1836
1817
  };
1837
1818
 
1838
1819
  const initialFormState$1 = {
@@ -1882,11 +1863,10 @@
1882
1863
  isValidationSuccess(getValidator(vedTypes)(formState)) && onSubmit(data);
1883
1864
  }, [onSubmit]);
1884
1865
  const [, { field, ...formProps }] = useForm(initialFormState$1, { onSubmit: handleSubmit });
1885
- return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field }), jsx(InputControl, { label: "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435", placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", ...field('partnerComments'), isTextarea: true }), renderSubmitButton(button), jsx(Footnote, { link: link }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), renderContacts()] }));
1866
+ return (jsxs("form", { className: "container space-y-m", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field }), jsx(InputControl, { label: "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435", placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", ...field('partnerComments'), isTextarea: true }), renderSubmitButton(button), jsx(Footnote, { link: link }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), renderContacts()] }));
1886
1867
  });
1887
1868
 
1888
1869
  const EmbeddableForms = {
1889
- ApplicationFormBusinessCard,
1890
1870
  ApplicationFormWed,
1891
1871
  ApplicationFormDeposit,
1892
1872
  ApplicationFormCredit,
@@ -1894,7 +1874,6 @@
1894
1874
  ApplicationFormGrantSupport,
1895
1875
  ApplicationFormIndividuals,
1896
1876
  ApplicationFormFeedback,
1897
- ApplicationFormSelfCollection,
1898
1877
  ApplicationFormUltraPremium,
1899
1878
  };
1900
1879
 
@@ -1907,7 +1886,7 @@
1907
1886
  setResponseType(status);
1908
1887
  return status;
1909
1888
  }, []);
1910
- return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-lg", children: [formBlock?.title ? (jsx(Heading, { headingType: "h3", title: formBlock.title, className: "@xl:text-center" })) : null, formBlock ? renderEmbeddedForm(formBlock, handleSubmit) : null, responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1889
+ return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-m", children: [formBlock?.title ? (jsx(Heading, { headingType: "h3", title: formBlock.title, className: "@xl:text-center" })) : null, formBlock ? renderEmbeddedForm(formBlock, handleSubmit) : null, responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
1911
1890
  });
1912
1891
  const renderEmbeddedForm = (formBlock, handleSubmit) => {
1913
1892
  const type = formBlock?.formType;
@@ -1926,33 +1905,27 @@
1926
1905
 
1927
1906
  const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (k === 'region' ? v?.text : v?.key) || v]));
1928
1907
 
1929
- const columnStyle = {
1930
- 1: 'space-y-s max-w-2xl mx-auto',
1931
- 2: 'grid @xl:grid-cols-2 gap-s',
1932
- };
1933
-
1934
1908
  const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
1935
1909
 
1936
- const getField = (input, field) => {
1910
+ const getField = (field) => (input, index) => {
1937
1911
  const { required } = input;
1938
1912
  const InputsMap = {
1939
- surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), nameValidator, required) })),
1940
- name: jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), nameValidator, required) }),
1913
+ surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), validatorObj.surname, required) })),
1914
+ name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), validatorObj.name, required) })),
1941
1915
  middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') })),
1942
- phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), phoneValidator, required) })),
1943
- email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), defaultValidator, required) })),
1944
- comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), defaultValidator, required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })),
1945
- region: jsx(RegionField, { field: field }),
1916
+ phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), validatorObj.phone, required) })),
1917
+ email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), validatorObj.email, required) })),
1918
+ fullName: (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, required) })),
1919
+ inn: jsx(InputControl, { label: "\u0418\u041D\u041D", ...getValidation(field('inn'), validatorObj.inn, required) }),
1920
+ comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), validatorObj.comment, required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })),
1921
+ region: jsx(RegionField, { field: field, input: input }),
1922
+ birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
1946
1923
  client: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
1947
- birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), defaultValidator, required) })),
1948
- legend: (jsx("legend", { className: "w-full col-span-2", children: jsx(Heading, { title: input.label, headingType: "h6", className: "@xl:text-center" }) })),
1949
1924
  };
1950
- return InputsMap[input.name];
1925
+ return jsx("div", { children: InputsMap[input.name] }, String(index));
1951
1926
  };
1952
1927
  const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
1953
1928
 
1954
- const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
1955
-
1956
1929
  const initialFormState = {
1957
1930
  typeForm: { key: '', text: '' },
1958
1931
  region: { key: '', text: '' },
@@ -1964,30 +1937,16 @@
1964
1937
  birthday: undefined,
1965
1938
  comment: '',
1966
1939
  consentDataProcessing: false,
1940
+ product: '',
1967
1941
  };
1968
1942
  const getInitialFormState = (inputs, typeForm = '') => {
1969
1943
  const formState = Object.fromEntries(getNamesFromInput(inputs).map((_) => [_, initialFormState[_]]));
1970
1944
  return { ...formState, typeForm: { key: typeForm, text: '' } };
1971
1945
  };
1972
1946
 
1973
- const validator = {
1974
- typeForm: defaultValidator,
1975
- surname: nameValidator,
1976
- name: nameValidator,
1977
- region: defaultValidator,
1978
- phone: phoneValidator,
1979
- birthday: defaultValidator,
1980
- email: defaultValidator,
1981
- comment: defaultValidator,
1982
- consentDataProcessing: checkboxValidator,
1983
- };
1984
- const getObjectValidator = (inputs) => {
1985
- const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
1986
- return Object.fromEntries(requiredInputs.map((_) => [_, validator?.[_]]));
1987
- };
1988
-
1989
1947
  const API = LeadServiceAPI();
1990
- const ApplicationFormCustom = JSX(({ className, title, typeForm = '', inputs = [], button, link, formColumns = 2, endpoint }) => {
1948
+ const ApplicationFormCustom = JSX(({ className, title, typeForm = '', sections = [], button, link, endpoint }) => {
1949
+ const inputs = (sections?.flatMap((_) => _?.inputs) || []);
1991
1950
  const initialFormState = getInitialFormState(inputs, typeForm);
1992
1951
  const [responseType, setResponseType] = useState('');
1993
1952
  const feedbackValidator = objectValidator(getObjectValidator(inputs));
@@ -2002,8 +1961,9 @@
2002
1961
  }, []);
2003
1962
  const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
2004
1963
  const fieldName = getConsentDataProcessing(inputs)?.name;
2005
- return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: columnStyle[formColumns], onSubmit: onSubmit, children: [inputs.map((_, index) => (jsx("div", { children: getField(_, field) }, String(index)))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }) }));
1964
+ return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: "", onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [_?.title ? jsx("div", { className: "@xl:text-center @xl:col-span-2", children: _.title }) : null, _?.inputs?.map(getField(field))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }) }));
2006
1965
  });
1966
+ const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
2007
1967
  const getConsentDataProcessing = (inputs) => inputs.find((_) => _?.name === 'consentDataProcessing');
2008
1968
 
2009
1969
  const AlignStyles = 'text-left';
@@ -5696,7 +5656,7 @@
5696
5656
 
5697
5657
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5698
5658
 
5699
- const packageVersion = "0.14.200";
5659
+ const packageVersion = "0.14.201";
5700
5660
 
5701
5661
  exports.Blocks = Blocks;
5702
5662
  exports.ContentPage = ContentPage;