@redneckz/wildless-cms-uni-blocks 0.8.17 → 0.8.18

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 (274) hide show
  1. package/bundle/api/CorporateLeadAPI.d.ts +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +116 -51
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  6. package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  7. package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  8. package/bundle/components/ApplicationForm/CreditParameters.d.ts +6 -0
  9. package/bundle/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  10. package/bundle/components/ApplicationForm/renderInputRange.d.ts +11 -0
  11. package/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  12. package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  13. package/bundle/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  14. package/bundle/components/Video/VideoContent.d.ts +19 -4
  15. package/bundle/hooks/useLink.d.ts +1 -3
  16. package/bundle/model/PreventableEvent.d.ts +3 -0
  17. package/dist/api/CorporateLeadAPI.d.ts +1 -1
  18. package/dist/api/CorporateLeadAPI.js +1 -1
  19. package/dist/api/CorporateLeadAPI.js.map +1 -1
  20. package/dist/components/ApplicationForm/ApplicationForm.js +6 -3
  21. package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  22. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
  23. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  24. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
  25. package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  26. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  27. package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  28. package/dist/components/ApplicationForm/ApplicationFormCredit.js +21 -13
  29. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
  31. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  32. package/dist/components/ApplicationForm/ApplicationFormWed.js +14 -4
  33. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  34. package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  35. package/dist/components/ApplicationForm/CreditParameters.d.ts +6 -0
  36. package/dist/components/ApplicationForm/CreditParameters.js +9 -0
  37. package/dist/components/ApplicationForm/CreditParameters.js.map +1 -0
  38. package/dist/components/ApplicationForm/acquiringTypes.js +0 -5
  39. package/dist/components/ApplicationForm/acquiringTypes.js.map +1 -1
  40. package/dist/components/ApplicationForm/renderBankOffices.js +1 -1
  41. package/dist/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  42. package/dist/components/ApplicationForm/renderCreditParameters.js +10 -12
  43. package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  44. package/dist/components/ApplicationForm/renderInputRange.d.ts +11 -0
  45. package/dist/components/ApplicationForm/renderInputRange.js +8 -0
  46. package/dist/components/ApplicationForm/renderInputRange.js.map +1 -0
  47. package/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  48. package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  49. package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  50. package/dist/components/ApplicationForm/renderSelects.js +1 -1
  51. package/dist/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  52. package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  53. package/dist/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  54. package/dist/components/ApplicationForm/useFormHandlers.js +1 -6
  55. package/dist/components/ApplicationForm/useFormHandlers.js.map +1 -1
  56. package/dist/components/Video/Video.js +2 -2
  57. package/dist/components/Video/Video.js.map +1 -1
  58. package/dist/components/Video/VideoContent.d.ts +19 -4
  59. package/dist/hooks/useLink.d.ts +1 -3
  60. package/dist/hooks/useLink.js.map +1 -1
  61. package/dist/model/PreventableEvent.d.ts +3 -0
  62. package/dist/model/PreventableEvent.js +2 -0
  63. package/dist/model/PreventableEvent.js.map +1 -0
  64. package/lib/api/CorporateLeadAPI.d.ts +1 -1
  65. package/lib/api/CorporateLeadAPI.js +1 -1
  66. package/lib/api/CorporateLeadAPI.js.map +1 -1
  67. package/lib/common.css +1 -1
  68. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +0 -2
  69. package/lib/components/ApplicationForm/ApplicationForm.js +6 -3
  70. package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  71. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
  72. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  73. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
  74. package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  75. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  76. package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  77. package/lib/components/ApplicationForm/ApplicationFormCredit.js +18 -10
  78. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  79. package/lib/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
  80. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  81. package/lib/components/ApplicationForm/ApplicationFormWed.js +14 -4
  82. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  83. package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  84. package/lib/components/ApplicationForm/CreditParameters.d.ts +6 -0
  85. package/lib/components/ApplicationForm/CreditParameters.js +7 -0
  86. package/lib/components/ApplicationForm/CreditParameters.js.map +1 -0
  87. package/lib/components/ApplicationForm/acquiringTypes.js +0 -5
  88. package/lib/components/ApplicationForm/acquiringTypes.js.map +1 -1
  89. package/lib/components/ApplicationForm/renderBankOffices.js +1 -1
  90. package/lib/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  91. package/lib/components/ApplicationForm/renderCreditParameters.js +3 -5
  92. package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  93. package/lib/components/ApplicationForm/renderInputRange.d.ts +11 -0
  94. package/lib/components/ApplicationForm/renderInputRange.js +5 -0
  95. package/lib/components/ApplicationForm/renderInputRange.js.map +1 -0
  96. package/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  97. package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  98. package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  99. package/lib/components/ApplicationForm/renderSelects.js +1 -1
  100. package/lib/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  101. package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  102. package/lib/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  103. package/lib/components/ApplicationForm/useFormHandlers.js +1 -6
  104. package/lib/components/ApplicationForm/useFormHandlers.js.map +1 -1
  105. package/lib/components/Video/Video.js +2 -2
  106. package/lib/components/Video/Video.js.map +1 -1
  107. package/lib/components/Video/VideoContent.d.ts +19 -4
  108. package/lib/hooks/useLink.d.ts +1 -3
  109. package/lib/hooks/useLink.js.map +1 -1
  110. package/lib/model/PreventableEvent.d.ts +3 -0
  111. package/lib/model/PreventableEvent.js +2 -0
  112. package/lib/model/PreventableEvent.js.map +1 -0
  113. package/mobile/bundle/api/CorporateLeadAPI.d.ts +1 -1
  114. package/mobile/bundle/bundle.umd.js +1 -1
  115. package/mobile/bundle/bundle.umd.min.js +1 -1
  116. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  117. package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  118. package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  119. package/mobile/bundle/components/ApplicationForm/CreditParameters.d.ts +6 -0
  120. package/mobile/bundle/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  121. package/mobile/bundle/components/ApplicationForm/renderInputRange.d.ts +11 -0
  122. package/mobile/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  123. package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  124. package/mobile/bundle/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  125. package/mobile/bundle/components/Video/VideoContent.d.ts +19 -4
  126. package/mobile/bundle/hooks/useLink.d.ts +1 -3
  127. package/mobile/bundle/model/PreventableEvent.d.ts +3 -0
  128. package/mobile/dist/api/CorporateLeadAPI.d.ts +1 -1
  129. package/mobile/dist/api/CorporateLeadAPI.js +1 -1
  130. package/mobile/dist/api/CorporateLeadAPI.js.map +1 -1
  131. package/mobile/dist/components/ApplicationForm/ApplicationForm.js +6 -3
  132. package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
  133. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
  134. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  135. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
  136. package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  137. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  138. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  139. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +21 -13
  140. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  141. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
  142. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  143. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +14 -4
  144. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  145. package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  146. package/mobile/dist/components/ApplicationForm/CreditParameters.d.ts +6 -0
  147. package/mobile/dist/components/ApplicationForm/CreditParameters.js +9 -0
  148. package/mobile/dist/components/ApplicationForm/CreditParameters.js.map +1 -0
  149. package/mobile/dist/components/ApplicationForm/acquiringTypes.js +0 -5
  150. package/mobile/dist/components/ApplicationForm/acquiringTypes.js.map +1 -1
  151. package/mobile/dist/components/ApplicationForm/renderBankOffices.js +1 -1
  152. package/mobile/dist/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  153. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +10 -12
  154. package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  155. package/mobile/dist/components/ApplicationForm/renderInputRange.d.ts +11 -0
  156. package/mobile/dist/components/ApplicationForm/renderInputRange.js +8 -0
  157. package/mobile/dist/components/ApplicationForm/renderInputRange.js.map +1 -0
  158. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  159. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  160. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  161. package/mobile/dist/components/ApplicationForm/renderSelects.js +1 -1
  162. package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  163. package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  164. package/mobile/dist/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  165. package/mobile/dist/components/ApplicationForm/useFormHandlers.js +1 -6
  166. package/mobile/dist/components/ApplicationForm/useFormHandlers.js.map +1 -1
  167. package/mobile/dist/components/Video/Video.js +2 -2
  168. package/mobile/dist/components/Video/Video.js.map +1 -1
  169. package/mobile/dist/components/Video/VideoContent.d.ts +19 -4
  170. package/mobile/dist/hooks/useLink.d.ts +1 -3
  171. package/mobile/dist/hooks/useLink.js.map +1 -1
  172. package/mobile/dist/model/PreventableEvent.d.ts +3 -0
  173. package/mobile/dist/model/PreventableEvent.js +2 -0
  174. package/mobile/dist/model/PreventableEvent.js.map +1 -0
  175. package/mobile/lib/api/CorporateLeadAPI.d.ts +1 -1
  176. package/mobile/lib/api/CorporateLeadAPI.js +1 -1
  177. package/mobile/lib/api/CorporateLeadAPI.js.map +1 -1
  178. package/mobile/lib/components/ApplicationForm/ApplicationForm.js +6 -3
  179. package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
  180. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
  181. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  182. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
  183. package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
  184. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
  185. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
  186. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +18 -10
  187. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  188. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
  189. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  190. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +14 -4
  191. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  192. package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
  193. package/mobile/lib/components/ApplicationForm/CreditParameters.d.ts +6 -0
  194. package/mobile/lib/components/ApplicationForm/CreditParameters.js +7 -0
  195. package/mobile/lib/components/ApplicationForm/CreditParameters.js.map +1 -0
  196. package/mobile/lib/components/ApplicationForm/acquiringTypes.js +0 -5
  197. package/mobile/lib/components/ApplicationForm/acquiringTypes.js.map +1 -1
  198. package/mobile/lib/components/ApplicationForm/renderBankOffices.js +1 -1
  199. package/mobile/lib/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
  200. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +3 -5
  201. package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
  202. package/mobile/lib/components/ApplicationForm/renderInputRange.d.ts +11 -0
  203. package/mobile/lib/components/ApplicationForm/renderInputRange.js +5 -0
  204. package/mobile/lib/components/ApplicationForm/renderInputRange.js.map +1 -0
  205. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
  206. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  207. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
  208. package/mobile/lib/components/ApplicationForm/renderSelects.js +1 -1
  209. package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
  210. package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
  211. package/mobile/lib/components/ApplicationForm/useFormHandlers.d.ts +1 -5
  212. package/mobile/lib/components/ApplicationForm/useFormHandlers.js +1 -6
  213. package/mobile/lib/components/ApplicationForm/useFormHandlers.js.map +1 -1
  214. package/mobile/lib/components/Video/Video.js +2 -2
  215. package/mobile/lib/components/Video/Video.js.map +1 -1
  216. package/mobile/lib/components/Video/VideoContent.d.ts +19 -4
  217. package/mobile/lib/hooks/useLink.d.ts +1 -3
  218. package/mobile/lib/hooks/useLink.js.map +1 -1
  219. package/mobile/lib/model/PreventableEvent.d.ts +3 -0
  220. package/mobile/lib/model/PreventableEvent.js +2 -0
  221. package/mobile/lib/model/PreventableEvent.js.map +1 -0
  222. package/mobile/src/api/CorporateLeadAPI.ts +2 -2
  223. package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +8 -4
  224. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +20 -5
  225. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +20 -7
  226. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +16 -4
  227. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +23 -12
  228. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +15 -4
  229. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +18 -4
  230. package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  231. package/mobile/src/components/ApplicationForm/CreditParameters.ts +7 -0
  232. package/mobile/src/components/ApplicationForm/WrapperSelect.tsx +1 -1
  233. package/mobile/src/components/ApplicationForm/acquiringTypes.ts +0 -5
  234. package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  235. package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +3 -22
  236. package/mobile/src/components/ApplicationForm/renderInputRange.tsx +20 -0
  237. package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +3 -3
  238. package/mobile/src/components/ApplicationForm/renderSelects.tsx +2 -2
  239. package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +1 -1
  240. package/mobile/src/components/ApplicationForm/useFormHandlers.ts +1 -15
  241. package/mobile/src/components/Video/Video.example.json +5 -0
  242. package/mobile/src/components/Video/Video.tsx +4 -4
  243. package/mobile/src/components/Video/Video.ui.json +1 -1
  244. package/mobile/src/components/Video/VideoContent.ts +19 -4
  245. package/mobile/src/hooks/useLink.ts +1 -4
  246. package/mobile/src/model/PreventableEvent.ts +3 -0
  247. package/package.json +1 -1
  248. package/src/api/CorporateLeadAPI.ts +2 -2
  249. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
  250. package/src/components/ApplicationForm/ApplicationForm.tsx +8 -4
  251. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +20 -5
  252. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +20 -7
  253. package/src/components/ApplicationForm/ApplicationFormContent.ts +16 -4
  254. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +23 -12
  255. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +15 -4
  256. package/src/components/ApplicationForm/ApplicationFormWed.tsx +18 -4
  257. package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
  258. package/src/components/ApplicationForm/CreditParameters.ts +7 -0
  259. package/src/components/ApplicationForm/WrapperSelect.tsx +1 -1
  260. package/src/components/ApplicationForm/acquiringTypes.ts +0 -5
  261. package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
  262. package/src/components/ApplicationForm/renderCreditParameters.tsx +3 -22
  263. package/src/components/ApplicationForm/renderInputRange.tsx +20 -0
  264. package/src/components/ApplicationForm/renderQuestionsInterested.tsx +3 -3
  265. package/src/components/ApplicationForm/renderSelects.tsx +2 -2
  266. package/src/components/ApplicationForm/renderSubmitButton.tsx +1 -1
  267. package/src/components/ApplicationForm/useFormHandlers.ts +1 -15
  268. package/src/components/Video/Video.example.json +5 -0
  269. package/src/components/Video/Video.fixture.tsx +1 -1
  270. package/src/components/Video/Video.tsx +4 -4
  271. package/src/components/Video/Video.ui.json +1 -1
  272. package/src/components/Video/VideoContent.ts +19 -4
  273. package/src/hooks/useLink.ts +1 -4
  274. package/src/model/PreventableEvent.ts +3 -0
