@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.
- package/bundle/api/CorporateLeadAPI.d.ts +1 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +116 -51
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/bundle/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/bundle/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/bundle/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/bundle/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/bundle/components/Video/VideoContent.d.ts +19 -4
- package/bundle/hooks/useLink.d.ts +1 -3
- package/bundle/model/PreventableEvent.d.ts +3 -0
- package/dist/api/CorporateLeadAPI.d.ts +1 -1
- package/dist/api/CorporateLeadAPI.js +1 -1
- package/dist/api/CorporateLeadAPI.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +6 -3
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
- package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/dist/components/ApplicationForm/ApplicationFormCredit.js +21 -13
- package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js +14 -4
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/dist/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/dist/components/ApplicationForm/CreditParameters.js +9 -0
- package/dist/components/ApplicationForm/CreditParameters.js.map +1 -0
- package/dist/components/ApplicationForm/acquiringTypes.js +0 -5
- package/dist/components/ApplicationForm/acquiringTypes.js.map +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/dist/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/dist/components/ApplicationForm/renderCreditParameters.js +10 -12
- package/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/dist/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/dist/components/ApplicationForm/renderInputRange.js +8 -0
- package/dist/components/ApplicationForm/renderInputRange.js.map +1 -0
- package/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/dist/components/ApplicationForm/renderSelects.js +1 -1
- package/dist/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/dist/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/dist/components/ApplicationForm/useFormHandlers.js +1 -6
- package/dist/components/ApplicationForm/useFormHandlers.js.map +1 -1
- package/dist/components/Video/Video.js +2 -2
- package/dist/components/Video/Video.js.map +1 -1
- package/dist/components/Video/VideoContent.d.ts +19 -4
- package/dist/hooks/useLink.d.ts +1 -3
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/model/PreventableEvent.d.ts +3 -0
- package/dist/model/PreventableEvent.js +2 -0
- package/dist/model/PreventableEvent.js.map +1 -0
- package/lib/api/CorporateLeadAPI.d.ts +1 -1
- package/lib/api/CorporateLeadAPI.js +1 -1
- package/lib/api/CorporateLeadAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +0 -2
- package/lib/components/ApplicationForm/ApplicationForm.js +6 -3
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
- package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/lib/components/ApplicationForm/ApplicationFormCredit.js +18 -10
- package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js +14 -4
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/lib/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/lib/components/ApplicationForm/CreditParameters.js +7 -0
- package/lib/components/ApplicationForm/CreditParameters.js.map +1 -0
- package/lib/components/ApplicationForm/acquiringTypes.js +0 -5
- package/lib/components/ApplicationForm/acquiringTypes.js.map +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/lib/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/lib/components/ApplicationForm/renderCreditParameters.js +3 -5
- package/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/lib/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/lib/components/ApplicationForm/renderInputRange.js +5 -0
- package/lib/components/ApplicationForm/renderInputRange.js.map +1 -0
- package/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/lib/components/ApplicationForm/renderSelects.js +1 -1
- package/lib/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/lib/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/lib/components/ApplicationForm/useFormHandlers.js +1 -6
- package/lib/components/ApplicationForm/useFormHandlers.js.map +1 -1
- package/lib/components/Video/Video.js +2 -2
- package/lib/components/Video/Video.js.map +1 -1
- package/lib/components/Video/VideoContent.d.ts +19 -4
- package/lib/hooks/useLink.d.ts +1 -3
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/model/PreventableEvent.d.ts +3 -0
- package/lib/model/PreventableEvent.js +2 -0
- package/lib/model/PreventableEvent.js.map +1 -0
- package/mobile/bundle/api/CorporateLeadAPI.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/mobile/bundle/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/mobile/bundle/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/mobile/bundle/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/mobile/bundle/components/Video/VideoContent.d.ts +19 -4
- package/mobile/bundle/hooks/useLink.d.ts +1 -3
- package/mobile/bundle/model/PreventableEvent.d.ts +3 -0
- package/mobile/dist/api/CorporateLeadAPI.d.ts +1 -1
- package/mobile/dist/api/CorporateLeadAPI.js +1 -1
- package/mobile/dist/api/CorporateLeadAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +6 -3
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +21 -13
- package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +14 -4
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/mobile/dist/components/ApplicationForm/CreditParameters.js +9 -0
- package/mobile/dist/components/ApplicationForm/CreditParameters.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/acquiringTypes.js +0 -5
- package/mobile/dist/components/ApplicationForm/acquiringTypes.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js +10 -12
- package/mobile/dist/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/mobile/dist/components/ApplicationForm/renderInputRange.js +8 -0
- package/mobile/dist/components/ApplicationForm/renderInputRange.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSelects.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/mobile/dist/components/ApplicationForm/useFormHandlers.js +1 -6
- package/mobile/dist/components/ApplicationForm/useFormHandlers.js.map +1 -1
- package/mobile/dist/components/Video/Video.js +2 -2
- package/mobile/dist/components/Video/Video.js.map +1 -1
- package/mobile/dist/components/Video/VideoContent.d.ts +19 -4
- package/mobile/dist/hooks/useLink.d.ts +1 -3
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/model/PreventableEvent.d.ts +3 -0
- package/mobile/dist/model/PreventableEvent.js +2 -0
- package/mobile/dist/model/PreventableEvent.js.map +1 -0
- package/mobile/lib/api/CorporateLeadAPI.d.ts +1 -1
- package/mobile/lib/api/CorporateLeadAPI.js +1 -1
- package/mobile/lib/api/CorporateLeadAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +6 -3
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js +16 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +16 -7
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +15 -4
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.d.ts +0 -6
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +18 -10
- package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +11 -4
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +14 -4
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/CreditParameters.d.ts +6 -0
- package/mobile/lib/components/ApplicationForm/CreditParameters.js +7 -0
- package/mobile/lib/components/ApplicationForm/CreditParameters.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/acquiringTypes.js +0 -5
- package/mobile/lib/components/ApplicationForm/acquiringTypes.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js +3 -5
- package/mobile/lib/components/ApplicationForm/renderCreditParameters.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderInputRange.d.ts +11 -0
- package/mobile/lib/components/ApplicationForm/renderInputRange.js +5 -0
- package/mobile/lib/components/ApplicationForm/renderInputRange.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSelects.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/useFormHandlers.d.ts +1 -5
- package/mobile/lib/components/ApplicationForm/useFormHandlers.js +1 -6
- package/mobile/lib/components/ApplicationForm/useFormHandlers.js.map +1 -1
- package/mobile/lib/components/Video/Video.js +2 -2
- package/mobile/lib/components/Video/Video.js.map +1 -1
- package/mobile/lib/components/Video/VideoContent.d.ts +19 -4
- package/mobile/lib/hooks/useLink.d.ts +1 -3
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/model/PreventableEvent.d.ts +3 -0
- package/mobile/lib/model/PreventableEvent.js +2 -0
- package/mobile/lib/model/PreventableEvent.js.map +1 -0
- package/mobile/src/api/CorporateLeadAPI.ts +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +8 -4
- package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +20 -5
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +20 -7
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +16 -4
- package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +23 -12
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +15 -4
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +18 -4
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/mobile/src/components/ApplicationForm/CreditParameters.ts +7 -0
- package/mobile/src/components/ApplicationForm/WrapperSelect.tsx +1 -1
- package/mobile/src/components/ApplicationForm/acquiringTypes.ts +0 -5
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderCreditParameters.tsx +3 -22
- package/mobile/src/components/ApplicationForm/renderInputRange.tsx +20 -0
- package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +3 -3
- package/mobile/src/components/ApplicationForm/renderSelects.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +1 -1
- package/mobile/src/components/ApplicationForm/useFormHandlers.ts +1 -15
- package/mobile/src/components/Video/Video.example.json +5 -0
- package/mobile/src/components/Video/Video.tsx +4 -4
- package/mobile/src/components/Video/Video.ui.json +1 -1
- package/mobile/src/components/Video/VideoContent.ts +19 -4
- package/mobile/src/hooks/useLink.ts +1 -4
- package/mobile/src/model/PreventableEvent.ts +3 -0
- package/package.json +1 -1
- package/src/api/CorporateLeadAPI.ts +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationForm.tsx +8 -4
- package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +20 -5
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +20 -7
- package/src/components/ApplicationForm/ApplicationFormContent.ts +16 -4
- package/src/components/ApplicationForm/ApplicationFormCredit.tsx +23 -12
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +15 -4
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +18 -4
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/src/components/ApplicationForm/CreditParameters.ts +7 -0
- package/src/components/ApplicationForm/WrapperSelect.tsx +1 -1
- package/src/components/ApplicationForm/acquiringTypes.ts +0 -5
- package/src/components/ApplicationForm/renderBankOffices.tsx +1 -1
- package/src/components/ApplicationForm/renderCreditParameters.tsx +3 -22
- package/src/components/ApplicationForm/renderInputRange.tsx +20 -0
- package/src/components/ApplicationForm/renderQuestionsInterested.tsx +3 -3
- package/src/components/ApplicationForm/renderSelects.tsx +2 -2
- package/src/components/ApplicationForm/renderSubmitButton.tsx +1 -1
- package/src/components/ApplicationForm/useFormHandlers.ts +1 -15
- package/src/components/Video/Video.example.json +5 -0
- package/src/components/Video/Video.fixture.tsx +1 -1
- package/src/components/Video/Video.tsx +4 -4
- package/src/components/Video/Video.ui.json +1 -1
- package/src/components/Video/VideoContent.ts +19 -4
- package/src/hooks/useLink.ts +1 -4
- package/src/model/PreventableEvent.ts +3 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -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: "
|
|
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 = ({
|
|
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
|
|
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]?.
|
|
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
|
|
887
|
-
formState,
|
|
888
|
-
handleSubmit,
|
|
908
|
+
const { handleChange } = useFormHandlers({
|
|
889
909
|
setFormState,
|
|
890
|
-
typeForm: 'bcrd',
|
|
891
910
|
});
|
|
892
|
-
const selectedRegion = normalizeSelectedRegion$1(
|
|
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: "
|
|
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
|
|
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
|
|
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 {
|
|
1009
|
-
|
|
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:
|
|
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
|
|
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,
|
|
1085
|
-
const handleSubmit = useCallback(() => {
|
|
1086
|
-
|
|
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,
|
|
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" }),
|
|
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.
|
|
4526
|
+
const packageVersion = "0.8.18";
|
|
4462
4527
|
|
|
4463
4528
|
exports.Blocks = Blocks;
|
|
4464
4529
|
exports.ContentPage = ContentPage;
|