@redneckz/wildless-cms-uni-blocks 0.14.170 → 0.14.172
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/bin/migration-scripts/0.14.169.js +139 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +362 -342
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/bundle/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/bundle/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/bundle/components/ApplicationForm/validators.d.ts +1 -0
- package/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/bundle/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/bundle/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/bundle/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/bundle/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/bundle/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/{dist/components/ApplicationForm → bundle/ui-kit/Input}/InputControl.d.ts +1 -1
- package/dist/components/ApplicationForm/AddressBranchField.js +1 -1
- package/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +6 -14
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/DatePickerControl.js +1 -1
- package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
- package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/dist/components/ApplicationForm/RegionField.js +1 -1
- package/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/dist/components/ApplicationForm/SelectControl.js +1 -1
- package/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/dist/components/ApplicationForm/feedbackTypes.js.map +1 -1
- package/dist/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/dist/components/ApplicationForm/getFormatData.js +5 -0
- package/dist/components/ApplicationForm/getFormatData.js.map +1 -0
- package/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/dist/components/ApplicationForm/handleSubmitFeedback.js +38 -0
- package/dist/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/components/ApplicationForm/validators.d.ts +1 -0
- package/dist/components/ApplicationForm/validators.js +2 -1
- package/dist/components/ApplicationForm/validators.js.map +1 -1
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +5 -0
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
- package/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js +5 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
- package/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +39 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
- package/dist/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/dist/components/ApplicationFormCustom/columnStyle.js +7 -0
- package/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -0
- package/dist/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/dist/components/ApplicationFormCustom/getField.js +29 -0
- package/dist/components/ApplicationFormCustom/getField.js.map +1 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js +20 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
- package/dist/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/dist/components/ApplicationFormCustom/getNamesFromInput.js +5 -0
- package/dist/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
- package/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/dist/components/ApplicationFormCustom/getObjectValidator.js +20 -0
- package/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
- package/dist/components/Blocks.js +6 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +12 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
- package/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
- package/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js +15 -0
- package/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
- package/dist/ui-kit/Checkbox/Checkbox.js +1 -1
- package/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/dist/ui-kit/Checkbox/CheckboxWithError.js +1 -1
- package/dist/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
- package/{lib/components/ApplicationForm → dist/ui-kit/Input}/InputControl.d.ts +1 -1
- package/dist/{components/ApplicationForm → ui-kit/Input}/InputControl.js +1 -1
- package/dist/ui-kit/Input/InputControl.js.map +1 -0
- package/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
- package/dist/ui-kit/Input/renderErrorText.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/AddressBranchField.js +2 -2
- package/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +2 -4
- package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +0 -2
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +4 -13
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/DatePickerControl.js +1 -1
- package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
- package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/lib/components/ApplicationForm/RegionField.js +2 -2
- package/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/lib/components/ApplicationForm/SelectControl.js +1 -1
- package/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/lib/components/ApplicationForm/feedbackTypes.js.map +1 -1
- package/lib/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/lib/components/ApplicationForm/getFormatData.js +2 -0
- package/lib/components/ApplicationForm/getFormatData.js.map +1 -0
- package/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/lib/components/ApplicationForm/{handleSubmit.js → handleSubmitFeedback.js} +16 -18
- package/lib/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/components/ApplicationForm/validators.d.ts +1 -0
- package/lib/components/ApplicationForm/validators.js +1 -0
- package/lib/components/ApplicationForm/validators.js.map +1 -1
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.fixture.d.ts +6 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +2 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
- package/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.fixture.d.ts +6 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js +2 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
- package/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.fixture.d.ts +6 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +37 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
- package/lib/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/lib/components/ApplicationFormCustom/columnStyle.js +5 -0
- package/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -0
- package/lib/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/lib/components/ApplicationFormCustom/getField.js +26 -0
- package/lib/components/ApplicationFormCustom/getField.js.map +1 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js +17 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
- package/lib/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/lib/components/ApplicationFormCustom/getNamesFromInput.js +2 -0
- package/lib/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
- package/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/lib/components/ApplicationFormCustom/getObjectValidator.js +17 -0
- package/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
- package/lib/components/Blocks.js +6 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +10 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
- package/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
- package/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js +13 -0
- package/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
- package/lib/ui-kit/Checkbox/Checkbox.js +1 -1
- package/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/lib/ui-kit/Checkbox/CheckboxWithError.js +1 -1
- package/lib/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
- package/{bundle/components/ApplicationForm → lib/ui-kit/Input}/InputControl.d.ts +1 -1
- package/{mobile/lib/components/ApplicationForm → lib/ui-kit/Input}/InputControl.js +1 -1
- package/lib/ui-kit/Input/InputControl.js.map +1 -0
- package/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
- package/lib/ui-kit/Input/renderErrorText.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +361 -342
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/mobile/bundle/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/mobile/bundle/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/mobile/bundle/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/mobile/bundle/components/ApplicationForm/validators.d.ts +1 -0
- package/mobile/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/mobile/bundle/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/mobile/bundle/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/mobile/bundle/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/mobile/bundle/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/mobile/bundle/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/mobile/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/mobile/bundle/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/mobile/bundle/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/mobile/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/mobile/bundle/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/mobile/bundle/{components/ApplicationForm → ui-kit/Input}/InputControl.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/AddressBranchField.js +1 -1
- package/mobile/dist/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +6 -14
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +0 -4
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/RegionField.js +1 -1
- package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/SelectControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/dist/components/ApplicationForm/feedbackTypes.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/mobile/dist/components/ApplicationForm/getFormatData.js +5 -0
- package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js +38 -0
- package/mobile/dist/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/validators.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/validators.js +2 -1
- package/mobile/dist/components/ApplicationForm/validators.js.map +1 -1
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +5 -0
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
- package/mobile/dist/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js +5 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
- package/mobile/dist/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +39 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/mobile/dist/components/ApplicationFormCustom/columnStyle.js +7 -0
- package/mobile/dist/components/ApplicationFormCustom/columnStyle.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/mobile/dist/components/ApplicationFormCustom/getField.js +29 -0
- package/mobile/dist/components/ApplicationFormCustom/getField.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js +20 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.js +5 -0
- package/mobile/dist/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
- package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js +20 -0
- package/mobile/dist/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +12 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js +15 -0
- package/mobile/dist/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js +1 -1
- package/mobile/dist/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithError.js +1 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputControl.d.ts +2 -0
- package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/InputControl.js +1 -1
- package/mobile/dist/ui-kit/Input/InputControl.js.map +1 -0
- package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
- package/mobile/dist/ui-kit/Input/renderErrorText.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/AddressBranchField.js +2 -2
- package/mobile/lib/components/ApplicationForm/AddressBranchField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -15
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +4 -13
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormSelfCollection.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormUltraPremium.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +0 -4
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/RegionField.js +2 -2
- package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/SelectControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/SelectControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/lib/components/ApplicationForm/feedbackTypes.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getFormatData.d.ts +3 -0
- package/mobile/lib/components/ApplicationForm/getFormatData.js +2 -0
- package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.d.ts +15 -0
- package/mobile/lib/components/ApplicationForm/{handleSubmit.js → handleSubmitFeedback.js} +16 -18
- package/mobile/lib/components/ApplicationForm/handleSubmitFeedback.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAcquiringDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderCreditDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.d.ts +1 -3
- package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/validators.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/validators.js +1 -0
- package/mobile/lib/components/ApplicationForm/validators.js.map +1 -1
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.d.ts +1 -0
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js +2 -0
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.js.map +1 -0
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.d.ts +2 -0
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js +2 -0
- package/mobile/lib/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.d.ts +1 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js +2 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruption.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.d.ts +2 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js +2 -0
- package/mobile/lib/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.d.ts +6 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +37 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +53 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js +2 -0
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/columnStyle.d.ts +2 -0
- package/mobile/lib/components/ApplicationFormCustom/columnStyle.js +5 -0
- package/mobile/lib/components/ApplicationFormCustom/columnStyle.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getField.d.ts +3 -0
- package/mobile/lib/components/ApplicationFormCustom/getField.js +26 -0
- package/mobile/lib/components/ApplicationFormCustom/getField.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +13 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js +17 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.d.ts +2 -0
- package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.js +2 -0
- package/mobile/lib/components/ApplicationFormCustom/getNamesFromInput.js.map +1 -0
- package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.d.ts +3 -0
- package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js +17 -0
- package/mobile/lib/components/ApplicationFormCustom/getObjectValidator.js.map +1 -0
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.d.ts +5 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js +10 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayout.js.map +1 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.d.ts +9 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js +2 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.js.map +1 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js +13 -0
- package/mobile/lib/ui-kit/ApplicationFormLayout/ResponseNotification.js.map +1 -0
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js +1 -1
- package/mobile/lib/ui-kit/Checkbox/Checkbox.js.map +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithError.js +1 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithError.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputControl.d.ts +2 -0
- package/{lib/components/ApplicationForm → mobile/lib/ui-kit/Input}/InputControl.js +1 -1
- package/mobile/lib/ui-kit/Input/InputControl.js.map +1 -0
- package/mobile/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.js +1 -1
- package/mobile/lib/ui-kit/Input/renderErrorText.js.map +1 -0
- package/mobile/src/components/ApplicationForm/AddressBranchField.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -21
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +4 -15
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +1 -1
- package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +1 -1
- package/mobile/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/mobile/src/components/ApplicationForm/SelectControl.tsx +1 -1
- package/mobile/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/mobile/src/components/ApplicationForm/getFormatData.tsx +4 -0
- package/mobile/src/components/ApplicationForm/handleSubmitFeedback.tsx +54 -0
- package/mobile/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderUserData.tsx +2 -6
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
- package/mobile/src/components/ApplicationForm/validators.ts +2 -0
- package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +27 -0
- package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.tsx +1 -0
- package/mobile/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.ts +2 -0
- package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +27 -0
- package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruption.tsx +1 -0
- package/mobile/src/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.ts +2 -0
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +21 -0
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +59 -0
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +74 -0
- package/mobile/src/components/ApplicationFormCustom/columnStyle.tsx +6 -0
- package/mobile/src/components/ApplicationFormCustom/getField.tsx +76 -0
- package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +34 -0
- package/mobile/src/components/ApplicationFormCustom/getNamesFromInput.tsx +3 -0
- package/mobile/src/components/ApplicationFormCustom/getObjectValidator.tsx +28 -0
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/Calculator/Calculator.ui.json +0 -6
- package/mobile/src/components/Calculator/CalculatorContent.ts +2 -2
- package/mobile/src/components/TariffsTable/TariffsTable.ui.json +0 -3
- package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +22 -0
- package/mobile/src/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.ts +12 -0
- package/mobile/src/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.tsx +3 -6
- package/mobile/src/ui-kit/Checkbox/Checkbox.tsx +1 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxWithError.tsx +1 -1
- package/mobile/src/ui-kit/InnerTable/InnerTableProps.ts +1 -1
- package/mobile/src/{components/ApplicationForm → ui-kit/Input}/InputControl.tsx +2 -2
- package/mobile/src/{components/ApplicationForm → ui-kit/Input}/renderErrorText.tsx +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/AddressBranchField.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +1 -28
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +8 -36
- package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -21
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +4 -15
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormSelfCollection.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormUltraPremium.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
- package/src/components/ApplicationForm/DatePickerControl.tsx +1 -1
- package/src/components/ApplicationForm/EmbeddableForms.tsx +0 -4
- package/src/components/ApplicationForm/PhoneInputControl.tsx +1 -1
- package/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/src/components/ApplicationForm/SelectControl.tsx +1 -1
- package/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/src/components/ApplicationForm/getFormatData.tsx +4 -0
- package/src/components/ApplicationForm/handleSubmitFeedback.tsx +54 -0
- package/src/components/ApplicationForm/renderAcquiringDataOrganization.tsx +1 -1
- package/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +2 -2
- package/src/components/ApplicationForm/renderCreditDataOrganization.tsx +1 -1
- package/src/components/ApplicationForm/renderUserData.tsx +2 -6
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +1 -1
- package/src/components/ApplicationForm/validators.ts +2 -0
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.example.json +27 -0
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.fixture.tsx +36 -0
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraud.tsx +1 -0
- package/src/components/ApplicationFormAntiFraud/ApplicationFormAntiFraudContent.ts +2 -0
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.example.json +27 -0
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.fixture.tsx +36 -0
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruption.tsx +1 -0
- package/src/components/ApplicationFormCorruption/ApplicationFormCorruptionContent.ts +2 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +21 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.fixture.tsx +37 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +59 -0
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +74 -0
- package/src/components/ApplicationFormCustom/columnStyle.tsx +6 -0
- package/src/components/ApplicationFormCustom/getField.tsx +76 -0
- package/src/components/ApplicationFormCustom/getInitialFormState.tsx +34 -0
- package/src/components/ApplicationFormCustom/getNamesFromInput.tsx +3 -0
- package/src/components/ApplicationFormCustom/getObjectValidator.tsx +28 -0
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Blocks.ts +6 -0
- package/src/components/Calculator/Calculator.ui.json +0 -6
- package/src/components/Calculator/CalculatorContent.ts +2 -2
- package/src/components/TariffsTable/TariffsTable.ui.json +0 -3
- package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayout.tsx +22 -0
- package/src/ui-kit/ApplicationFormLayout/ApplicationFormLayoutContent.ts +12 -0
- package/src/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.tsx +3 -6
- package/src/ui-kit/Checkbox/Checkbox.tsx +1 -1
- package/src/ui-kit/Checkbox/CheckboxWithError.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTableProps.ts +1 -1
- package/src/{components/ApplicationForm → ui-kit/Input}/InputControl.tsx +2 -2
- package/src/{components/ApplicationForm → ui-kit/Input}/renderErrorText.tsx +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/bundle/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -43
- package/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
- package/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/dist/components/ApplicationForm/ApplicationFormCorruption.js +0 -44
- package/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
- package/dist/components/ApplicationForm/InputControl.js.map +0 -1
- package/dist/components/ApplicationForm/ResponseNotification.js +0 -14
- package/dist/components/ApplicationForm/ResponseNotification.js.map +0 -1
- package/dist/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/dist/components/ApplicationForm/handleSubmit.js +0 -42
- package/dist/components/ApplicationForm/handleSubmit.js.map +0 -1
- package/dist/components/ApplicationForm/renderErrorText.js.map +0 -1
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -41
- package/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
- package/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/lib/components/ApplicationForm/ApplicationFormCorruption.js +0 -42
- package/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
- package/lib/components/ApplicationForm/InputControl.js.map +0 -1
- package/lib/components/ApplicationForm/ResponseNotification.js +0 -12
- package/lib/components/ApplicationForm/ResponseNotification.js.map +0 -1
- package/lib/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/lib/components/ApplicationForm/handleSubmit.js.map +0 -1
- package/lib/components/ApplicationForm/renderErrorText.js.map +0 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/mobile/bundle/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/mobile/bundle/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -43
- package/mobile/dist/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js +0 -44
- package/mobile/dist/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/InputControl.d.ts +0 -2
- package/mobile/dist/components/ApplicationForm/InputControl.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js +0 -14
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/mobile/dist/components/ApplicationForm/handleSubmit.js +0 -42
- package/mobile/dist/components/ApplicationForm/handleSubmit.js.map +0 -1
- package/mobile/dist/components/ApplicationForm/renderErrorText.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.d.ts +0 -12
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js +0 -41
- package/mobile/lib/components/ApplicationForm/ApplicationFormAntiFraud.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.d.ts +0 -12
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js +0 -42
- package/mobile/lib/components/ApplicationForm/ApplicationFormCorruption.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/InputControl.d.ts +0 -2
- package/mobile/lib/components/ApplicationForm/InputControl.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js +0 -12
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/handleSubmit.d.ts +0 -16
- package/mobile/lib/components/ApplicationForm/handleSubmit.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/renderErrorText.js.map +0 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +0 -77
- package/mobile/src/components/ApplicationForm/ApplicationFormCorruption.tsx +0 -82
- package/mobile/src/components/ApplicationForm/handleSubmit.tsx +0 -57
- package/src/components/ApplicationForm/ApplicationFormAntiFraud.tsx +0 -77
- package/src/components/ApplicationForm/ApplicationFormCorruption.tsx +0 -82
- package/src/components/ApplicationForm/handleSubmit.tsx +0 -57
- /package/bundle/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/bundle/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
- /package/dist/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
- /package/lib/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
- /package/mobile/bundle/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/mobile/bundle/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
- /package/mobile/dist/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/mobile/dist/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
- /package/mobile/lib/{components/ApplicationForm → ui-kit/ApplicationFormLayout}/ResponseNotification.d.ts +0 -0
- /package/mobile/lib/{components/ApplicationForm → ui-kit/Input}/renderErrorText.d.ts +0 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -848,6 +848,13 @@
|
|
|
848
848
|
? {}
|
|
849
849
|
: { secondaryPhoneNumber: formatPhone(secondaryPhone) };
|
|
850
850
|
|
|
851
|
+
const ResponseNotification = JSX(({ responseType }) => {
|
|
852
|
+
const responseOK = responseType === 'OK';
|
|
853
|
+
const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
|
|
854
|
+
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
855
|
+
return (jsxs("div", { className: style('flex items-center p-lg rounded-md space-x-m', backgroundColor), children: [jsx(Img, { image: { icon: statusIcon, iconVersion: 'normal' }, width: "42", height: "42" }), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
|
|
856
|
+
});
|
|
857
|
+
|
|
851
858
|
const identity = (_) => _;
|
|
852
859
|
|
|
853
860
|
const useForm = (initialState, { resetOnSubmit, onSubmit } = {}) => {
|
|
@@ -903,26 +910,13 @@
|
|
|
903
910
|
[];
|
|
904
911
|
|
|
905
912
|
const isValidationSuccess = (info) => !info?.length;
|
|
906
|
-
const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
913
|
+
const validator$1 = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
907
914
|
|
|
908
915
|
const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text || 'Нажимая кнопку, вы подтверждаете согласие с ' }), link ? (jsx(LinkButton, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target || '', className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
909
916
|
|
|
910
917
|
const formStyle$1 = 'container space-y-lg';
|
|
911
918
|
const oneColumnFormStyle = 'w-full max-w-xl space-y-s m-auto';
|
|
912
919
|
|
|
913
|
-
const withValidator = (props, validator) => {
|
|
914
|
-
const { value, isDirty } = props;
|
|
915
|
-
const errors = isDirty ? validator(value) : [];
|
|
916
|
-
return {
|
|
917
|
-
...props,
|
|
918
|
-
errors,
|
|
919
|
-
error: errors[0],
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
|
|
923
|
-
const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
|
|
924
|
-
const formChildrenStyle = '@xl:w-1/2 space-y-s';
|
|
925
|
-
|
|
926
920
|
const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
|
|
927
921
|
const inputRef = useRef(null);
|
|
928
922
|
const handleChange = useCallback((e) => {
|
|
@@ -947,6 +941,19 @@
|
|
|
947
941
|
|
|
948
942
|
const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label && rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: rest?.errors && !label ? `${placeholder}*` : placeholder }), renderErrorText(error)] })));
|
|
949
943
|
|
|
944
|
+
const withValidator = (props, validator) => {
|
|
945
|
+
const { value, isDirty } = props;
|
|
946
|
+
const errors = isDirty ? validator(value) : [];
|
|
947
|
+
return {
|
|
948
|
+
...props,
|
|
949
|
+
errors,
|
|
950
|
+
error: errors[0],
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
const ApplicationFieldsetLayout = JSX(({ title, children }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, children] })));
|
|
955
|
+
const formChildrenStyle = '@xl:w-1/2 space-y-s';
|
|
956
|
+
|
|
950
957
|
const isPlaceholder = (_) => _ === '_';
|
|
951
958
|
const isDigit = (_) => /\d/.test(_);
|
|
952
959
|
const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
|
|
@@ -968,16 +975,17 @@
|
|
|
968
975
|
|
|
969
976
|
const PhoneInputControl = JSX(({ className, label, value, error, onChange, onBlur, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(PhoneInput, { "aria-label": label, label: rest?.errors ? `${label}*` : label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, placeholder: "+7 (___) ___-__-__" }), renderErrorText(error)] })));
|
|
970
977
|
|
|
971
|
-
const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
|
|
978
|
+
const pattern = (regexp) => validator$1((_) => typeof _ === 'string' && regexp.test(_));
|
|
972
979
|
|
|
973
|
-
const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
|
|
980
|
+
const required = validator$1((_) => _ !== null && _ !== undefined && _ !== '');
|
|
974
981
|
|
|
975
982
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
976
983
|
const defaultValidator = required(ERROR_MESSAGE);
|
|
977
|
-
const
|
|
978
|
-
const
|
|
984
|
+
const defaultSelectValidator = validator$1((_) => _?.key && _?.key !== '')(ERROR_MESSAGE);
|
|
985
|
+
const nameValidator = validator$1((_) => typeof _ === 'string' && _.length > 1)(ERROR_MESSAGE);
|
|
986
|
+
const innValidator = validator$1((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(ERROR_MESSAGE);
|
|
979
987
|
const phoneValidator = pattern(/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/)(ERROR_MESSAGE);
|
|
980
|
-
const checkboxValidator = validator((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
|
|
988
|
+
const checkboxValidator = validator$1((_) => typeof _ === 'boolean' && _)(ERROR_MESSAGE);
|
|
981
989
|
|
|
982
990
|
const renderAcquiringDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] })] }));
|
|
983
991
|
|
|
@@ -1178,7 +1186,7 @@
|
|
|
1178
1186
|
|
|
1179
1187
|
const RegionField = JSX(({ field }) => {
|
|
1180
1188
|
const regions = useRegions();
|
|
1181
|
-
return (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'),
|
|
1189
|
+
return (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultSelectValidator) }));
|
|
1182
1190
|
});
|
|
1183
1191
|
|
|
1184
1192
|
const renderAcquiringRegion = ({ field, title }) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(SelectControl, { label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433", options: ACQUIRING_TYPES, ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) })] }));
|
|
@@ -1215,7 +1223,7 @@
|
|
|
1215
1223
|
|
|
1216
1224
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
1217
1225
|
|
|
1218
|
-
const initialFormState$
|
|
1226
|
+
const initialFormState$9 = {
|
|
1219
1227
|
typeForm: { key: 'acqr', text: 'Предупреждение о мошенничестве' },
|
|
1220
1228
|
acquiringType: { key: 'trade', text: 'Торговый эквайринг' },
|
|
1221
1229
|
fullName: '',
|
|
@@ -1247,12 +1255,236 @@
|
|
|
1247
1255
|
};
|
|
1248
1256
|
isValidationSuccess(acquiringValidator(formState)) && onSubmit(submitData, false);
|
|
1249
1257
|
}, [onSubmit]);
|
|
1250
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
1258
|
+
const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
|
|
1251
1259
|
const isSlideCheckboxes = getSlideCheckboxes(field('acquiringType').value?.key);
|
|
1252
1260
|
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderAcquiringRegion({ field, title: 'Вид эквайринга и регион' }), renderAcquiringDataOrganization(field, 'Данные организации'), isSlideCheckboxes ? (jsxs("div", { children: [jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] })) : null, renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1253
1261
|
});
|
|
1254
1262
|
const getSlideCheckboxes = (type) => type === 'all' || type === 'trade';
|
|
1255
1263
|
|
|
1264
|
+
const initialFormState$8 = {
|
|
1265
|
+
typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
|
|
1266
|
+
name: '',
|
|
1267
|
+
phone: '',
|
|
1268
|
+
inn: '',
|
|
1269
|
+
email: '',
|
|
1270
|
+
};
|
|
1271
|
+
const businessCardValidator = objectValidator({
|
|
1272
|
+
region: defaultValidator,
|
|
1273
|
+
name: nameValidator,
|
|
1274
|
+
phone: phoneValidator,
|
|
1275
|
+
inn: innValidator,
|
|
1276
|
+
email: defaultValidator,
|
|
1277
|
+
});
|
|
1278
|
+
const ApplicationFormBusinessCard = JSX((props) => {
|
|
1279
|
+
const { button, link, onSubmit } = props;
|
|
1280
|
+
const handleSubmit = useCallback((formState) => {
|
|
1281
|
+
isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
|
|
1282
|
+
}, [onSubmit]);
|
|
1283
|
+
const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
|
|
1284
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1285
|
+
});
|
|
1286
|
+
|
|
1287
|
+
const BRANCHES_URL = '/api/v1/branches';
|
|
1288
|
+
const EMPTY_VALUE$4 = [];
|
|
1289
|
+
function useBranches(regionCode) {
|
|
1290
|
+
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
|
|
1291
|
+
return data || EMPTY_VALUE$4;
|
|
1292
|
+
}
|
|
1293
|
+
const fetchSafeBoxes$1 = async (url) => {
|
|
1294
|
+
const result = await fetchJSON(url, { method: 'GET' });
|
|
1295
|
+
return result || EMPTY_VALUE$4;
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
|
|
1299
|
+
function usePremiumBranchesByRegions() {
|
|
1300
|
+
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
1301
|
+
return data || [];
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
|
|
1305
|
+
const addressBranch = isPremium
|
|
1306
|
+
? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
|
|
1307
|
+
: useBranches(regionKey).filter((branch) => branch?.address);
|
|
1308
|
+
return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
|
|
1309
|
+
key: address,
|
|
1310
|
+
text: address,
|
|
1311
|
+
})), ...withValidator(field('addressBranch'), defaultSelectValidator) }));
|
|
1312
|
+
});
|
|
1313
|
+
|
|
1314
|
+
const MIN_CREDIT_AMOUNT = 1000;
|
|
1315
|
+
const MAX_CREDIT_AMOUNT = 1000000000;
|
|
1316
|
+
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
1317
|
+
const MIN_CREDIT_TERM = 1;
|
|
1318
|
+
const MAX_CREDIT_TERM = 180;
|
|
1319
|
+
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
1320
|
+
|
|
1321
|
+
const renderCreditDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }));
|
|
1322
|
+
|
|
1323
|
+
const useNormalizedInput = (props, { normalize, format }) => {
|
|
1324
|
+
const { value, onFocus, onBlur, onChange } = props;
|
|
1325
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
1326
|
+
const handleFocus = useCallback((e) => {
|
|
1327
|
+
setIsFocused(true);
|
|
1328
|
+
onFocus && onFocus(e);
|
|
1329
|
+
}, []);
|
|
1330
|
+
const handleBlur = useCallback(() => {
|
|
1331
|
+
setIsFocused(false);
|
|
1332
|
+
onChange && onChange(normalize(value));
|
|
1333
|
+
onBlur && onBlur();
|
|
1334
|
+
}, [onChange, value]);
|
|
1335
|
+
return {
|
|
1336
|
+
value: (isFocused || !format ? value : format(value)),
|
|
1337
|
+
onFocus: handleFocus,
|
|
1338
|
+
onBlur: handleBlur,
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
1343
|
+
|
|
1344
|
+
function parseDecimal(value) {
|
|
1345
|
+
const rawValue = (value || '').replace(/\D/g, '');
|
|
1346
|
+
const unsafeDecimal = parseInt(rawValue, 10);
|
|
1347
|
+
return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
|
|
1351
|
+
const rangeValue = list.length ? list.indexOf(value) : value;
|
|
1352
|
+
const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
|
|
1353
|
+
const percentage = (rangeValueShift * 100) / (max - min);
|
|
1354
|
+
const inputStyle = {
|
|
1355
|
+
backgroundSize: `${percentage.toFixed(2)}% 100%`,
|
|
1356
|
+
};
|
|
1357
|
+
return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
|
|
1358
|
+
const rawValue = parseDecimal(e.target?.value);
|
|
1359
|
+
const newValue = list.length ? list[rawValue] : rawValue;
|
|
1360
|
+
onChange && onChange(newValue || 0);
|
|
1361
|
+
}) }) })] }));
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
1365
|
+
const DEFAULT_MIN = 1;
|
|
1366
|
+
const DEFAULT_MAX = 100;
|
|
1367
|
+
const InputRange = JSX((props) => {
|
|
1368
|
+
const { className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, } = props;
|
|
1369
|
+
const normalizedProps = useNormalizedInput(props, {
|
|
1370
|
+
normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
|
|
1371
|
+
format: toLocalNumberFormat(),
|
|
1372
|
+
});
|
|
1373
|
+
const handleChange = useCallback((e) => {
|
|
1374
|
+
onChange && onChange(parseDecimal(e.target?.value));
|
|
1375
|
+
}, [onChange]);
|
|
1376
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'pl-m box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
1377
|
+
});
|
|
1378
|
+
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
1379
|
+
const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-xs", children: items.map((item, i) => (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item }, String(i)))) }));
|
|
1380
|
+
|
|
1381
|
+
const renderCreditParameters = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') }) }), jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') }) })] }));
|
|
1382
|
+
|
|
1383
|
+
const initialFormState$7 = {
|
|
1384
|
+
typeForm: { key: 'cred', text: 'Кредит' },
|
|
1385
|
+
amount: MIN_CREDIT_AMOUNT,
|
|
1386
|
+
term: 12,
|
|
1387
|
+
fullName: '',
|
|
1388
|
+
inn: '',
|
|
1389
|
+
name: '',
|
|
1390
|
+
phone: '',
|
|
1391
|
+
email: '',
|
|
1392
|
+
annualRevenue: '',
|
|
1393
|
+
};
|
|
1394
|
+
const creditValidator$1 = objectValidator({
|
|
1395
|
+
fullName: defaultValidator,
|
|
1396
|
+
annualRevenue: defaultValidator,
|
|
1397
|
+
inn: innValidator,
|
|
1398
|
+
name: nameValidator,
|
|
1399
|
+
phone: phoneValidator,
|
|
1400
|
+
region: defaultValidator,
|
|
1401
|
+
});
|
|
1402
|
+
const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
|
|
1403
|
+
const handleSubmit = useCallback((formState) => {
|
|
1404
|
+
const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
|
|
1405
|
+
isValidationSuccess(creditValidator$1(formState)) &&
|
|
1406
|
+
onSubmit({
|
|
1407
|
+
...usedFields,
|
|
1408
|
+
addressBranch: addressBranch?.text || '',
|
|
1409
|
+
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
1410
|
+
});
|
|
1411
|
+
}, [onSubmit]);
|
|
1412
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$7, {
|
|
1413
|
+
onSubmit: handleSubmit,
|
|
1414
|
+
});
|
|
1415
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderCreditParameters(field, 'Параметры'), renderCreditDataOrganization(field, 'Данные организации'), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: formState.region?.key }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1416
|
+
});
|
|
1417
|
+
|
|
1418
|
+
const initialFormState$6 = {
|
|
1419
|
+
typeForm: { key: 'dpst', text: 'Заявка на депозит' },
|
|
1420
|
+
name: '',
|
|
1421
|
+
phone: '',
|
|
1422
|
+
};
|
|
1423
|
+
const depositValidator = objectValidator({
|
|
1424
|
+
name: nameValidator,
|
|
1425
|
+
phone: phoneValidator,
|
|
1426
|
+
});
|
|
1427
|
+
const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
|
|
1428
|
+
const handleSubmit = useCallback((formState) => {
|
|
1429
|
+
isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
|
|
1430
|
+
}, [onSubmit]);
|
|
1431
|
+
const [, { field, ...formProps }] = useForm(initialFormState$6, {
|
|
1432
|
+
onSubmit: handleSubmit,
|
|
1433
|
+
resetOnSubmit: false,
|
|
1434
|
+
});
|
|
1435
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { 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", children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderSubmitButton(button), jsx(Footnote, { link: link })] }) }) }));
|
|
1436
|
+
});
|
|
1437
|
+
|
|
1438
|
+
const FEEDBACK_TYPES = [
|
|
1439
|
+
{
|
|
1440
|
+
text: 'Задать вопрос по продуктам и услугам',
|
|
1441
|
+
key: 'FEEDBACK',
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
text: 'Качество обслуживания',
|
|
1445
|
+
key: 'FEEDBACK_QS',
|
|
1446
|
+
},
|
|
1447
|
+
];
|
|
1448
|
+
const FEEDBACK_METHOD = [
|
|
1449
|
+
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1450
|
+
{ key: 'email', text: 'Электронное сообщение' },
|
|
1451
|
+
];
|
|
1452
|
+
const SERVICE_DIRECTIONS = [
|
|
1453
|
+
{ key: 'Физическое лицо' },
|
|
1454
|
+
{ key: 'Юридическое лицо / ИП' },
|
|
1455
|
+
];
|
|
1456
|
+
|
|
1457
|
+
const feedbackValidatorDefaultObject = {
|
|
1458
|
+
typeForm: defaultValidator,
|
|
1459
|
+
region: defaultValidator,
|
|
1460
|
+
surname: defaultValidator,
|
|
1461
|
+
name: nameValidator,
|
|
1462
|
+
feedbackMethod: defaultValidator,
|
|
1463
|
+
phone: phoneValidator,
|
|
1464
|
+
email: defaultValidator,
|
|
1465
|
+
comment: defaultValidator,
|
|
1466
|
+
consentDataProcessing: checkboxValidator,
|
|
1467
|
+
};
|
|
1468
|
+
const handleSubmitFeedback = (formState, onSubmit) => {
|
|
1469
|
+
const isLegal = getLegalEntity(formState?.typeForm.key, formState?.serviceDirection?.key);
|
|
1470
|
+
const feedbackValidator = objectValidator({
|
|
1471
|
+
...feedbackValidatorDefaultObject,
|
|
1472
|
+
...getFeedbackValidationObject(formState, isLegal),
|
|
1473
|
+
});
|
|
1474
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, !isLegal);
|
|
1475
|
+
};
|
|
1476
|
+
const getFeedbackValidationObject = (formState, isLegal) => {
|
|
1477
|
+
if (isLegal) {
|
|
1478
|
+
return { addressBranch: defaultValidator, inn: innValidator };
|
|
1479
|
+
}
|
|
1480
|
+
else if (formState.typeForm.key === 'FEEDBACK') {
|
|
1481
|
+
return { birthday: defaultValidator };
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
return { addressBranch: defaultValidator };
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1256
1488
|
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1257
1489
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1258
1490
|
const resultOptions = { ...commonOptions, ...options };
|
|
@@ -1281,9 +1513,7 @@
|
|
|
1281
1513
|
});
|
|
1282
1514
|
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1283
1515
|
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1286
|
-
const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] }), renderSubmitButton(button)] }));
|
|
1516
|
+
const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex col-span-2 gap-m flex-col lg:flex-row w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, checkboxValidator).error)] }), renderSubmitButton(button)] }));
|
|
1287
1517
|
|
|
1288
1518
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1289
1519
|
if (typeof date === 'string') {
|
|
@@ -1447,310 +1677,22 @@
|
|
|
1447
1677
|
};
|
|
1448
1678
|
const renderUserData = (field, isBirthday = true) => (jsxs("div", { className: "space-y-s", children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), isBirthday ? (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) })) : null] }));
|
|
1449
1679
|
|
|
1450
|
-
const initialFormState$
|
|
1680
|
+
const initialFormState$5 = {
|
|
1451
1681
|
...initialUserFormState,
|
|
1452
|
-
typeForm: { key: '
|
|
1453
|
-
|
|
1682
|
+
typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
|
|
1683
|
+
serviceDirection: { key: 'Физическое лицо' },
|
|
1454
1684
|
birthday: undefined,
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
};
|
|
1459
|
-
const feedbackValidator$2 = objectValidator({
|
|
1460
|
-
typeForm: defaultValidator,
|
|
1461
|
-
surname: defaultValidator,
|
|
1462
|
-
name: nameValidator,
|
|
1463
|
-
birthday: defaultValidator,
|
|
1464
|
-
phone: phoneValidator,
|
|
1465
|
-
comment: defaultValidator,
|
|
1466
|
-
consentDataProcessing: checkboxValidator,
|
|
1467
|
-
});
|
|
1468
|
-
const ApplicationFormAntiFraud = JSX(({ button, link, onSubmit }) => {
|
|
1469
|
-
const handleSubmit = useCallback((formState) => {
|
|
1470
|
-
isValidationSuccess(feedbackValidator$2(formState)) && onSubmit(formState, true);
|
|
1471
|
-
}, [onSubmit]);
|
|
1472
|
-
const [, { field, ...formProps }] = useForm(initialFormState$9, { onSubmit: handleSubmit });
|
|
1473
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, true), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' }), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1474
|
-
});
|
|
1475
|
-
|
|
1476
|
-
const initialFormState$8 = {
|
|
1477
|
-
typeForm: { key: 'bcrd', text: 'Заявка на бизнес-карту' },
|
|
1478
|
-
name: '',
|
|
1479
|
-
phone: '',
|
|
1480
|
-
inn: '',
|
|
1481
|
-
email: '',
|
|
1482
|
-
};
|
|
1483
|
-
const businessCardValidator = objectValidator({
|
|
1484
|
-
region: defaultValidator,
|
|
1485
|
-
name: nameValidator,
|
|
1486
|
-
phone: phoneValidator,
|
|
1487
|
-
inn: innValidator,
|
|
1488
|
-
email: defaultValidator,
|
|
1489
|
-
});
|
|
1490
|
-
const ApplicationFormBusinessCard = JSX((props) => {
|
|
1491
|
-
const { button, link, onSubmit } = props;
|
|
1492
|
-
const handleSubmit = useCallback((formState) => {
|
|
1493
|
-
isValidationSuccess(businessCardValidator(formState)) && onSubmit(formState);
|
|
1494
|
-
}, [onSubmit]);
|
|
1495
|
-
const [, { field, ...formProps }] = useForm(initialFormState$8, { onSubmit: handleSubmit });
|
|
1496
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(RegionField, { field: field }), jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1497
|
-
});
|
|
1498
|
-
|
|
1499
|
-
const initialFormState$7 = {
|
|
1500
|
-
typeForm: { key: 'CORRUPTION', text: 'Факты коррупции' },
|
|
1501
|
-
...initialUserFormState,
|
|
1502
|
-
phone: '',
|
|
1503
|
-
email: '',
|
|
1504
|
-
comment: '',
|
|
1505
|
-
consentDataProcessing: false,
|
|
1506
|
-
};
|
|
1507
|
-
const feedbackValidator$1 = objectValidator({
|
|
1508
|
-
typeForm: defaultValidator,
|
|
1509
|
-
surname: defaultValidator,
|
|
1510
|
-
name: nameValidator,
|
|
1511
|
-
region: defaultValidator,
|
|
1512
|
-
phone: phoneValidator,
|
|
1513
|
-
email: defaultValidator,
|
|
1514
|
-
comment: defaultValidator,
|
|
1515
|
-
consentDataProcessing: checkboxValidator,
|
|
1516
|
-
});
|
|
1517
|
-
const ApplicationFormCorruption = JSX(({ button, link, onSubmit }) => {
|
|
1518
|
-
const handleSubmit = useCallback((formState) => {
|
|
1519
|
-
isValidationSuccess(feedbackValidator$1(formState)) && onSubmit(formState, true);
|
|
1520
|
-
}, [onSubmit]);
|
|
1521
|
-
const [, { field, ...formProps }] = useForm(initialFormState$7, { onSubmit: handleSubmit });
|
|
1522
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [renderUserData(field, false), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) }), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1523
|
-
});
|
|
1524
|
-
|
|
1525
|
-
const BRANCHES_URL = '/api/v1/branches';
|
|
1526
|
-
const EMPTY_VALUE$4 = [];
|
|
1527
|
-
function useBranches(regionCode) {
|
|
1528
|
-
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
|
|
1529
|
-
return data || EMPTY_VALUE$4;
|
|
1530
|
-
}
|
|
1531
|
-
const fetchSafeBoxes$1 = async (url) => {
|
|
1532
|
-
const result = await fetchJSON(url, { method: 'GET' });
|
|
1533
|
-
return result || EMPTY_VALUE$4;
|
|
1534
|
-
};
|
|
1535
|
-
|
|
1536
|
-
const REGIONS_URL = '/api/v1/premiumBranchesByRegions';
|
|
1537
|
-
function usePremiumBranchesByRegions() {
|
|
1538
|
-
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
1539
|
-
return data || [];
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
const AddressBranchField = JSX(({ field, regionKey, isPremium = false }) => {
|
|
1543
|
-
const addressBranch = isPremium
|
|
1544
|
-
? usePremiumBranchesByRegions().find((_) => _?.region === regionKey)?.branches
|
|
1545
|
-
: useBranches(regionKey).filter((branch) => branch?.address);
|
|
1546
|
-
return (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: (addressBranch || []).map(({ address = '' }) => ({
|
|
1547
|
-
key: address,
|
|
1548
|
-
text: address,
|
|
1549
|
-
})), ...withValidator(field('addressBranch'), defaultValidator) }));
|
|
1550
|
-
});
|
|
1551
|
-
|
|
1552
|
-
const MIN_CREDIT_AMOUNT = 1000;
|
|
1553
|
-
const MAX_CREDIT_AMOUNT = 1000000000;
|
|
1554
|
-
const ITEMS_CREDIT_AMOUNT = ['От 1 000 ₽', 'До 1 000 000 000 ₽'];
|
|
1555
|
-
const MIN_CREDIT_TERM = 1;
|
|
1556
|
-
const MAX_CREDIT_TERM = 180;
|
|
1557
|
-
const ITEMS_CREDIT_TERM = ['От 1 мес', 'До 15 лет'];
|
|
1558
|
-
|
|
1559
|
-
const renderCreditDataOrganization = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...withValidator(field('annualRevenue'), defaultValidator) }), jsx(InputControl, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }));
|
|
1560
|
-
|
|
1561
|
-
const useNormalizedInput = (props, { normalize, format }) => {
|
|
1562
|
-
const { value, onFocus, onBlur, onChange } = props;
|
|
1563
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
1564
|
-
const handleFocus = useCallback((e) => {
|
|
1565
|
-
setIsFocused(true);
|
|
1566
|
-
onFocus && onFocus(e);
|
|
1567
|
-
}, []);
|
|
1568
|
-
const handleBlur = useCallback(() => {
|
|
1569
|
-
setIsFocused(false);
|
|
1570
|
-
onChange && onChange(normalize(value));
|
|
1571
|
-
onBlur && onBlur();
|
|
1572
|
-
}, [onChange, value]);
|
|
1573
|
-
return {
|
|
1574
|
-
value: (isFocused || !format ? value : format(value)),
|
|
1575
|
-
onFocus: handleFocus,
|
|
1576
|
-
onBlur: handleBlur,
|
|
1577
|
-
};
|
|
1578
|
-
};
|
|
1579
|
-
|
|
1580
|
-
const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
1581
|
-
|
|
1582
|
-
function parseDecimal(value) {
|
|
1583
|
-
const rawValue = (value || '').replace(/\D/g, '');
|
|
1584
|
-
const unsafeDecimal = parseInt(rawValue, 10);
|
|
1585
|
-
return Number.isNaN(unsafeDecimal) ? 0 : unsafeDecimal;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
|
|
1589
|
-
const rangeValue = list.length ? list.indexOf(value) : value;
|
|
1590
|
-
const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
|
|
1591
|
-
const percentage = (rangeValueShift * 100) / (max - min);
|
|
1592
|
-
const inputStyle = {
|
|
1593
|
-
backgroundSize: `${percentage.toFixed(2)}% 100%`,
|
|
1594
|
-
};
|
|
1595
|
-
return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: style('w-2 h-2 rounded-full', rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main') }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
|
|
1596
|
-
const rawValue = parseDecimal(e.target?.value);
|
|
1597
|
-
const newValue = list.length ? list[rawValue] : rawValue;
|
|
1598
|
-
onChange && onChange(newValue || 0);
|
|
1599
|
-
}) }) })] }));
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
const DISABLED_INPUT_CLASSES = 'disabled:border-gray disabled:bg-main-divider';
|
|
1603
|
-
const DEFAULT_MIN = 1;
|
|
1604
|
-
const DEFAULT_MAX = 100;
|
|
1605
|
-
const InputRange = JSX((props) => {
|
|
1606
|
-
const { className, title, items = [], list = [], min = list.length ? 0 : DEFAULT_MIN, max = list.length ? list.length - 1 : DEFAULT_MAX, step = 1, value = list[0] || min, disabled = false, onChange, } = props;
|
|
1607
|
-
const normalizedProps = useNormalizedInput(props, {
|
|
1608
|
-
normalize: (_ = 0) => list.length ? closestValue(list)(_) : clamp(_, min, max),
|
|
1609
|
-
format: toLocalNumberFormat(),
|
|
1610
|
-
});
|
|
1611
|
-
const handleChange = useCallback((e) => {
|
|
1612
|
-
onChange && onChange(parseDecimal(e.target?.value));
|
|
1613
|
-
}, [onChange]);
|
|
1614
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'pl-m box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
1615
|
-
});
|
|
1616
|
-
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
1617
|
-
const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-xs", children: items.map((item, i) => (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item }, String(i)))) }));
|
|
1618
|
-
|
|
1619
|
-
const renderCreditParameters = (field, title) => (jsxs(ApplicationFieldsetLayout, { title: title, children: [jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0443\u043C\u043C\u0430, \u20BD", items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') }) }), jsx("div", { className: formChildrenStyle, children: jsx(InputRange, { title: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432", items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') }) })] }));
|
|
1620
|
-
|
|
1621
|
-
const initialFormState$6 = {
|
|
1622
|
-
typeForm: { key: 'cred', text: 'Кредит' },
|
|
1623
|
-
amount: MIN_CREDIT_AMOUNT,
|
|
1624
|
-
term: 12,
|
|
1625
|
-
fullName: '',
|
|
1626
|
-
inn: '',
|
|
1627
|
-
name: '',
|
|
1628
|
-
phone: '',
|
|
1629
|
-
email: '',
|
|
1630
|
-
annualRevenue: '',
|
|
1631
|
-
};
|
|
1632
|
-
const creditValidator$1 = objectValidator({
|
|
1633
|
-
fullName: defaultValidator,
|
|
1634
|
-
annualRevenue: defaultValidator,
|
|
1635
|
-
inn: innValidator,
|
|
1636
|
-
name: nameValidator,
|
|
1637
|
-
phone: phoneValidator,
|
|
1638
|
-
region: defaultValidator,
|
|
1639
|
-
});
|
|
1640
|
-
const ApplicationFormCredit = JSX(({ button, link, onSubmit }) => {
|
|
1641
|
-
const handleSubmit = useCallback((formState) => {
|
|
1642
|
-
const { amount, term, addressBranch, annualRevenue, ...usedFields } = formState;
|
|
1643
|
-
isValidationSuccess(creditValidator$1(formState)) &&
|
|
1644
|
-
onSubmit({
|
|
1645
|
-
...usedFields,
|
|
1646
|
-
addressBranch: addressBranch?.text || '',
|
|
1647
|
-
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
1648
|
-
});
|
|
1649
|
-
}, [onSubmit]);
|
|
1650
|
-
const [formState, { field, ...formProps }] = useForm(initialFormState$6, {
|
|
1651
|
-
onSubmit: handleSubmit,
|
|
1652
|
-
});
|
|
1653
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [renderCreditParameters(field, 'Параметры'), renderCreditDataOrganization(field, 'Данные организации'), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: formState.region?.key }) })] }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1654
|
-
});
|
|
1655
|
-
|
|
1656
|
-
const initialFormState$5 = {
|
|
1657
|
-
typeForm: { key: 'dpst', text: 'Заявка на депозит' },
|
|
1658
|
-
name: '',
|
|
1659
|
-
phone: '',
|
|
1660
|
-
};
|
|
1661
|
-
const depositValidator = objectValidator({
|
|
1662
|
-
name: nameValidator,
|
|
1663
|
-
phone: phoneValidator,
|
|
1664
|
-
});
|
|
1665
|
-
const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
|
|
1666
|
-
const handleSubmit = useCallback((formState) => {
|
|
1667
|
-
isValidationSuccess(depositValidator(formState)) && onSubmit(formState);
|
|
1668
|
-
}, [onSubmit]);
|
|
1669
|
-
const [, { field, ...formProps }] = useForm(initialFormState$5, {
|
|
1670
|
-
onSubmit: handleSubmit,
|
|
1671
|
-
resetOnSubmit: false,
|
|
1672
|
-
});
|
|
1673
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { 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", children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderSubmitButton(button), jsx(Footnote, { link: link })] }) }) }));
|
|
1674
|
-
});
|
|
1675
|
-
|
|
1676
|
-
const FEEDBACK_TYPES = [
|
|
1677
|
-
{
|
|
1678
|
-
text: 'Задать вопрос по продуктам и услугам',
|
|
1679
|
-
key: 'FEEDBACK',
|
|
1680
|
-
},
|
|
1681
|
-
{
|
|
1682
|
-
text: 'Качество обслуживания',
|
|
1683
|
-
key: 'FEEDBACK_QS',
|
|
1684
|
-
},
|
|
1685
|
-
];
|
|
1686
|
-
const FEEDBACK_METHOD = [
|
|
1687
|
-
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1688
|
-
{ key: 'mail', text: 'Электронное сообщение' },
|
|
1689
|
-
];
|
|
1690
|
-
const SERVICE_DIRECTIONS = [
|
|
1691
|
-
{ key: 'Физическое лицо' },
|
|
1692
|
-
{ key: 'Юридическое лицо / ИП' },
|
|
1693
|
-
];
|
|
1694
|
-
|
|
1695
|
-
const feedbackValidatorDefaultObject = {
|
|
1696
|
-
typeForm: defaultValidator,
|
|
1697
|
-
region: defaultValidator,
|
|
1698
|
-
surname: defaultValidator,
|
|
1699
|
-
name: nameValidator,
|
|
1700
|
-
feedbackMethod: defaultValidator,
|
|
1701
|
-
phone: phoneValidator,
|
|
1702
|
-
email: defaultValidator,
|
|
1703
|
-
comment: defaultValidator,
|
|
1704
|
-
consentDataProcessing: checkboxValidator,
|
|
1705
|
-
};
|
|
1706
|
-
const handleSubmitIndividual = (formState, onSubmit) => {
|
|
1707
|
-
const feedbackValidator = objectValidator({
|
|
1708
|
-
...feedbackValidatorDefaultObject,
|
|
1709
|
-
addressBranch: defaultValidator,
|
|
1710
|
-
});
|
|
1711
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
|
|
1712
|
-
};
|
|
1713
|
-
const handleSubmitLegal = (formState, onSubmit) => {
|
|
1714
|
-
const feedbackValidator = objectValidator({
|
|
1715
|
-
...feedbackValidatorDefaultObject,
|
|
1716
|
-
addressBranch: defaultValidator,
|
|
1717
|
-
inn: innValidator,
|
|
1718
|
-
});
|
|
1719
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
|
|
1720
|
-
};
|
|
1721
|
-
const handleSubmitQuestion = (formState, onSubmit) => {
|
|
1722
|
-
const feedbackValidator = objectValidator({
|
|
1723
|
-
...feedbackValidatorDefaultObject,
|
|
1724
|
-
birthday: defaultValidator,
|
|
1725
|
-
});
|
|
1726
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, true);
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
|
-
const initialFormState$4 = {
|
|
1730
|
-
...initialUserFormState,
|
|
1731
|
-
typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
|
|
1732
|
-
serviceDirection: { key: 'Физическое лицо' },
|
|
1733
|
-
birthday: undefined,
|
|
1734
|
-
feedbackMethod: { key: 'Телефонный звонок' },
|
|
1735
|
-
phone: '',
|
|
1736
|
-
email: '',
|
|
1685
|
+
feedbackMethod: { key: 'Телефонный звонок' },
|
|
1686
|
+
phone: '',
|
|
1687
|
+
email: '',
|
|
1737
1688
|
comment: '',
|
|
1738
1689
|
consentDataProcessing: false,
|
|
1739
1690
|
};
|
|
1740
1691
|
const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
|
|
1741
1692
|
const handleSubmit = useCallback((feedbackFormState) => {
|
|
1742
|
-
|
|
1743
|
-
if (isLegal) {
|
|
1744
|
-
handleSubmitLegal(feedbackFormState, onSubmit);
|
|
1745
|
-
}
|
|
1746
|
-
else if (feedbackFormState.typeForm.key === 'FEEDBACK') {
|
|
1747
|
-
handleSubmitQuestion(feedbackFormState, onSubmit);
|
|
1748
|
-
}
|
|
1749
|
-
else {
|
|
1750
|
-
handleSubmitIndividual(feedbackFormState, onSubmit);
|
|
1751
|
-
}
|
|
1693
|
+
handleSubmitFeedback(feedbackFormState, onSubmit);
|
|
1752
1694
|
}, [onSubmit]);
|
|
1753
|
-
const [formState, { field, ...formProps }] = useForm(initialFormState$
|
|
1695
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$5, {
|
|
1754
1696
|
onSubmit: handleSubmit,
|
|
1755
1697
|
});
|
|
1756
1698
|
const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
|
|
@@ -1781,7 +1723,7 @@
|
|
|
1781
1723
|
return (jsxs("div", { className: "container space-y-s", children: [regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(LinkButton, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: button?.text ? button.text : 'Перейти' }) })) : null] }));
|
|
1782
1724
|
});
|
|
1783
1725
|
|
|
1784
|
-
const initialFormState$
|
|
1726
|
+
const initialFormState$4 = {
|
|
1785
1727
|
...initialUserFormState,
|
|
1786
1728
|
phone: '',
|
|
1787
1729
|
email: '',
|
|
@@ -1805,11 +1747,11 @@
|
|
|
1805
1747
|
product,
|
|
1806
1748
|
}, true);
|
|
1807
1749
|
}, [onSubmit]);
|
|
1808
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
1750
|
+
const [, { field, ...formProps }] = useForm(initialFormState$4, { onSubmit: handleSubmit });
|
|
1809
1751
|
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] })] }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1810
1752
|
});
|
|
1811
1753
|
|
|
1812
|
-
const initialFormState$
|
|
1754
|
+
const initialFormState$3 = {
|
|
1813
1755
|
typeForm: { key: 'SELFCOLLECTION', text: 'Самоинкассация' },
|
|
1814
1756
|
fullName: '',
|
|
1815
1757
|
phone: '',
|
|
@@ -1825,7 +1767,7 @@
|
|
|
1825
1767
|
const handleSubmit = useCallback((formState) => {
|
|
1826
1768
|
isValidationSuccess(feedbackValidator(formState)) && onSubmit(formState, false);
|
|
1827
1769
|
}, [onSubmit]);
|
|
1828
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
1770
|
+
const [, { field, ...formProps }] = useForm(initialFormState$3, { onSubmit: handleSubmit });
|
|
1829
1771
|
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { children: jsxs("div", { className: oneColumnFormStyle, children: [jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('fullName'), defaultValidator) }), jsx(RegionField, { field: field }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1830
1772
|
});
|
|
1831
1773
|
|
|
@@ -1842,7 +1784,7 @@
|
|
|
1842
1784
|
{ key: 'ULTRASERVICE', text: 'Ультра' },
|
|
1843
1785
|
{ key: 'PREMIUMSERVICE', text: 'Премиум' },
|
|
1844
1786
|
];
|
|
1845
|
-
const initialFormState$
|
|
1787
|
+
const initialFormState$2 = {
|
|
1846
1788
|
typeForm: SERVICE_TYPES[0],
|
|
1847
1789
|
...initialUserFormState,
|
|
1848
1790
|
email: '',
|
|
@@ -1864,7 +1806,7 @@
|
|
|
1864
1806
|
const isValid = isValidationSuccess(creditValidator(formState));
|
|
1865
1807
|
isValid && onSubmit(formState, true);
|
|
1866
1808
|
}, [onSubmit]);
|
|
1867
|
-
const [formState, { field, ...formProps }] = useForm({ ...initialFormState$
|
|
1809
|
+
const [formState, { field, ...formProps }] = useForm({ ...initialFormState$2, typeForm: getDefaultFormType(defaultType) }, { onSubmit: handleSubmit });
|
|
1868
1810
|
const regionKey = formState?.region?.key;
|
|
1869
1811
|
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsxs(ApplicationFieldsetLayout, { title: "\u0412\u0430\u0448\u0438 \u0434\u0430\u043D\u043D\u044B\u0435", children: [jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }), jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('typeForm'), defaultValidator) })] })] }), jsxs(ApplicationFieldsetLayout, { title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", children: [jsx("div", { className: formChildrenStyle, children: jsx(RegionPremiumField, { field: field }) }), jsx("div", { className: formChildrenStyle, children: jsx(AddressBranchField, { field: field, regionKey: regionKey, isPremium: true }) })] }), jsx(InputControl, { ...field('comment'), placeholder: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439, \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0438 \u043F\u0440\u043E\u0447\u0435\u0435", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1870
1812
|
});
|
|
@@ -1884,7 +1826,7 @@
|
|
|
1884
1826
|
return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? jsx(RegionField, { field: field }) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-lg gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...field('email') }) : null] })] }));
|
|
1885
1827
|
};
|
|
1886
1828
|
|
|
1887
|
-
const initialFormState = {
|
|
1829
|
+
const initialFormState$1 = {
|
|
1888
1830
|
typeForm: { key: 'KVED', text: 'Заявка на консультацию ВЭД' },
|
|
1889
1831
|
vedTypes: 'currencyControl',
|
|
1890
1832
|
fullName: '',
|
|
@@ -1930,7 +1872,7 @@
|
|
|
1930
1872
|
};
|
|
1931
1873
|
isValidationSuccess(getValidator(vedTypes)(formState)) && onSubmit(data);
|
|
1932
1874
|
}, [onSubmit]);
|
|
1933
|
-
const [, { field, ...formProps }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
1875
|
+
const [, { field, ...formProps }] = useForm(initialFormState$1, { onSubmit: handleSubmit });
|
|
1934
1876
|
return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field }), jsx(InputControl, { label: "\u041E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435", placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", ...field('partnerComments'), isTextarea: true }), renderSubmitButton(button), jsx(Footnote, { link: link }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), renderContacts()] }));
|
|
1935
1877
|
});
|
|
1936
1878
|
|
|
@@ -1943,26 +1885,17 @@
|
|
|
1943
1885
|
ApplicationFormGrantSupport,
|
|
1944
1886
|
ApplicationFormIndividuals,
|
|
1945
1887
|
ApplicationFormFeedback,
|
|
1946
|
-
ApplicationFormAntiFraud,
|
|
1947
|
-
ApplicationFormCorruption,
|
|
1948
1888
|
ApplicationFormSelfCollection,
|
|
1949
1889
|
ApplicationFormUltraPremium,
|
|
1950
1890
|
};
|
|
1951
1891
|
|
|
1952
|
-
const
|
|
1953
|
-
const responseOK = responseType === 'OK';
|
|
1954
|
-
const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
|
|
1955
|
-
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
1956
|
-
return (jsxs("div", { className: `flex items-center p-lg rounded-md space-x-m ${backgroundColor}`, children: [jsx(Img, { image: { icon: statusIcon ? 'ResponseOKIcon' : 'ResponseFailIcon', iconVersion: 'normal' }, width: "42", height: "42" }), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
|
|
1957
|
-
});
|
|
1958
|
-
|
|
1959
|
-
const API = LeadServiceAPI();
|
|
1892
|
+
const API$1 = LeadServiceAPI();
|
|
1960
1893
|
const ApplicationForm = JSX((props) => {
|
|
1961
1894
|
const { className, formBlock, ...rest } = props;
|
|
1962
1895
|
const [responseType, setResponseType] = useState('');
|
|
1963
1896
|
const handleSubmit = useCallback(async (data, isIndividualType = false) => {
|
|
1964
|
-
const formatData = getFormatData(data);
|
|
1965
|
-
const status = (await API.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
|
|
1897
|
+
const formatData = getFormatData$1(data);
|
|
1898
|
+
const status = (await API$1.send(formatData, isIndividualType)) ? 'OK' : 'Fail';
|
|
1966
1899
|
setResponseType(status);
|
|
1967
1900
|
return status;
|
|
1968
1901
|
}, []);
|
|
@@ -1976,8 +1909,92 @@
|
|
|
1976
1909
|
const EmbeddedForm = EmbeddableForms[type];
|
|
1977
1910
|
return jsx(EmbeddedForm, { ...formBlock, onSubmit: handleSubmit });
|
|
1978
1911
|
};
|
|
1912
|
+
const getFormatData$1 = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
|
|
1913
|
+
|
|
1914
|
+
const ApplicationFormLayout = JSX((props) => {
|
|
1915
|
+
const { className, title, responseType, children, ...rest } = props;
|
|
1916
|
+
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px] space-y-lg", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, children, responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1979
1919
|
const getFormatData = (data) => Object.fromEntries(Object.entries(data).map(([k, v]) => [k, (v?.region ? v?.text : v?.key) || v]));
|
|
1980
1920
|
|
|
1921
|
+
const columnStyle = {
|
|
1922
|
+
1: 'space-y-s max-w-xl mx-auto',
|
|
1923
|
+
2: 'grid @xl:grid-cols-2 gap-s',
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1927
|
+
|
|
1928
|
+
const getField = (input, field, i) => {
|
|
1929
|
+
const InputsMap = {
|
|
1930
|
+
surname: (jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...getValidation(field('surname'), nameValidator, input?.required) }, i)),
|
|
1931
|
+
name: (jsx(InputControl, { label: "\u0418\u043C\u044F", ...getValidation(field('name'), nameValidator, input?.required) }, i)),
|
|
1932
|
+
middleName: (jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }, i)),
|
|
1933
|
+
phone: (jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...getValidation(field('phone'), phoneValidator, input?.required) }, i)),
|
|
1934
|
+
email: (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...getValidation(field('email'), defaultValidator, input?.required) }, i)),
|
|
1935
|
+
comment: (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), defaultValidator, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true }, i)),
|
|
1936
|
+
region: jsx(RegionField, { field: field }, i),
|
|
1937
|
+
client: (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })),
|
|
1938
|
+
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), defaultValidator) })),
|
|
1939
|
+
legend: (jsx("legend", { className: "w-full col-span-2", children: jsx(Heading, { title: input.label, headingType: "h6", className: "@xl:text-center" }) }, i)),
|
|
1940
|
+
};
|
|
1941
|
+
return InputsMap[input.name];
|
|
1942
|
+
};
|
|
1943
|
+
const getValidation = (field, validator, required = false) => required ? withValidator(field, validator) : field;
|
|
1944
|
+
|
|
1945
|
+
const getNamesFromInput = (inputs) => Object.values(inputs).map((_) => _.name);
|
|
1946
|
+
|
|
1947
|
+
const initialFormState = {
|
|
1948
|
+
typeForm: { key: '', text: '' },
|
|
1949
|
+
region: { key: '', text: '' },
|
|
1950
|
+
surname: '',
|
|
1951
|
+
name: '',
|
|
1952
|
+
middleName: '',
|
|
1953
|
+
phone: '',
|
|
1954
|
+
email: '',
|
|
1955
|
+
comment: '',
|
|
1956
|
+
consentDataProcessing: false,
|
|
1957
|
+
};
|
|
1958
|
+
const getInitialFormState = (inputs, typeForm = '') => {
|
|
1959
|
+
const formState = Object.fromEntries(getNamesFromInput(inputs).map((_) => [_, initialFormState[_]]));
|
|
1960
|
+
return { ...formState, typeForm: { key: typeForm, text: '' } };
|
|
1961
|
+
};
|
|
1962
|
+
|
|
1963
|
+
const validator = {
|
|
1964
|
+
typeForm: defaultValidator,
|
|
1965
|
+
surname: nameValidator,
|
|
1966
|
+
name: nameValidator,
|
|
1967
|
+
region: defaultValidator,
|
|
1968
|
+
phone: phoneValidator,
|
|
1969
|
+
email: defaultValidator,
|
|
1970
|
+
comment: defaultValidator,
|
|
1971
|
+
consentDataProcessing: checkboxValidator,
|
|
1972
|
+
};
|
|
1973
|
+
const getObjectValidator = (inputs) => {
|
|
1974
|
+
const requiredInputs = getNamesFromInput(inputs.filter((_) => ('required' in _ ? _.required : false)));
|
|
1975
|
+
return Object.fromEntries(requiredInputs.map((_) => [_, validator?.[_]]));
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1978
|
+
const API = LeadServiceAPI();
|
|
1979
|
+
const ApplicationFormCustom = JSX(({ className, title, typeForm = '', inputs = [], button, link, formColumns = 2, endpoint }) => {
|
|
1980
|
+
const initialFormState = getInitialFormState(inputs, typeForm);
|
|
1981
|
+
const [responseType, setResponseType] = useState('');
|
|
1982
|
+
const feedbackValidator = objectValidator(getObjectValidator(inputs));
|
|
1983
|
+
const handleSubmit = useCallback(async (data) => {
|
|
1984
|
+
if (!isValidationSuccess(feedbackValidator(data))) {
|
|
1985
|
+
return 'Fail';
|
|
1986
|
+
}
|
|
1987
|
+
const formatData = getFormatData(data);
|
|
1988
|
+
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
1989
|
+
setResponseType(status);
|
|
1990
|
+
return status;
|
|
1991
|
+
}, []);
|
|
1992
|
+
const [, { field, onSubmit }] = useForm(initialFormState, { onSubmit: handleSubmit });
|
|
1993
|
+
return (jsx(ApplicationFormLayout, { className: style(formStyle$1, className), title: title, responseType: responseType, children: jsxs("form", { className: columnStyle[formColumns], onSubmit: onSubmit, children: [inputs.map((_, index) => getField(_, field, String(index))), inputs.find((_) => _.name === 'consentDataProcessing')
|
|
1994
|
+
? renderAgreementWithSubmit(field('consentDataProcessing'), link, button)
|
|
1995
|
+
: renderSubmitButton(button)] }) }));
|
|
1996
|
+
});
|
|
1997
|
+
|
|
1981
1998
|
/** @deprecated */
|
|
1982
1999
|
const AlignStyles = 'text-center';
|
|
1983
2000
|
|
|
@@ -5809,6 +5826,9 @@
|
|
|
5809
5826
|
const Blocks = {
|
|
5810
5827
|
AdTile,
|
|
5811
5828
|
ApplicationForm,
|
|
5829
|
+
ApplicationFormAntiFraud: ApplicationFormCustom,
|
|
5830
|
+
ApplicationFormCustom,
|
|
5831
|
+
ApplicationFormCorruption: ApplicationFormCustom,
|
|
5812
5832
|
BenefitsBlock,
|
|
5813
5833
|
BonusBenefitsBlock,
|
|
5814
5834
|
ButtonsBlock,
|
|
@@ -6007,7 +6027,7 @@
|
|
|
6007
6027
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6008
6028
|
});
|
|
6009
6029
|
|
|
6010
|
-
const packageVersion = "0.14.
|
|
6030
|
+
const packageVersion = "0.14.171";
|
|
6011
6031
|
|
|
6012
6032
|
exports.Blocks = Blocks;
|
|
6013
6033
|
exports.ContentPage = ContentPage;
|