@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
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
// Adjusted by decorator block and blockClassName
|
|
169
169
|
render: ({ block: adjustedBlock, blockClassName: adjustedBlockClassName }) => {
|
|
170
170
|
const { content } = adjustedBlock;
|
|
171
|
-
return BlockComponent ? (jsx(BlockComponent, { className: adjustedBlockClassName, block: block, options: options
|
|
171
|
+
return BlockComponent ? (jsx(BlockComponent, { ...content, ...extraProps, className: style(adjustedBlockClassName, content?.className), block: block, options: options }, key)) : null;
|
|
172
172
|
},
|
|
173
173
|
}, key);
|
|
174
174
|
}
|
|
@@ -629,13 +629,12 @@
|
|
|
629
629
|
const handleClick = useCallback(() => router.back(), []);
|
|
630
630
|
const backwardButtonText = rest.options?.page?.common?.backwardButton;
|
|
631
631
|
const isBackBtn = backwardButton && !isMobile;
|
|
632
|
-
return (jsxs("div", { className: style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className), children: [isBackBtn && renderBackwardButton({ version, handleClick, text: backwardButtonText }), title ? jsx("div", { className: "relative
|
|
632
|
+
return (jsxs("div", { className: style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className), children: [isBackBtn && renderBackwardButton({ version, handleClick, text: backwardButtonText }), title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', {
|
|
633
633
|
'self-start @xl:w-auto': leftImage,
|
|
634
634
|
}), children: [renderImageContainer(leftImage, { imageAlign, className: 'mx-auto' }), jsxs("div", { className: style('grid gap-3xl items-center md:items-stretch', {
|
|
635
635
|
'@xl:grid-cols-2 auto-cols-fr': rightImage,
|
|
636
636
|
grow: !leftImage,
|
|
637
|
-
}, 'h-
|
|
638
|
-
'auto-rows-[max-content_1fr]'), children: [jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderUnitContainer(renderChildren({ ...rest, extraProps: { className: '@container-normal' } })), renderImageContainer(rightImage, {
|
|
637
|
+
}, 'h-auto'), children: [renderMiddleContent(insetTitle, children), renderUnitContainer(renderChildren({ ...rest, extraProps: { className: '@container-normal' } })), renderImageContainer(rightImage, {
|
|
639
638
|
className: style('@xl:justify-self-end @xl:col-start-2', {
|
|
640
639
|
[imageAlwaysOnRightContainerStyle(isImageAlwaysOnRight)]: buttons,
|
|
641
640
|
'col-start-2 self-center': isImageAlwaysOnRight,
|
|
@@ -644,6 +643,7 @@
|
|
|
644
643
|
imageAlign,
|
|
645
644
|
}), buttons ? jsx("div", { className: "self-end", children: buttons }) : null] })] })] }));
|
|
646
645
|
});
|
|
646
|
+
const renderMiddleContent = (insetTitle, children) => insetTitle || children ? (jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] })) : null;
|
|
647
647
|
const imageAlwaysOnRightContainerStyle = (isImage) => style(isImage ? 'row-span-2' : '@xl:row-span-2');
|
|
648
648
|
const renderUnitContainer = (childrenBlocks) => childrenBlocks?.length ? (jsx("div", { className: "flex items-start justify-end", children: childrenBlocks })) : null;
|
|
649
649
|
|
|
@@ -724,8 +724,15 @@
|
|
|
724
724
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
725
725
|
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true }));
|
|
726
726
|
const filteredBenefits = benefits?.filter((_) => '__html' in _ || 'label' in _ || 'description' in _);
|
|
727
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), backwardButton: backwardButton, ...rest, children:
|
|
727
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), backwardButton: backwardButton, ...rest, children: renderChildList(renderBenefits(filteredBenefits, { benefitsVersion, isTabularBenefits }), renderRichText(__html, { richVersion, isDotted, headlineVersion }), children, renderPriceList(priceList), renderTags(tags)) }));
|
|
728
728
|
});
|
|
729
|
+
const renderBenefits = (benefits, { benefitsVersion, isTabularBenefits, } = {}) => benefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: benefits })) : null;
|
|
730
|
+
const renderRichText = (__html, { richVersion, isDotted, headlineVersion, } = {}) => __html ? (jsx(RichText, { __html: __html, richVersion: richVersion, isDotted: isDotted, itemSize: RICHTEXT_SIZE[headlineVersion ?? 'L'] })) : null;
|
|
731
|
+
const renderPriceList = (priceList) => priceList?.length ? jsx(PriceList, { priceList: priceList }) : null;
|
|
732
|
+
const renderChildList = (...elements) => {
|
|
733
|
+
const cleanElements = elements.filter(Boolean);
|
|
734
|
+
return cleanElements.length ? (jsx("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: cleanElements.map((_, i) => (jsx("div", { children: _ }, String(i)))) })) : null;
|
|
735
|
+
};
|
|
729
736
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
730
737
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
731
738
|
|
|
@@ -2019,7 +2026,7 @@
|
|
|
2019
2026
|
|
|
2020
2027
|
const PhoneField = JSX(({ field, input }) => {
|
|
2021
2028
|
const fieldName = input?.name || 'phone';
|
|
2022
|
-
return jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...field(fieldName), ...input });
|
|
2029
|
+
return (jsx(InputPhoneControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", disabled: input?.filledByEsia && isEsiaAuthorize(field, input.name ?? ''), ...field(fieldName), ...input }));
|
|
2023
2030
|
});
|
|
2024
2031
|
|
|
2025
2032
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
@@ -2199,7 +2206,7 @@
|
|
|
2199
2206
|
function shouldRenderField({ input, field, }) {
|
|
2200
2207
|
const { condition } = input;
|
|
2201
2208
|
const { value } = field(condition?.name || '');
|
|
2202
|
-
return !condition || condition?.values?.
|
|
2209
|
+
return !condition || condition?.values?.includes(value?.key ?? value);
|
|
2203
2210
|
}
|
|
2204
2211
|
|
|
2205
2212
|
const PRODUCT_REF = {
|
|
@@ -2634,11 +2641,11 @@
|
|
|
2634
2641
|
{
|
|
2635
2642
|
columns: 2,
|
|
2636
2643
|
inputs: [
|
|
2637
|
-
{ name: 'surname', required: true, dadata: true },
|
|
2638
|
-
{ name: 'name', required: true, dadata: true },
|
|
2639
|
-
{ name: 'middleName', dadata: true },
|
|
2640
|
-
{ name: 'limitedBirthday', required: true },
|
|
2641
|
-
{ name: 'phone', required: true },
|
|
2644
|
+
{ name: 'surname', required: true, dadata: true, filledByEsia: true },
|
|
2645
|
+
{ name: 'name', required: true, dadata: true, filledByEsia: true },
|
|
2646
|
+
{ name: 'middleName', dadata: true, filledByEsia: true },
|
|
2647
|
+
{ name: 'limitedBirthday', required: true, filledByEsia: true },
|
|
2648
|
+
{ name: 'phone', required: true, filledByEsia: true },
|
|
2642
2649
|
{ name: 'email', required: true, dadata: true },
|
|
2643
2650
|
],
|
|
2644
2651
|
},
|
|
@@ -2648,6 +2655,58 @@
|
|
|
2648
2655
|
];
|
|
2649
2656
|
};
|
|
2650
2657
|
|
|
2658
|
+
const getTraceId = () => {
|
|
2659
|
+
const result = new Uint8Array(8);
|
|
2660
|
+
globalThis.crypto.getRandomValues(result);
|
|
2661
|
+
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
2662
|
+
};
|
|
2663
|
+
|
|
2664
|
+
const fetchRetailJSON = async (url, method, body) => {
|
|
2665
|
+
try {
|
|
2666
|
+
const response = await doRequest(url, method, body);
|
|
2667
|
+
return response.json();
|
|
2668
|
+
}
|
|
2669
|
+
catch (err) {
|
|
2670
|
+
console.error(err);
|
|
2671
|
+
return null;
|
|
2672
|
+
}
|
|
2673
|
+
};
|
|
2674
|
+
async function doRequest(url, method, body) {
|
|
2675
|
+
const traceId = getTraceId();
|
|
2676
|
+
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
2677
|
+
method,
|
|
2678
|
+
headers: {
|
|
2679
|
+
'Content-Type': 'application/json',
|
|
2680
|
+
'X-B3-Sampled': '1',
|
|
2681
|
+
'X-B3-Spanid': traceId,
|
|
2682
|
+
'X-B3-Traceid': traceId,
|
|
2683
|
+
...getAuthorizationHeaders(),
|
|
2684
|
+
},
|
|
2685
|
+
credentials: 'include',
|
|
2686
|
+
body: body ? JSON.stringify(body) : null,
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
const getAuthorizationHeaders = () => {
|
|
2690
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2691
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2692
|
+
};
|
|
2693
|
+
|
|
2694
|
+
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
2695
|
+
|
|
2696
|
+
const EsiaLoginBanner = JSX(() => {
|
|
2697
|
+
const navigator = locationNavigator();
|
|
2698
|
+
const handleAuth = useCallback(async () => {
|
|
2699
|
+
const resp = await getLink({
|
|
2700
|
+
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
2701
|
+
});
|
|
2702
|
+
if (resp?.link) {
|
|
2703
|
+
navigator.assign(resp.link);
|
|
2704
|
+
globalThis.location.href = resp.link;
|
|
2705
|
+
}
|
|
2706
|
+
}, []);
|
|
2707
|
+
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" })] }));
|
|
2708
|
+
});
|
|
2709
|
+
|
|
2651
2710
|
const debounce = (fn, delay = 600) => {
|
|
2652
2711
|
let timerId;
|
|
2653
2712
|
const debouncedCallback = (...args) => {
|
|
@@ -3534,42 +3593,6 @@
|
|
|
3534
3593
|
const mapByIndex = (points, index) => points.map((_) => _.coords?.[index]);
|
|
3535
3594
|
const getArraySumAndAverage = (arr) => arr.length && arr.reduce((a, b) => a + b) / arr.length;
|
|
3536
3595
|
|
|
3537
|
-
const getTraceId = () => {
|
|
3538
|
-
const result = new Uint8Array(8);
|
|
3539
|
-
globalThis.crypto.getRandomValues(result);
|
|
3540
|
-
return result.reduce((acc, _) => `${acc}${_.toString(16).padStart(2, '0')}`, '');
|
|
3541
|
-
};
|
|
3542
|
-
|
|
3543
|
-
const fetchRetailJSON = async (url, method, body) => {
|
|
3544
|
-
try {
|
|
3545
|
-
const response = await doRequest(url, method, body);
|
|
3546
|
-
return response.json();
|
|
3547
|
-
}
|
|
3548
|
-
catch (err) {
|
|
3549
|
-
console.error(err);
|
|
3550
|
-
return null;
|
|
3551
|
-
}
|
|
3552
|
-
};
|
|
3553
|
-
async function doRequest(url, method, body) {
|
|
3554
|
-
const traceId = getTraceId();
|
|
3555
|
-
return globalThis?.fetch?.(`${RETAIL_API_BASE_URI}${url}`, {
|
|
3556
|
-
method,
|
|
3557
|
-
headers: {
|
|
3558
|
-
'Content-Type': 'application/json',
|
|
3559
|
-
'X-B3-Sampled': '1',
|
|
3560
|
-
'X-B3-Spanid': traceId,
|
|
3561
|
-
'X-B3-Traceid': traceId,
|
|
3562
|
-
...getAuthorizationHeaders(),
|
|
3563
|
-
},
|
|
3564
|
-
credentials: 'include',
|
|
3565
|
-
body: body ? JSON.stringify(body) : null,
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
const getAuthorizationHeaders = () => {
|
|
3569
|
-
const token = sessionStorage.getItem('accessToken');
|
|
3570
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
3571
|
-
};
|
|
3572
|
-
|
|
3573
3596
|
const fetchRegionOffices = async (regionKey) => {
|
|
3574
3597
|
const response = await fetchRetailJSON('/public-data/regionOffices', 'POST', {
|
|
3575
3598
|
regionRfCd: {
|
|
@@ -5323,11 +5346,11 @@
|
|
|
5323
5346
|
}, []);
|
|
5324
5347
|
|
|
5325
5348
|
const getFamilyStatusAndIncomeData = (formData) => {
|
|
5326
|
-
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
5349
|
+
const { familyStatus, familyMembers, dependents, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, esiaAccountTypeCd, } = formData;
|
|
5327
5350
|
return {
|
|
5328
5351
|
maritalStatusCd: familyStatus,
|
|
5329
5352
|
totalDependents: familyMembers,
|
|
5330
|
-
incomeCertificateCd: confirmationIncome,
|
|
5353
|
+
incomeCertificateCd: esiaAccountTypeCd?.key ? { key: 'SFR_CERTIFICATE' } : confirmationIncome,
|
|
5331
5354
|
otherDependents: dependents,
|
|
5332
5355
|
childrenDependents: children,
|
|
5333
5356
|
militaryStatusCd: conscription,
|
|
@@ -5440,7 +5463,7 @@
|
|
|
5440
5463
|
const participant = task.participants[0];
|
|
5441
5464
|
const { classCard: cardCategory, codeWord, paymentSystemTypeCd: paymentSystem, currencyCode: currency, } = task;
|
|
5442
5465
|
const { loanAmount: moneyValue, creditPeriod: monthsValue, paymentTypeCd } = task;
|
|
5443
|
-
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, } = participant;
|
|
5466
|
+
const { birthDate: limitedBirthday, midname: middleName, name, surname, birthPlace, dulIssueDate: dulIssueDate, dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, educationLevelCd: education, registrationDate: participantDateRegistration, houseTypeCd: housing, genderCd, participantContacts = [], participantAddresses = [], employmentContractDate: beginDate, employmentTypeCd: employment, organizationName, organizationInn: inn, organizationActivityTypeCd: employerActivities, organizationTypeCd: organization, organizationKindCd: employerOrganization, employeesNumberCd: amountWorkers, opf: legalForm, seniority: generalSeniority, generalSeniority: experience5Years, jobsNumber, lastWorkDuration: lastJobExperience, positionCd: positionOrganization, maritalStatusCd: familyStatus, childrenDependents: children, totalDependents: familyMembers, otherDependents: dependents, militaryStatusCd: conscription, participantIncomes, snils, armyIdFlg, bankruptcyFlg, shareholderFlg, nameLegalEntity: legalEntityName, creditInRshbCd, payrollCardRshbFlg: isInsurance, consentInsuranceFlg: isSalaryClient, incomeCertificateCd, profile, } = participant;
|
|
5444
5467
|
return {
|
|
5445
5468
|
currency: currency?.key,
|
|
5446
5469
|
paymentSystem: getSelectValue(paymentSystem),
|
|
@@ -5492,6 +5515,7 @@
|
|
|
5492
5515
|
monthsValue,
|
|
5493
5516
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
5494
5517
|
},
|
|
5518
|
+
esiaAccountTypeCd: profile?.esiaAccountTypeCd,
|
|
5495
5519
|
...getParticipantIncomes(participantIncomes),
|
|
5496
5520
|
...getParticipantAddresses(participantAddresses),
|
|
5497
5521
|
...getParticipantContacts(participantContacts),
|
|
@@ -5546,39 +5570,6 @@
|
|
|
5546
5570
|
};
|
|
5547
5571
|
};
|
|
5548
5572
|
|
|
5549
|
-
const getLink = (body) => fetchRetailJSON('/esia/getLink', 'POST', body);
|
|
5550
|
-
|
|
5551
|
-
const EsiaLoginDialog = JSX(({ onClose }) => {
|
|
5552
|
-
const navigator = locationNavigator();
|
|
5553
|
-
const retailFormStore = useRetailFormStore();
|
|
5554
|
-
const handleAuth = useCallback(async () => {
|
|
5555
|
-
const resp = await getLink({
|
|
5556
|
-
redirectUri: globalThis.location.origin + globalThis.location.pathname,
|
|
5557
|
-
});
|
|
5558
|
-
if (resp?.link) {
|
|
5559
|
-
navigator.assign(resp.link);
|
|
5560
|
-
globalThis.location.href = resp.link;
|
|
5561
|
-
}
|
|
5562
|
-
}, []);
|
|
5563
|
-
const handleClose = useCallback(() => {
|
|
5564
|
-
if (retailFormStore.leadForm) {
|
|
5565
|
-
const leadForm = { ...retailFormStore.leadForm };
|
|
5566
|
-
delete leadForm.esiaAccountTypeCd;
|
|
5567
|
-
retailFormStore.leadForm = leadForm;
|
|
5568
|
-
}
|
|
5569
|
-
onClose?.();
|
|
5570
|
-
}, []);
|
|
5571
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex items-center justify-around w-full px-m", children: [jsxs("ul", { className: "list-disc", children: [jsx("li", { children: "\u0412\u0435\u0440\u043E\u044F\u0442\u043D\u043E\u0441\u0442\u044C \u043E\u0434\u043E\u0431\u0440\u0435\u043D\u0438\u044F \u0432\u044B\u0448\u0435" }), jsx("li", { children: "\u0411\u0435\u0437 \u0441\u043F\u0440\u0430\u0432\u043E\u043A \u043E \u0434\u043E\u0445\u043E\u0434\u0430\u0445 \u0438 \u0442\u0440\u0443\u0434\u043E\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435" }), jsx("li", { children: "\u0421 \u0437\u0430\u0449\u0438\u0442\u043E\u0439 \u0412\u0430\u0448\u0438\u0445 \u0434\u0430\u043D\u043D\u044B\u0445" })] }), jsx(Img, { image: { icon: 'GosUslugiIcon', iconVersion: 'normal' }, height: "70" })] }), jsxs("div", { className: "@container flex flex-wrap gap-lg w-full", children: [jsx(Button, { type: "button", onClick: handleAuth, className: "w-full md:w-auto", children: "\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0447\u0435\u0440\u0435\u0437 \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438" }), jsx(Button, { type: "button", version: "secondary", onClick: handleClose, className: "w-full md:w-auto", children: "\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C" })] })] }) }));
|
|
5572
|
-
});
|
|
5573
|
-
|
|
5574
|
-
const useEsiaLoginDialog = (nextStepLink) => {
|
|
5575
|
-
const { open } = useDialog(EsiaLoginDialog);
|
|
5576
|
-
const navigator = locationNavigator();
|
|
5577
|
-
return useCallback(() => {
|
|
5578
|
-
open({ onClose: () => navigator.assign(nextStepLink) });
|
|
5579
|
-
}, [open, nextStepLink]);
|
|
5580
|
-
};
|
|
5581
|
-
|
|
5582
5573
|
// TODO Не должно быть импортов из бизнес-слоя в API слой. Только наоборот.
|
|
5583
5574
|
const getUpdateUserProfileData = (profileId, formData, consents) => {
|
|
5584
5575
|
const { name = '', surname = '', middleName = '', limitedBirthday = '', phone = '', email = '', } = formData;
|
|
@@ -5700,21 +5691,19 @@
|
|
|
5700
5691
|
|
|
5701
5692
|
/* eslint-disable max-lines */
|
|
5702
5693
|
// eslint-disable-next-line max-lines-per-function
|
|
5703
|
-
const useApplicationLeadApi = ({ programId, nextStepLink, productType,
|
|
5694
|
+
const useApplicationLeadApi = ({ programId, nextStepLink, productType, data, }) => {
|
|
5704
5695
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5705
5696
|
const [ok, setOK] = useState();
|
|
5706
5697
|
const saveUserData = useSaveUserData();
|
|
5707
5698
|
const sendAspects = useSendLeadFormAspects({ data });
|
|
5708
5699
|
const navigator = locationNavigator();
|
|
5709
|
-
const
|
|
5710
|
-
|
|
5700
|
+
const goToNextStep = useCallback(() => {
|
|
5701
|
+
navigator.assign(nextStepLink);
|
|
5702
|
+
}, []);
|
|
5703
|
+
const consentBkiDialog = useConsentBkiDialog(goToNextStep);
|
|
5711
5704
|
const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
|
|
5712
5705
|
const draftDialog = useDraftDialog();
|
|
5713
5706
|
const handleSubmit = useCallback(async (formData) => {
|
|
5714
|
-
if (esiaError) {
|
|
5715
|
-
navigator.assign(nextStepLink);
|
|
5716
|
-
return;
|
|
5717
|
-
}
|
|
5718
5707
|
try {
|
|
5719
5708
|
startSending();
|
|
5720
5709
|
const profileId = await createUserProfile({
|
|
@@ -5732,7 +5721,7 @@
|
|
|
5732
5721
|
});
|
|
5733
5722
|
verifyPhoneDialog.close();
|
|
5734
5723
|
if (productType === 'debitCard') {
|
|
5735
|
-
|
|
5724
|
+
goToNextStep();
|
|
5736
5725
|
}
|
|
5737
5726
|
else {
|
|
5738
5727
|
consentBkiDialog.open(formData.phone, profileId);
|
|
@@ -5771,7 +5760,7 @@
|
|
|
5771
5760
|
catch {
|
|
5772
5761
|
setOK(false);
|
|
5773
5762
|
}
|
|
5774
|
-
}, [
|
|
5763
|
+
}, []);
|
|
5775
5764
|
return { isSending, ok, handleSubmit };
|
|
5776
5765
|
};
|
|
5777
5766
|
const getAcceptedConsents = (formData, productType) => {
|
|
@@ -5854,7 +5843,10 @@
|
|
|
5854
5843
|
}
|
|
5855
5844
|
}, [target, key]);
|
|
5856
5845
|
|
|
5857
|
-
const
|
|
5846
|
+
const esiaRequestProfile = (body) => fetchRetailJSON('/esia/requestProfile', 'POST', body).then((res) => {
|
|
5847
|
+
saveToken(res);
|
|
5848
|
+
return res;
|
|
5849
|
+
});
|
|
5858
5850
|
|
|
5859
5851
|
const initialFormState = {
|
|
5860
5852
|
surname: '',
|
|
@@ -5872,19 +5864,24 @@
|
|
|
5872
5864
|
consentPhotoFlg: false,
|
|
5873
5865
|
consentFATCA: false,
|
|
5874
5866
|
};
|
|
5875
|
-
const getInitialFormState$1 = (inputs, savedForm) => {
|
|
5867
|
+
const getInitialFormState$1 = (inputs, savedForm, esiaAuthSuccess) => {
|
|
5876
5868
|
if (savedForm) {
|
|
5877
|
-
return {
|
|
5869
|
+
return {
|
|
5870
|
+
...savedForm,
|
|
5871
|
+
limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
|
|
5872
|
+
...(!esiaAuthSuccess && {
|
|
5873
|
+
esiaAccountTypeCd: { key: '' },
|
|
5874
|
+
}),
|
|
5875
|
+
};
|
|
5878
5876
|
}
|
|
5879
5877
|
const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
|
|
5880
5878
|
return { ...formState };
|
|
5881
5879
|
};
|
|
5882
5880
|
|
|
5883
|
-
const uploadFile = async (file,
|
|
5881
|
+
const uploadFile = async (file, documentCategory, isPDF = false) => {
|
|
5884
5882
|
const fd = new FormData();
|
|
5885
|
-
fd.append('taskId', taskId);
|
|
5886
5883
|
fd.append('documentCategory', documentCategory);
|
|
5887
|
-
fd.append('file', file, '
|
|
5884
|
+
fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
|
|
5888
5885
|
const res = await globalThis
|
|
5889
5886
|
?.fetch?.(`/light-api-cash/v1/file`, {
|
|
5890
5887
|
method: 'POST',
|
|
@@ -5898,23 +5895,46 @@
|
|
|
5898
5895
|
return res;
|
|
5899
5896
|
};
|
|
5900
5897
|
|
|
5901
|
-
const parseEsiaProfile = async (esiaProfile,
|
|
5898
|
+
const parseEsiaProfile = async (esiaProfile, isDebit) => {
|
|
5902
5899
|
isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
|
|
5903
5900
|
const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } = esiaProfile;
|
|
5904
|
-
|
|
5901
|
+
let files = [];
|
|
5905
5902
|
if (!isDebit) {
|
|
5906
|
-
await
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5903
|
+
files = await saveDocuments([
|
|
5904
|
+
{
|
|
5905
|
+
file: esiaAdditionalDocument.pdfFileWorkbook,
|
|
5906
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5907
|
+
isPDF: true,
|
|
5908
|
+
},
|
|
5909
|
+
{
|
|
5910
|
+
file: esiaAdditionalDocument.pdfFilePayout,
|
|
5911
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5912
|
+
isPDF: true,
|
|
5913
|
+
},
|
|
5914
|
+
{
|
|
5915
|
+
file: esiaAdditionalDocument.pdfFileSigPayout,
|
|
5916
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5917
|
+
isPDF: true,
|
|
5918
|
+
},
|
|
5919
|
+
{
|
|
5920
|
+
file: esiaAdditionalDocument.xmlFilePayout,
|
|
5921
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5922
|
+
isPDF: false,
|
|
5923
|
+
},
|
|
5924
|
+
{
|
|
5925
|
+
file: esiaAdditionalDocument.xmlFileSigPayout,
|
|
5926
|
+
category: 'CONFIRMING_EMPLOYMENT_DOC',
|
|
5927
|
+
isPDF: false,
|
|
5928
|
+
},
|
|
5929
|
+
{
|
|
5930
|
+
file: esiaAdditionalDocument.xmlFileWorkbook,
|
|
5931
|
+
category: 'CONFIRMING_INCOME_DOC',
|
|
5932
|
+
isPDF: false,
|
|
5933
|
+
},
|
|
5934
|
+
//TODO: После тестирования добавить документы снизу
|
|
5935
|
+
// {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
|
|
5936
|
+
// {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
|
|
5937
|
+
]);
|
|
5918
5938
|
}
|
|
5919
5939
|
const mainData = {
|
|
5920
5940
|
name: profile.name,
|
|
@@ -5976,11 +5996,16 @@
|
|
|
5976
5996
|
};
|
|
5977
5997
|
};
|
|
5978
5998
|
const getYearFromMonth = (month) => Math.floor(month / 12);
|
|
5979
|
-
const
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
.
|
|
5983
|
-
|
|
5999
|
+
const saveDocuments = async (documents) => {
|
|
6000
|
+
const files = [];
|
|
6001
|
+
for (const doc of documents) {
|
|
6002
|
+
const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
|
|
6003
|
+
await fetch(`${contentType},${doc.file}`)
|
|
6004
|
+
.then((res) => res.blob())
|
|
6005
|
+
.then((value) => uploadFile(value, doc.category, doc.isPDF))
|
|
6006
|
+
.then((file) => files.push(file));
|
|
6007
|
+
}
|
|
6008
|
+
return files;
|
|
5984
6009
|
};
|
|
5985
6010
|
const checkEsiaDataForCredit = (esiaProfile) => {
|
|
5986
6011
|
const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
|
|
@@ -6007,6 +6032,13 @@
|
|
|
6007
6032
|
esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
|
|
6008
6033
|
esiaAdditionalDocument.pdfFilePayout,
|
|
6009
6034
|
esiaAdditionalDocument.pdfFileWorkbook,
|
|
6035
|
+
esiaAdditionalDocument.pdfFileSigPayout,
|
|
6036
|
+
esiaAdditionalDocument.xmlFilePayout,
|
|
6037
|
+
esiaAdditionalDocument.xmlFileSigPayout,
|
|
6038
|
+
esiaAdditionalDocument.xmlFileWorkbook,
|
|
6039
|
+
//TODO: После тестирования добавить документы снизу
|
|
6040
|
+
// esiaAdditionalDocument.pdfFileSigWorkbook,
|
|
6041
|
+
// esiaAdditionalDocument.xmlFileSigWorkbook
|
|
6010
6042
|
];
|
|
6011
6043
|
if (!data.every((_) => Boolean(_))) {
|
|
6012
6044
|
throw new Error();
|
|
@@ -6034,29 +6066,28 @@
|
|
|
6034
6066
|
}
|
|
6035
6067
|
};
|
|
6036
6068
|
|
|
6037
|
-
const useInitApplicationLead = ({ inputs,
|
|
6038
|
-
const navigator = locationNavigator();
|
|
6069
|
+
const useInitApplicationLead = ({ inputs, productType, setEsiaError, setEsiaAuthSuccess, esiaAuthSuccess, }) => {
|
|
6039
6070
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
6040
6071
|
const leadFormStore = useLeadFormStore();
|
|
6041
6072
|
const saveForm = useSetter(leadFormStore, 'leadForm');
|
|
6042
|
-
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm), [inputs, leadFormStore.leadForm]);
|
|
6043
|
-
const
|
|
6073
|
+
const initialFormState = useMemo(() => getInitialFormState$1(inputs, leadFormStore.leadForm, esiaAuthSuccess), [inputs, leadFormStore.leadForm]);
|
|
6074
|
+
const requestEsiaProfile = useCallback(async (code, state) => {
|
|
6044
6075
|
startLoading();
|
|
6045
6076
|
try {
|
|
6046
|
-
const data = await
|
|
6047
|
-
profileId,
|
|
6077
|
+
const data = await esiaRequestProfile({
|
|
6048
6078
|
code,
|
|
6049
6079
|
state,
|
|
6050
6080
|
redirectUri: globalThis.location?.href,
|
|
6081
|
+
authorize: true,
|
|
6051
6082
|
});
|
|
6052
|
-
if (data
|
|
6053
|
-
const parsedData = await parseEsiaProfile(data,
|
|
6083
|
+
if (data) {
|
|
6084
|
+
const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
|
|
6054
6085
|
saveForm((_) => ({
|
|
6055
6086
|
..._,
|
|
6056
6087
|
...parsedData,
|
|
6057
6088
|
}));
|
|
6089
|
+
setEsiaAuthSuccess();
|
|
6058
6090
|
}
|
|
6059
|
-
navigator.assign(nextStepLink);
|
|
6060
6091
|
}
|
|
6061
6092
|
catch {
|
|
6062
6093
|
setEsiaError();
|
|
@@ -6064,15 +6095,14 @@
|
|
|
6064
6095
|
finally {
|
|
6065
6096
|
endLoading();
|
|
6066
6097
|
}
|
|
6067
|
-
}, [
|
|
6098
|
+
}, []);
|
|
6068
6099
|
useEffect(() => {
|
|
6069
6100
|
leadFormStore.productType = productType;
|
|
6070
|
-
const profileId = (safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? ''));
|
|
6071
6101
|
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
6072
6102
|
const code = params.get('code');
|
|
6073
6103
|
const state = params.get('state');
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6104
|
+
if (code && state) {
|
|
6105
|
+
requestEsiaProfile(code, state);
|
|
6076
6106
|
}
|
|
6077
6107
|
else {
|
|
6078
6108
|
sessionStorage.removeItem('accessToken');
|
|
@@ -6084,6 +6114,7 @@
|
|
|
6084
6114
|
|
|
6085
6115
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, productType = 'credit', data, ...rest }) => {
|
|
6086
6116
|
const [esiaError, { setTrue: setEsiaError }] = useBool(false);
|
|
6117
|
+
const [esiaAuthSuccess, { setTrue: setEsiaAuthSuccess }] = useBool(false);
|
|
6087
6118
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
6088
6119
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
6089
6120
|
const formValidator = useMemo(() => getFormValidator(inputs, validatorObj), [inputs]);
|
|
@@ -6092,15 +6123,17 @@
|
|
|
6092
6123
|
nextStepLink,
|
|
6093
6124
|
productType,
|
|
6094
6125
|
setEsiaError,
|
|
6126
|
+
setEsiaAuthSuccess,
|
|
6127
|
+
esiaAuthSuccess,
|
|
6095
6128
|
});
|
|
6096
6129
|
const { isSending, ok, handleSubmit } = useApplicationLeadApi({
|
|
6097
6130
|
programId,
|
|
6098
6131
|
nextStepLink,
|
|
6099
6132
|
productType,
|
|
6100
|
-
|
|
6133
|
+
esiaAuthSuccess,
|
|
6101
6134
|
data,
|
|
6102
6135
|
});
|
|
6103
|
-
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
6136
|
+
const [, { field, onSubmit, reset }] = useForm(initialFormState, {
|
|
6104
6137
|
formValidator,
|
|
6105
6138
|
onSubmit: handleSubmit,
|
|
6106
6139
|
});
|
|
@@ -6110,7 +6143,12 @@
|
|
|
6110
6143
|
responseTypeDialog.open({ ok });
|
|
6111
6144
|
}
|
|
6112
6145
|
}, [ok]);
|
|
6113
|
-
|
|
6146
|
+
useEffect(() => {
|
|
6147
|
+
if (initialFormState?.esiaAccountTypeCd) {
|
|
6148
|
+
reset();
|
|
6149
|
+
}
|
|
6150
|
+
}, [initialFormState]);
|
|
6151
|
+
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [!esiaAuthSuccess && !esiaError ? jsx(EsiaLoginBanner, {}) : null, jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs }, productType)] }, `section-${i}`))), renderSubmitButton(button, isSending), esiaError ? (jsx(Text, { size: "text-m", font: "font-medium", color: "text-error", children: "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0413\u043E\u0441\u0443\u0441\u043B\u0443\u0433\u0438 \u0434\u043B\u044F \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043F\u043E\u043B\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E." })) : null] })] }));
|
|
6114
6152
|
});
|
|
6115
6153
|
|
|
6116
6154
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7355,7 +7393,7 @@
|
|
|
7355
7393
|
black: 'bg-black',
|
|
7356
7394
|
white: 'bg-white',
|
|
7357
7395
|
};
|
|
7358
|
-
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
|
|
7396
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align, className: "min-h-24" }), rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
|
|
7359
7397
|
const renderColorOption = (color, i) => (jsx("figure", { className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
7360
7398
|
|
|
7361
7399
|
const CarouselLinkButton = JSX(({ icon, ...linkProps }) => {
|
|
@@ -7803,6 +7841,7 @@
|
|
|
7803
7841
|
mandatoryPayments: undefined,
|
|
7804
7842
|
snils: '',
|
|
7805
7843
|
armyIdFlg: false,
|
|
7844
|
+
esiaAccountTypeCd: { key: '', text: '' },
|
|
7806
7845
|
},
|
|
7807
7846
|
{
|
|
7808
7847
|
bankruptcyFlg: false,
|
|
@@ -8244,7 +8283,16 @@
|
|
|
8244
8283
|
},
|
|
8245
8284
|
{
|
|
8246
8285
|
columns: 1,
|
|
8247
|
-
inputs: [
|
|
8286
|
+
inputs: [
|
|
8287
|
+
{
|
|
8288
|
+
name: 'confirmationIncome',
|
|
8289
|
+
required: true,
|
|
8290
|
+
condition: {
|
|
8291
|
+
name: 'esiaAccountTypeCd',
|
|
8292
|
+
values: [''],
|
|
8293
|
+
},
|
|
8294
|
+
},
|
|
8295
|
+
],
|
|
8248
8296
|
},
|
|
8249
8297
|
{
|
|
8250
8298
|
columns: 1,
|
|
@@ -9269,6 +9317,77 @@
|
|
|
9269
9317
|
return (jsxs(BlockWrapper, { tag: "footer", className: style('grid gap-y-xl p-4xl pb-24 lg:p-xl', className), ...rest, children: [renderLogoSearchBar(), jsxs("div", { className: "flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ", children: [jsx(Sitemap, { navigationItems: navigationItems }), jsx("div", { className: "border-t border-main-divider lg:hidden w-full" }), jsxs("div", { className: style(LEFT_COLUMN_STYLE, 'flex flex-col shrink-0 overflow-hidden space-y-xl'), children: [jsx(Contacts, { items: contacts }), feedbackButton ? (jsx(LinkButton, { className: "w-full", version: "primary", ...feedbackButton })) : null, mediaLinks.map((_, i) => (jsx(SocialMedia, { media: _?.links ?? [], showButtonText: false, stretched: true, children: _?.title }, String(i)))), otherLinks.map((_, i) => (jsx(Link, { className: "text-s font-light", ..._ }, `${_.href}_${i}`)))] })] }), jsx(HorizontalNavigation, { title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, { links: documents, license: license })] }));
|
|
9270
9318
|
});
|
|
9271
9319
|
|
|
9320
|
+
const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
|
|
9321
|
+
|
|
9322
|
+
const gapStyles = {
|
|
9323
|
+
XXL: 'gap-6xl',
|
|
9324
|
+
XL: 'gap-5xl',
|
|
9325
|
+
L: 'gap-3xl',
|
|
9326
|
+
M: 'gap-m',
|
|
9327
|
+
S: 'gap-xs',
|
|
9328
|
+
XS: 'gap-2xs',
|
|
9329
|
+
'': '',
|
|
9330
|
+
};
|
|
9331
|
+
|
|
9332
|
+
const MIN_LENGTH_CHILD = 5;
|
|
9333
|
+
const SHORT_TILE_INDEXES = [1, 2, 3, 4];
|
|
9334
|
+
const LINK_SCHEMA = {
|
|
9335
|
+
link: {
|
|
9336
|
+
allOf: [
|
|
9337
|
+
{ $ref: `#/definitions/LinkCommonProps` },
|
|
9338
|
+
{
|
|
9339
|
+
type: 'object',
|
|
9340
|
+
properties: {
|
|
9341
|
+
data: {
|
|
9342
|
+
type: 'array',
|
|
9343
|
+
items: { $ref: '#/definitions/AspectsDef' },
|
|
9344
|
+
title: 'Дополнительные атрибуты',
|
|
9345
|
+
},
|
|
9346
|
+
},
|
|
9347
|
+
},
|
|
9348
|
+
],
|
|
9349
|
+
title: 'Ссылка',
|
|
9350
|
+
required: ['href'],
|
|
9351
|
+
},
|
|
9352
|
+
};
|
|
9353
|
+
const GalleryLayout = UniBlock(({ className = '', padding = 'p-0', gap = '', isInnerPadding = true, version = 'transparent', isTheme = false, isCardBorder = false, ...rest }) => (jsx(BlockWrapper, { className: style('grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-4 lg:auto-rows-fr', gapStyles[gap], className), padding: padding, version: version, isTheme: isTheme, ...rest, children: renderChildren({
|
|
9354
|
+
...rest,
|
|
9355
|
+
renderProps: getRenderProps({ isInnerPadding, isCardBorder }),
|
|
9356
|
+
}) })), {
|
|
9357
|
+
childrenTypes: ['ProductBlock'],
|
|
9358
|
+
childSchema: () => LINK_SCHEMA,
|
|
9359
|
+
allowRemoveChild: (slot) => (slot?.blocks ?? []).length > MIN_LENGTH_CHILD,
|
|
9360
|
+
});
|
|
9361
|
+
const getRenderProps = ({ isInnerPadding, isCardBorder, }) => (childBlock, childOptions, i) => renderBlock$1(childBlock, {
|
|
9362
|
+
...childOptions,
|
|
9363
|
+
blockDecorator: blockDecoratorWrapper(childOptions.blockDecorator, i),
|
|
9364
|
+
}, {
|
|
9365
|
+
className: style('w-full', getBorderStyle(isCardBorder)),
|
|
9366
|
+
...getInnerPadding(isInnerPadding),
|
|
9367
|
+
});
|
|
9368
|
+
const blockDecoratorWrapper = (blockDecorator, idx = 0) => (props, i) => blockDecorator?.({
|
|
9369
|
+
...props,
|
|
9370
|
+
render: (renderProps) => productBlockDecorator(idx)({ ...props, ...renderProps }, i),
|
|
9371
|
+
}, `wrap_${i}`) ?? productBlockDecorator(idx)(props, i);
|
|
9372
|
+
const productBlockDecorator = (idx) => ({ blockClassName, block, render }, i) => (jsx(LinkWrapper, { ...block.content?.link, className: getChildStyle(idx), children: render({
|
|
9373
|
+
blockClassName: style(blockClassName, 'h-full'),
|
|
9374
|
+
block: modifyBlock(block, idx),
|
|
9375
|
+
}) }, i));
|
|
9376
|
+
const getChildStyle = (index) => SHORT_TILE_INDEXES.includes(index)
|
|
9377
|
+
? 'lg:col-span-1 lg:row-span-1'
|
|
9378
|
+
: 'lg:col-span-2 lg:row-span-2';
|
|
9379
|
+
const modifyBlock = (block, i) => {
|
|
9380
|
+
const content = { ...block.content };
|
|
9381
|
+
if (SHORT_TILE_INDEXES.includes(i)) {
|
|
9382
|
+
delete content.description;
|
|
9383
|
+
delete content.benefits;
|
|
9384
|
+
}
|
|
9385
|
+
if (content.link?.href) {
|
|
9386
|
+
delete content.buttons;
|
|
9387
|
+
}
|
|
9388
|
+
return { ...block, content };
|
|
9389
|
+
};
|
|
9390
|
+
|
|
9272
9391
|
const GrantSupport = UniBlock(({ className, title, button, regionSource, data, ...rest }) => {
|
|
9273
9392
|
const [region, setRegion] = useState({ key: '' });
|
|
9274
9393
|
const regions = regionSource?.regions ?? [];
|
|
@@ -9387,18 +9506,6 @@
|
|
|
9387
9506
|
return (jsx(BlockWrapper, { tag: "header", defaultPadding: "", version: version, ...rest, children: jsx("div", { className: "container px-lg py-2xs box-border", children: jsx(HeaderTop, { bgColor: bgColor, logo: logoProps, alwaysShowLogo: alwaysShowLogo, internetBankButton: internetBankButton, version: version, backwardButton: backwardButton, ...rest }) }) }));
|
|
9388
9507
|
});
|
|
9389
9508
|
|
|
9390
|
-
const getInnerPadding = (isPadding = false) => isPadding ? {} : { padding: 'p-0' };
|
|
9391
|
-
|
|
9392
|
-
const gapStyles = {
|
|
9393
|
-
XXL: 'gap-6xl',
|
|
9394
|
-
XL: 'gap-5xl',
|
|
9395
|
-
L: 'gap-3xl',
|
|
9396
|
-
M: 'gap-m',
|
|
9397
|
-
S: 'gap-xs',
|
|
9398
|
-
XS: 'gap-2xs',
|
|
9399
|
-
'': '',
|
|
9400
|
-
};
|
|
9401
|
-
|
|
9402
9509
|
const VerticalLayout = UniBlock(({ className = '', padding = 'p-0', gap = '', isInnerPadding = true, version = 'transparent', isTheme = false, isCardBorder = false, image, ...rest }) => {
|
|
9403
9510
|
const router = useRouter();
|
|
9404
9511
|
return (jsx(BlockWrapper, { className: style('relative flex flex-col', gapStyles[gap], image?.src ? 'bg-right-bottom bg-no-repeat' : '', className), ...(image?.src
|
|
@@ -10619,6 +10726,7 @@
|
|
|
10619
10726
|
ErrorBlock,
|
|
10620
10727
|
ExchangeRateTile,
|
|
10621
10728
|
Footer,
|
|
10729
|
+
GalleryLayout,
|
|
10622
10730
|
GrantSupport,
|
|
10623
10731
|
Header,
|
|
10624
10732
|
Headline,
|
|
@@ -10766,7 +10874,7 @@
|
|
|
10766
10874
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10767
10875
|
});
|
|
10768
10876
|
|
|
10769
|
-
const packageVersion = "0.14.
|
|
10877
|
+
const packageVersion = "0.14.814";
|
|
10770
10878
|
|
|
10771
10879
|
exports.Blocks = Blocks;
|
|
10772
10880
|
exports.ContentPage = ContentPage;
|