@@ -518,6 +518,27 @@
518
518
  AccordionItem.childrenTypes = [];
519
519
  const FoldButton = JSX(({ label, icon, onClick }) => (jsxs("button", { className: "border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer", onClick: onClick, children: [jsx(Text, { size: "text-xl", font: "font-medium", children: label }), jsx(ImgInner, { image: { icon }, className: "text-primary-main flex-shrink-0", width: "24", height: "24", asSVG: true })] })));
520
520
 
521
+ function CorporateLeadAPI() {
522
+ async function send(body) {
523
+ try {
524
+ const response = await fetch('/api/v1/sendCorporateLead', {
525
+ method: 'POST',
526
+ headers: { 'Content-Type': 'application/json' },
527
+ mode: 'cors',
528
+ body: JSON.stringify(body),
529
+ });
530
+ const data = await response.json();
531
+ return data;
532
+ }
533
+ catch (e) {
534
+ return null;
535
+ }
536
+ }
537
+ return {
538
+ send,
539
+ };
540
+ }
541
+
521
542
  const Input = JSX(({ className = '', inputClassName = '', id, name, type = 'text', label, value = '', valid = true, children, onChange, onBlur, ...inputProps }) => {
522
543
  const handleChange = useCallback((e) => {
523
544
  const validInputValue = e.target.validity.valid ? e.target.value : value;
@@ -625,23 +646,18 @@
625
646
 
626
647
  const ACQUIRING_TYPES = [
627
648
  {
628
- code: '1',
629
649
  name: 'Торговый эквайринг',
630
650
  },
631
651
  {
632
- code: '2',
633
652
  name: 'Мобильный эквайринг',
634
653
  },
635
654
  {
636
- code: '3',
637
655
  name: 'Интернет-эквайринг',
638
656
  },
639
657
  {
640
- code: '4',
641
658
  name: 'QR-эквайринг (СБП)',
642
659
  },
643
660
  {
644
- code: '5',
645
661
  name: 'Все виды эквайринга',
646
662
  },
647
663
  ];
@@ -806,7 +822,7 @@
806
822
  return (jsx(Select, { options: dataFormat, label: label, placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj }));
807
823
  });
808
824
 
809
- const renderSelects = ({ acquiringType, regions, region, handleChange }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: ACQUIRING_TYPES, fieldValue: "code", fieldLabel: "name", selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), 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" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
825
+ const renderSelects = ({ acquiringType, regions, region, handleChange }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), 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" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "name", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
810
826
 
811
827
  const SlideCheckbox = JSX(({ checked, text, onClick }) => (jsxs("div", { role: "checkbox", "aria-checked": checked, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onClick && onClick(), children: [jsx("div", { className: `relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl ${checked ? 'bg-primary-main' : 'bg-main-divider'}`, children: jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full ${checked ? 'left-[50%]' : 'left-[5%]'}` }) }), jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
812
828
 
@@ -820,15 +836,10 @@
820
836
  return (jsx("button", { type: "submit", className: `p-4 ${buttonStyle} ${className}`, children: button?.text ? button.text : 'Отправить заявку' }));
821
837
  };
822
838
 
823
- const useFormHandlers = ({ formState, handleSubmit, setFormState, typeForm, }) => {
839
+ const useFormHandlers = ({ setFormState }) => {
824
840
  const handleChange = useCallback((state) => setFormState((oldState) => ({ ...oldState, ...state })), []);
825
- const onSubmit = useCallback(async (e) => {
826
- e.preventDefault();
827
- handleSubmit && (await handleSubmit({ ...formState, typeForm }));
828
- }, []);
829
841
  return {
830
842
  handleChange,
831
- onSubmit,
832
843
  };
833
844
  };
834
845
 
@@ -846,19 +857,30 @@
846
857
  });
847
858
  const { acquiringType, region, fullName, inn, name, phone, onlineСheckout, posTerminal } = formState;
848
859
  const regions = useGetRegions();
849
- const { handleChange, onSubmit } = useFormHandlers({
850
- formState,
851
- handleSubmit,
860
+ const { handleChange } = useFormHandlers({
852
861
  setFormState,
853
- typeForm: 'acqr',
854
862
  });
855
863
  const selectedRegion = normalizeSelectedRegion$1(region, regions);
856
864
  useEffect(() => {
857
865
  setFormState((oldState) => ({
858
866
  ...oldState,
859
- acquiringType: ACQUIRING_TYPES?.length && ACQUIRING_TYPES[0]?.code ? ACQUIRING_TYPES[0].code : '',
867
+ acquiringType: ACQUIRING_TYPES?.length && ACQUIRING_TYPES[0]?.name ? ACQUIRING_TYPES[0].name : '',
860
868
  }));
861
869
  }, []);
870
+ const onSubmit = async (e) => {
871
+ e.preventDefault();
872
+ const PartnerComments = `Вид эквайринга=${acquiringType}/Онлайн касса=${onlineСheckout}/POS-терминал=${posTerminal}`;
873
+ handleSubmit &&
874
+ (await handleSubmit({
875
+ typeForm: 'acqr',
876
+ region,
877
+ PartnerComments,
878
+ fullName,
879
+ inn,
880
+ name,
881
+ phone,
882
+ }));
883
+ };
862
884
  return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "text-center mb-4" }), renderSelects({
863
885
  acquiringType,
864
886
  regions,
@@ -881,15 +903,24 @@
881
903
  inn: '',
882
904
  mail: '',
883
905
  });
884
- const { name, phone, inn, mail } = formState;
906
+ const { region, name, phone, inn, mail } = formState;
885
907
  const regions = useGetRegions();
886
- const { handleChange, onSubmit } = useFormHandlers({
887
- formState,
888
- handleSubmit,
908
+ const { handleChange } = useFormHandlers({
889
909
  setFormState,
890
- typeForm: 'bcrd',
891
910
  });
892
- const selectedRegion = normalizeSelectedRegion$1(formState.region, regions);
911
+ const selectedRegion = normalizeSelectedRegion$1(region, regions);
912
+ const onSubmit = async (e) => {
913
+ e.preventDefault();
914
+ handleSubmit &&
915
+ (await handleSubmit({
916
+ typeForm: 'bcrd',
917
+ region,
918
+ name,
919
+ phone,
920
+ inn,
921
+ mail,
922
+ }));
923
+ };
893
924
  return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [renderRegion$1({
894
925
  regions,
895
926
  region: selectedRegion,
@@ -897,7 +928,7 @@
897
928
  }), renderDataOrganization$3({ name, phone, inn, mail, handleChange }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
898
929
  });
899
930
  const renderDataOrganization$3 = ({ name, phone, mail, inn, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
900
- const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
931
+ const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "name", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
901
932
 
902
933
  const SAFEBOXES_URL = '/api/v1/safeboxes';
903
934
  const EMPTY_VALUE = [];
@@ -910,7 +941,14 @@
910
941
  return result || EMPTY_VALUE;
911
942
  };
912
943
 
913
- const renderBankOffices = ({ regions, region, branches, department, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: department, setSelected: (value) => handleChange({ department: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
944
+ const MIN_CREDIT_AMOUNT = 50000;
945
+ const MAX_CREDIT_AMOUNT = 3000000;
946
+ const ITEMS_CREDIT_AMOUNT = ['От 50 000 ₽', 'До 3 000 000 ₽'];
947
+ const MIN_CREDIT_TERM = 1;
948
+ const MAX_CREDIT_TERM = 60;
949
+ const ITEMS_CREDIT_TERM = ['От 1 года', 'До 5 лет'];
950
+
951
+ const renderBankOffices = ({ regions, region, branches, department, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "name", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: department, setSelected: (value) => handleChange({ department: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
914
952
 
915
953
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', {}).format(number);
916
954
 
@@ -936,6 +974,8 @@
936
974
  return (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) }));
937
975
  }
938
976
 
977
+ const renderInputRange = (props) => (jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: props.label }) }), jsx(InputRange, { ...props })] }));
978
+
939
979
  const renderCreditParameters = ({ amount, term, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [renderInputRange({
940
980
  label: 'Сумма кредита, ₽',
941
981
  value: amount,
@@ -951,16 +991,9 @@
951
991
  max: MAX_CREDIT_TERM,
952
992
  items: ITEMS_CREDIT_TERM,
953
993
  })] }));
954
- const renderInputRange = (props) => (jsxs("div", { className: "w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m-light", children: props.label }) }), jsx(InputRange, { ...props })] }));
955
994
 
956
995
  const renderDataOrganization$2 = ({ fullName, inn, name, phone, mail, annualRevenue, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", value: fullName, onChange: (value) => handleChange({ fullName: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", value: annualRevenue, onChange: (value) => handleChange({ annualRevenue: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
957
996
 
958
- const MIN_CREDIT_AMOUNT = 50000;
959
- const MAX_CREDIT_AMOUNT = 3000000;
960
- const ITEMS_CREDIT_AMOUNT = ['От 50 000 ₽', 'До 3 000 000 ₽'];
961
- const MIN_CREDIT_TERM = 1;
962
- const MAX_CREDIT_TERM = 60;
963
- const ITEMS_CREDIT_TERM = ['От 1 года', 'До 5 лет'];
964
997
  const ApplicationFormCredit = JSX((props) => {
965
998
  const { button, link, handleSubmit } = props;
966
999
  const [formState, setFormState] = useState({
@@ -977,11 +1010,8 @@
977
1010
  });
978
1011
  const { amount, term, fullName, inn, name, phone, mail, region, department, annualRevenue } = formState;
979
1012
  const regions = useGetRegions();
980
- const { handleChange, onSubmit } = useFormHandlers({
981
- formState,
982
- handleSubmit,
1013
+ const { handleChange } = useFormHandlers({
983
1014
  setFormState,
984
- typeForm: 'cred',
985
1015
  });
986
1016
  const selectedRegion = normalizeSelectedRegion$1(formState.region, regions);
987
1017
  const branches = useSafeBoxes(region);
@@ -990,6 +1020,22 @@
990
1020
  department: '',
991
1021
  });
992
1022
  }, [formState.region, handleChange]);
1023
+ const onSubmit = async (e) => {
1024
+ e.preventDefault();
1025
+ const PartnerComments = `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`;
1026
+ handleSubmit &&
1027
+ (await handleSubmit({
1028
+ typeForm: 'cred',
1029
+ fullName,
1030
+ inn,
1031
+ name,
1032
+ phone,
1033
+ mail,
1034
+ region,
1035
+ department,
1036
+ PartnerComments,
1037
+ }));
1038
+ };
993
1039
  return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043A\u0440\u0435\u0434\u0438\u0442\u0430", className: "text-center mb-4" }), renderCreditParameters({ amount, term, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization$2({ fullName, inn, name, phone, mail, annualRevenue, handleChange }), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "text-center mb-4" }), renderBankOffices({
994
1040
  regions,
995
1041
  region: selectedRegion,
@@ -1005,12 +1051,19 @@
1005
1051
  name: '',
1006
1052
  phone: '',
1007
1053
  });
1008
- const { handleChange, onSubmit } = useFormHandlers({
1009
- formState,
1010
- handleSubmit,
1054
+ const { name, phone } = formState;
1055
+ const { handleChange } = useFormHandlers({
1011
1056
  setFormState,
1012
- typeForm: 'dpst',
1013
1057
  });
1058
+ const onSubmit = async (e) => {
1059
+ e.preventDefault();
1060
+ handleSubmit &&
1061
+ (await handleSubmit({
1062
+ typeForm: 'dpst',
1063
+ name,
1064
+ phone,
1065
+ }));
1066
+ };
1014
1067
  return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "text-center mb-4" }), renderDataOrganization$1({ name: formState.name, phone: formState.phone, handleChange }), jsxs("div", { className: "flex justify-between items-center max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
1015
1068
  });
1016
1069
  const renderDataOrganization$1 = ({ name, phone, handleChange }) => (jsxs("div", { className: "max-w-[560px] m-auto", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u043C\u044F", label: "\u0418\u043C\u044F", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) })] }));
@@ -1035,7 +1088,7 @@
1035
1088
  : 'rounded checked:bg-primary-main disabled:bg-main-disabled border', checked ? 'border-black' : 'border-gray', disabled ? '' : 'group-hover/box:border-primary-hover'), type: "checkbox", onChange: (e) => onChange && onChange(e.target.checked), checked: checked, disabled: disabled }), isRadio ? (jsx("div", { className: "left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "hidden absolute left-1 ml-px peer-checked:block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" })), text ? jsx("span", { className: "font-sans ml-3 text-l-light", children: text }) : null] }) }));
1036
1089
  });
1037
1090
 
1038
- const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0412\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", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text", value: text, onChange: (e) => handleChange({ text: e.target.value }) })] }));
1091
+ const renderQuestionsInterested = ({ currencyControl, documentaryOperations, conversionOperations, text, handleChange, }) => (jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center mb-4 gap-6", children: [jsx(Checkbox, { text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", checked: currencyControl, onChange: (value) => handleChange({ currencyControl: value }) }), jsx(Checkbox, { text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: documentaryOperations, onChange: (value) => handleChange({ documentaryOperations: value }) }), jsx(Checkbox, { text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", checked: conversionOperations, onChange: (value) => handleChange({ conversionOperations: value }) })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0412\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", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: text, onChange: (e) => handleChange({ text: e.target.value }) })] }));
1039
1092
 
1040
1093
  const ApplicationFormWed = JSX((props) => {
1041
1094
  const { button, link, handleSubmit } = props;
@@ -1050,12 +1103,22 @@
1050
1103
  text: '',
1051
1104
  });
1052
1105
  const { fullName, name, phone, mail, currencyControl, documentaryOperations, conversionOperations, text, } = formState;
1053
- const { handleChange, onSubmit } = useFormHandlers({
1054
- formState,
1055
- handleSubmit,
1106
+ const { handleChange } = useFormHandlers({
1056
1107
  setFormState,
1057
- typeForm: 'kved',
1058
1108
  });
1109
+ const onSubmit = async (e) => {
1110
+ e.preventDefault();
1111
+ const PartnerComments = `Валютный контроль=${currencyControl}/Документарные операции=${documentaryOperations}/Конверсионные операции=${conversionOperations}/Доп инф=${text}`;
1112
+ handleSubmit &&
1113
+ (await handleSubmit({
1114
+ typeForm: 'kved',
1115
+ fullName,
1116
+ name,
1117
+ phone,
1118
+ mail,
1119
+ PartnerComments,
1120
+ }));
1121
+ };
1059
1122
  return (jsxs("form", { onSubmit: onSubmit, className: "container", children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "text-center mb-4" }), renderDataOrganization({ fullName, name, phone, mail, handleChange }), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "text-center mb-4" }), renderQuestionsInterested({
1060
1123
  currencyControl,
1061
1124
  documentaryOperations,
@@ -1079,11 +1142,13 @@
1079
1142
  deposit: (props) => jsx(ApplicationFormDeposit, { ...props }),
1080
1143
  wed: (props) => jsx(ApplicationFormWed, { ...props }),
1081
1144
  };
1145
+ const API = CorporateLeadAPI();
1082
1146
  const ApplicationForm = JSX((props) => {
1083
1147
  const { className = '', title, typeForm = 'credit', button, link, ...rest } = props;
1084
- const [responceType, setResponceType] = useState('');
1085
- const handleSubmit = useCallback(() => {
1086
- setResponceType('OK');
1148
+ const [responceType, setResponseType] = useState('');
1149
+ const handleSubmit = useCallback(async (data) => {
1150
+ const status = await API.send(data);
1151
+ setResponseType(status ? 'OK' : 'Fail');
1087
1152
  return 'OK';
1088
1153
  }, []);
1089
1154
  return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, handleSubmit }), responceType ? jsx(ResponseNotification, { responceType: responceType }) : null] }) }));
@@ -4269,9 +4334,9 @@
4269
4334
  const MIN_COL_SPAN = 10;
4270
4335
  const getPaddings = (className) => getColSpan(className) < MIN_COL_SPAN ? 'py-6 px-11' : 'py-12 px-32';
4271
4336
 
4272
- const Video = JSX(({ className, title, src, previewImg, ...rest }) => {
4337
+ const Video = JSX(({ className, title, url, previewImg, ...rest }) => {
4273
4338
  const router = useRouter();
4274
- return (jsxs(BlockWrapper, { className: style(getPaddings(className), className), ...rest, children: [jsx(Headline, { title: title, headlineVersion: "M" }), src ? (jsx("video", { className: "m-auto w-full object-fill", preload: "metadata", poster: adjustHref(router)(previewImg?.src), style: { maxHeight: 524 }, controls: true, children: jsx("source", { src: adjustHref(router)(src) }) })) : null] }));
4339
+ return (jsxs(BlockWrapper, { className: style(getPaddings(className), className), ...rest, children: [jsx(Headline, { title: title, headlineVersion: "M" }), url ? (jsx("video", { className: "m-auto w-full object-fill", preload: "metadata", poster: adjustHref(router)(previewImg?.src), style: { maxHeight: 524 }, controls: true, children: jsx("source", { src: adjustHref(router)(url) }) })) : null] }));
4275
4340
  });
4276
4341
 
4277
4342
  const Blocks = {
@@ -4458,7 +4523,7 @@
4458
4523
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
4459
4524
  }
4460
4525
 
4461
- const packageVersion = "0.8.17";
4526
+ const packageVersion = "0.8.18";
4462
4527
 
4463
4528
  exports.Blocks = Blocks;
4464
4529
  exports.ContentPage = ContentPage;