@redneckz/wildless-cms-uni-blocks 0.14.812 → 0.14.814
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/bundle.umd.js +173 -132
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/bundle/retail/api/checkCode.d.ts +1 -0
- package/bundle/retail/api/{updateProfileEsia.d.ts → esiaRequestProfile.d.ts} +11 -4
- package/bundle/retail/api/updateUserTask.d.ts +1 -0
- package/bundle/retail/api/uploadFile.d.ts +1 -1
- package/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +23 -0
- package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
- package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
- package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
- package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/CreditForm/SuccessStatusContent.js +1 -1
- package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/retail/api/checkCode.d.ts +1 -0
- package/dist/retail/api/checkCode.js +3 -2
- package/dist/retail/api/checkCode.js.map +1 -1
- package/{lib/retail/api/updateProfileEsia.d.ts → dist/retail/api/esiaRequestProfile.d.ts} +11 -4
- package/dist/retail/api/esiaRequestProfile.js +10 -0
- package/dist/retail/api/esiaRequestProfile.js.map +1 -0
- package/dist/retail/api/updateUserTask.d.ts +1 -0
- package/dist/retail/api/updateUserTask.js.map +1 -1
- package/dist/retail/api/uploadFile.d.ts +1 -1
- package/dist/retail/api/uploadFile.js +2 -3
- package/dist/retail/api/uploadFile.js.map +1 -1
- package/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
- package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/dist/retail/content.js +10 -1
- package/dist/retail/content.js.map +1 -1
- package/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/dist/retail/utils/mainFormStateMap.js +1 -0
- package/dist/retail/utils/mainFormStateMap.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
- package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.js +1 -1
- package/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +21 -0
- package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
- package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
- package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
- package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/CreditForm/SuccessStatusContent.js +1 -1
- package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/retail/api/checkCode.d.ts +1 -0
- package/lib/retail/api/checkCode.js +1 -1
- package/lib/retail/api/checkCode.js.map +1 -1
- package/{mobile/bundle/retail/api/updateProfileEsia.d.ts → lib/retail/api/esiaRequestProfile.d.ts} +11 -4
- package/lib/retail/api/esiaRequestProfile.js +7 -0
- package/lib/retail/api/esiaRequestProfile.js.map +1 -0
- package/lib/retail/api/updateUserTask.d.ts +1 -0
- package/lib/retail/api/updateUserTask.js.map +1 -1
- package/lib/retail/api/uploadFile.d.ts +1 -1
- package/lib/retail/api/uploadFile.js +2 -3
- package/lib/retail/api/uploadFile.js.map +1 -1
- package/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
- package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/lib/retail/content.js +10 -1
- package/lib/retail/content.js.map +1 -1
- package/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/lib/retail/utils/mainFormStateMap.js +1 -0
- package/lib/retail/utils/mainFormStateMap.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
- package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.js +1 -1
- package/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +173 -132
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
- package/{dist/retail/api/updateProfileEsia.d.ts → mobile/bundle/retail/api/esiaRequestProfile.d.ts} +11 -4
- package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -0
- package/mobile/bundle/retail/api/uploadFile.d.ts +1 -1
- package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +23 -0
- package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
- package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
- package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js +1 -1
- package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/retail/api/checkCode.d.ts +1 -0
- package/mobile/dist/retail/api/checkCode.js +3 -2
- package/mobile/dist/retail/api/checkCode.js.map +1 -1
- package/mobile/dist/retail/api/esiaRequestProfile.d.ts +84 -0
- package/mobile/dist/retail/api/esiaRequestProfile.js +10 -0
- package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -0
- package/mobile/dist/retail/api/updateUserTask.d.ts +1 -0
- package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
- package/mobile/dist/retail/api/uploadFile.d.ts +1 -1
- package/mobile/dist/retail/api/uploadFile.js +2 -3
- package/mobile/dist/retail/api/uploadFile.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
- package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/dist/retail/content.js +10 -1
- package/mobile/dist/retail/content.js.map +1 -1
- package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/dist/retail/utils/mainFormStateMap.js +1 -0
- package/mobile/dist/retail/utils/mainFormStateMap.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
- package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.js +1 -1
- package/mobile/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +21 -0
- package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
- package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
- package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js +1 -1
- package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/retail/api/checkCode.d.ts +1 -0
- package/mobile/lib/retail/api/checkCode.js +1 -1
- package/mobile/lib/retail/api/checkCode.js.map +1 -1
- package/mobile/lib/retail/api/esiaRequestProfile.d.ts +84 -0
- package/mobile/lib/retail/api/esiaRequestProfile.js +7 -0
- package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -0
- package/mobile/lib/retail/api/updateUserTask.d.ts +1 -0
- package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
- package/mobile/lib/retail/api/uploadFile.d.ts +1 -1
- package/mobile/lib/retail/api/uploadFile.js +2 -3
- package/mobile/lib/retail/api/uploadFile.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
- package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
- package/mobile/lib/retail/content.js +10 -1
- package/mobile/lib/retail/content.js.map +1 -1
- package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
- package/mobile/lib/retail/utils/mainFormStateMap.js +1 -0
- package/mobile/lib/retail/utils/mainFormStateMap.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
- package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.js +1 -1
- package/mobile/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +14 -2
- package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +52 -0
- package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
- package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +68 -34
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +58 -65
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -41
- package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +3 -1
- package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -1
- package/mobile/src/retail/api/checkCode.ts +1 -1
- package/mobile/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
- package/mobile/src/retail/api/updateUserTask.ts +1 -0
- package/mobile/src/retail/api/uploadFile.ts +2 -3
- package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
- package/mobile/src/retail/content.tsx +10 -1
- package/mobile/src/retail/model/NameFieldDef.ts +1 -0
- package/mobile/src/retail/utils/mainFormStateMap.ts +1 -0
- package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
- package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +14 -2
- package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +52 -0
- package/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
- package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +68 -34
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +58 -65
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -41
- package/src/components/CreditForm/SuccessStatusContent.tsx +3 -1
- package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -1
- package/src/retail/api/checkCode.ts +1 -1
- package/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
- package/src/retail/api/updateUserTask.ts +1 -0
- package/src/retail/api/uploadFile.ts +2 -3
- package/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
- package/src/retail/content.tsx +10 -1
- package/src/retail/model/NameFieldDef.ts +1 -0
- package/src/retail/utils/mainFormStateMap.ts +1 -0
- package/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
- package/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
- package/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/dist/retail/api/updateProfileEsia.js +0 -6
- package/dist/retail/api/updateProfileEsia.js.map +0 -1
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
- package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
- package/lib/retail/api/updateProfileEsia.js +0 -3
- package/lib/retail/api/updateProfileEsia.js.map +0 -1
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts +0 -5
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
- package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
- package/mobile/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/mobile/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/mobile/dist/retail/api/updateProfileEsia.d.ts +0 -77
- package/mobile/dist/retail/api/updateProfileEsia.js +0 -6
- package/mobile/dist/retail/api/updateProfileEsia.js.map +0 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
- package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
- package/mobile/lib/retail/api/updateProfileEsia.d.ts +0 -77
- package/mobile/lib/retail/api/updateProfileEsia.js +0 -3
- package/mobile/lib/retail/api/updateProfileEsia.js.map +0 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
- package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
- package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
- package/mobile/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
- package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +0 -7
- package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
- package/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
|
@@ -2019,7 +2019,7 @@
|
|
|
2019
2019
|
|
|
2020
2020
|
const PhoneField = JSX(({ field, input }) => {
|
|
2021
2021
|
const fieldName = input?.name || 'phone';
|
|
2022
|
-
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2022
|
+
return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(fieldName), ...input }));
|
|
2023
2023
|
});
|
|
2024
2024
|
|
|
2025
2025
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
@@ -2199,7 +2199,7 @@
|
|
|
2199
2199
|
function shouldRenderField({ input, field, }) {
|
|
2200
2200
|
const { condition } = input;
|
|
2201
2201
|
const { value } = field(condition?.name || '');
|
|
2202
|
-
return !condition || condition?.values?.
|
|
2202
|
+
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
2203
2203
|
}
|
|
2204
2204
|
|
|
2205
2205
|
const PRODUCT_REF = {
|
|
@@ -2634,11 +2634,11 @@
|
|
|
2634
2634
|
{
|
|
2635
2635
|
columns: 2,
|
|
2636
2636
|
inputs: [
|
|
2637
|
-
{ name: 'surname', required: true, dadata: true },
|
|
2638
|
-
{ name: 'name', required: true, dadata: true },
|
|
2639
|
-
{ name: 'middleName', dadata: true },
|
|
2640
|
-
{ name: 'limitedBirthday', required: true },
|
|
2641
|
-
{ name: 'phone', required: true },
|
|
2637
|
+
{ name: 'surname', required: true, dadata: true, filledByEsia: true },
|
|
2638
|
+
{ name: 'name', required: true, dadata: true, filledByEsia: true },
|
|
2639
|
+
{ name: 'middleName', dadata: true, filledByEsia: true },
|
|
2640
|
+
{ name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
2641
|
+
{ name: 'phone', required: true, filledByEsia: true },
|
|
2642
2642
|
{ name: 'email', required: true, dadata: true },
|
|
2643
2643
|
],
|
|
2644
2644
|
},
|
|
@@ -2648,6 +2648,58 @@
|
|
|
2648
2648
|
];
|
|
2649
2649
|
};
|
|
2650
2650
|
|
|
2651
|
+
const getTraceId = () => {
|
|
2652
|
+
const result = new Uint8Array(8);
|
|
2653
|
+
globalThis.crypto.getRandomValues(result);
|
|
2654
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2655
|
+
};
|
|
2656
|
+
|
|
2657
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
2658
|
+
try {
|
|
2659
|
+
const response = await doRequest(url, method, body);
|
|
2660
|
+
return response.json();
|
|
2661
|
+
}
|
|
2662
|
+
catch (err) {
|
|
2663
|
+
console.error(err);
|
|
2664
|
+
return null;
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2667
|
+
async function doRequest(url, method, body) {
|
|
2668
|
+
const traceId = getTraceId();
|
|
2669
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2670
|
+
method,
|
|
2671
|
+
headers: {
|
|
2672
|
+
'Content-Type': 'application/json',
|
|
2673
|
+
'X-B3-Sampled': '1',
|
|
2674
|
+
'X-B3-Spanid': traceId,
|
|
2675
|
+
'X-B3-Traceid': traceId,
|
|
2676
|
+
...getAuthorizationHeaders(),
|
|
2677
|
+
},
|
|
2678
|
+
credentials: 'include',
|
|
2679
|
+
body: body ? JSON.stringify(body) : null,
|
|
2680
|
+
});
|
|
2681
|
+
}
|
|
2682
|
+
const getAuthorizationHeaders = () => {
|
|
2683
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2684
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2685
|
+
};
|
|
2686
|
+
|
|
2687
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2688
|
+
|
|
2689
|
+
const EsiaLoginBanner = JSX(() => {
|
|
2690
|
+
const navigator = locationNavigator();
|
|
2691
|
+
const handleAuth = useCallback(async () => {
|
|
2692
|
+
const resp = await getLink({
|
|
2693
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2694
|
+
});
|
|
2695
|
+
if (resp?.link) {
|
|
2696
|
+
navigator.assign(resp.link);
|
|
2697
|
+
globalThis.location.href = resp.link;
|
|
2698
|
+
}
|
|
2699
|
+
}, []);
|
|
2700
|
+
return (jsxs("div", { className: "flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9", children: [jsxs("div", { className: "flex flex-col justify-around w-full", children: [jsx("p", { className: "mb-4 text-xl @md:text-2xl @md:mb-6", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsxs("ul", { className: "list-disc list-inside mb-9", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { className: "block mb-6 self-center @md:hidden", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "80", width: "80" }), jsx(Button, { type: "button", onClick: handleAuth, className: "w-full @md:w-fit", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C" })] }), jsx(Img, { className: "hidden @md:block", image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "164" })] }));
|
|
2701
|
+
});
|
|
2702
|
+
|
|
2651
2703
|
const debounce = (fn, delay = 600) => {
|
|
2652
2704
|
let timerId;
|
|
2653
2705
|
const debouncedCallback = (...args) => {
|
|
@@ -3534,42 +3586,6 @@
|
|
|
3534
3586
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3535
3587
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3536
3588
|
|
|
3537
|
-
const getTraceId = () => {
|
|
3538
|
-
const result = new Uint8Array(8);
|
|
3539
|
-
globalThis.crypto.getRandomValues(result);
|
|
3540
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3541
|
-
};
|
|
3542
|
-
|
|
3543
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
3544
|
-
try {
|
|
3545
|
-
const response = await doRequest(url, method, body);
|
|
3546
|
-
return response.json();
|
|
3547
|
-
}
|
|
3548
|
-
catch (err) {
|
|
3549
|
-
console.error(err);
|
|
3550
|
-
return null;
|
|
3551
|
-
}
|
|
3552
|
-
};
|
|
3553
|
-
async function doRequest(url, method, body) {
|
|
3554
|
-
const traceId = getTraceId();
|
|
3555
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3556
|
-
method,
|
|
3557
|
-
headers: {
|
|
3558
|
-
'Content-Type': 'application/json',
|
|
3559
|
-
'X-B3-Sampled': '1',
|
|
3560
|
-
'X-B3-Spanid': traceId,
|
|
3561
|
-
'X-B3-Traceid': traceId,
|
|
3562
|
-
...getAuthorizationHeaders(),
|
|
3563
|
-
},
|
|
3564
|
-
credentials: 'include',
|
|
3565
|
-
body: body ? JSON.stringify(body) : null,
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
const getAuthorizationHeaders = () => {
|
|
3569
|
-
const token = sessionStorage.getItem('accessToken');
|
|
3570
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3571
|
-
};
|
|
3572
|
-
|
|
3573
3589
|
const fetchRegionOffices = async (regionKey) => {
|
|
3574
3590
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3575
3591
|
regionRfCd: {
|
|
@@ -5323,11 +5339,11 @@
|
|
|
5323
5339
|
}, []);
|
|
5324
5340
|
|
|
5325
5341
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5326
|
-
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
5342
|
+
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, esiaAccountTypeCd, } = formData;
|
|
5327
5343
|
return {
|
|
5328
5344
|
maritalStatusCd: familyStatus,
|
|
5329
5345
|
totalDependents: familyMembers,
|
|
5330
|
-
incomeCertificateCd: confirmationIncome,
|
|
5346
|
+
incomeCertificateCd: esiaAccountTypeCd?.key ? { key: 'SFR_CERTIFICATE' } : confirmationIncome,
|
|
5331
5347
|
otherDependents: dependents,
|
|
5332
5348
|
childrenDependents: children,
|
|
5333
5349
|
militaryStatusCd: conscription,
|
|
@@ -5440,7 +5456,7 @@
|
|
|
5440
5456
|
const participant = task.participants[0];
|
|
5441
5457
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5442
5458
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5443
|
-
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
|
|
5459
|
+
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
|
|
5444
5460
|
return {
|
|
5445
5461
|
currency: currency?.key,
|
|
5446
5462
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5492,6 +5508,7 @@
|
|
|
5492
5508
|
monthsValue,
|
|
5493
5509
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5494
5510
|
},
|
|
5511
|
+
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5495
5512
|
...getParticipantIncomes(participantIncomes),
|
|
5496
5513
|
...getParticipantAddresses(participantAddresses),
|
|
5497
5514
|
...getParticipantContacts(participantContacts),
|
|
@@ -5546,39 +5563,6 @@
|
|
|
5546
5563
|
};
|
|
5547
5564
|
};
|
|
5548
5565
|
|
|
5549
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5550
|
-
|
|
5551
|
-
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5552
|
-
const navigator = locationNavigator();
|
|
5553
|
-
const retailFormStore = useRetailFormStore();
|
|
5554
|
-
const handleAuth = useCallback(async () => {
|
|
5555
|
-
const resp = await getLink({
|
|
5556
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5557
|
-
});
|
|
5558
|
-
if (resp?.link) {
|
|
5559
|
-
navigator.assign(resp.link);
|
|
5560
|
-
globalThis.location.href = resp.link;
|
|
5561
|
-
}
|
|
5562
|
-
}, []);
|
|
5563
|
-
const handleClose = useCallback(() => {
|
|
5564
|
-
if (retailFormStore.leadForm) {
|
|
5565
|
-
const leadForm = { ...retailFormStore.leadForm };
|
|
5566
|
-
delete leadForm.esiaAccountTypeCd;
|
|
5567
|
-
retailFormStore.leadForm = leadForm;
|
|
5568
|
-
}
|
|
5569
|
-
onClose?.();
|
|
5570
|
-
}, []);
|
|
5571
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full px-m", children: [jsxs("ul", { className: "list-disc", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "@container flex flex-wrap gap-lg w-full", children: [jsx(Button, { type: "button", onClick: handleAuth, className: "w-full md:w-auto", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, className: "w-full md:w-auto", children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
|
|
5572
|
-
});
|
|
5573
|
-
|
|
5574
|
-
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5575
|
-
const { open } = useDialog(EsiaLoginDialog);
|
|
5576
|
-
const navigator = locationNavigator();
|
|
5577
|
-
return useCallback(() => {
|
|
5578
|
-
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5579
|
-
}, [open, nextStepLink]);
|
|
5580
|
-
};
|
|
5581
|
-
|
|
5582
5566
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5583
5567
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5584
5568
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5700,21 +5684,19 @@
|
|
|
5700
5684
|
|
|
5701
5685
|
/* eslint-disable max-lines */
|
|
5702
5686
|
// eslint-disable-next-line max-lines-per-function
|
|
5703
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType,
|
|
5687
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5704
5688
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5705
5689
|
const [ok, setOK] = useState();
|
|
5706
5690
|
const saveUserData = useSaveUserData();
|
|
5707
5691
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5708
5692
|
const navigator = locationNavigator();
|
|
5709
|
-
const
|
|
5710
|
-
|
|
5693
|
+
const goToNextStep = useCallback(() => {
|
|
5694
|
+
navigator.assign(nextStepLink);
|
|
5695
|
+
}, []);
|
|
5696
|
+
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5711
5697
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5712
5698
|
const draftDialog = useDraftDialog();
|
|
5713
5699
|
const handleSubmit = useCallback(async (formData) => {
|
|
5714
|
-
if (esiaError) {
|
|
5715
|
-
navigator.assign(nextStepLink);
|
|
5716
|
-
return;
|
|
5717
|
-
}
|
|
5718
5700
|
try {
|
|
5719
5701
|
startSending();
|
|
5720
5702
|
const profileId = await createUserProfile({
|
|
@@ -5732,7 +5714,7 @@
|
|
|
5732
5714
|
});
|
|
5733
5715
|
verifyPhoneDialog.close();
|
|
5734
5716
|
if (productType === 'debitCard') {
|
|
5735
|
-
|
|
5717
|
+
goToNextStep();
|
|
5736
5718
|
}
|
|
5737
5719
|
else {
|
|
5738
5720
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5771,7 +5753,7 @@
|
|
|
5771
5753
|
catch {
|
|
5772
5754
|
setOK(false);
|
|
5773
5755
|
}
|
|
5774
|
-
}, [
|
|
5756
|
+
}, []);
|
|
5775
5757
|
return { isSending, ok, handleSubmit };
|
|
5776
5758
|
};
|
|
5777
5759
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5854,7 +5836,10 @@
|
|
|
5854
5836
|
}
|
|
5855
5837
|
}, [target, key]);
|
|
5856
5838
|
|
|
5857
|
-
const
|
|
5839
|
+
const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
|
|
5840
|
+
saveToken(res);
|
|
5841
|
+
return res;
|
|
5842
|
+
});
|
|
5858
5843
|
|
|
5859
5844
|
const initialFormState = {
|
|
5860
5845
|
surname: '',
|
|
@@ -5872,19 +5857,24 @@
|
|
|
5872
5857
|
consentPhotoFlg: false,
|
|
5873
5858
|
consentFATCA: false,
|
|
5874
5859
|
};
|
|
5875
|
-
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5860
|
+
const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
|
|
5876
5861
|
if (savedForm) {
|
|
5877
|
-
return {
|
|
5862
|
+
return {
|
|
5863
|
+
...savedForm,
|
|
5864
|
+
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5865
|
+
...(!esiaAuthSuccess && {
|
|
5866
|
+
esiaAccountTypeCd: { key: '' },
|
|
5867
|
+
}),
|
|
5868
|
+
};
|
|
5878
5869
|
}
|
|
5879
5870
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5880
5871
|
return { ...formState };
|
|
5881
5872
|
};
|
|
5882
5873
|
|
|
5883
|
-
const uploadFile = async (file,
|
|
5874
|
+
const uploadFile = async (file, documentCategory, isPDF = false) => {
|
|
5884
5875
|
const fd = new FormData();
|
|
5885
|
-
fd.append('taskId', taskId);
|
|
5886
5876
|
fd.append('documentCategory', documentCategory);
|
|
5887
|
-
fd.append('file', file, '
|
|
5877
|
+
fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
|
|
5888
5878
|
const res = await globalThis
|
|
5889
5879
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5890
5880
|
method: 'POST',
|
|
@@ -5898,23 +5888,46 @@
|
|
|
5898
5888
|
return res;
|
|
5899
5889
|
};
|
|
5900
5890
|
|
|
5901
|
-
const parseEsiaProfile = async (esiaProfile,
|
|
5891
|
+
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5902
5892
|
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5903
5893
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5904
|
-
|
|
5894
|
+
let files = [];
|
|
5905
5895
|
if (!isDebit) {
|
|
5906
|
-
await
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5896
|
+
files = await saveDocuments([
|
|
5897
|
+
{
|
|
5898
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5899
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5900
|
+
isPDF: true,
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5904
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5905
|
+
isPDF: true,
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5909
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5910
|
+
isPDF: true,
|
|
5911
|
+
},
|
|
5912
|
+
{
|
|
5913
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5914
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5915
|
+
isPDF: false,
|
|
5916
|
+
},
|
|
5917
|
+
{
|
|
5918
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5919
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5920
|
+
isPDF: false,
|
|
5921
|
+
},
|
|
5922
|
+
{
|
|
5923
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5924
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5925
|
+
isPDF: false,
|
|
5926
|
+
},
|
|
5927
|
+
//TODO: После тестирования добавить документы снизу
|
|
5928
|
+
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
5929
|
+
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
5930
|
+
]);
|
|
5918
5931
|
}
|
|
5919
5932
|
const mainData = {
|
|
5920
5933
|
name: profile.name,
|
|
@@ -5976,11 +5989,16 @@
|
|
|
5976
5989
|
};
|
|
5977
5990
|
};
|
|
5978
5991
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5979
|
-
const
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
.
|
|
5983
|
-
|
|
5992
|
+
const saveDocuments = async (documents) => {
|
|
5993
|
+
const files = [];
|
|
5994
|
+
for (const doc of documents) {
|
|
5995
|
+
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
5996
|
+
await fetch(`${contentType},${doc.file}`)
|
|
5997
|
+
.then((res) => res.blob())
|
|
5998
|
+
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
5999
|
+
.then((file) => files.push(file));
|
|
6000
|
+
}
|
|
6001
|
+
return files;
|
|
5984
6002
|
};
|
|
5985
6003
|
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
5986
6004
|
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
@@ -6007,6 +6025,13 @@
|
|
|
6007
6025
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6008
6026
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6009
6027
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6028
|
+
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6029
|
+
esiaAdditionalDocument.xmlFilePayout,
|
|
6030
|
+
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6031
|
+
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6032
|
+
//TODO: После тестирования добавить документы снизу
|
|
6033
|
+
// esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6034
|
+
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
6010
6035
|
];
|
|
6011
6036
|
if (!data.every((_) => Boolean(_))) {
|
|
6012
6037
|
throw new Error();
|
|
@@ -6034,29 +6059,28 @@
|
|
|
6034
6059
|
}
|
|
6035
6060
|
};
|
|
6036
6061
|
|
|
6037
|
-
const useInitApplicationLead = ({ inputs,
|
|
6038
|
-
const navigator = locationNavigator();
|
|
6062
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaError, setEsiaAuthSuccess, esiaAuthSuccess, }) => {
|
|
6039
6063
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6040
6064
|
const leadFormStore = useLeadFormStore();
|
|
6041
6065
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6042
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6043
|
-
const
|
|
6066
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6067
|
+
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6044
6068
|
startLoading();
|
|
6045
6069
|
try {
|
|
6046
|
-
const data = await
|
|
6047
|
-
profileId,
|
|
6070
|
+
const data = await esiaRequestProfile({
|
|
6048
6071
|
code,
|
|
6049
6072
|
state,
|
|
6050
6073
|
redirectUri: globalThis.location?.href,
|
|
6074
|
+
authorize: true,
|
|
6051
6075
|
});
|
|
6052
|
-
if (data
|
|
6053
|
-
const parsedData = await parseEsiaProfile(data,
|
|
6076
|
+
if (data) {
|
|
6077
|
+
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6054
6078
|
saveForm((_) => ({
|
|
6055
6079
|
..._,
|
|
6056
6080
|
...parsedData,
|
|
6057
6081
|
}));
|
|
6082
|
+
setEsiaAuthSuccess();
|
|
6058
6083
|
}
|
|
6059
|
-
navigator.assign(nextStepLink);
|
|
6060
6084
|
}
|
|
6061
6085
|
catch {
|
|
6062
6086
|
setEsiaError();
|
|
@@ -6064,15 +6088,14 @@
|
|
|
6064
6088
|
finally {
|
|
6065
6089
|
endLoading();
|
|
6066
6090
|
}
|
|
6067
|
-
}, [
|
|
6091
|
+
}, []);
|
|
6068
6092
|
useEffect(() => {
|
|
6069
6093
|
leadFormStore.productType = productType;
|
|
6070
|
-
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6071
6094
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6072
6095
|
const code = params.get('code');
|
|
6073
6096
|
const state = params.get('state');
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6097
|
+
if (code && state) {
|
|
6098
|
+
requestEsiaProfile(code, state);
|
|
6076
6099
|
}
|
|
6077
6100
|
else {
|
|
6078
6101
|
sessionStorage.removeItem('accessToken');
|
|
@@ -6084,6 +6107,7 @@
|
|
|
6084
6107
|
|
|
6085
6108
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6086
6109
|
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6110
|
+
const [esiaAuthSuccess, { setTrue: setEsiaAuthSuccess }] = useBool(false);
|
|
6087
6111
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6088
6112
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6089
6113
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
@@ -6092,15 +6116,17 @@
|
|
|
6092
6116
|
nextStepLink,
|
|
6093
6117
|
productType,
|
|
6094
6118
|
setEsiaError,
|
|
6119
|
+
setEsiaAuthSuccess,
|
|
6120
|
+
esiaAuthSuccess,
|
|
6095
6121
|
});
|
|
6096
6122
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6097
6123
|
programId,
|
|
6098
6124
|
nextStepLink,
|
|
6099
6125
|
productType,
|
|
6100
|
-
|
|
6126
|
+
esiaAuthSuccess,
|
|
6101
6127
|
data,
|
|
6102
6128
|
});
|
|
6103
|
-
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6129
|
+
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
6104
6130
|
formValidator,
|
|
6105
6131
|
onSubmit: handleSubmit,
|
|
6106
6132
|
});
|
|
@@ -6110,7 +6136,12 @@
|
|
|
6110
6136
|
responseTypeDialog.open({ ok });
|
|
6111
6137
|
}
|
|
6112
6138
|
}, [ok]);
|
|
6113
|
-
|
|
6139
|
+
useEffect(() => {
|
|
6140
|
+
if (initialFormState?.esiaAccountTypeCd) {
|
|
6141
|
+
reset();
|
|
6142
|
+
}
|
|
6143
|
+
}, [initialFormState]);
|
|
6144
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaAuthSuccess && !esiaError ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6114
6145
|
});
|
|
6115
6146
|
|
|
6116
6147
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7803,6 +7834,7 @@
|
|
|
7803
7834
|
mandatoryPayments: undefined,
|
|
7804
7835
|
snils: '',
|
|
7805
7836
|
armyIdFlg: false,
|
|
7837
|
+
esiaAccountTypeCd: { key: '', text: '' },
|
|
7806
7838
|
},
|
|
7807
7839
|
{
|
|
7808
7840
|
bankruptcyFlg: false,
|
|
@@ -8244,7 +8276,16 @@
|
|
|
8244
8276
|
},
|
|
8245
8277
|
{
|
|
8246
8278
|
columns: 1,
|
|
8247
|
-
inputs: [
|
|
8279
|
+
inputs: [
|
|
8280
|
+
{
|
|
8281
|
+
name: 'confirmationIncome',
|
|
8282
|
+
required: true,
|
|
8283
|
+
condition: {
|
|
8284
|
+
name: 'esiaAccountTypeCd',
|
|
8285
|
+
values: [''],
|
|
8286
|
+
},
|
|
8287
|
+
},
|
|
8288
|
+
],
|
|
8248
8289
|
},
|
|
8249
8290
|
{
|
|
8250
8291
|
columns: 1,
|
|
@@ -8576,7 +8617,7 @@
|
|
|
8576
8617
|
},
|
|
8577
8618
|
{
|
|
8578
8619
|
label: 'Ежемесячный платеж',
|
|
8579
|
-
description: `${Math.round(statusInfo?.calculator?.monthlyPayment ?? 0)} ₽`,
|
|
8620
|
+
description: `${Math.round(statusInfo?.calculator?.monthlyPayment ?? 0).toLocaleString()} ₽`,
|
|
8580
8621
|
},
|
|
8581
8622
|
{
|
|
8582
8623
|
label: 'Срок кредита',
|
|
@@ -10766,7 +10807,7 @@
|
|
|
10766
10807
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10767
10808
|
});
|
|
10768
10809
|
|
|
10769
|
-
const packageVersion = "0.14.
|
|
10810
|
+
const packageVersion = "0.14.813";
|
|
10770
10811
|
|
|
10771
10812
|
exports.Blocks = Blocks;
|
|
10772
10813
|
exports.ContentPage = ContentPage;
|