@redneckz/wildless-cms-uni-blocks 0.14.813 → 0.14.815
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/UniBlock/UniBlock.d.ts +3 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +257 -149
- 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/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/bundle/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- 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/BlockRenderer/renderBlock.js +1 -1
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/UniBlock/UniBlock.d.ts +3 -1
- package/dist/UniBlock/UniBlock.js.map +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/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/dist/components/GalleryLayout/GalleryLayout.js +71 -0
- package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -0
- package/dist/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- package/dist/components/GalleryLayout/GalleryLayoutContent.js +2 -0
- package/dist/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
- 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/BaseProductTile/BaseProductTile.js +8 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +3 -3
- package/dist/ui-kit/BaseTile/BaseTile.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/BlockRenderer/renderBlock.js +1 -1
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/UniBlock/UniBlock.d.ts +3 -1
- package/lib/UniBlock/UniBlock.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/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/lib/{retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts → components/GalleryLayout/GalleryLayout.fixture.d.ts} +1 -1
- package/lib/components/GalleryLayout/GalleryLayout.js +69 -0
- package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -0
- package/lib/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- package/lib/components/GalleryLayout/GalleryLayoutContent.js +2 -0
- package/lib/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
- 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/BaseProductTile/BaseProductTile.js +9 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +3 -3
- package/lib/ui-kit/BaseTile/BaseTile.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/UniBlock/UniBlock.d.ts +3 -1
- package/mobile/bundle/bundle.umd.js +257 -149
- 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/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/mobile/bundle/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- 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/BlockRenderer/renderBlock.js +1 -1
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/UniBlock/UniBlock.d.ts +3 -1
- package/mobile/dist/UniBlock/UniBlock.js.map +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/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js +71 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.js +2 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
- 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/BaseProductTile/BaseProductTile.js +8 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +3 -3
- package/mobile/dist/ui-kit/BaseTile/BaseTile.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/BlockRenderer/renderBlock.js +1 -1
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/UniBlock/UniBlock.d.ts +3 -1
- package/mobile/lib/UniBlock/UniBlock.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/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/GalleryLayout/GalleryLayout.d.ts +5 -0
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js +69 -0
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -0
- package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
- package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.js +2 -0
- package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
- 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/BaseProductTile/BaseProductTile.js +9 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +3 -3
- package/mobile/lib/ui-kit/BaseTile/BaseTile.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/BlockRenderer/renderBlock.tsx +3 -3
- package/mobile/src/UniBlock/UniBlock.tsx +3 -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/Blocks.ts +2 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -0
- package/mobile/src/components/GalleryLayout/GalleryLayout.example.json +102 -0
- package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +140 -0
- package/mobile/src/components/GalleryLayout/GalleryLayout.ui.json +1 -0
- package/mobile/src/components/GalleryLayout/GalleryLayoutContent.ts +16 -0
- 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/BaseProductTile/BaseProductTile.tsx +60 -23
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +11 -7
- package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
- package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
- package/package.json +2 -2
- package/src/BlockRenderer/renderBlock.tsx +3 -3
- package/src/UniBlock/UniBlock.tsx +3 -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/Blocks.mobile.ts +2 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -0
- package/src/components/GalleryLayout/GalleryLayout.example.json +102 -0
- package/src/components/GalleryLayout/GalleryLayout.fixture.tsx +61 -0
- package/src/components/GalleryLayout/GalleryLayout.tsx +140 -0
- package/src/components/GalleryLayout/GalleryLayout.ui.json +1 -0
- package/src/components/GalleryLayout/GalleryLayoutContent.ts +16 -0
- 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/BaseProductTile/BaseProductTile.tsx +60 -23
- package/src/ui-kit/BaseTile/BaseTile.tsx +11 -7
- 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.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
|
@@ -3,32 +3,6 @@ import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
|
|
|
3
3
|
import { type ProductType } from './ApplicationLeadFormContent';
|
|
4
4
|
import { productTypeToConsentsMap } from './consents';
|
|
5
5
|
|
|
6
|
-
export const applicationFormData: SectionsRetailProps[] = [
|
|
7
|
-
{
|
|
8
|
-
columns: 2,
|
|
9
|
-
inputs: [
|
|
10
|
-
{ name: 'surname', required: true, dadata: true },
|
|
11
|
-
{ name: 'name', required: true, dadata: true },
|
|
12
|
-
{ name: 'middleName', dadata: true },
|
|
13
|
-
{ name: 'limitedBirthday', required: true },
|
|
14
|
-
{ name: 'phone', required: true },
|
|
15
|
-
{ name: 'email', required: true, dadata: true },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
inputs: [
|
|
20
|
-
{ name: 'processPersonalDataFlg', required: true },
|
|
21
|
-
{ name: 'consentProviderFlg', required: true },
|
|
22
|
-
{ name: 'consentOthersFlg', required: true },
|
|
23
|
-
{ name: 'consentInformFlg' },
|
|
24
|
-
{ name: 'consentPfrFlg' },
|
|
25
|
-
{ name: 'consentInformMaterialsFlg' },
|
|
26
|
-
{ name: 'consentPhotoFlg' },
|
|
27
|
-
{ name: 'consentFATCA' },
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
|
|
32
6
|
export const getApplicationFormData = (productType: ProductType): SectionsRetailProps[] => {
|
|
33
7
|
const currentProductConsents = productTypeToConsentsMap[productType];
|
|
34
8
|
const allConsents: FieldRetailDef[] = [
|
|
@@ -46,11 +20,11 @@ export const getApplicationFormData = (productType: ProductType): SectionsRetail
|
|
|
46
20
|
{
|
|
47
21
|
columns: 2,
|
|
48
22
|
inputs: [
|
|
49
|
-
{ name: 'surname', required: true, dadata: true },
|
|
50
|
-
{ name: 'name', required: true, dadata: true },
|
|
51
|
-
{ name: 'middleName', dadata: true },
|
|
52
|
-
{ name: 'limitedBirthday', required: true },
|
|
53
|
-
{ name: 'phone', required: true },
|
|
23
|
+
{ name: 'surname', required: true, dadata: true, filledByEsia: true },
|
|
24
|
+
{ name: 'name', required: true, dadata: true, filledByEsia: true },
|
|
25
|
+
{ name: 'middleName', dadata: true, filledByEsia: true },
|
|
26
|
+
{ name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
27
|
+
{ name: 'phone', required: true, filledByEsia: true },
|
|
54
28
|
{ name: 'email', required: true, dadata: true },
|
|
55
29
|
],
|
|
56
30
|
},
|
|
@@ -21,9 +21,16 @@ const initialFormState = {
|
|
|
21
21
|
export const getInitialFormState = (
|
|
22
22
|
inputs: FieldRetailDef[],
|
|
23
23
|
savedForm: LeadFormState | null,
|
|
24
|
+
esiaAuthSuccess: boolean,
|
|
24
25
|
): LeadFormState => {
|
|
25
26
|
if (savedForm) {
|
|
26
|
-
return {
|
|
27
|
+
return {
|
|
28
|
+
...savedForm,
|
|
29
|
+
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
30
|
+
...(!esiaAuthSuccess && {
|
|
31
|
+
esiaAccountTypeCd: { key: '' },
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
@@ -1,33 +1,62 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
|
-
|
|
2
|
+
/* eslint-disable max-lines-per-function */
|
|
3
|
+
import { type EsiaRequestProfileResponse } from '../../retail/api/esiaRequestProfile';
|
|
3
4
|
import { uploadFile, type DocumentCategory } from '../../retail/api/uploadFile';
|
|
4
5
|
import { type Address, type File, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
5
6
|
import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
|
|
6
7
|
|
|
8
|
+
type Document = {
|
|
9
|
+
file: string;
|
|
10
|
+
category: DocumentCategory;
|
|
11
|
+
isPDF: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
7
14
|
export const parseEsiaProfile = async (
|
|
8
|
-
esiaProfile:
|
|
9
|
-
taskId: string,
|
|
15
|
+
esiaProfile: EsiaRequestProfileResponse,
|
|
10
16
|
isDebit: boolean,
|
|
11
17
|
): Promise<LeadFormState> => {
|
|
12
18
|
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
13
19
|
|
|
14
20
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } =
|
|
15
21
|
esiaProfile;
|
|
16
|
-
|
|
22
|
+
let files: File[] = [];
|
|
17
23
|
|
|
18
24
|
if (!isDebit) {
|
|
19
|
-
await
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
files = await saveDocuments([
|
|
26
|
+
{
|
|
27
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
28
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
29
|
+
isPDF: true,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
33
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
34
|
+
isPDF: true,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
38
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
39
|
+
isPDF: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
43
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
44
|
+
isPDF: false,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
48
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
49
|
+
isPDF: false,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
53
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
54
|
+
isPDF: false,
|
|
55
|
+
},
|
|
56
|
+
//TODO: После тестирования добавить документы снизу
|
|
57
|
+
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
58
|
+
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
59
|
+
]);
|
|
31
60
|
}
|
|
32
61
|
|
|
33
62
|
const mainData = {
|
|
@@ -74,7 +103,7 @@ const concatFullAddress = (address: Array<string | undefined>): string => {
|
|
|
74
103
|
}, '');
|
|
75
104
|
};
|
|
76
105
|
|
|
77
|
-
const buildAddress = (fields:
|
|
106
|
+
const buildAddress = (fields: EsiaRequestProfileResponse['addressRegistration']): Address => {
|
|
78
107
|
const {
|
|
79
108
|
postcode,
|
|
80
109
|
region,
|
|
@@ -110,24 +139,22 @@ const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']):
|
|
|
110
139
|
|
|
111
140
|
const getYearFromMonth = (month: number) => Math.floor(month / 12);
|
|
112
141
|
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.then((value) => uploadFile(value, taskId, category))
|
|
127
|
-
.then((file) => files.push(file));
|
|
142
|
+
const saveDocuments = async (documents: Document[]): Promise<File[]> => {
|
|
143
|
+
const files: File[] = [];
|
|
144
|
+
|
|
145
|
+
for (const doc of documents) {
|
|
146
|
+
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
147
|
+
|
|
148
|
+
await fetch(`${contentType},${doc.file}`)
|
|
149
|
+
.then((res) => res.blob())
|
|
150
|
+
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
151
|
+
.then((file) => files.push(file));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return files;
|
|
128
155
|
};
|
|
129
156
|
|
|
130
|
-
const checkEsiaDataForCredit = (esiaProfile:
|
|
157
|
+
const checkEsiaDataForCredit = (esiaProfile: EsiaRequestProfileResponse) => {
|
|
131
158
|
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
132
159
|
|
|
133
160
|
const data = [
|
|
@@ -153,6 +180,13 @@ const checkEsiaDataForCredit = (esiaProfile: UpdateProfileEsiaResponse) => {
|
|
|
153
180
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
154
181
|
esiaAdditionalDocument.pdfFilePayout,
|
|
155
182
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
183
|
+
esiaAdditionalDocument.pdfFileSigPayout,
|
|
184
|
+
esiaAdditionalDocument.xmlFilePayout,
|
|
185
|
+
esiaAdditionalDocument.xmlFileSigPayout,
|
|
186
|
+
esiaAdditionalDocument.xmlFileWorkbook,
|
|
187
|
+
//TODO: После тестирования добавить документы снизу
|
|
188
|
+
// esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
189
|
+
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
156
190
|
];
|
|
157
191
|
|
|
158
192
|
if (!data.every((_) => Boolean(_))) {
|
|
@@ -160,7 +194,7 @@ const checkEsiaDataForCredit = (esiaProfile: UpdateProfileEsiaResponse) => {
|
|
|
160
194
|
}
|
|
161
195
|
};
|
|
162
196
|
|
|
163
|
-
const checkEsiaDataForDebit = (esiaProfile:
|
|
197
|
+
const checkEsiaDataForDebit = (esiaProfile: EsiaRequestProfileResponse) => {
|
|
164
198
|
const { profile, document, addressRegistration } = esiaProfile;
|
|
165
199
|
|
|
166
200
|
const data = [
|
|
@@ -12,7 +12,6 @@ import { updateUserProfile } from '../../retail/api/updateUserProfile';
|
|
|
12
12
|
import { updateUserTask } from '../../retail/api/updateUserTask';
|
|
13
13
|
import { useConsentBkiDialog } from '../../retail/components/ConsentBkiDialog/useConsentBkiDialog';
|
|
14
14
|
import { useDraftDialog } from '../../retail/components/DraftDialog/useDraftDialog';
|
|
15
|
-
import { useEsiaLoginDialog } from '../../retail/components/EsiaLoginDialog/useEsiaLoginDialog';
|
|
16
15
|
import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/VerifyPhoneDialog';
|
|
17
16
|
import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
18
17
|
import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
|
|
@@ -28,7 +27,7 @@ interface ApplicationLeadApiProps extends AspectsProps {
|
|
|
28
27
|
programId: string;
|
|
29
28
|
nextStepLink: string;
|
|
30
29
|
productType: ProductType;
|
|
31
|
-
|
|
30
|
+
esiaAuthSuccess: boolean;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
// eslint-disable-next-line max-lines-per-function
|
|
@@ -36,7 +35,6 @@ export const useApplicationLeadApi = ({
|
|
|
36
35
|
programId,
|
|
37
36
|
nextStepLink,
|
|
38
37
|
productType,
|
|
39
|
-
esiaError,
|
|
40
38
|
data,
|
|
41
39
|
}: ApplicationLeadApiProps) => {
|
|
42
40
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
@@ -45,77 +43,72 @@ export const useApplicationLeadApi = ({
|
|
|
45
43
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
46
44
|
const navigator = locationNavigator();
|
|
47
45
|
|
|
48
|
-
const
|
|
49
|
-
|
|
46
|
+
const goToNextStep = useCallback(() => {
|
|
47
|
+
navigator.assign(nextStepLink);
|
|
48
|
+
}, []);
|
|
49
|
+
|
|
50
|
+
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
50
51
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
51
52
|
const draftDialog = useDraftDialog();
|
|
52
53
|
|
|
53
|
-
const handleSubmit = useCallback(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
startSending();
|
|
62
|
-
const profileId = await createUserProfile({
|
|
63
|
-
profile: { phone: formatPhone(formData.phone as string) },
|
|
64
|
-
});
|
|
54
|
+
const handleSubmit = useCallback(async (formData: LeadFormState) => {
|
|
55
|
+
try {
|
|
56
|
+
startSending();
|
|
57
|
+
const profileId = await createUserProfile({
|
|
58
|
+
profile: { phone: formatPhone(formData.phone as string) },
|
|
59
|
+
});
|
|
65
60
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
if (profileId && formData?.phone) {
|
|
62
|
+
const sendCurrentTask = async () => {
|
|
63
|
+
await updateUserData({
|
|
64
|
+
programId,
|
|
65
|
+
profileId,
|
|
66
|
+
formData,
|
|
67
|
+
productType,
|
|
68
|
+
saveUserData,
|
|
69
|
+
sendAspects,
|
|
70
|
+
});
|
|
71
|
+
verifyPhoneDialog.close();
|
|
72
|
+
if (productType === 'debitCard') {
|
|
73
|
+
goToNextStep();
|
|
74
|
+
} else {
|
|
75
|
+
consentBkiDialog.open(formData.phone, profileId);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const handleSuccessVerify = async () => {
|
|
79
|
+
try {
|
|
80
|
+
const lastTaskId = await getLastTaskStatus({ profileId, programId });
|
|
81
|
+
|
|
82
|
+
if (lastTaskId) {
|
|
83
|
+
const task = await getTaskById({ taskId: lastTaskId });
|
|
84
|
+
verifyPhoneDialog.close();
|
|
85
|
+
draftDialog.open({
|
|
86
|
+
task,
|
|
87
|
+
isFromLead: true,
|
|
88
|
+
sendAspects,
|
|
89
|
+
onClose: sendCurrentTask,
|
|
90
|
+
});
|
|
79
91
|
} else {
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const handleSuccessVerify = async () => {
|
|
84
|
-
try {
|
|
85
|
-
const lastTaskId = await getLastTaskStatus({ profileId, programId });
|
|
86
|
-
|
|
87
|
-
if (lastTaskId) {
|
|
88
|
-
const task = await getTaskById({ taskId: lastTaskId });
|
|
89
|
-
verifyPhoneDialog.close();
|
|
90
|
-
draftDialog.open({
|
|
91
|
-
task,
|
|
92
|
-
isFromLead: true,
|
|
93
|
-
sendAspects,
|
|
94
|
-
onClose: sendCurrentTask,
|
|
95
|
-
});
|
|
96
|
-
} else {
|
|
97
|
-
await sendCurrentTask();
|
|
98
|
-
}
|
|
99
|
-
} catch {
|
|
100
|
-
setOK(false);
|
|
92
|
+
await sendCurrentTask();
|
|
101
93
|
}
|
|
102
|
-
}
|
|
94
|
+
} catch {
|
|
95
|
+
setOK(false);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
103
98
|
|
|
104
|
-
|
|
99
|
+
const acceptedConsents = getAcceptedConsents(formData, productType);
|
|
105
100
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
} catch {
|
|
114
|
-
setOK(false);
|
|
101
|
+
verifyPhoneDialog.open({
|
|
102
|
+
phone: formData?.phone,
|
|
103
|
+
consents: acceptedConsents,
|
|
104
|
+
onSuccess: handleSuccessVerify,
|
|
105
|
+
});
|
|
106
|
+
endSending();
|
|
115
107
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
} catch {
|
|
109
|
+
setOK(false);
|
|
110
|
+
}
|
|
111
|
+
}, []);
|
|
119
112
|
|
|
120
113
|
return { isSending, ok, handleSubmit };
|
|
121
114
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
2
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
3
|
-
import { locationNavigator } from '../../external/locationNavigator';
|
|
4
3
|
import { useSetter } from '../../hooks/useSetter';
|
|
5
|
-
import {
|
|
4
|
+
import { esiaRequestProfile } from '../../retail/api/esiaRequestProfile';
|
|
6
5
|
import { type LeadFormState } from '../../retail/model/LeadFormState';
|
|
7
6
|
import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
|
|
8
|
-
import { safeJsonParse } from '../../utils/safeJsonParse';
|
|
9
7
|
import { type ProductType } from './ApplicationLeadFormContent';
|
|
10
8
|
import { getInitialFormState } from './getInitialFormState';
|
|
11
9
|
import { parseEsiaProfile } from './parseEsiaProfile';
|
|
@@ -16,70 +14,62 @@ type InitApplicationLeadProps = {
|
|
|
16
14
|
nextStepLink: string;
|
|
17
15
|
productType: ProductType;
|
|
18
16
|
setEsiaError: () => void;
|
|
17
|
+
setEsiaAuthSuccess: () => void;
|
|
18
|
+
esiaAuthSuccess: boolean;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export const useInitApplicationLead = ({
|
|
22
22
|
inputs,
|
|
23
|
-
nextStepLink,
|
|
24
23
|
productType,
|
|
25
24
|
setEsiaError,
|
|
25
|
+
setEsiaAuthSuccess,
|
|
26
|
+
esiaAuthSuccess,
|
|
26
27
|
}: InitApplicationLeadProps): [LeadFormState, { isLoading: boolean }] => {
|
|
27
|
-
const navigator = locationNavigator();
|
|
28
28
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
29
29
|
|
|
30
30
|
const leadFormStore = useLeadFormStore();
|
|
31
31
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
32
32
|
|
|
33
33
|
const initialFormState = useMemo(
|
|
34
|
-
() => getInitialFormState(inputs, leadFormStore.leadForm),
|
|
34
|
+
() => getInitialFormState(inputs, leadFormStore.leadForm, esiaAuthSuccess),
|
|
35
35
|
[inputs, leadFormStore.leadForm],
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
38
|
+
const requestEsiaProfile = useCallback(async (code: string, state: string) => {
|
|
39
|
+
startLoading();
|
|
40
|
+
try {
|
|
41
|
+
const data = await esiaRequestProfile({
|
|
42
|
+
code,
|
|
43
|
+
state,
|
|
44
|
+
redirectUri: globalThis.location?.href,
|
|
45
|
+
authorize: true,
|
|
46
|
+
});
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
data,
|
|
52
|
-
leadFormStore.taskId.toString(),
|
|
53
|
-
productType === 'debitCard',
|
|
54
|
-
);
|
|
48
|
+
if (data) {
|
|
49
|
+
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
55
50
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
navigator.assign(nextStepLink);
|
|
63
|
-
} catch {
|
|
64
|
-
setEsiaError();
|
|
65
|
-
} finally {
|
|
66
|
-
endLoading();
|
|
51
|
+
saveForm((_) => ({
|
|
52
|
+
..._,
|
|
53
|
+
...parsedData,
|
|
54
|
+
}));
|
|
55
|
+
setEsiaAuthSuccess();
|
|
67
56
|
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
} catch {
|
|
58
|
+
setEsiaError();
|
|
59
|
+
} finally {
|
|
60
|
+
endLoading();
|
|
61
|
+
}
|
|
62
|
+
}, []);
|
|
71
63
|
|
|
72
64
|
useEffect(() => {
|
|
73
65
|
leadFormStore.productType = productType;
|
|
74
|
-
|
|
75
|
-
safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? '')
|
|
76
|
-
);
|
|
66
|
+
|
|
77
67
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
78
68
|
const code = params.get('code');
|
|
79
69
|
const state = params.get('state');
|
|
80
70
|
|
|
81
|
-
if (
|
|
82
|
-
|
|
71
|
+
if (code && state) {
|
|
72
|
+
requestEsiaProfile(code, state);
|
|
83
73
|
} else {
|
|
84
74
|
sessionStorage.removeItem('accessToken');
|
|
85
75
|
sessionStorage.removeItem('refreshToken');
|
|
@@ -26,6 +26,7 @@ import { Depository } from './Depository/Depository';
|
|
|
26
26
|
import { ErrorBlock } from './ErrorBlock/ErrorBlock';
|
|
27
27
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
28
28
|
import { Footer } from './Footer/Footer';
|
|
29
|
+
import { GalleryLayout } from './GalleryLayout/GalleryLayout';
|
|
29
30
|
import { GrantSupport } from './GrantSupport/GrantSupport';
|
|
30
31
|
import { Header } from './Header/Header';
|
|
31
32
|
import { Headline } from './Headline/Headline';
|
|
@@ -74,6 +75,7 @@ export const Blocks: BlocksRegistry = {
|
|
|
74
75
|
ErrorBlock,
|
|
75
76
|
ExchangeRateTile,
|
|
76
77
|
Footer,
|
|
78
|
+
GalleryLayout,
|
|
77
79
|
GrantSupport,
|
|
78
80
|
Header,
|
|
79
81
|
Headline,
|
package/src/components/Blocks.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { Depository } from './Depository/Depository';
|
|
|
28
28
|
import { ErrorBlock } from './ErrorBlock/ErrorBlock';
|
|
29
29
|
import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
|
|
30
30
|
import { Footer } from './Footer/Footer';
|
|
31
|
+
import { GalleryLayout } from './GalleryLayout/GalleryLayout';
|
|
31
32
|
import { GracePeriod } from './GracePeriod/GracePeriod';
|
|
32
33
|
import { GrantSupport } from './GrantSupport/GrantSupport';
|
|
33
34
|
import { Header } from './Header/Header';
|
|
@@ -81,6 +82,7 @@ export const Blocks: BlocksRegistry = {
|
|
|
81
82
|
ErrorBlock,
|
|
82
83
|
ExchangeRateTile,
|
|
83
84
|
Footer,
|
|
85
|
+
GalleryLayout,
|
|
84
86
|
GracePeriod,
|
|
85
87
|
GrantSupport,
|
|
86
88
|
Header,
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"content": {
|
|
3
|
+
"gap": "L",
|
|
4
|
+
"version": "primary",
|
|
5
|
+
"padding": "p-xl"
|
|
6
|
+
},
|
|
7
|
+
"blocks": [
|
|
8
|
+
{
|
|
9
|
+
"content": {
|
|
10
|
+
"version": "secondary",
|
|
11
|
+
"title": "Продукт",
|
|
12
|
+
"description": "Описание",
|
|
13
|
+
"headlineVersion": "XL",
|
|
14
|
+
"backwardButton": false,
|
|
15
|
+
"isDotted": true,
|
|
16
|
+
"buttons": [
|
|
17
|
+
{
|
|
18
|
+
"text": "Кнопка",
|
|
19
|
+
"version": "secondary"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"padding": "p-xl",
|
|
23
|
+
"benefitsVersion": "normal",
|
|
24
|
+
"benefits": [
|
|
25
|
+
{
|
|
26
|
+
"label": "Преимущество №1",
|
|
27
|
+
"icon": {
|
|
28
|
+
"icon": "SmallClockIcon"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"label": "Преимущество №2",
|
|
33
|
+
"icon": {
|
|
34
|
+
"icon": "SignDocsIcon"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"imageOptions": {
|
|
39
|
+
"imageAlign": "end"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"style": ["col-span-12"],
|
|
43
|
+
"type": "ProductBlock"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"content": {
|
|
47
|
+
"version": "secondary",
|
|
48
|
+
"title": "Продукт",
|
|
49
|
+
"headlineVersion": "S",
|
|
50
|
+
"backwardButton": false,
|
|
51
|
+
"padding": "p-xl",
|
|
52
|
+
"imageOptions": {
|
|
53
|
+
"imageAlign": "end"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"style": ["col-span-12"],
|
|
57
|
+
"type": "ProductBlock"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"content": {
|
|
61
|
+
"version": "secondary",
|
|
62
|
+
"title": "Продукт",
|
|
63
|
+
"headlineVersion": "S",
|
|
64
|
+
"backwardButton": false,
|
|
65
|
+
"padding": "p-xl",
|
|
66
|
+
"imageOptions": {
|
|
67
|
+
"imageAlign": "end"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"style": ["col-span-12"],
|
|
71
|
+
"type": "ProductBlock"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"content": {
|
|
75
|
+
"version": "secondary",
|
|
76
|
+
"title": "Продукт",
|
|
77
|
+
"headlineVersion": "S",
|
|
78
|
+
"backwardButton": false,
|
|
79
|
+
"padding": "p-xl",
|
|
80
|
+
"imageOptions": {
|
|
81
|
+
"imageAlign": "end"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"style": ["col-span-12"],
|
|
85
|
+
"type": "ProductBlock"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"content": {
|
|
89
|
+
"version": "secondary",
|
|
90
|
+
"title": "Продукт",
|
|
91
|
+
"headlineVersion": "S",
|
|
92
|
+
"backwardButton": false,
|
|
93
|
+
"padding": "p-xl",
|
|
94
|
+
"imageOptions": {
|
|
95
|
+
"imageAlign": "end"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"style": ["col-span-12"],
|
|
99
|
+
"type": "ProductBlock"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|