@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
package/bundle/bundle.umd.js
CHANGED
|
@@ -2011,7 +2011,7 @@
|
|
|
2011
2011
|
|
|
2012
2012
|
const PhoneField = JSX(({ field, input }) => {
|
|
2013
2013
|
const fieldName = input?.name || 'phone';
|
|
2014
|
-
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2014
|
+
return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(fieldName), ...input }));
|
|
2015
2015
|
});
|
|
2016
2016
|
|
|
2017
2017
|
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);
|
|
@@ -2191,7 +2191,7 @@
|
|
|
2191
2191
|
function shouldRenderField({ input, field, }) {
|
|
2192
2192
|
const { condition } = input;
|
|
2193
2193
|
const { value } = field(condition?.name || '');
|
|
2194
|
-
return !condition || condition?.values?.
|
|
2194
|
+
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
2195
2195
|
}
|
|
2196
2196
|
|
|
2197
2197
|
const PRODUCT_REF = {
|
|
@@ -2626,11 +2626,11 @@
|
|
|
2626
2626
|
{
|
|
2627
2627
|
columns: 2,
|
|
2628
2628
|
inputs: [
|
|
2629
|
-
{ name: 'surname', required: true, dadata: true },
|
|
2630
|
-
{ name: 'name', required: true, dadata: true },
|
|
2631
|
-
{ name: 'middleName', dadata: true },
|
|
2632
|
-
{ name: 'limitedBirthday', required: true },
|
|
2633
|
-
{ name: 'phone', required: true },
|
|
2629
|
+
{ name: 'surname', required: true, dadata: true, filledByEsia: true },
|
|
2630
|
+
{ name: 'name', required: true, dadata: true, filledByEsia: true },
|
|
2631
|
+
{ name: 'middleName', dadata: true, filledByEsia: true },
|
|
2632
|
+
{ name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
2633
|
+
{ name: 'phone', required: true, filledByEsia: true },
|
|
2634
2634
|
{ name: 'email', required: true, dadata: true },
|
|
2635
2635
|
],
|
|
2636
2636
|
},
|
|
@@ -2640,6 +2640,58 @@
|
|
|
2640
2640
|
];
|
|
2641
2641
|
};
|
|
2642
2642
|
|
|
2643
|
+
const getTraceId = () => {
|
|
2644
|
+
const result = new Uint8Array(8);
|
|
2645
|
+
globalThis.crypto.getRandomValues(result);
|
|
2646
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2647
|
+
};
|
|
2648
|
+
|
|
2649
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
2650
|
+
try {
|
|
2651
|
+
const response = await doRequest(url, method, body);
|
|
2652
|
+
return response.json();
|
|
2653
|
+
}
|
|
2654
|
+
catch (err) {
|
|
2655
|
+
console.error(err);
|
|
2656
|
+
return null;
|
|
2657
|
+
}
|
|
2658
|
+
};
|
|
2659
|
+
async function doRequest(url, method, body) {
|
|
2660
|
+
const traceId = getTraceId();
|
|
2661
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2662
|
+
method,
|
|
2663
|
+
headers: {
|
|
2664
|
+
'Content-Type': 'application/json',
|
|
2665
|
+
'X-B3-Sampled': '1',
|
|
2666
|
+
'X-B3-Spanid': traceId,
|
|
2667
|
+
'X-B3-Traceid': traceId,
|
|
2668
|
+
...getAuthorizationHeaders(),
|
|
2669
|
+
},
|
|
2670
|
+
credentials: 'include',
|
|
2671
|
+
body: body ? JSON.stringify(body) : null,
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2674
|
+
const getAuthorizationHeaders = () => {
|
|
2675
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2676
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2677
|
+
};
|
|
2678
|
+
|
|
2679
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2680
|
+
|
|
2681
|
+
const EsiaLoginBanner = JSX(() => {
|
|
2682
|
+
const navigator = locationNavigator();
|
|
2683
|
+
const handleAuth = useCallback(async () => {
|
|
2684
|
+
const resp = await getLink({
|
|
2685
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2686
|
+
});
|
|
2687
|
+
if (resp?.link) {
|
|
2688
|
+
navigator.assign(resp.link);
|
|
2689
|
+
globalThis.location.href = resp.link;
|
|
2690
|
+
}
|
|
2691
|
+
}, []);
|
|
2692
|
+
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" })] }));
|
|
2693
|
+
});
|
|
2694
|
+
|
|
2643
2695
|
const debounce = (fn, delay = 600) => {
|
|
2644
2696
|
let timerId;
|
|
2645
2697
|
const debouncedCallback = (...args) => {
|
|
@@ -3526,42 +3578,6 @@
|
|
|
3526
3578
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3527
3579
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3528
3580
|
|
|
3529
|
-
const getTraceId = () => {
|
|
3530
|
-
const result = new Uint8Array(8);
|
|
3531
|
-
globalThis.crypto.getRandomValues(result);
|
|
3532
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3533
|
-
};
|
|
3534
|
-
|
|
3535
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
3536
|
-
try {
|
|
3537
|
-
const response = await doRequest(url, method, body);
|
|
3538
|
-
return response.json();
|
|
3539
|
-
}
|
|
3540
|
-
catch (err) {
|
|
3541
|
-
console.error(err);
|
|
3542
|
-
return null;
|
|
3543
|
-
}
|
|
3544
|
-
};
|
|
3545
|
-
async function doRequest(url, method, body) {
|
|
3546
|
-
const traceId = getTraceId();
|
|
3547
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3548
|
-
method,
|
|
3549
|
-
headers: {
|
|
3550
|
-
'Content-Type': 'application/json',
|
|
3551
|
-
'X-B3-Sampled': '1',
|
|
3552
|
-
'X-B3-Spanid': traceId,
|
|
3553
|
-
'X-B3-Traceid': traceId,
|
|
3554
|
-
...getAuthorizationHeaders(),
|
|
3555
|
-
},
|
|
3556
|
-
credentials: 'include',
|
|
3557
|
-
body: body ? JSON.stringify(body) : null,
|
|
3558
|
-
});
|
|
3559
|
-
}
|
|
3560
|
-
const getAuthorizationHeaders = () => {
|
|
3561
|
-
const token = sessionStorage.getItem('accessToken');
|
|
3562
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3563
|
-
};
|
|
3564
|
-
|
|
3565
3581
|
const fetchRegionOffices = async (regionKey) => {
|
|
3566
3582
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3567
3583
|
regionRfCd: {
|
|
@@ -5315,11 +5331,11 @@
|
|
|
5315
5331
|
}, []);
|
|
5316
5332
|
|
|
5317
5333
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5318
|
-
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
5334
|
+
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, esiaAccountTypeCd, } = formData;
|
|
5319
5335
|
return {
|
|
5320
5336
|
maritalStatusCd: familyStatus,
|
|
5321
5337
|
totalDependents: familyMembers,
|
|
5322
|
-
incomeCertificateCd: confirmationIncome,
|
|
5338
|
+
incomeCertificateCd: esiaAccountTypeCd?.key ? { key: 'SFR_CERTIFICATE' } : confirmationIncome,
|
|
5323
5339
|
otherDependents: dependents,
|
|
5324
5340
|
childrenDependents: children,
|
|
5325
5341
|
militaryStatusCd: conscription,
|
|
@@ -5432,7 +5448,7 @@
|
|
|
5432
5448
|
const participant = task.participants[0];
|
|
5433
5449
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5434
5450
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5435
|
-
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;
|
|
5451
|
+
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;
|
|
5436
5452
|
return {
|
|
5437
5453
|
currency: currency?.key,
|
|
5438
5454
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5484,6 +5500,7 @@
|
|
|
5484
5500
|
monthsValue,
|
|
5485
5501
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5486
5502
|
},
|
|
5503
|
+
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5487
5504
|
...getParticipantIncomes(participantIncomes),
|
|
5488
5505
|
...getParticipantAddresses(participantAddresses),
|
|
5489
5506
|
...getParticipantContacts(participantContacts),
|
|
@@ -5538,39 +5555,6 @@
|
|
|
5538
5555
|
};
|
|
5539
5556
|
};
|
|
5540
5557
|
|
|
5541
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5542
|
-
|
|
5543
|
-
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5544
|
-
const navigator = locationNavigator();
|
|
5545
|
-
const retailFormStore = useRetailFormStore();
|
|
5546
|
-
const handleAuth = useCallback(async () => {
|
|
5547
|
-
const resp = await getLink({
|
|
5548
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5549
|
-
});
|
|
5550
|
-
if (resp?.link) {
|
|
5551
|
-
navigator.assign(resp.link);
|
|
5552
|
-
globalThis.location.href = resp.link;
|
|
5553
|
-
}
|
|
5554
|
-
}, []);
|
|
5555
|
-
const handleClose = useCallback(() => {
|
|
5556
|
-
if (retailFormStore.leadForm) {
|
|
5557
|
-
const leadForm = { ...retailFormStore.leadForm };
|
|
5558
|
-
delete leadForm.esiaAccountTypeCd;
|
|
5559
|
-
retailFormStore.leadForm = leadForm;
|
|
5560
|
-
}
|
|
5561
|
-
onClose?.();
|
|
5562
|
-
}, []);
|
|
5563
|
-
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" })] })] }) }));
|
|
5564
|
-
});
|
|
5565
|
-
|
|
5566
|
-
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5567
|
-
const { open } = useDialog(EsiaLoginDialog);
|
|
5568
|
-
const navigator = locationNavigator();
|
|
5569
|
-
return useCallback(() => {
|
|
5570
|
-
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5571
|
-
}, [open, nextStepLink]);
|
|
5572
|
-
};
|
|
5573
|
-
|
|
5574
5558
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5575
5559
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5576
5560
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5692,21 +5676,19 @@
|
|
|
5692
5676
|
|
|
5693
5677
|
/* eslint-disable max-lines */
|
|
5694
5678
|
// eslint-disable-next-line max-lines-per-function
|
|
5695
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType,
|
|
5679
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5696
5680
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5697
5681
|
const [ok, setOK] = useState();
|
|
5698
5682
|
const saveUserData = useSaveUserData();
|
|
5699
5683
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5700
5684
|
const navigator = locationNavigator();
|
|
5701
|
-
const
|
|
5702
|
-
|
|
5685
|
+
const goToNextStep = useCallback(() => {
|
|
5686
|
+
navigator.assign(nextStepLink);
|
|
5687
|
+
}, []);
|
|
5688
|
+
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5703
5689
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5704
5690
|
const draftDialog = useDraftDialog();
|
|
5705
5691
|
const handleSubmit = useCallback(async (formData) => {
|
|
5706
|
-
if (esiaError) {
|
|
5707
|
-
navigator.assign(nextStepLink);
|
|
5708
|
-
return;
|
|
5709
|
-
}
|
|
5710
5692
|
try {
|
|
5711
5693
|
startSending();
|
|
5712
5694
|
const profileId = await createUserProfile({
|
|
@@ -5724,7 +5706,7 @@
|
|
|
5724
5706
|
});
|
|
5725
5707
|
verifyPhoneDialog.close();
|
|
5726
5708
|
if (productType === 'debitCard') {
|
|
5727
|
-
|
|
5709
|
+
goToNextStep();
|
|
5728
5710
|
}
|
|
5729
5711
|
else {
|
|
5730
5712
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5763,7 +5745,7 @@
|
|
|
5763
5745
|
catch {
|
|
5764
5746
|
setOK(false);
|
|
5765
5747
|
}
|
|
5766
|
-
}, [
|
|
5748
|
+
}, []);
|
|
5767
5749
|
return { isSending, ok, handleSubmit };
|
|
5768
5750
|
};
|
|
5769
5751
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5846,7 +5828,10 @@
|
|
|
5846
5828
|
}
|
|
5847
5829
|
}, [target, key]);
|
|
5848
5830
|
|
|
5849
|
-
const
|
|
5831
|
+
const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
|
|
5832
|
+
saveToken(res);
|
|
5833
|
+
return res;
|
|
5834
|
+
});
|
|
5850
5835
|
|
|
5851
5836
|
const initialFormState = {
|
|
5852
5837
|
surname: '',
|
|
@@ -5864,19 +5849,24 @@
|
|
|
5864
5849
|
consentPhotoFlg: false,
|
|
5865
5850
|
consentFATCA: false,
|
|
5866
5851
|
};
|
|
5867
|
-
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5852
|
+
const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
|
|
5868
5853
|
if (savedForm) {
|
|
5869
|
-
return {
|
|
5854
|
+
return {
|
|
5855
|
+
...savedForm,
|
|
5856
|
+
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5857
|
+
...(!esiaAuthSuccess && {
|
|
5858
|
+
esiaAccountTypeCd: { key: '' },
|
|
5859
|
+
}),
|
|
5860
|
+
};
|
|
5870
5861
|
}
|
|
5871
5862
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5872
5863
|
return { ...formState };
|
|
5873
5864
|
};
|
|
5874
5865
|
|
|
5875
|
-
const uploadFile = async (file,
|
|
5866
|
+
const uploadFile = async (file, documentCategory, isPDF = false) => {
|
|
5876
5867
|
const fd = new FormData();
|
|
5877
|
-
fd.append('taskId', taskId);
|
|
5878
5868
|
fd.append('documentCategory', documentCategory);
|
|
5879
|
-
fd.append('file', file, '
|
|
5869
|
+
fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
|
|
5880
5870
|
const res = await globalThis
|
|
5881
5871
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5882
5872
|
method: 'POST',
|
|
@@ -5890,23 +5880,46 @@
|
|
|
5890
5880
|
return res;
|
|
5891
5881
|
};
|
|
5892
5882
|
|
|
5893
|
-
const parseEsiaProfile = async (esiaProfile,
|
|
5883
|
+
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5894
5884
|
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5895
5885
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5896
|
-
|
|
5886
|
+
let files = [];
|
|
5897
5887
|
if (!isDebit) {
|
|
5898
|
-
await
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5888
|
+
files = await saveDocuments([
|
|
5889
|
+
{
|
|
5890
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5891
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5892
|
+
isPDF: true,
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5896
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5897
|
+
isPDF: true,
|
|
5898
|
+
},
|
|
5899
|
+
{
|
|
5900
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5901
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5902
|
+
isPDF: true,
|
|
5903
|
+
},
|
|
5904
|
+
{
|
|
5905
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5906
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5907
|
+
isPDF: false,
|
|
5908
|
+
},
|
|
5909
|
+
{
|
|
5910
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5911
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5912
|
+
isPDF: false,
|
|
5913
|
+
},
|
|
5914
|
+
{
|
|
5915
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5916
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5917
|
+
isPDF: false,
|
|
5918
|
+
},
|
|
5919
|
+
//TODO: После тестирования добавить документы снизу
|
|
5920
|
+
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
5921
|
+
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
5922
|
+
]);
|
|
5910
5923
|
}
|
|
5911
5924
|
const mainData = {
|
|
5912
5925
|
name: profile.name,
|
|
@@ -5968,11 +5981,16 @@
|
|
|
5968
5981
|
};
|
|
5969
5982
|
};
|
|
5970
5983
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5971
|
-
const
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
.
|
|
5975
|
-
|
|
5984
|
+
const saveDocuments = async (documents) => {
|
|
5985
|
+
const files = [];
|
|
5986
|
+
for (const doc of documents) {
|
|
5987
|
+
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
5988
|
+
await fetch(`${contentType},${doc.file}`)
|
|
5989
|
+
.then((res) => res.blob())
|
|
5990
|
+
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
5991
|
+
.then((file) => files.push(file));
|
|
5992
|
+
}
|
|
5993
|
+
return files;
|
|
5976
5994
|
};
|
|
5977
5995
|
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
5978
5996
|
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
@@ -5999,6 +6017,13 @@
|
|
|
5999
6017
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6000
6018
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6001
6019
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6020
|
+
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6021
|
+
esiaAdditionalDocument.xmlFilePayout,
|
|
6022
|
+
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6023
|
+
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6024
|
+
//TODO: После тестирования добавить документы снизу
|
|
6025
|
+
// esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6026
|
+
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
6002
6027
|
];
|
|
6003
6028
|
if (!data.every((_) => Boolean(_))) {
|
|
6004
6029
|
throw new Error();
|
|
@@ -6026,29 +6051,28 @@
|
|
|
6026
6051
|
}
|
|
6027
6052
|
};
|
|
6028
6053
|
|
|
6029
|
-
const useInitApplicationLead = ({ inputs,
|
|
6030
|
-
const navigator = locationNavigator();
|
|
6054
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaError, setEsiaAuthSuccess, esiaAuthSuccess, }) => {
|
|
6031
6055
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6032
6056
|
const leadFormStore = useLeadFormStore();
|
|
6033
6057
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6034
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6035
|
-
const
|
|
6058
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6059
|
+
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6036
6060
|
startLoading();
|
|
6037
6061
|
try {
|
|
6038
|
-
const data = await
|
|
6039
|
-
profileId,
|
|
6062
|
+
const data = await esiaRequestProfile({
|
|
6040
6063
|
code,
|
|
6041
6064
|
state,
|
|
6042
6065
|
redirectUri: globalThis.location?.href,
|
|
6066
|
+
authorize: true,
|
|
6043
6067
|
});
|
|
6044
|
-
if (data
|
|
6045
|
-
const parsedData = await parseEsiaProfile(data,
|
|
6068
|
+
if (data) {
|
|
6069
|
+
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6046
6070
|
saveForm((_) => ({
|
|
6047
6071
|
..._,
|
|
6048
6072
|
...parsedData,
|
|
6049
6073
|
}));
|
|
6074
|
+
setEsiaAuthSuccess();
|
|
6050
6075
|
}
|
|
6051
|
-
navigator.assign(nextStepLink);
|
|
6052
6076
|
}
|
|
6053
6077
|
catch {
|
|
6054
6078
|
setEsiaError();
|
|
@@ -6056,15 +6080,14 @@
|
|
|
6056
6080
|
finally {
|
|
6057
6081
|
endLoading();
|
|
6058
6082
|
}
|
|
6059
|
-
}, [
|
|
6083
|
+
}, []);
|
|
6060
6084
|
useEffect(() => {
|
|
6061
6085
|
leadFormStore.productType = productType;
|
|
6062
|
-
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6063
6086
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6064
6087
|
const code = params.get('code');
|
|
6065
6088
|
const state = params.get('state');
|
|
6066
|
-
if (
|
|
6067
|
-
|
|
6089
|
+
if (code && state) {
|
|
6090
|
+
requestEsiaProfile(code, state);
|
|
6068
6091
|
}
|
|
6069
6092
|
else {
|
|
6070
6093
|
sessionStorage.removeItem('accessToken');
|
|
@@ -6076,6 +6099,7 @@
|
|
|
6076
6099
|
|
|
6077
6100
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6078
6101
|
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6102
|
+
const [esiaAuthSuccess, { setTrue: setEsiaAuthSuccess }] = useBool(false);
|
|
6079
6103
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6080
6104
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6081
6105
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
@@ -6084,15 +6108,17 @@
|
|
|
6084
6108
|
nextStepLink,
|
|
6085
6109
|
productType,
|
|
6086
6110
|
setEsiaError,
|
|
6111
|
+
setEsiaAuthSuccess,
|
|
6112
|
+
esiaAuthSuccess,
|
|
6087
6113
|
});
|
|
6088
6114
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6089
6115
|
programId,
|
|
6090
6116
|
nextStepLink,
|
|
6091
6117
|
productType,
|
|
6092
|
-
|
|
6118
|
+
esiaAuthSuccess,
|
|
6093
6119
|
data,
|
|
6094
6120
|
});
|
|
6095
|
-
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6121
|
+
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
6096
6122
|
formValidator,
|
|
6097
6123
|
onSubmit: handleSubmit,
|
|
6098
6124
|
});
|
|
@@ -6102,7 +6128,12 @@
|
|
|
6102
6128
|
responseTypeDialog.open({ ok });
|
|
6103
6129
|
}
|
|
6104
6130
|
}, [ok]);
|
|
6105
|
-
|
|
6131
|
+
useEffect(() => {
|
|
6132
|
+
if (initialFormState?.esiaAccountTypeCd) {
|
|
6133
|
+
reset();
|
|
6134
|
+
}
|
|
6135
|
+
}, [initialFormState]);
|
|
6136
|
+
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] })] }));
|
|
6106
6137
|
});
|
|
6107
6138
|
|
|
6108
6139
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7811,6 +7842,7 @@
|
|
|
7811
7842
|
mandatoryPayments: undefined,
|
|
7812
7843
|
snils: '',
|
|
7813
7844
|
armyIdFlg: false,
|
|
7845
|
+
esiaAccountTypeCd: { key: '', text: '' },
|
|
7814
7846
|
},
|
|
7815
7847
|
{
|
|
7816
7848
|
bankruptcyFlg: false,
|
|
@@ -8252,7 +8284,16 @@
|
|
|
8252
8284
|
},
|
|
8253
8285
|
{
|
|
8254
8286
|
columns: 1,
|
|
8255
|
-
inputs: [
|
|
8287
|
+
inputs: [
|
|
8288
|
+
{
|
|
8289
|
+
name: 'confirmationIncome',
|
|
8290
|
+
required: true,
|
|
8291
|
+
condition: {
|
|
8292
|
+
name: 'esiaAccountTypeCd',
|
|
8293
|
+
values: [''],
|
|
8294
|
+
},
|
|
8295
|
+
},
|
|
8296
|
+
],
|
|
8256
8297
|
},
|
|
8257
8298
|
{
|
|
8258
8299
|
columns: 1,
|
|
@@ -8662,7 +8703,7 @@
|
|
|
8662
8703
|
},
|
|
8663
8704
|
{
|
|
8664
8705
|
label: 'Ежемесячный платеж',
|
|
8665
|
-
description: `${Math.round(statusInfo?.calculator?.monthlyPayment ?? 0)} ₽`,
|
|
8706
|
+
description: `${Math.round(statusInfo?.calculator?.monthlyPayment ?? 0).toLocaleString()} ₽`,
|
|
8666
8707
|
},
|
|
8667
8708
|
{
|
|
8668
8709
|
label: 'Срок кредита',
|
|
@@ -11473,7 +11514,7 @@
|
|
|
11473
11514
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11474
11515
|
});
|
|
11475
11516
|
|
|
11476
|
-
const packageVersion = "0.14.
|
|
11517
|
+
const packageVersion = "0.14.813";
|
|
11477
11518
|
|
|
11478
11519
|
exports.Blocks = Blocks;
|
|
11479
11520
|
exports.ContentPage = ContentPage;
|