@redneckz/wildless-cms-uni-blocks 0.12.12 → 0.12.13
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/bin/migration-scripts/0.12.10.js +59 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +90 -66
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/bundle/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/bundle/components/Carousel/Carousel.d.ts +1 -1
- package/bundle/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/bundle/components/Footer/Contacts.d.ts +0 -1
- package/bundle/components/Footer/MediaButton.d.ts +1 -1
- package/bundle/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/bundle/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
- package/bundle/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +16 -14
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +22 -0
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js +17 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -0
- package/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/dist/components/Bonus/Bonus.js +10 -13
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +3 -3
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +1 -1
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/dist/components/CarouselLinks/CarouselLinks.js +7 -8
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +2 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Footer/Contacts.d.ts +0 -1
- package/dist/components/Footer/Contacts.js +3 -4
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/Footer.js +2 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +4 -3
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/dist/components/Footer/MediaButton.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.js +2 -1
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/dist/components/Footer/buttonSizeStyles.js +7 -0
- package/dist/components/Footer/buttonSizeStyles.js.map +1 -0
- package/dist/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
- package/dist/components/Footer/buttonSizeStyles.mobile.js +7 -0
- package/dist/components/Footer/buttonSizeStyles.mobile.js.map +1 -0
- package/dist/components/Footer/buttonStylesWithText.js +2 -5
- package/dist/components/Footer/buttonStylesWithText.js.map +1 -1
- package/dist/components/MobileAppTile/renderDescription.js +1 -1
- package/dist/components/MobileAppTile/renderDescription.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +1 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/dist/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
- package/dist/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
- package/dist/ui-kit/LinkButton/LinkButton.js +4 -3
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/dist/ui-kit/LinkList/LinkList.js +2 -2
- package/dist/ui-kit/LinkList/LinkList.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.fixture.mobile.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationForm.js +16 -14
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +20 -0
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js +15 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -0
- package/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/lib/components/Bonus/Bonus.fixture.mobile.d.ts +8 -0
- package/lib/components/Bonus/Bonus.js +10 -13
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +3 -3
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Carousel/Carousel.d.ts +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/lib/components/CarouselLinks/CarouselLinks.fixture.mobile.d.ts +6 -0
- package/lib/components/CarouselLinks/CarouselLinks.js +7 -8
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +2 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Footer/Contacts.d.ts +0 -1
- package/lib/components/Footer/Contacts.js +3 -4
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Footer.js +2 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +4 -3
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/lib/components/Footer/MediaButton.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.js +2 -1
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/lib/components/Footer/buttonSizeStyles.js +5 -0
- package/lib/components/Footer/buttonSizeStyles.js.map +1 -0
- package/lib/components/Footer/buttonSizeStyles.mobile.d.ts +4 -0
- package/lib/components/Footer/buttonSizeStyles.mobile.js +5 -0
- package/lib/components/Footer/buttonSizeStyles.mobile.js.map +1 -0
- package/lib/components/Footer/buttonStylesWithText.js +1 -4
- package/lib/components/Footer/buttonStylesWithText.js.map +1 -1
- package/lib/components/MobileAppTile/renderDescription.js +1 -1
- package/lib/components/MobileAppTile/renderDescription.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +1 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/lib/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
- package/lib/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
- package/lib/ui-kit/LinkButton/LinkButton.fixture.mobile.d.ts +6 -0
- package/lib/ui-kit/LinkButton/LinkButton.js +4 -3
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/ui-kit/LinkList/LinkList.js +2 -2
- package/lib/ui-kit/LinkList/LinkList.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +65 -37
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/mobile/bundle/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -1
- package/mobile/bundle/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/mobile/bundle/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/mobile/bundle/components/Footer/Contacts.d.ts +0 -1
- package/mobile/bundle/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/bundle/components/Footer/SocialMedia.d.ts +4 -2
- package/mobile/bundle/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/mobile/bundle/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +16 -14
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +22 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +17 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -0
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +10 -13
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +3 -3
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.d.ts +1 -1
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +7 -8
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/mobile/dist/components/ContentPage/ContentPage.js +2 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.d.ts +0 -1
- package/mobile/dist/components/Footer/Contacts.js +3 -4
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +4 -3
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/dist/components/Footer/SocialMedia.d.ts +4 -2
- package/mobile/dist/components/Footer/SocialMedia.js +3 -1
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/mobile/dist/components/Footer/buttonSizeStyles.js +7 -0
- package/mobile/dist/components/Footer/buttonSizeStyles.js.map +1 -0
- package/mobile/dist/components/Footer/buttonStylesWithText.js +2 -5
- package/mobile/dist/components/Footer/buttonStylesWithText.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/renderDescription.js +1 -1
- package/mobile/dist/components/MobileAppTile/renderDescription.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
- package/mobile/dist/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +4 -3
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/dist/ui-kit/LinkList/LinkList.js +2 -2
- package/mobile/dist/ui-kit/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +16 -14
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +52 -6
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +20 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +8 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +15 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -0
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +10 -13
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +4 -4
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +3 -3
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.d.ts +1 -1
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +2 -2
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.d.ts +1 -0
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +7 -8
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinksContent.d.ts +2 -0
- package/mobile/lib/components/ContentPage/ContentPage.js +2 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.d.ts +0 -1
- package/mobile/lib/components/Footer/Contacts.js +3 -4
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +4 -3
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/lib/components/Footer/SocialMedia.d.ts +4 -2
- package/mobile/lib/components/Footer/SocialMedia.js +4 -2
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Footer/buttonSizeStyles.d.ts +4 -0
- package/mobile/lib/components/Footer/buttonSizeStyles.js +5 -0
- package/mobile/lib/components/Footer/buttonSizeStyles.js.map +1 -0
- package/mobile/lib/components/Footer/buttonStylesWithText.js +1 -4
- package/mobile/lib/components/Footer/buttonStylesWithText.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/renderDescription.js +1 -1
- package/mobile/lib/components/MobileAppTile/renderDescription.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.d.ts +7 -0
- package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.js +2 -0
- package/mobile/lib/services/regionsGrantSupport/RegionsGrantSupportData.js.map +1 -0
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +4 -3
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/ui-kit/LinkList/LinkList.js +2 -2
- package/mobile/lib/ui-kit/LinkList/LinkList.js.map +1 -1
- package/mobile/src/common.css +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +31 -19
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +12 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +70 -11
- package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +51 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -0
- package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +15 -0
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/mobile/src/components/Bonus/Bonus.tsx +33 -28
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -6
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +3 -3
- package/mobile/src/components/Carousel/Carousel.tsx +5 -3
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +10 -3
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +25 -14
- package/mobile/src/components/CarouselLinks/CarouselLinksContent.ts +2 -0
- package/mobile/src/components/ContentPage/ContentPage.tsx +3 -3
- package/mobile/src/components/Footer/Contacts.tsx +15 -19
- package/mobile/src/components/Footer/Footer.tsx +27 -13
- package/mobile/src/components/Footer/HorizontalNavigation.tsx +10 -3
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +22 -9
- package/mobile/src/components/Footer/TextInformation.tsx +2 -2
- package/mobile/src/components/Footer/buttonSizeStyles.ts +6 -0
- package/mobile/src/components/Footer/buttonStylesWithText.ts +1 -5
- package/mobile/src/components/MobileAppTile/renderDescription.tsx +1 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +1 -1
- package/mobile/src/services/regionsGrantSupport/RegionsGrantSupportData.ts +8 -0
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +22 -9
- package/mobile/src/ui-kit/LinkList/LinkList.tsx +3 -3
- package/package.json +1 -1
- package/src/common.css +1 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +41 -7
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +41 -7
- package/src/components/ApplicationForm/ApplicationForm.tsx +31 -19
- package/src/components/ApplicationForm/ApplicationForm.ui.json +12 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +70 -11
- package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +51 -0
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +1 -0
- package/src/components/ApplicationForm/EmbeddableForms.tsx +15 -0
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +1 -1
- package/src/components/Bonus/Bonus.fixture.mobile.tsx +72 -0
- package/src/components/Bonus/Bonus.tsx +33 -28
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -6
- package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/src/components/Calculator/DepositCalculatorForm.tsx +3 -3
- package/src/components/Carousel/Carousel.tsx +5 -3
- package/src/components/Carousel/CarouselScrollButtons.tsx +10 -3
- package/src/components/CarouselLinks/CarouselLinks.fixture.mobile.tsx +34 -0
- package/src/components/CarouselLinks/CarouselLinks.fixture.tsx +3 -0
- package/src/components/CarouselLinks/CarouselLinks.tsx +25 -14
- package/src/components/CarouselLinks/CarouselLinksContent.ts +2 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -1
- package/src/components/ContentPage/ContentPage.tsx +3 -3
- package/src/components/Footer/Contacts.tsx +15 -19
- package/src/components/Footer/Footer.mobile.tsx +27 -13
- package/src/components/Footer/Footer.tsx +6 -8
- package/src/components/Footer/HorizontalNavigation.mobile.tsx +10 -3
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +9 -6
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/Footer/buttonSizeStyles.mobile.ts +6 -0
- package/src/components/Footer/buttonSizeStyles.ts +6 -0
- package/src/components/Footer/buttonStylesWithText.ts +1 -5
- package/src/components/MobileAppTile/renderDescription.tsx +1 -1
- package/src/components/RollupItem/RollupItem.tsx +1 -1
- package/src/services/regionsGrantSupport/RegionsGrantSupportData.ts +8 -0
- package/src/ui-kit/LinkButton/LinkButton.fixture.mobile.tsx +11 -0
- package/src/ui-kit/LinkButton/LinkButton.fixture.tsx +1 -1
- package/src/ui-kit/LinkButton/LinkButton.tsx +22 -9
- package/src/ui-kit/LinkList/LinkList.tsx +3 -3
- package/tailwind.config.cjs +5 -5
- package/bundle/components/Footer/SocialMedia.mobile.d.ts +0 -6
- package/bundle/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
- package/dist/components/Footer/SocialMedia.mobile.d.ts +0 -6
- package/dist/components/Footer/SocialMedia.mobile.js +0 -7
- package/dist/components/Footer/SocialMedia.mobile.js.map +0 -1
- package/dist/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
- package/dist/components/Footer/buttonStylesWithText.mobile.js +0 -12
- package/dist/components/Footer/buttonStylesWithText.mobile.js.map +0 -1
- package/lib/components/Footer/SocialMedia.mobile.d.ts +0 -6
- package/lib/components/Footer/SocialMedia.mobile.js +0 -5
- package/lib/components/Footer/SocialMedia.mobile.js.map +0 -1
- package/lib/components/Footer/buttonStylesWithText.mobile.d.ts +0 -2
- package/lib/components/Footer/buttonStylesWithText.mobile.js +0 -9
- package/lib/components/Footer/buttonStylesWithText.mobile.js.map +0 -1
- package/src/components/Footer/SocialMedia.mobile.tsx +0 -16
- package/src/components/Footer/buttonStylesWithText.mobile.ts +0 -15
|
@@ -9,11 +9,18 @@ export interface HorizontalNavigationProps extends FooterLink, TitleProps {}
|
|
|
9
9
|
export const HorizontalNavigation = JSX<HorizontalNavigationProps>(
|
|
10
10
|
({ title, links, className = '' }) => (
|
|
11
11
|
<div className={className}>
|
|
12
|
-
<Text size="text-
|
|
12
|
+
<Text size="text-l" font="font-normal">
|
|
13
|
+
{title}
|
|
14
|
+
</Text>
|
|
13
15
|
{links?.length ? (
|
|
14
|
-
<div className="flex flex-col gap-
|
|
16
|
+
<div className="flex flex-col gap-lg mt-lg">
|
|
15
17
|
{links.map((_, i) => (
|
|
16
|
-
<HorizontalNavigationLink
|
|
18
|
+
<HorizontalNavigationLink
|
|
19
|
+
className="text-l font-light"
|
|
20
|
+
key={String(i)}
|
|
21
|
+
index={i}
|
|
22
|
+
{..._}
|
|
23
|
+
/>
|
|
17
24
|
))}
|
|
18
25
|
</div>
|
|
19
26
|
) : null}
|
|
@@ -7,7 +7,7 @@ import { style } from '../../utils/style';
|
|
|
7
7
|
import { buttonStylesWithText } from './buttonStylesWithText';
|
|
8
8
|
import { findIconByHref } from './findIconByHref';
|
|
9
9
|
|
|
10
|
-
export type ButtonSize = 'default' | '
|
|
10
|
+
export type ButtonSize = 'default' | 'stretched';
|
|
11
11
|
|
|
12
12
|
interface MediaButtonProps extends ButtonProps, IconProps {
|
|
13
13
|
buttonSize?: ButtonSize;
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
4
|
import { MediaButton } from './MediaButton';
|
|
5
|
+
import type { ButtonSize } from './MediaButton';
|
|
6
|
+
import { style } from '../../utils/style';
|
|
4
7
|
|
|
5
8
|
export interface SocialMediaProps {
|
|
6
9
|
className?: string;
|
|
7
|
-
media?:
|
|
10
|
+
media?: ButtonWithIconProps[];
|
|
11
|
+
buttonSize?: ButtonSize;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
|
-
export const SocialMedia = JSX<SocialMediaProps>(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
export const SocialMedia = JSX<SocialMediaProps>(
|
|
15
|
+
({ className = '', media, children, buttonSize }) => (
|
|
16
|
+
<div className="flex flex-col sm:flex-col-reverse gap-xs">
|
|
17
|
+
{children ? (
|
|
18
|
+
<Text size="text-s" font="font-light" color="text-secondary-text">
|
|
19
|
+
{children}
|
|
20
|
+
</Text>
|
|
21
|
+
) : null}
|
|
22
|
+
<div className={style('flex gap-xs', className)}>
|
|
23
|
+
{media?.map((_, index) => (
|
|
24
|
+
<MediaButton key={String(index)} buttonSize={buttonSize} {..._} />
|
|
25
|
+
))}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
),
|
|
29
|
+
);
|
|
@@ -5,13 +5,13 @@ import { TextInformationLink } from './TextInformationLink';
|
|
|
5
5
|
|
|
6
6
|
export const TextInformation = JSX<FooterLink>(({ className = '', links }) => (
|
|
7
7
|
<div className={className}>
|
|
8
|
-
<div className="pt-
|
|
8
|
+
<div className="pt-lg">
|
|
9
9
|
<Text size="text-xs" font="font-light" color="text-secondary-text">
|
|
10
10
|
{`\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.`}
|
|
11
11
|
</Text>
|
|
12
12
|
</div>
|
|
13
13
|
{links?.length ? (
|
|
14
|
-
<div className="flex justify-start items-start gap-
|
|
14
|
+
<div className="flex flex-col sm:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg">
|
|
15
15
|
{links.map((_, i) => (
|
|
16
16
|
<TextInformationLink key={String(i)} index={i} {..._} />
|
|
17
17
|
))}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { style } from '../../utils/style';
|
|
2
2
|
import { ButtonSize } from './MediaButton';
|
|
3
|
-
|
|
4
|
-
const buttonSizeStyles = {
|
|
5
|
-
default: 'w-24 h-14',
|
|
6
|
-
small: 'w-12 h-12',
|
|
7
|
-
};
|
|
3
|
+
import { buttonSizeStyles } from './buttonSizeStyles';
|
|
8
4
|
|
|
9
5
|
export const buttonStylesWithText = (text: string, buttonSize: ButtonSize) =>
|
|
10
6
|
text
|
|
@@ -2,7 +2,7 @@ import { Text } from '../../ui-kit/Text/Text';
|
|
|
2
2
|
|
|
3
3
|
export const renderDescription = (description?: string) =>
|
|
4
4
|
description ? (
|
|
5
|
-
<div className="mb-
|
|
5
|
+
<div className="mb-lg pt-3xs">
|
|
6
6
|
<Text size="text-xl" font-weight="light">
|
|
7
7
|
{description}
|
|
8
8
|
</Text>
|
|
@@ -127,7 +127,7 @@ const renderPrimaryFoldButton = ({
|
|
|
127
127
|
return (
|
|
128
128
|
<button
|
|
129
129
|
className={style(
|
|
130
|
-
'border-none bg-transparent
|
|
130
|
+
'border-none bg-transparent flex justify-between items-center w-full group/button',
|
|
131
131
|
labelIcon?.icon ? 'py-xs' : 'py-lg',
|
|
132
132
|
)}
|
|
133
133
|
onClick={onToggle}
|
|
@@ -2,9 +2,10 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
3
|
import type { LinkProps } from '../../model/LinkProps';
|
|
4
4
|
import { Img } from '../Img/Img';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
5
6
|
|
|
6
|
-
const LINK_CLASS_NAME = `absolute border border-primary-main
|
|
7
|
-
text-l font-light bg-white text-primary-text flex
|
|
7
|
+
const LINK_CLASS_NAME = `absolute border border-primary-main px-xl py-lg
|
|
8
|
+
text-l font-light bg-white text-primary-text flex
|
|
8
9
|
justify-between items-center group-hover/link:text-primary-main z-10`;
|
|
9
10
|
|
|
10
11
|
const LINK_BORDER_CLASS_NAME =
|
|
@@ -20,12 +21,24 @@ export const LinkButton = JSX<LinkButtonProps>(
|
|
|
20
21
|
const adjustedProps = link({ href, target });
|
|
21
22
|
|
|
22
23
|
return text ? (
|
|
23
|
-
<div
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
<div
|
|
25
|
+
className={style(
|
|
26
|
+
'flex max-w-sm relative group/link cursor-pointer w-64 h-16 sm:w-[47%] sm:h-20 sm:mr-m',
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
<a
|
|
31
|
+
className={style(
|
|
32
|
+
LINK_CLASS_NAME,
|
|
33
|
+
'rounded-md sm:rounded-none w-full h-12 sm:ml-s sm:w-full sm:h-auto',
|
|
34
|
+
)}
|
|
35
|
+
role="link"
|
|
36
|
+
{...adjustedProps}
|
|
37
|
+
>
|
|
38
|
+
<div className="p-0.5">{text}</div>
|
|
39
|
+
<div className="w-6 h-6 hidden sm:block">
|
|
27
40
|
<Img
|
|
28
|
-
className="w-4 h-4
|
|
41
|
+
className="w-4 h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100"
|
|
29
42
|
image={{ icon: 'ArrowRightIcon', iconVersion: 'black' }}
|
|
30
43
|
imageClassName="group-hover/link:text-primary-main"
|
|
31
44
|
width="24"
|
|
@@ -33,8 +46,8 @@ export const LinkButton = JSX<LinkButtonProps>(
|
|
|
33
46
|
/>
|
|
34
47
|
</div>
|
|
35
48
|
</a>
|
|
36
|
-
<div className={
|
|
37
|
-
<div className={
|
|
49
|
+
<div className={LINK_BORDER_CLASS_NAME + ' hidden sm:block mx-1.5 mt-1.5'} />
|
|
50
|
+
<div className={LINK_BORDER_CLASS_NAME + ' hidden sm:block mt-3 mr-3'} />
|
|
38
51
|
</div>
|
|
39
52
|
) : null;
|
|
40
53
|
},
|
|
@@ -6,7 +6,7 @@ import { linkListStyles } from './linkListStyles';
|
|
|
6
6
|
|
|
7
7
|
export const LinkList = JSX<LinkListProps>(({ className = '', items }) =>
|
|
8
8
|
items?.length ? (
|
|
9
|
-
<ul className={style('flex flex-col
|
|
9
|
+
<ul className={style('flex flex-col', linkListStyles, className)}>
|
|
10
10
|
{items.map(renderLinkListItem)}
|
|
11
11
|
</ul>
|
|
12
12
|
) : null,
|
|
@@ -16,8 +16,8 @@ const renderLinkListItem = (item: LinkProps, i: number) => {
|
|
|
16
16
|
const { text, ...linkProps } = item;
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<li key={`list_item_${String(i)}`} className="list-none">
|
|
20
|
-
<a className="hover:text-primary-main
|
|
19
|
+
<li key={`list_item_${String(i)}`} className="list-none my-xs">
|
|
20
|
+
<a className="hover:text-primary-main font-light" role="link" {...linkProps}>
|
|
21
21
|
{text ? text : null}
|
|
22
22
|
</a>
|
|
23
23
|
</li>
|
package/package.json
CHANGED
package/src/common.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../../setup-fixture';
|
|
2
2
|
|
|
3
3
|
import { ApplicationForm } from './ApplicationForm';
|
|
4
|
-
import type { ApplicationFormContent } from './ApplicationFormContent';
|
|
4
|
+
import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const formBlockProps: ApplicationFormBlockDef = {
|
|
7
7
|
title: 'Форма заявки',
|
|
8
8
|
button: {
|
|
9
9
|
text: 'Отправить заявку',
|
|
@@ -13,32 +13,66 @@ const ApplicationFormProps: ApplicationFormContent = {
|
|
|
13
13
|
text: 'условиями передачи данных',
|
|
14
14
|
href: '#',
|
|
15
15
|
},
|
|
16
|
+
formType: 'ApplicationFormCredit',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ApplicationFormCredit: ApplicationFormContent = {
|
|
20
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormCredit' },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const ApplicationFormAcquiring: ApplicationFormContent = {
|
|
24
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormAcquiring' },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const ApplicationFormBusinessCard: ApplicationFormContent = {
|
|
28
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormBusinessCard' },
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const ApplicationFormDeposit: ApplicationFormContent = {
|
|
32
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormDeposit' },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ApplicationFormWed: ApplicationFormContent = {
|
|
36
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormWed' },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ApplicationFormGrantSupport: ApplicationFormContent = {
|
|
40
|
+
formBlock: {
|
|
41
|
+
...formBlockProps,
|
|
42
|
+
formType: 'ApplicationFormGrantSupport',
|
|
43
|
+
sourceBookDir: 'regions-grant-support',
|
|
44
|
+
},
|
|
16
45
|
};
|
|
17
46
|
|
|
18
47
|
export default {
|
|
19
48
|
credit: (
|
|
20
49
|
<div className="container grid grid-cols-12">
|
|
21
|
-
<ApplicationForm className="col-span-12" {...
|
|
50
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormCredit} />
|
|
22
51
|
</div>
|
|
23
52
|
),
|
|
24
53
|
acquiring: (
|
|
25
54
|
<div className="container grid grid-cols-12">
|
|
26
|
-
<ApplicationForm className="col-span-12" {...
|
|
55
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormAcquiring} />
|
|
27
56
|
</div>
|
|
28
57
|
),
|
|
29
58
|
'business-card': (
|
|
30
59
|
<div className="container grid grid-cols-12">
|
|
31
|
-
<ApplicationForm className="col-span-12" {...
|
|
60
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormBusinessCard} />
|
|
32
61
|
</div>
|
|
33
62
|
),
|
|
34
63
|
deposit: (
|
|
35
64
|
<div className="container grid grid-cols-12">
|
|
36
|
-
<ApplicationForm className="col-span-12" {...
|
|
65
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormDeposit} />
|
|
37
66
|
</div>
|
|
38
67
|
),
|
|
39
68
|
wed: (
|
|
40
69
|
<div className="container grid grid-cols-12">
|
|
41
|
-
<ApplicationForm className="col-span-12" {...
|
|
70
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormWed} />
|
|
71
|
+
</div>
|
|
72
|
+
),
|
|
73
|
+
'grant-support': (
|
|
74
|
+
<div className="container grid grid-cols-12">
|
|
75
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormGrantSupport} />
|
|
42
76
|
</div>
|
|
43
77
|
),
|
|
44
78
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../../setup-fixture';
|
|
2
2
|
|
|
3
3
|
import { ApplicationForm } from './ApplicationForm';
|
|
4
|
-
import type { ApplicationFormContent } from './ApplicationFormContent';
|
|
4
|
+
import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const formBlockProps: ApplicationFormBlockDef = {
|
|
7
7
|
title: 'Форма заявки',
|
|
8
8
|
button: {
|
|
9
9
|
text: 'Отправить заявку',
|
|
@@ -13,32 +13,66 @@ const ApplicationFormProps: ApplicationFormContent = {
|
|
|
13
13
|
text: 'условиями передачи данных',
|
|
14
14
|
href: '#',
|
|
15
15
|
},
|
|
16
|
+
formType: 'ApplicationFormCredit',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ApplicationFormCredit: ApplicationFormContent = {
|
|
20
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormCredit' },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const ApplicationFormAcquiring: ApplicationFormContent = {
|
|
24
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormAcquiring' },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const ApplicationFormBusinessCard: ApplicationFormContent = {
|
|
28
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormBusinessCard' },
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const ApplicationFormDeposit: ApplicationFormContent = {
|
|
32
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormDeposit' },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const ApplicationFormWed: ApplicationFormContent = {
|
|
36
|
+
formBlock: { ...formBlockProps, formType: 'ApplicationFormWed' },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const ApplicationFormGrantSupport: ApplicationFormContent = {
|
|
40
|
+
formBlock: {
|
|
41
|
+
...formBlockProps,
|
|
42
|
+
formType: 'ApplicationFormGrantSupport',
|
|
43
|
+
sourceBookDir: 'regions-grant-support',
|
|
44
|
+
},
|
|
16
45
|
};
|
|
17
46
|
|
|
18
47
|
export default {
|
|
19
48
|
credit: (
|
|
20
49
|
<div className="container grid grid-cols-12">
|
|
21
|
-
<ApplicationForm className="col-span-12" {...
|
|
50
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormCredit} />
|
|
22
51
|
</div>
|
|
23
52
|
),
|
|
24
53
|
acquiring: (
|
|
25
54
|
<div className="container grid grid-cols-12">
|
|
26
|
-
<ApplicationForm className="col-span-12" {...
|
|
55
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormAcquiring} />
|
|
27
56
|
</div>
|
|
28
57
|
),
|
|
29
58
|
'business-card': (
|
|
30
59
|
<div className="container grid grid-cols-12">
|
|
31
|
-
<ApplicationForm className="col-span-12" {...
|
|
60
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormBusinessCard} />
|
|
32
61
|
</div>
|
|
33
62
|
),
|
|
34
63
|
deposit: (
|
|
35
64
|
<div className="container grid grid-cols-12">
|
|
36
|
-
<ApplicationForm className="col-span-12" {...
|
|
65
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormDeposit} />
|
|
37
66
|
</div>
|
|
38
67
|
),
|
|
39
68
|
wed: (
|
|
40
69
|
<div className="container grid grid-cols-12">
|
|
41
|
-
<ApplicationForm className="col-span-12" {...
|
|
70
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormWed} />
|
|
71
|
+
</div>
|
|
72
|
+
),
|
|
73
|
+
'grant-support': (
|
|
74
|
+
<div className="container grid grid-cols-12">
|
|
75
|
+
<ApplicationForm className="col-span-12" {...ApplicationFormGrantSupport} />
|
|
42
76
|
</div>
|
|
43
77
|
),
|
|
44
78
|
};
|
|
@@ -4,29 +4,22 @@ import { CorporateLeadAPI } from '../../api/CorporateLeadAPI';
|
|
|
4
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
6
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import type { ApplicationFormContent } from './ApplicationFormContent';
|
|
10
|
-
import { ApplicationFormCredit } from './ApplicationFormCredit';
|
|
11
|
-
import { ApplicationFormDeposit } from './ApplicationFormDeposit';
|
|
12
|
-
import type { ApplicationFormsProps } from './ApplicationFormsProps';
|
|
13
|
-
import { ApplicationFormWed } from './ApplicationFormWed';
|
|
7
|
+
import type { ApplicationFormBlockDef, ApplicationFormContent } from './ApplicationFormContent';
|
|
8
|
+
import { EmbeddableForms } from './EmbeddableForms';
|
|
14
9
|
import { ResponseNotification } from './ResponseNotification';
|
|
15
10
|
|
|
16
11
|
export interface ApplicationFormProps extends ApplicationFormContent, UniBlockProps {}
|
|
17
12
|
|
|
18
|
-
const COMPONENTS_MAP = {
|
|
19
|
-
credit: (props: ApplicationFormsProps) => <ApplicationFormCredit {...props} />,
|
|
20
|
-
acquiring: (props: ApplicationFormsProps) => <ApplicationFormAcquiring {...props} />,
|
|
21
|
-
'business-card': (props: ApplicationFormsProps) => <ApplicationFormBusinessCard {...props} />,
|
|
22
|
-
deposit: (props: ApplicationFormsProps) => <ApplicationFormDeposit {...props} />,
|
|
23
|
-
wed: (props: ApplicationFormsProps) => <ApplicationFormWed {...props} />,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
13
|
const API = CorporateLeadAPI();
|
|
27
14
|
|
|
28
15
|
export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
|
|
29
|
-
const { className,
|
|
16
|
+
const { className, formBlock, ...rest } = props;
|
|
17
|
+
|
|
18
|
+
// const type = formBlock?.formType;
|
|
19
|
+
// if (!type || !(type in EmbeddableForms)) {
|
|
20
|
+
// return null;
|
|
21
|
+
// }
|
|
22
|
+
// const EmbeddedForm = EmbeddableForms[type];
|
|
30
23
|
|
|
31
24
|
const [responseType, setResponseType] = useState<'OK' | 'Fail' | ''>('');
|
|
32
25
|
|
|
@@ -40,12 +33,31 @@ export const ApplicationForm = JSX<ApplicationFormProps>((props) => {
|
|
|
40
33
|
return (
|
|
41
34
|
<BlockWrapper className={className} defaultPadding="p-6xl" {...rest}>
|
|
42
35
|
<div className="container max-w-[978px]">
|
|
43
|
-
{title ? (
|
|
44
|
-
<Heading
|
|
36
|
+
{formBlock?.title ? (
|
|
37
|
+
<Heading
|
|
38
|
+
headingType="h3"
|
|
39
|
+
title={formBlock.title}
|
|
40
|
+
className="mb-4 sm:mb-8 sm:text-center"
|
|
41
|
+
/>
|
|
45
42
|
) : null}
|
|
46
|
-
{
|
|
43
|
+
{/* <EmbeddedForm {...formBlock} onSubmit={handleSubmit} /> */}
|
|
44
|
+
{formBlock ? renderEmbeddedForm(formBlock, handleSubmit) : null}
|
|
45
|
+
{/* {COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit })} */}
|
|
47
46
|
{responseType ? <ResponseNotification responseType={responseType} /> : null}
|
|
48
47
|
</div>
|
|
49
48
|
</BlockWrapper>
|
|
50
49
|
);
|
|
51
50
|
});
|
|
51
|
+
|
|
52
|
+
const renderEmbeddedForm = (
|
|
53
|
+
formBlock: ApplicationFormBlockDef,
|
|
54
|
+
handleSubmit: (data: Record<string, string>) => Promise<'OK' | 'Fail'>,
|
|
55
|
+
) => {
|
|
56
|
+
const type = formBlock?.formType;
|
|
57
|
+
if (!type || !(type in EmbeddableForms)) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const EmbeddedForm = EmbeddableForms[type];
|
|
61
|
+
|
|
62
|
+
return <EmbeddedForm {...formBlock} onSubmit={handleSubmit} />;
|
|
63
|
+
};
|
|
@@ -13,17 +13,76 @@ export interface SubmitButtonProps extends ButtonAdditionalProps {
|
|
|
13
13
|
version?: ButtonVersion;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export type CommonApplicationFormProps = TitleProps & {
|
|
17
|
+
button?: SubmitButtonProps;
|
|
18
|
+
/** @title Условия передачи данных */
|
|
19
|
+
link?: LinkProps;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type ApplicationFormBlockDef =
|
|
23
|
+
| BusinessCardFormParamsDef
|
|
24
|
+
| WedFormParamsDef
|
|
25
|
+
| DepositFormParamsDef
|
|
26
|
+
| CreditFormParamsDef
|
|
27
|
+
| AcquiringFormParamsDef
|
|
28
|
+
| GrantSupportFormParamsDef;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @title Бизнес-карта
|
|
32
|
+
* @default {"formType": "ApplicationFormBusinessCard"}
|
|
33
|
+
*/
|
|
34
|
+
export type BusinessCardFormParamsDef = CommonApplicationFormProps & {
|
|
35
|
+
formType: 'ApplicationFormBusinessCard';
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @title ВЭД
|
|
40
|
+
* @default {"formType": "ApplicationFormWed"}
|
|
41
|
+
*/
|
|
42
|
+
export type WedFormParamsDef = CommonApplicationFormProps & {
|
|
43
|
+
formType: 'ApplicationFormWed';
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @title Депозит
|
|
48
|
+
* @default {"formType": "ApplicationFormDeposit"}
|
|
49
|
+
*/
|
|
50
|
+
export type DepositFormParamsDef = CommonApplicationFormProps & {
|
|
51
|
+
formType: 'ApplicationFormDeposit';
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @title Кредит
|
|
56
|
+
* @default {"formType": "ApplicationFormCredit"}
|
|
57
|
+
*/
|
|
58
|
+
export type CreditFormParamsDef = CommonApplicationFormProps & {
|
|
59
|
+
formType: 'ApplicationFormCredit';
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @title Эквайринг
|
|
64
|
+
* @default {"formType": "ApplicationFormAcquiring"}
|
|
65
|
+
*/
|
|
66
|
+
export type AcquiringFormParamsDef = CommonApplicationFormProps & {
|
|
67
|
+
formType: 'ApplicationFormAcquiring';
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @title Грантовая поддержка
|
|
72
|
+
* @default {"formType": "ApplicationFormGrantSupport"}
|
|
73
|
+
*/
|
|
74
|
+
export type GrantSupportFormParamsDef = CommonApplicationFormProps & {
|
|
75
|
+
formType: 'ApplicationFormGrantSupport';
|
|
76
|
+
/** @title Адрес справочника */
|
|
77
|
+
sourceBookDir?: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
16
80
|
/**
|
|
17
81
|
* @title Форма заявки
|
|
18
82
|
*/
|
|
19
|
-
export type ApplicationFormContent = UniBlockContent &
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
typeForm?: 'business-card' | 'wed' | 'deposit' | 'credit' | 'acquiring';
|
|
26
|
-
button?: SubmitButtonProps;
|
|
27
|
-
/** @title Условия передачи данных */
|
|
28
|
-
link?: LinkProps;
|
|
29
|
-
};
|
|
83
|
+
export type ApplicationFormContent = UniBlockContent & {
|
|
84
|
+
/**
|
|
85
|
+
* @title Вид заявки
|
|
86
|
+
*/
|
|
87
|
+
formBlock?: ApplicationFormBlockDef;
|
|
88
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
4
|
+
import { RegionsGrantSupportData } from '../../services/regionsGrantSupport/RegionsGrantSupportData';
|
|
5
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
6
|
+
import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
|
|
7
|
+
import { style } from '../../utils/style';
|
|
8
|
+
import type { ApplicationFormsProps } from './ApplicationFormsProps';
|
|
9
|
+
import { SelectControl } from './SelectControl';
|
|
10
|
+
|
|
11
|
+
export const ApplicationFormGrantSupport = JSX<ApplicationFormsProps>((props) => {
|
|
12
|
+
const { button, sourceBookDir } = props;
|
|
13
|
+
|
|
14
|
+
const { regions } = useSWRResource<RegionsGrantSupportData>(
|
|
15
|
+
sourceBookDir || 'regions-grant-support',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const [region, setRegion] = useState({ key: '' });
|
|
19
|
+
|
|
20
|
+
const buttonStyle = getRegularButtonClasses({
|
|
21
|
+
className: 'text-white',
|
|
22
|
+
version: button?.version,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const regionHref = regions?.find((_) => _.name === region.key)?.href;
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<div className="container space-y-s sm:space-y-lg">
|
|
29
|
+
{regions ? (
|
|
30
|
+
<SelectControl
|
|
31
|
+
label="Ваш регион"
|
|
32
|
+
placeholder="Выберите регион"
|
|
33
|
+
options={regions.map(({ name = '' }) => ({ key: name }))}
|
|
34
|
+
value={region}
|
|
35
|
+
onChange={setRegion}
|
|
36
|
+
/>
|
|
37
|
+
) : null}
|
|
38
|
+
{regionHref ? (
|
|
39
|
+
<div className="text-center">
|
|
40
|
+
<Button
|
|
41
|
+
href={regionHref}
|
|
42
|
+
target="_blank"
|
|
43
|
+
className={style('p-4 w-full sm:w-auto', buttonStyle)}
|
|
44
|
+
>
|
|
45
|
+
{button?.text ? button.text : 'Перейти'}
|
|
46
|
+
</Button>
|
|
47
|
+
</div>
|
|
48
|
+
) : null}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
});
|
|
@@ -4,5 +4,6 @@ import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
|
4
4
|
export interface ApplicationFormsProps<S extends Record<string, any> = Record<string, any>> {
|
|
5
5
|
button?: SubmitButtonProps;
|
|
6
6
|
link?: LinkProps;
|
|
7
|
+
sourceBookDir?: string;
|
|
7
8
|
onSubmit: (data: S) => void;
|
|
8
9
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApplicationFormAcquiring } from './ApplicationFormAcquiring';
|
|
2
|
+
import { ApplicationFormBusinessCard } from './ApplicationFormBusinessCard';
|
|
3
|
+
import { ApplicationFormCredit } from './ApplicationFormCredit';
|
|
4
|
+
import { ApplicationFormDeposit } from './ApplicationFormDeposit';
|
|
5
|
+
import { ApplicationFormGrantSupport } from './ApplicationFormGrantSupport';
|
|
6
|
+
import { ApplicationFormWed } from './ApplicationFormWed';
|
|
7
|
+
|
|
8
|
+
export const EmbeddableForms = {
|
|
9
|
+
ApplicationFormBusinessCard,
|
|
10
|
+
ApplicationFormWed,
|
|
11
|
+
ApplicationFormDeposit,
|
|
12
|
+
ApplicationFormCredit,
|
|
13
|
+
ApplicationFormAcquiring,
|
|
14
|
+
ApplicationFormGrantSupport,
|
|
15
|
+
};
|