@redneckz/wildless-cms-uni-blocks 0.14.1028 → 0.14.1030
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/api/getSubmitBody.d.ts +4225 -865
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +178 -46
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/bundle/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/bundle/components/ReferalForm/renderSections.d.ts +3 -0
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/bundle/retail/api/createDraftTask.d.ts +1 -1
- package/bundle/retail/api/createParticipant.d.ts +5 -1
- package/bundle/retail/api/draftTasksKZO.d.ts +2 -1
- package/bundle/retail/api/getLastTaskStatus.d.ts +2 -1
- package/bundle/retail/api/getUserTasks.d.ts +2 -40
- package/bundle/retail/api/getUserTasksCard.d.ts +2 -0
- package/bundle/retail/api/getUserTasksCredit.d.ts +2 -0
- package/bundle/retail/api/getUserTasksDebit.d.ts +2 -0
- package/bundle/retail/api/getUserTasksTypes.d.ts +39 -0
- package/bundle/retail/api/updateUserTask.d.ts +1 -1
- package/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/bundle/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/dist/api/getSubmitBody.d.ts +4225 -865
- package/dist/api/getSubmitBody.js +14 -0
- package/dist/api/getSubmitBody.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -1
- package/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/dist/components/ReferalForm/ReferalForm.js +33 -0
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -0
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/dist/components/ReferalForm/ReferalFormContent.js +2 -0
- package/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/dist/components/ReferalForm/ResultLink.d.ts +5 -0
- package/dist/components/ReferalForm/ResultLink.js +12 -0
- package/dist/components/ReferalForm/ResultLink.js.map +1 -0
- package/dist/components/ReferalForm/referalFormData.d.ts +2 -0
- package/dist/components/ReferalForm/referalFormData.js +19 -0
- package/dist/components/ReferalForm/referalFormData.js.map +1 -0
- package/dist/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/dist/components/ReferalForm/renderLinkInput.js +25 -0
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/dist/components/ReferalForm/renderSections.d.ts +3 -0
- package/dist/components/ReferalForm/renderSections.js +10 -0
- package/dist/components/ReferalForm/renderSections.js.map +1 -0
- package/dist/hooks/useDadataParty.js +1 -1
- package/dist/hooks/useDadataParty.js.map +1 -1
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/dist/retail/api/createDraftTask.d.ts +1 -1
- package/dist/retail/api/createParticipant.d.ts +5 -1
- package/dist/retail/api/createParticipant.js +1 -1
- package/dist/retail/api/createParticipant.js.map +1 -1
- package/dist/retail/api/draftTasksKZO.d.ts +2 -1
- package/dist/retail/api/draftTasksKZO.js.map +1 -1
- package/dist/retail/api/getLastTaskStatus.d.ts +2 -1
- package/dist/retail/api/getLastTaskStatus.js.map +1 -1
- package/dist/retail/api/getUserTasks.d.ts +2 -40
- package/dist/retail/api/getUserTasks.js +2 -6
- package/dist/retail/api/getUserTasks.js.map +1 -1
- package/dist/retail/api/getUserTasksCard.d.ts +2 -0
- package/dist/retail/api/getUserTasksCard.js +8 -0
- package/dist/retail/api/getUserTasksCard.js.map +1 -0
- package/dist/retail/api/getUserTasksCredit.d.ts +2 -0
- package/dist/retail/api/getUserTasksCredit.js +9 -0
- package/dist/retail/api/getUserTasksCredit.js.map +1 -0
- package/dist/retail/api/getUserTasksDebit.d.ts +2 -0
- package/dist/retail/api/getUserTasksDebit.js +8 -0
- package/dist/retail/api/getUserTasksDebit.js.map +1 -0
- package/dist/retail/api/getUserTasksTypes.d.ts +39 -0
- package/dist/retail/api/getUserTasksTypes.js +9 -0
- package/dist/retail/api/getUserTasksTypes.js.map +1 -0
- package/dist/retail/api/updateUserTask.d.ts +1 -1
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
- package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/dist/retail/components/DraftDialog/DraftDialog.js +4 -2
- package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/dist/retail/components/DraftDialog/parseDraftTask.js +4 -1
- package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/dist/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/lib/api/getSubmitBody.d.ts +4225 -865
- package/lib/api/getSubmitBody.js +14 -0
- package/lib/api/getSubmitBody.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -1
- package/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/lib/components/ReferalForm/ReferalForm.fixture.d.ts +5 -0
- package/lib/components/ReferalForm/ReferalForm.fixture.mobile.d.ts +5 -0
- package/lib/components/ReferalForm/ReferalForm.js +31 -0
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -0
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/lib/components/ReferalForm/ReferalFormContent.js +2 -0
- package/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/lib/components/ReferalForm/ResultLink.d.ts +5 -0
- package/lib/components/ReferalForm/ResultLink.js +10 -0
- package/lib/components/ReferalForm/ResultLink.js.map +1 -0
- package/lib/components/ReferalForm/referalFormData.d.ts +2 -0
- package/lib/components/ReferalForm/referalFormData.js +17 -0
- package/lib/components/ReferalForm/referalFormData.js.map +1 -0
- package/lib/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/lib/components/ReferalForm/renderLinkInput.js +23 -0
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/lib/components/ReferalForm/renderSections.d.ts +3 -0
- package/lib/components/ReferalForm/renderSections.js +7 -0
- package/lib/components/ReferalForm/renderSections.js.map +1 -0
- package/lib/hooks/useDadataParty.js +1 -1
- package/lib/hooks/useDadataParty.js.map +1 -1
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/lib/retail/api/createDraftTask.d.ts +1 -1
- package/lib/retail/api/createParticipant.d.ts +5 -1
- package/lib/retail/api/createParticipant.js +1 -1
- package/lib/retail/api/createParticipant.js.map +1 -1
- package/lib/retail/api/draftTasksKZO.d.ts +2 -1
- package/lib/retail/api/draftTasksKZO.js.map +1 -1
- package/lib/retail/api/getLastTaskStatus.d.ts +2 -1
- package/lib/retail/api/getLastTaskStatus.js.map +1 -1
- package/lib/retail/api/getUserTasks.d.ts +2 -40
- package/lib/retail/api/getUserTasks.js +1 -6
- package/lib/retail/api/getUserTasks.js.map +1 -1
- package/lib/retail/api/getUserTasksCard.d.ts +2 -0
- package/lib/retail/api/getUserTasksCard.js +5 -0
- package/lib/retail/api/getUserTasksCard.js.map +1 -0
- package/lib/retail/api/getUserTasksCredit.d.ts +2 -0
- package/lib/retail/api/getUserTasksCredit.js +6 -0
- package/lib/retail/api/getUserTasksCredit.js.map +1 -0
- package/lib/retail/api/getUserTasksDebit.d.ts +2 -0
- package/lib/retail/api/getUserTasksDebit.js +5 -0
- package/lib/retail/api/getUserTasksDebit.js.map +1 -0
- package/lib/retail/api/getUserTasksTypes.d.ts +39 -0
- package/lib/retail/api/getUserTasksTypes.js +7 -0
- package/lib/retail/api/getUserTasksTypes.js.map +1 -0
- package/lib/retail/api/updateUserTask.d.ts +1 -1
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
- package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/lib/retail/components/DraftDialog/DraftDialog.js +4 -2
- package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/lib/retail/components/DraftDialog/parseDraftTask.js +4 -1
- package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/lib/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/mobile/bundle/api/getSubmitBody.d.ts +4225 -865
- package/mobile/bundle/bundle.umd.js +113 -42
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/mobile/bundle/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/mobile/bundle/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/mobile/bundle/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/mobile/bundle/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/mobile/bundle/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/mobile/bundle/components/ReferalForm/ResultLink.d.ts +5 -0
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/bundle/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/mobile/bundle/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/mobile/bundle/retail/api/createDraftTask.d.ts +1 -1
- package/mobile/bundle/retail/api/createParticipant.d.ts +5 -1
- package/mobile/bundle/retail/api/draftTasksKZO.d.ts +2 -1
- package/mobile/bundle/retail/api/getLastTaskStatus.d.ts +2 -1
- package/mobile/bundle/retail/api/getUserTasks.d.ts +2 -40
- package/mobile/bundle/retail/api/getUserTasksCard.d.ts +2 -0
- package/mobile/bundle/retail/api/getUserTasksCredit.d.ts +2 -0
- package/mobile/bundle/retail/api/getUserTasksDebit.d.ts +2 -0
- package/mobile/bundle/retail/api/getUserTasksTypes.d.ts +39 -0
- package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -1
- package/mobile/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/mobile/bundle/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/bundle/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/mobile/dist/api/getSubmitBody.d.ts +4225 -865
- package/mobile/dist/api/getSubmitBody.js +14 -0
- package/mobile/dist/api/getSubmitBody.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/mobile/dist/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/mobile/dist/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/mobile/dist/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/dist/components/ReferalForm/ReferalForm.js +33 -0
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.js +2 -0
- package/mobile/dist/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/mobile/dist/components/ReferalForm/ResultLink.d.ts +5 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js +12 -0
- package/mobile/dist/components/ReferalForm/ResultLink.js.map +1 -0
- package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/dist/components/ReferalForm/referalFormData.js +19 -0
- package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +25 -0
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/mobile/dist/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/dist/components/ReferalForm/renderSections.js +10 -0
- package/mobile/dist/components/ReferalForm/renderSections.js.map +1 -0
- package/mobile/dist/hooks/useDadataParty.js +1 -1
- package/mobile/dist/hooks/useDadataParty.js.map +1 -1
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/mobile/dist/retail/api/createDraftTask.d.ts +1 -1
- package/mobile/dist/retail/api/createParticipant.d.ts +5 -1
- package/mobile/dist/retail/api/createParticipant.js +1 -1
- package/mobile/dist/retail/api/createParticipant.js.map +1 -1
- package/mobile/dist/retail/api/draftTasksKZO.d.ts +2 -1
- package/mobile/dist/retail/api/draftTasksKZO.js.map +1 -1
- package/mobile/dist/retail/api/getLastTaskStatus.d.ts +2 -1
- package/mobile/dist/retail/api/getLastTaskStatus.js.map +1 -1
- package/mobile/dist/retail/api/getUserTasks.d.ts +2 -40
- package/mobile/dist/retail/api/getUserTasks.js +2 -6
- package/mobile/dist/retail/api/getUserTasks.js.map +1 -1
- package/mobile/dist/retail/api/getUserTasksCard.d.ts +2 -0
- package/mobile/dist/retail/api/getUserTasksCard.js +8 -0
- package/mobile/dist/retail/api/getUserTasksCard.js.map +1 -0
- package/mobile/dist/retail/api/getUserTasksCredit.d.ts +2 -0
- package/mobile/dist/retail/api/getUserTasksCredit.js +9 -0
- package/mobile/dist/retail/api/getUserTasksCredit.js.map +1 -0
- package/mobile/dist/retail/api/getUserTasksDebit.d.ts +2 -0
- package/mobile/dist/retail/api/getUserTasksDebit.js +8 -0
- package/mobile/dist/retail/api/getUserTasksDebit.js.map +1 -0
- package/mobile/dist/retail/api/getUserTasksTypes.d.ts +39 -0
- package/mobile/dist/retail/api/getUserTasksTypes.js +9 -0
- package/mobile/dist/retail/api/getUserTasksTypes.js.map +1 -0
- package/mobile/dist/retail/api/updateUserTask.d.ts +1 -1
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
- package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +4 -2
- package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +4 -1
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/dist/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/mobile/lib/api/getSubmitBody.d.ts +4225 -865
- package/mobile/lib/api/getSubmitBody.js +14 -0
- package/mobile/lib/api/getSubmitBody.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +2 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +10 -0
- package/mobile/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getLeadFormTaskData.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +80 -31
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.d.ts +4 -2
- package/mobile/lib/components/ApplicationLeadForm/useLeadFormStore.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.d.ts +3 -2
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useSaveUserData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSendLeadFormAspects.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useSendLeadFormAspects.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/getCreditCardFormTaskData.d.ts +1 -1
- package/mobile/lib/components/DebitForm/getDebitCardFormTaskData.d.ts +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.d.ts +10 -0
- package/mobile/lib/components/ReferalForm/ReferalForm.js +31 -0
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +11 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.js +2 -0
- package/mobile/lib/components/ReferalForm/ReferalFormContent.js.map +1 -0
- package/mobile/lib/components/ReferalForm/ResultLink.d.ts +5 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js +10 -0
- package/mobile/lib/components/ReferalForm/ResultLink.js.map +1 -0
- package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -0
- package/mobile/lib/components/ReferalForm/referalFormData.js +17 -0
- package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.d.ts +2 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +23 -0
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -0
- package/mobile/lib/components/ReferalForm/renderSections.d.ts +3 -0
- package/mobile/lib/components/ReferalForm/renderSections.js +7 -0
- package/mobile/lib/components/ReferalForm/renderSections.js.map +1 -0
- package/mobile/lib/hooks/useDadataParty.js +1 -1
- package/mobile/lib/hooks/useDadataParty.js.map +1 -1
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/retail/adaptors/getCreditFormTaskData.d.ts +1 -1
- package/mobile/lib/retail/api/createDraftTask.d.ts +1 -1
- package/mobile/lib/retail/api/createParticipant.d.ts +5 -1
- package/mobile/lib/retail/api/createParticipant.js +1 -1
- package/mobile/lib/retail/api/createParticipant.js.map +1 -1
- package/mobile/lib/retail/api/draftTasksKZO.d.ts +2 -1
- package/mobile/lib/retail/api/draftTasksKZO.js.map +1 -1
- package/mobile/lib/retail/api/getLastTaskStatus.d.ts +2 -1
- package/mobile/lib/retail/api/getLastTaskStatus.js.map +1 -1
- package/mobile/lib/retail/api/getUserTasks.d.ts +2 -40
- package/mobile/lib/retail/api/getUserTasks.js +1 -6
- package/mobile/lib/retail/api/getUserTasks.js.map +1 -1
- package/mobile/lib/retail/api/getUserTasksCard.d.ts +2 -0
- package/mobile/lib/retail/api/getUserTasksCard.js +5 -0
- package/mobile/lib/retail/api/getUserTasksCard.js.map +1 -0
- package/mobile/lib/retail/api/getUserTasksCredit.d.ts +2 -0
- package/mobile/lib/retail/api/getUserTasksCredit.js +6 -0
- package/mobile/lib/retail/api/getUserTasksCredit.js.map +1 -0
- package/mobile/lib/retail/api/getUserTasksDebit.d.ts +2 -0
- package/mobile/lib/retail/api/getUserTasksDebit.js +5 -0
- package/mobile/lib/retail/api/getUserTasksDebit.js.map +1 -0
- package/mobile/lib/retail/api/getUserTasksTypes.d.ts +39 -0
- package/mobile/lib/retail/api/getUserTasksTypes.js +7 -0
- package/mobile/lib/retail/api/getUserTasksTypes.js.map +1 -0
- package/mobile/lib/retail/api/updateUserTask.d.ts +1 -1
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +3 -2
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +2 -1
- package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.d.ts +1 -1
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +4 -2
- package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +4 -1
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/lib/retail/hooks/useRetailFormStore.d.ts +2 -1
- package/mobile/src/api/getSubmitBody.ts +17 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +10 -1
- package/mobile/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
- package/mobile/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +140 -32
- package/mobile/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/useSaveUserData.ts +11 -2
- package/mobile/src/components/ApplicationLeadForm/useSendLeadFormAspects.tsx +1 -1
- package/mobile/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
- package/mobile/src/components/DebitForm/getDebitCardFormTaskData.ts +1 -1
- package/mobile/src/components/ReferalForm/ReferalForm.example.json +8 -0
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +78 -0
- package/mobile/src/components/ReferalForm/ReferalForm.ui.json +1 -0
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +12 -0
- package/mobile/src/components/ReferalForm/ResultLink.tsx +20 -0
- package/mobile/src/components/ReferalForm/referalFormData.ts +18 -0
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +37 -0
- package/mobile/src/components/ReferalForm/renderSections.tsx +18 -0
- package/mobile/src/hooks/useDadataParty.ts +1 -1
- package/mobile/src/model/FormTypeFieldDef.ts +2 -1
- package/mobile/src/retail/adaptors/getCreditFormTaskData.ts +1 -1
- package/mobile/src/retail/api/createDraftTask.ts +1 -1
- package/mobile/src/retail/api/createParticipant.ts +3 -2
- package/mobile/src/retail/api/draftTasksKZO.ts +2 -1
- package/mobile/src/retail/api/getLastTaskStatus.ts +2 -1
- package/mobile/src/retail/api/getUserTasks.ts +2 -42
- package/mobile/src/retail/api/getUserTasksCard.ts +6 -0
- package/mobile/src/retail/api/getUserTasksCredit.ts +8 -0
- package/mobile/src/retail/api/getUserTasksDebit.ts +6 -0
- package/mobile/src/retail/api/getUserTasksTypes.ts +42 -0
- package/mobile/src/retail/api/updateUserTask.ts +1 -1
- package/mobile/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +6 -3
- package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +5 -3
- package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +5 -1
- package/package.json +1 -1
- package/src/api/getSubmitBody.ts +17 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +38 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +36 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +2 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +10 -0
- package/src/components/ApplicationForm/Footnote.tsx +10 -1
- package/src/components/ApplicationForm/renderAgreementSubmit.tsx +7 -1
- package/src/components/ApplicationLeadForm/getLeadFormTaskData.ts +2 -2
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +140 -32
- package/src/components/ApplicationLeadForm/useLeadFormStore.ts +2 -1
- package/src/components/ApplicationLeadForm/useSaveUserData.ts +11 -2
- package/src/components/ApplicationLeadForm/useSendLeadFormAspects.tsx +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/CreditCardForm/getCreditCardFormTaskData.ts +1 -1
- package/src/components/DebitForm/getDebitCardFormTaskData.ts +1 -1
- package/src/components/ReferalForm/ReferalForm.example.json +8 -0
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +16 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +16 -0
- package/src/components/ReferalForm/ReferalForm.tsx +78 -0
- package/src/components/ReferalForm/ReferalForm.ui.json +1 -0
- package/src/components/ReferalForm/ReferalFormContent.ts +12 -0
- package/src/components/ReferalForm/ResultLink.tsx +20 -0
- package/src/components/ReferalForm/referalFormData.ts +18 -0
- package/src/components/ReferalForm/renderLinkInput.tsx +37 -0
- package/src/components/ReferalForm/renderSections.tsx +18 -0
- package/src/hooks/useDadataParty.ts +1 -1
- package/src/icons/IconName.ts +4 -4
- package/src/model/FormTypeFieldDef.ts +2 -1
- package/src/retail/adaptors/getCreditFormTaskData.ts +1 -1
- package/src/retail/api/createDraftTask.ts +1 -1
- package/src/retail/api/createParticipant.ts +3 -2
- package/src/retail/api/draftTasksKZO.ts +2 -1
- package/src/retail/api/getLastTaskStatus.ts +2 -1
- package/src/retail/api/getUserTasks.ts +2 -42
- package/src/retail/api/getUserTasksCard.ts +6 -0
- package/src/retail/api/getUserTasksCredit.ts +8 -0
- package/src/retail/api/getUserTasksDebit.ts +6 -0
- package/src/retail/api/getUserTasksTypes.ts +42 -0
- package/src/retail/api/updateUserTask.ts +1 -1
- package/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +6 -3
- package/src/retail/components/DraftDialog/DraftDialog.tsx +5 -3
- package/src/retail/components/DraftDialog/parseDraftTask.ts +5 -1
|
@@ -62,6 +62,7 @@ export const useApplicationLeadApi = ({
|
|
|
62
62
|
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
63
63
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
64
64
|
const draftDialog = useDraftDialog();
|
|
65
|
+
|
|
65
66
|
const handleFailSendForm = () => {
|
|
66
67
|
verifyPhoneDialog.close();
|
|
67
68
|
changeSubmitFormStatus(false);
|
|
@@ -145,7 +146,7 @@ export const useApplicationLeadApi = ({
|
|
|
145
146
|
try {
|
|
146
147
|
startSending();
|
|
147
148
|
const transformedFormData = transformFormData(formData);
|
|
148
|
-
const
|
|
149
|
+
const participantData = await createParticipant({
|
|
149
150
|
phone: formatPhone(transformedFormData.phone as string),
|
|
150
151
|
email: transformedFormData.email as string,
|
|
151
152
|
});
|
|
@@ -153,38 +154,41 @@ export const useApplicationLeadApi = ({
|
|
|
153
154
|
const referalData = leadFormStore.referalData;
|
|
154
155
|
const marketingInfo = sessionStore.marketingInfo;
|
|
155
156
|
|
|
156
|
-
if (!
|
|
157
|
+
if (!participantData) {
|
|
157
158
|
throw new Error();
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
const
|
|
161
|
-
const taskId = await updateUserDataNewMicroservice({
|
|
162
|
-
programId,
|
|
163
|
-
participantId,
|
|
164
|
-
formData: transformedFormData,
|
|
165
|
-
referalData,
|
|
166
|
-
productType,
|
|
167
|
-
marketingInfo,
|
|
168
|
-
saveUserData,
|
|
169
|
-
sendAspects,
|
|
170
|
-
});
|
|
171
|
-
verifyPhoneDialog.close();
|
|
161
|
+
const { participantId, userId } = participantData;
|
|
172
162
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
participantId,
|
|
177
|
-
onFail: handleFailSendForm,
|
|
178
|
-
});
|
|
179
|
-
};
|
|
163
|
+
if (!participantId) {
|
|
164
|
+
throw new Error();
|
|
165
|
+
}
|
|
180
166
|
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
167
|
+
const sendCurrentTask = createSendCurrentTaskNew({
|
|
168
|
+
programId,
|
|
169
|
+
participantId,
|
|
170
|
+
userId,
|
|
171
|
+
formData: transformedFormData,
|
|
172
|
+
referalData,
|
|
173
|
+
productType,
|
|
174
|
+
marketingInfo,
|
|
175
|
+
saveUserData,
|
|
176
|
+
sendAspects,
|
|
177
|
+
verifyPhoneDialog,
|
|
178
|
+
consentBkiDialog,
|
|
179
|
+
handleFailSendForm,
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const handleSuccessVerify = createHandleSuccessVerifyNew({
|
|
183
|
+
userId,
|
|
184
|
+
programId,
|
|
185
|
+
productType,
|
|
186
|
+
verifyPhoneDialog,
|
|
187
|
+
draftDialog,
|
|
188
|
+
sendAspects,
|
|
189
|
+
sendCurrentTask,
|
|
190
|
+
handleFailSendForm,
|
|
191
|
+
});
|
|
188
192
|
|
|
189
193
|
const acceptedConsents = getAcceptedConsents(transformedFormData, productType);
|
|
190
194
|
|
|
@@ -207,6 +211,108 @@ export const useApplicationLeadApi = ({
|
|
|
207
211
|
};
|
|
208
212
|
};
|
|
209
213
|
|
|
214
|
+
const createSendCurrentTaskNew =
|
|
215
|
+
({
|
|
216
|
+
programId,
|
|
217
|
+
participantId,
|
|
218
|
+
userId,
|
|
219
|
+
formData,
|
|
220
|
+
referalData,
|
|
221
|
+
productType,
|
|
222
|
+
marketingInfo,
|
|
223
|
+
saveUserData,
|
|
224
|
+
sendAspects,
|
|
225
|
+
verifyPhoneDialog,
|
|
226
|
+
consentBkiDialog,
|
|
227
|
+
handleFailSendForm,
|
|
228
|
+
}: {
|
|
229
|
+
programId: string;
|
|
230
|
+
participantId: string | number;
|
|
231
|
+
userId?: string | number;
|
|
232
|
+
formData: LeadFormState;
|
|
233
|
+
referalData: ReferalData | null;
|
|
234
|
+
productType: ProductType;
|
|
235
|
+
marketingInfo: MarketingInfo | null;
|
|
236
|
+
saveUserData: (userData: UserData) => void;
|
|
237
|
+
sendAspects: (userId: string | number, taskId: number) => void;
|
|
238
|
+
verifyPhoneDialog: any;
|
|
239
|
+
consentBkiDialog: any;
|
|
240
|
+
handleFailSendForm: () => void;
|
|
241
|
+
}) =>
|
|
242
|
+
async () => {
|
|
243
|
+
const taskId = await updateUserDataNewMicroservice({
|
|
244
|
+
programId,
|
|
245
|
+
participantId,
|
|
246
|
+
userId,
|
|
247
|
+
formData,
|
|
248
|
+
referalData,
|
|
249
|
+
productType,
|
|
250
|
+
marketingInfo,
|
|
251
|
+
saveUserData,
|
|
252
|
+
sendAspects,
|
|
253
|
+
});
|
|
254
|
+
verifyPhoneDialog.close();
|
|
255
|
+
|
|
256
|
+
consentBkiDialog.open({
|
|
257
|
+
phone: formData.phone,
|
|
258
|
+
taskId,
|
|
259
|
+
userId,
|
|
260
|
+
participantId,
|
|
261
|
+
onFail: handleFailSendForm,
|
|
262
|
+
});
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
const createHandleSuccessVerifyNew =
|
|
266
|
+
({
|
|
267
|
+
userId,
|
|
268
|
+
programId,
|
|
269
|
+
productType,
|
|
270
|
+
verifyPhoneDialog,
|
|
271
|
+
draftDialog,
|
|
272
|
+
sendAspects,
|
|
273
|
+
sendCurrentTask,
|
|
274
|
+
handleFailSendForm,
|
|
275
|
+
}: {
|
|
276
|
+
userId?: string | number;
|
|
277
|
+
programId: string;
|
|
278
|
+
productType: ProductType;
|
|
279
|
+
verifyPhoneDialog: any;
|
|
280
|
+
draftDialog: any;
|
|
281
|
+
sendAspects: (userId: string | number, taskId: number) => void;
|
|
282
|
+
sendCurrentTask: () => Promise<void>;
|
|
283
|
+
handleFailSendForm: () => void;
|
|
284
|
+
}) =>
|
|
285
|
+
async () => {
|
|
286
|
+
try {
|
|
287
|
+
const lastTaskId = await getLastTaskStatus({
|
|
288
|
+
userId,
|
|
289
|
+
profileId: userId,
|
|
290
|
+
programId,
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
if (lastTaskId) {
|
|
294
|
+
const task = await getTaskById({ taskId: lastTaskId });
|
|
295
|
+
|
|
296
|
+
if (task) {
|
|
297
|
+
verifyPhoneDialog.close();
|
|
298
|
+
draftDialog.open({
|
|
299
|
+
task,
|
|
300
|
+
isFromLead: true,
|
|
301
|
+
isDebit: productType === 'debitCard',
|
|
302
|
+
sendAspects,
|
|
303
|
+
onClose: sendCurrentTask,
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
await sendCurrentTask();
|
|
311
|
+
} catch {
|
|
312
|
+
handleFailSendForm();
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
210
316
|
const getAcceptedConsents = (formData: LeadFormState, productType: ProductType): string[] => {
|
|
211
317
|
const consents = productTypeToConsentsMap[productType];
|
|
212
318
|
|
|
@@ -288,6 +394,7 @@ const updateUserData = async ({
|
|
|
288
394
|
|
|
289
395
|
const updateUserDataNewMicroservice = async ({
|
|
290
396
|
programId,
|
|
397
|
+
userId,
|
|
291
398
|
participantId,
|
|
292
399
|
formData,
|
|
293
400
|
referalData,
|
|
@@ -297,13 +404,14 @@ const updateUserDataNewMicroservice = async ({
|
|
|
297
404
|
sendAspects,
|
|
298
405
|
}: {
|
|
299
406
|
programId: string;
|
|
300
|
-
participantId: number;
|
|
407
|
+
participantId: string | number;
|
|
408
|
+
userId?: string | number;
|
|
301
409
|
formData: LeadFormState;
|
|
302
410
|
referalData: ReferalData | null;
|
|
303
411
|
productType: ProductType;
|
|
304
412
|
marketingInfo: MarketingInfo | null;
|
|
305
413
|
saveUserData: (userData: UserData) => void;
|
|
306
|
-
sendAspects: (
|
|
414
|
+
sendAspects: (userId: string | number, taskId: number) => void;
|
|
307
415
|
}): Promise<number> => {
|
|
308
416
|
let taskId: number;
|
|
309
417
|
const transformedConsents = transformConsentsFields(formData, productType);
|
|
@@ -332,8 +440,8 @@ const updateUserDataNewMicroservice = async ({
|
|
|
332
440
|
});
|
|
333
441
|
}
|
|
334
442
|
|
|
335
|
-
sendAspects(participantId, taskId);
|
|
336
|
-
saveUserData({ participantId, taskId, programId, formData });
|
|
443
|
+
sendAspects(userId || participantId, taskId);
|
|
444
|
+
saveUserData({ participantId, taskId, userId, programId, formData });
|
|
337
445
|
|
|
338
446
|
return taskId;
|
|
339
447
|
} catch (ex) {
|
|
@@ -8,7 +8,8 @@ export interface LeadFormStoreSlice {
|
|
|
8
8
|
leadForm: LeadFormState;
|
|
9
9
|
taskId: number;
|
|
10
10
|
profileId: Nullable<number>;
|
|
11
|
-
|
|
11
|
+
userId: Nullable<string | number>;
|
|
12
|
+
participantId: string | number;
|
|
12
13
|
programId: string;
|
|
13
14
|
productType: ProductType;
|
|
14
15
|
referalData: ReferalData;
|
|
@@ -4,9 +4,10 @@ import { type Nullable } from '../../utils/Nullable';
|
|
|
4
4
|
import { useLeadFormStore } from './useLeadFormStore';
|
|
5
5
|
|
|
6
6
|
export interface UserData {
|
|
7
|
-
participantId: number;
|
|
7
|
+
participantId: string | number;
|
|
8
8
|
taskId: number;
|
|
9
9
|
profileId?: Nullable<number>;
|
|
10
|
+
userId?: Nullable<string | number>;
|
|
10
11
|
programId: string;
|
|
11
12
|
formData: LeadFormState;
|
|
12
13
|
}
|
|
@@ -14,10 +15,18 @@ export const useSaveUserData = () => {
|
|
|
14
15
|
const leadFormStore = useLeadFormStore();
|
|
15
16
|
|
|
16
17
|
return useCallback(
|
|
17
|
-
({
|
|
18
|
+
({
|
|
19
|
+
participantId,
|
|
20
|
+
taskId,
|
|
21
|
+
userId,
|
|
22
|
+
profileId,
|
|
23
|
+
programId: programNumber,
|
|
24
|
+
formData,
|
|
25
|
+
}: UserData) => {
|
|
18
26
|
leadFormStore.participantId = participantId;
|
|
19
27
|
leadFormStore.taskId = taskId;
|
|
20
28
|
leadFormStore.profileId = profileId;
|
|
29
|
+
leadFormStore.userId = userId;
|
|
21
30
|
leadFormStore.programId = programNumber;
|
|
22
31
|
leadFormStore.leadForm = formData;
|
|
23
32
|
},
|
|
@@ -9,7 +9,7 @@ export const useSendLeadFormAspects = ({ data }: AspectsProps) => {
|
|
|
9
9
|
const aspects = useAspects();
|
|
10
10
|
|
|
11
11
|
return useCallback(
|
|
12
|
-
(ProfileId: number, TaskId: number) => {
|
|
12
|
+
(ProfileId: string | number, TaskId: number) => {
|
|
13
13
|
const snowplowParams = JSON.stringify({
|
|
14
14
|
ProfileId,
|
|
15
15
|
TaskId,
|
package/src/components/Blocks.ts
CHANGED
|
@@ -38,6 +38,7 @@ import { MobileAppTile } from './MobileAppTile/MobileAppTile';
|
|
|
38
38
|
import { OfficesAtmsMap } from './OfficesAtmsMap/OfficesAtmsMap';
|
|
39
39
|
import { ProductBlock } from './ProductBlock/ProductBlock';
|
|
40
40
|
import { RatesTable } from './RatesTable/RatesTable';
|
|
41
|
+
import { ReferalForm } from './ReferalForm/ReferalForm';
|
|
41
42
|
import { RichTextBlock } from './RichTextBlock/RichTextBlock';
|
|
42
43
|
import { RkoTariffCardsTable } from './RkoTariffCardsTable/RkoTariffCardsTable';
|
|
43
44
|
import { RollupItem } from './RollupItem/RollupItem';
|
|
@@ -98,4 +99,5 @@ export const Blocks: BlocksRegistry = {
|
|
|
98
99
|
CalculatorRko,
|
|
99
100
|
RkoTariffCardsTable,
|
|
100
101
|
RatesTable,
|
|
102
|
+
ReferalForm,
|
|
101
103
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
4
|
+
import { ReferalForm } from './ReferalForm';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
default: (
|
|
8
|
+
<div className="container grid grid-cols-12">
|
|
9
|
+
<ReferalForm
|
|
10
|
+
link="https://www.rshb.ru/business/dlya-druga/rko"
|
|
11
|
+
button={{ text: 'Получить ссылку' }}
|
|
12
|
+
/>
|
|
13
|
+
<PopupManager />
|
|
14
|
+
</div>
|
|
15
|
+
),
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import { PopupManager } from '../../ui-kit/PopupManager/PopupManager';
|
|
4
|
+
import { ReferalForm } from './ReferalForm';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
default: (
|
|
8
|
+
<div className="container grid grid-cols-12">
|
|
9
|
+
<ReferalForm
|
|
10
|
+
link="https://www.rshb.ru/business/dlya-druga/rko"
|
|
11
|
+
button={{ text: 'Получить ссылку' }}
|
|
12
|
+
/>
|
|
13
|
+
<PopupManager />
|
|
14
|
+
</div>
|
|
15
|
+
),
|
|
16
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useCallback, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { useForm } from '../../hooks/useForm/useForm';
|
|
3
|
+
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
|
|
4
|
+
import { SubmitButton } from '../../ui-kit/Button/SubmitButton';
|
|
5
|
+
import { getFormValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
6
|
+
import { Link } from '../../ui-kit/Link/Link';
|
|
7
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
8
|
+
import { type Option } from '../../ui-kit/Select/Option';
|
|
9
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
10
|
+
import { UniBlock } from '../../UniBlock/UniBlock';
|
|
11
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
12
|
+
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
13
|
+
import { type ReferalFormContent } from './ReferalFormContent';
|
|
14
|
+
import { sections } from './referalFormData';
|
|
15
|
+
import { renderSections } from './renderSections';
|
|
16
|
+
import { ResultLink } from './ResultLink';
|
|
17
|
+
|
|
18
|
+
export interface FormState {
|
|
19
|
+
email?: string;
|
|
20
|
+
dadataPartyInnSelect?: Option;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ReferalFormProps extends ReferalFormContent, UniBlockProps {}
|
|
24
|
+
|
|
25
|
+
export const ReferalForm = UniBlock<ReferalFormProps>(({ link = '', button, ...rest }) => {
|
|
26
|
+
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
27
|
+
const [referalLink, setReferalLink] = useState('');
|
|
28
|
+
const inputs = useMemo(
|
|
29
|
+
() => (sections?.flatMap((_) => _?.inputs) || []) as FieldDef[],
|
|
30
|
+
[sections],
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
34
|
+
|
|
35
|
+
const handleSubmit = useCallback(async (formData: FormState) => {
|
|
36
|
+
setReferalLink(
|
|
37
|
+
`${link}?utm_source=${formData.dadataPartyInnSelect?.text}&utm_mail=${formData.email}`,
|
|
38
|
+
);
|
|
39
|
+
setIsShowResultLink(true);
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
const [, { field, onSubmit }] = useForm(
|
|
43
|
+
{},
|
|
44
|
+
{
|
|
45
|
+
resetOnSubmit: true,
|
|
46
|
+
formValidator,
|
|
47
|
+
onSubmit: handleSubmit,
|
|
48
|
+
},
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<ApplicationFormLayout
|
|
53
|
+
className="container space-y-m col-span-12"
|
|
54
|
+
title={getTitle(isShowResultLink)}
|
|
55
|
+
{...rest}
|
|
56
|
+
>
|
|
57
|
+
{isShowResultLink ? (
|
|
58
|
+
<ResultLink link={referalLink} />
|
|
59
|
+
) : (
|
|
60
|
+
<form onSubmit={onSubmit}>
|
|
61
|
+
{renderSections(sections, field)}
|
|
62
|
+
<Paragraph size="text-l" font="font-light" color="text-secondary-text">
|
|
63
|
+
<Text>Нажимая кнопку, вы подтверждаете согласие с </Text>
|
|
64
|
+
<Link href="/privacy-policy" target="_blank" ariaLabel="условия передачи данных">
|
|
65
|
+
условиями передачи данных
|
|
66
|
+
</Link>
|
|
67
|
+
</Paragraph>
|
|
68
|
+
<SubmitButton className="w-full @xl:w-auto">
|
|
69
|
+
{button?.text ?? 'Получить ссылку'}
|
|
70
|
+
</SubmitButton>
|
|
71
|
+
</form>
|
|
72
|
+
)}
|
|
73
|
+
</ApplicationFormLayout>
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const getTitle = (isShowResultLink = false) =>
|
|
78
|
+
isShowResultLink ? 'Ваша личная ссылка' : 'Как получить бесплатное обслуживание счёта';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type TextProps } from '../../model/HeadlineType';
|
|
2
|
+
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title Форма для создания реферальной ссылки
|
|
6
|
+
*/
|
|
7
|
+
export type ReferalFormContent = UniBlockContent & {
|
|
8
|
+
/** @title Адрес страницы с заявкой для реферала */
|
|
9
|
+
link?: string;
|
|
10
|
+
/** @title Кнопка */
|
|
11
|
+
button?: TextProps;
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
import { renderLinkInput } from './renderLinkInput';
|
|
4
|
+
|
|
5
|
+
type ResultLinkProps = {
|
|
6
|
+
link: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const ResultLink = JSX<ResultLinkProps>(({ link }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
<div className="@xl:text-center @xl:col-span-2 mb-m">
|
|
13
|
+
<Text size="text-h6">Скопируйте ссылку и отправьте другу</Text>
|
|
14
|
+
</div>
|
|
15
|
+
{renderLinkInput({
|
|
16
|
+
value: link,
|
|
17
|
+
})}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type SectionsProps } from '../../model/InputSectionsType';
|
|
2
|
+
|
|
3
|
+
export const sections: SectionsProps[] = [
|
|
4
|
+
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
5
|
+
{
|
|
6
|
+
columns: 2,
|
|
7
|
+
inputs: [
|
|
8
|
+
{
|
|
9
|
+
name: 'dadataPartyInnSelect',
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'email',
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { type Picture } from '../../model/Picture';
|
|
4
|
+
import { Img } from '../../ui-kit/Img/Img';
|
|
5
|
+
import { type InputProps } from '../../ui-kit/Input/InputProps';
|
|
6
|
+
import { defaultStyle } from '../../ui-kit/Input/styles';
|
|
7
|
+
import { style } from '../../utils/style';
|
|
8
|
+
|
|
9
|
+
const icon: Picture = {
|
|
10
|
+
src: 'CopyIcon.svg',
|
|
11
|
+
iconVersion: 'normal',
|
|
12
|
+
size: { width: 20 },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const renderLinkInput = JSX<InputProps>(({ className, value = '' }) => {
|
|
16
|
+
const onClick = useCallback(async () => {
|
|
17
|
+
try {
|
|
18
|
+
await globalThis.navigator.clipboard.writeText(value);
|
|
19
|
+
} catch {
|
|
20
|
+
console.log('Ошибка копирования');
|
|
21
|
+
}
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div className={style('relative flex items-center max-w-lg m-auto', className)}>
|
|
26
|
+
<input
|
|
27
|
+
className={style('h-14 border-gray text-ellipsis pr-5xl', defaultStyle)}
|
|
28
|
+
type="text"
|
|
29
|
+
value={value}
|
|
30
|
+
disabled={true}
|
|
31
|
+
/>
|
|
32
|
+
<div role="button" className="absolute right-3" onClick={onClick}>
|
|
33
|
+
<Img image={icon} />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
2
|
+
import type { SectionsProps } from '../../model/InputSectionsType';
|
|
3
|
+
import { getField } from '../../ui-kit/FormField/getField';
|
|
4
|
+
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
5
|
+
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
6
|
+
import { style } from '../../utils/style';
|
|
7
|
+
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
8
|
+
|
|
9
|
+
export const renderSections = (
|
|
10
|
+
sections: SectionsProps[],
|
|
11
|
+
field: FormFieldRegisterer<Record<string, any>>,
|
|
12
|
+
) =>
|
|
13
|
+
sections.map((_, i) => (
|
|
14
|
+
<div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid')}>
|
|
15
|
+
{renderTitle(_.title)}
|
|
16
|
+
{(_?.inputs || [])?.map(getField<FieldDef>(field))}
|
|
17
|
+
</div>
|
|
18
|
+
));
|
|
@@ -9,7 +9,7 @@ export interface DaDataPartyHint {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const useDadataParty = async (searchQuery: string): Promise<DaDataPartyHint[]> =>
|
|
12
|
-
(await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))
|
|
12
|
+
(await getDaDataHints({ url: INN_DADATA_URL, query: searchQuery }))?.map((_) => ({
|
|
13
13
|
fullName: _?.value,
|
|
14
14
|
address: _?.data?.address?.value,
|
|
15
15
|
inn: _?.data?.inn,
|