@redneckz/wildless-cms-uni-blocks 0.14.25 → 0.14.27
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.14.26.js +55 -0
- package/bin/migration-scripts/0.14.27.js +38 -0
- package/bundle/api/{CorporateLeadAPI.d.ts → LeadServiceAPI.d.ts} +2 -2
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +293 -255
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/bundle/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/bundle/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/bundle/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/bundle/components/CarouselCard/titleSize.d.ts +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/bundle/utils/isIcon.d.ts +2 -0
- package/cosmos-static/icons/DzenIcon.svg +1 -0
- package/dist/api/{CorporateLeadAPI.d.ts → LeadServiceAPI.d.ts} +2 -2
- package/dist/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +7 -6
- package/dist/api/LeadServiceAPI.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationForm.js +4 -4
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +52 -0
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/dist/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/dist/components/ApplicationForm/DatePickerControl.js +8 -0
- package/dist/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/dist/components/ApplicationForm/Footnote.js +1 -1
- package/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/dist/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/dist/components/{Tile/TileContent.js → ApplicationForm/IndividualsFormState.js} +1 -1
- package/dist/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.js +11 -0
- package/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -4
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +4 -4
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/Calculator/Calculator.mobile.js +4 -4
- package/dist/components/Calculator/Calculator.mobile.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +1 -1
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/renderCarouselCards.js +1 -1
- package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselCard/titleSize.d.ts +1 -1
- package/dist/components/CarouselCard/titleSize.js +1 -1
- package/dist/components/CarouselCard/titleSize.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +5 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +2 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js +2 -1
- package/dist/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/dist/components/Footer/SocialMedia.js +5 -5
- 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/iconsMap.js +4 -0
- package/dist/components/Footer/iconsMap.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/dist/components/ProductBlock/ProductBlock.js +1 -3
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js +1 -1
- package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +2 -2
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +7 -3
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +3 -2
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +2 -1
- package/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/dist/ui-kit/Button/renderButtonsSection.js +2 -1
- package/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/dist/ui-kit/DatePicker/DatePicker.js +4 -4
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/DatePicker/getYears.js +1 -1
- package/dist/ui-kit/Input/Input.js +1 -1
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderForeignOffices.js +2 -2
- package/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +3 -2
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/dist/ui-kit/NotFound/NotFound.js +1 -1
- package/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/utils/isIcon.d.ts +2 -0
- package/dist/utils/isIcon.js +5 -0
- package/dist/utils/isIcon.js.map +1 -0
- package/lib/api/{CorporateLeadAPI.d.ts → LeadServiceAPI.d.ts} +2 -2
- package/lib/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +5 -4
- package/lib/api/LeadServiceAPI.js.map +1 -0
- 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 +4 -4
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +50 -0
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/lib/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/lib/components/ApplicationForm/DatePickerControl.js +6 -0
- package/lib/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/lib/components/ApplicationForm/Footnote.js +1 -1
- package/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/lib/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/lib/components/ApplicationForm/IndividualsFormState.js +2 -0
- package/lib/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.d.ts +3 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.js +8 -0
- package/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -4
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +4 -4
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/Calculator/Calculator.mobile.js +4 -4
- package/lib/components/Calculator/Calculator.mobile.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -1
- package/lib/components/Carousel/Carousel.fixture.mobile.d.ts +1 -1
- package/lib/components/Carousel/Carousel.js +1 -1
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/renderCarouselCards.js +1 -1
- package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselCard/titleSize.d.ts +1 -1
- package/lib/components/CarouselCard/titleSize.js +1 -1
- package/lib/components/CarouselCard/titleSize.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +6 -3
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +2 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js +2 -1
- package/lib/components/Footer/HorizontalNavigation.mobile.js.map +1 -1
- package/lib/components/Footer/SocialMedia.js +5 -5
- 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/iconsMap.js +4 -0
- package/lib/components/Footer/iconsMap.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.js +1 -3
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js +1 -1
- package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +1 -1
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +2 -2
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +2 -2
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +7 -3
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +3 -2
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +2 -1
- package/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/lib/ui-kit/Button/renderButtonsSection.js +2 -1
- package/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/lib/ui-kit/DatePicker/DatePicker.js +4 -4
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/lib/ui-kit/Input/Input.js +1 -1
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderForeignOffices.js +2 -2
- package/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +3 -2
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/ui-kit/NotFound/NotFound.js +1 -1
- package/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/utils/isIcon.d.ts +2 -0
- package/lib/utils/isIcon.js +2 -0
- package/lib/utils/isIcon.js.map +1 -0
- package/mobile/bundle/api/{CorporateLeadAPI.d.ts → LeadServiceAPI.d.ts} +2 -2
- package/mobile/bundle/bundle.umd.js +298 -107
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/bundle/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/bundle/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/bundle/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/mobile/bundle/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/bundle/utils/isIcon.d.ts +2 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +15 -0
- package/mobile/dist/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +7 -6
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +4 -4
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +52 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js +8 -0
- package/mobile/dist/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/dist/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/dist/components/{Tile/TileContent.js → ApplicationForm/IndividualsFormState.js} +1 -1
- package/mobile/dist/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js +11 -0
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/mobile/dist/components/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +4 -4
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +4 -4
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +1 -1
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -1
- package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.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/CarouselRecommendationCard/CarouselRecommendationCard.js +5 -2
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +2 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js +2 -1
- package/mobile/dist/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/dist/components/Footer/SocialMedia.js +5 -5
- 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/iconsMap.js +4 -0
- package/mobile/dist/components/Footer/iconsMap.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -3
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js +1 -1
- package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +2 -2
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +7 -3
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +3 -2
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +2 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/dist/ui-kit/Button/renderButtonsSection.js +2 -1
- package/mobile/dist/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +4 -4
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/DatePicker/getYears.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +1 -1
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js +2 -2
- package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +3 -2
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/dist/ui-kit/NotFound/NotFound.js +1 -1
- package/mobile/dist/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/utils/isIcon.d.ts +2 -0
- package/mobile/dist/utils/isIcon.js +5 -0
- package/mobile/dist/utils/isIcon.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.d.ts +15 -0
- package/mobile/lib/api/{CorporateLeadAPI.js → LeadServiceAPI.js} +5 -4
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +4 -4
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +11 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js +1 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +50 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -1
- package/mobile/lib/components/ApplicationForm/DatePickerControl.d.ts +8 -0
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js +6 -0
- package/mobile/lib/components/ApplicationForm/DatePickerControl.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js +2 -0
- package/mobile/lib/components/ApplicationForm/EmbeddableForms.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
- package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.d.ts +9 -0
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.js +2 -0
- package/mobile/lib/components/ApplicationForm/IndividualsFormState.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.d.ts +4 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js +8 -0
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -0
- package/mobile/lib/components/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +4 -4
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +4 -4
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +1 -1
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -1
- package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.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/CarouselRecommendationCard/CarouselRecommendationCard.js +6 -3
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +4 -3
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +2 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js +2 -1
- package/mobile/lib/components/Footer/HorizontalNavigation.js.map +1 -1
- package/mobile/lib/components/Footer/SocialMedia.js +5 -5
- 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/iconsMap.js +4 -0
- package/mobile/lib/components/Footer/iconsMap.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -3
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js +1 -1
- package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +2 -2
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +7 -3
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +8 -0
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +3 -2
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +2 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js.map +1 -1
- package/mobile/lib/ui-kit/Button/renderButtonsSection.js +2 -1
- package/mobile/lib/ui-kit/Button/renderButtonsSection.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.d.ts +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +4 -4
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/DatePicker/getYears.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +1 -1
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +2 -2
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js +2 -2
- package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +3 -2
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/ui-kit/NotFound/NotFound.js +1 -1
- package/mobile/lib/ui-kit/NotFound/NotFound.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchInput.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/utils/isIcon.d.ts +2 -0
- package/mobile/lib/utils/isIcon.js +2 -0
- package/mobile/lib/utils/isIcon.js.map +1 -0
- package/mobile/src/api/{CorporateLeadAPI.ts → LeadServiceAPI.ts} +5 -3
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +14 -8
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +5 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +13 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -3
- package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +74 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -1
- package/mobile/src/components/ApplicationForm/DatePickerControl.tsx +33 -0
- package/mobile/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/mobile/src/components/ApplicationForm/Footnote.tsx +3 -2
- package/mobile/src/components/ApplicationForm/IndividualsFormState.ts +9 -0
- package/mobile/src/components/ApplicationForm/renderIndividualsFields.tsx +46 -0
- package/mobile/src/components/Blocks.ts +0 -4
- package/mobile/src/components/Bonus/Bonus.tsx +4 -4
- package/mobile/src/components/Calculator/Calculator.tsx +5 -7
- package/mobile/src/components/Carousel/Carousel.tsx +1 -1
- package/mobile/src/components/Carousel/renderCarouselCards.tsx +1 -1
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -1
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +15 -5
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +5 -3
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +8 -8
- package/mobile/src/components/ContentPage/ContentPage.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +7 -5
- package/mobile/src/components/Footer/HorizontalNavigation.tsx +2 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +10 -12
- package/mobile/src/components/Footer/TextInformation.tsx +1 -1
- package/mobile/src/components/Footer/iconsMap.ts +4 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +16 -1
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +1 -6
- package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +7 -1
- package/mobile/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +1 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +6 -8
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +1 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +2 -2
- package/mobile/src/components/Tabs/Tabs.tsx +8 -4
- package/mobile/src/icons/DzenIcon.svg +4 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +8 -4
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -7
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +7 -2
- package/mobile/src/ui-kit/Button/renderButtonsSection.tsx +2 -1
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +13 -5
- package/mobile/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/mobile/src/ui-kit/Input/Input.tsx +1 -1
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -1
- package/mobile/src/ui-kit/LocationDialog/renderForeignOffices.tsx +6 -4
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +5 -2
- package/mobile/src/ui-kit/NotFound/NotFound.tsx +1 -1
- package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/mobile/src/utils/isIcon.ts +3 -0
- package/package.json +1 -1
- package/src/api/{CorporateLeadAPI.ts → LeadServiceAPI.ts} +5 -3
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +14 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +14 -0
- package/src/components/ApplicationForm/ApplicationForm.tsx +14 -8
- package/src/components/ApplicationForm/ApplicationForm.ui.json +5 -2
- package/src/components/ApplicationForm/ApplicationFormContent.ts +13 -1
- package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -3
- package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +74 -0
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -1
- package/src/components/ApplicationForm/DatePickerControl.tsx +33 -0
- package/src/components/ApplicationForm/EmbeddableForms.tsx +2 -0
- package/src/components/ApplicationForm/Footnote.tsx +3 -2
- package/src/components/ApplicationForm/IndividualsFormState.ts +9 -0
- package/src/components/ApplicationForm/renderIndividualsFields.tsx +46 -0
- package/src/components/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -4
- package/src/components/Bonus/Bonus.tsx +4 -4
- package/src/components/Calculator/Calculator.mobile.tsx +5 -7
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +12 -11
- package/src/components/Carousel/Carousel.fixture.tsx +15 -14
- package/src/components/Carousel/Carousel.tsx +1 -1
- package/src/components/Carousel/renderCarouselCards.tsx +1 -1
- package/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/src/components/CarouselCard/titleSize.tsx +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.mobile.tsx +41 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +41 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +15 -5
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +5 -3
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +8 -8
- package/src/components/ContentPage/ContentPage.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +7 -5
- package/src/components/Footer/HorizontalNavigation.mobile.tsx +2 -1
- package/src/components/Footer/SocialMedia.tsx +10 -12
- package/src/components/Footer/TextInformation.tsx +1 -1
- package/src/components/Footer/iconsMap.ts +4 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +16 -1
- package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +1 -0
- package/src/components/ProductBlock/ProductBlock.tsx +1 -6
- package/src/components/ProductBlock/renderBackwardButton.tsx +7 -1
- package/src/components/ProductGallery/ProductGallery.example.json +1 -1
- package/src/components/ProductGallery/ProductGallery.tsx +1 -1
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.example.json +1 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +6 -8
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +1 -0
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +2 -2
- package/src/components/StepsBlock/StepsBlock.tsx +3 -3
- package/src/components/Tabs/Tabs.tsx +8 -4
- package/src/icons/DzenIcon.svg +4 -0
- package/src/icons/IconName.ts +4 -1
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/src/ui-kit/BaseTile/BaseTile.tsx +8 -4
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -7
- package/src/ui-kit/Button/ButtonInner.tsx +7 -2
- package/src/ui-kit/Button/renderButtonsSection.tsx +2 -1
- package/src/ui-kit/DatePicker/DatePicker.tsx +13 -5
- package/src/ui-kit/DatePicker/getYears.ts +1 -1
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +5 -1
- package/src/ui-kit/LocationDialog/renderForeignOffices.tsx +6 -4
- package/src/ui-kit/LocationDialog/renderRegion.tsx +5 -2
- package/src/ui-kit/NotFound/NotFound.tsx +1 -1
- package/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +1 -1
- package/src/utils/isIcon.ts +3 -0
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/bundle/components/Tile/Tile.d.ts +0 -5
- package/bundle/components/Tile/TileContent.d.ts +0 -6
- package/dist/api/CorporateLeadAPI.js.map +0 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +0 -13
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +0 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +0 -2
- package/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +0 -1
- package/dist/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/dist/components/StepsBlock/checkCanRenderIcon.js +0 -5
- package/dist/components/StepsBlock/checkCanRenderIcon.js.map +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -5
- package/dist/components/Tile/Tile.js +0 -8
- package/dist/components/Tile/Tile.js.map +0 -1
- package/dist/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/Tile/TileContent.js.map +0 -1
- package/lib/api/CorporateLeadAPI.js.map +0 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.d.ts +0 -8
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.fixture.mobile.d.ts +0 -7
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +0 -11
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +0 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +0 -2
- package/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +0 -1
- package/lib/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/lib/components/StepsBlock/checkCanRenderIcon.js +0 -2
- package/lib/components/StepsBlock/checkCanRenderIcon.js.map +0 -1
- package/lib/components/Tile/Tile.d.ts +0 -5
- package/lib/components/Tile/Tile.fixture.d.ts +0 -15
- package/lib/components/Tile/Tile.fixture.mobile.d.ts +0 -9
- package/lib/components/Tile/Tile.js +0 -6
- package/lib/components/Tile/Tile.js.map +0 -1
- package/lib/components/Tile/TileContent.d.ts +0 -6
- package/lib/components/Tile/TileContent.js +0 -2
- package/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/mobile/bundle/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/mobile/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/mobile/bundle/components/Tile/Tile.d.ts +0 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/api/CorporateLeadAPI.d.ts +0 -15
- package/mobile/dist/api/CorporateLeadAPI.js.map +0 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +0 -13
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +0 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js +0 -2
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +0 -1
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js +0 -5
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js.map +0 -1
- package/mobile/dist/components/Tile/Tile.d.ts +0 -5
- package/mobile/dist/components/Tile/Tile.js +0 -8
- package/mobile/dist/components/Tile/Tile.js.map +0 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/Tile/TileContent.js.map +0 -1
- package/mobile/lib/api/CorporateLeadAPI.d.ts +0 -15
- package/mobile/lib/api/CorporateLeadAPI.js.map +0 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.d.ts +0 -5
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +0 -11
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +0 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.d.ts +0 -11
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js +0 -2
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCardContent.js.map +0 -1
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.d.ts +0 -4
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js +0 -2
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js.map +0 -1
- package/mobile/lib/components/Tile/Tile.d.ts +0 -5
- package/mobile/lib/components/Tile/Tile.js +0 -6
- package/mobile/lib/components/Tile/Tile.js.map +0 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +0 -6
- package/mobile/lib/components/Tile/TileContent.js +0 -2
- package/mobile/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +0 -25
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +0 -28
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +0 -1
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +0 -15
- package/mobile/src/components/StepsBlock/checkCanRenderIcon.ts +0 -4
- package/mobile/src/components/Tile/Tile.example.json +0 -28
- package/mobile/src/components/Tile/Tile.tsx +0 -23
- package/mobile/src/components/Tile/Tile.ui.json +0 -17
- package/mobile/src/components/Tile/TileContent.ts +0 -7
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +0 -25
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.mobile.tsx +0 -34
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +0 -36
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +0 -28
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.ui.json +0 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCardContent.ts +0 -15
- package/src/components/StepsBlock/checkCanRenderIcon.ts +0 -4
- package/src/components/Tile/Tile.example.json +0 -28
- package/src/components/Tile/Tile.fixture.mobile.tsx +0 -48
- package/src/components/Tile/Tile.fixture.tsx +0 -147
- package/src/components/Tile/Tile.tsx +0 -23
- package/src/components/Tile/Tile.ui.json +0 -17
- package/src/components/Tile/TileContent.ts +0 -7
package/bundle/bundle.umd.js
CHANGED
|
@@ -243,10 +243,11 @@
|
|
|
243
243
|
return JSXTmpl;
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
-
function
|
|
247
|
-
async function send(body) {
|
|
246
|
+
function LeadServiceAPI() {
|
|
247
|
+
async function send(body, isIndividualType) {
|
|
248
|
+
const url = isIndividualType ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
|
|
248
249
|
try {
|
|
249
|
-
const response = await fetch(
|
|
250
|
+
const response = await fetch(url, {
|
|
250
251
|
method: 'POST',
|
|
251
252
|
headers: { 'Content-Type': 'application/json' },
|
|
252
253
|
mode: 'cors',
|
|
@@ -642,7 +643,8 @@
|
|
|
642
643
|
|
|
643
644
|
const ButtonInner = JSX((props) => {
|
|
644
645
|
const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
|
|
645
|
-
|
|
646
|
+
const iconHideStyle = isWithText(props) ? 'hidden lg:block' : '';
|
|
647
|
+
return (jsxs("div", { className: style(getButtonStyle(props), 'flex gap-xs'), children: [appendLeft ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendLeft })) : null, isWithText(props) ? (jsxs("div", { className: "whitespace-pre", children: [aboveText ? jsx("div", { className: "text-xs font-light text-left", children: aboveText }) : null, jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-3xs' : 'text-l'}`, children: text })] })) : null, appendRight ? (jsx("div", { className: style(iconHideStyle, iconStyleMap[version]), children: appendRight })) : null] }));
|
|
646
648
|
});
|
|
647
649
|
const getButtonStyle = (props) => {
|
|
648
650
|
const { version, aboveText, rounded } = props;
|
|
@@ -683,7 +685,7 @@
|
|
|
683
685
|
|
|
684
686
|
const Text = JSX(({ children, ...styleProps }) => (jsx("span", { className: style('font-sans', Object.values(styleProps)), children: children })));
|
|
685
687
|
|
|
686
|
-
const Footnote = JSX(({ link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children:
|
|
688
|
+
const Footnote = JSX(({ text, link }) => (jsxs(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: [jsx(Text, { children: text || 'Нажимая кнопку, вы подтверждаете согласие с ' }), link ? (jsx(Button, { href: link.href, ariaLabel: "\u0443\u0441\u043B\u043E\u0432\u0438\u044F \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043D\u043D\u044B\u0445", target: link.target, className: "text-primary-main", children: jsx(Text, { children: link.text }) })) : null] })));
|
|
687
689
|
|
|
688
690
|
const withValidator = (props, validator) => {
|
|
689
691
|
const { value, isDirty } = props;
|
|
@@ -709,7 +711,7 @@
|
|
|
709
711
|
const validStyle = valid
|
|
710
712
|
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
711
713
|
: 'border-error';
|
|
712
|
-
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { ref: inputRef, className: style('w-full border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
714
|
+
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { ref: inputRef, className: style('w-full h-14 border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
713
715
|
});
|
|
714
716
|
|
|
715
717
|
const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null })] })));
|
|
@@ -885,7 +887,7 @@
|
|
|
885
887
|
onChange,
|
|
886
888
|
onClose: handleClose,
|
|
887
889
|
});
|
|
888
|
-
return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
|
|
890
|
+
return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
|
|
889
891
|
});
|
|
890
892
|
const renderLabel = (label) => label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null;
|
|
891
893
|
const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
|
|
@@ -907,7 +909,7 @@
|
|
|
907
909
|
return (jsx("button", { type: "submit", className: style('p-m w-full @xl:w-auto', buttonStyle, className), children: button?.text ? button.text : 'Отправить заявку' }));
|
|
908
910
|
};
|
|
909
911
|
|
|
910
|
-
const initialFormState$
|
|
912
|
+
const initialFormState$5 = {
|
|
911
913
|
acquiringType: { key: 'Торговый эквайринг' },
|
|
912
914
|
fullName: '',
|
|
913
915
|
inn: '',
|
|
@@ -939,7 +941,7 @@
|
|
|
939
941
|
phone: phone.replace(/[^+\d]/g, ''),
|
|
940
942
|
});
|
|
941
943
|
}, [onSubmit]);
|
|
942
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
944
|
+
const [, { field, ...formProps }] = useForm(initialFormState$5, handleSubmit);
|
|
943
945
|
const regions = useGetRegions();
|
|
944
946
|
return (jsxs("form", { className: "container space-y-m", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430 \u0438 \u0440\u0435\u0433\u0438\u043E\u043D", className: "@xl:text-center" }), renderAcquiringRegion({ regions, field }), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderAcquiringDataOrganization(field), renderSlideCheckboxes(field), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
945
947
|
});
|
|
@@ -948,7 +950,7 @@
|
|
|
948
950
|
|
|
949
951
|
const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
|
|
950
952
|
|
|
951
|
-
const initialFormState$
|
|
953
|
+
const initialFormState$4 = {
|
|
952
954
|
name: '',
|
|
953
955
|
phone: '',
|
|
954
956
|
inn: '',
|
|
@@ -975,7 +977,7 @@
|
|
|
975
977
|
phone: phone.replace(/[^+\d]/g, ''),
|
|
976
978
|
});
|
|
977
979
|
}, [onSubmit]);
|
|
978
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
980
|
+
const [, { field, ...formProps }] = useForm(initialFormState$4, handleSubmit);
|
|
979
981
|
const regions = useGetRegions();
|
|
980
982
|
return (jsxs("form", { className: "container space-y-s", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
981
983
|
});
|
|
@@ -1070,7 +1072,7 @@
|
|
|
1070
1072
|
text: address,
|
|
1071
1073
|
})), ...withValidator(field('department'), defaultValidator) }) })] }));
|
|
1072
1074
|
|
|
1073
|
-
const initialFormState$
|
|
1075
|
+
const initialFormState$3 = {
|
|
1074
1076
|
amount: MIN_CREDIT_AMOUNT,
|
|
1075
1077
|
term: 12,
|
|
1076
1078
|
fullName: '',
|
|
@@ -1105,13 +1107,13 @@
|
|
|
1105
1107
|
partnerComments: `Сумма=${amount}/Срок=${term}/Выручка=${annualRevenue}`,
|
|
1106
1108
|
});
|
|
1107
1109
|
}, [onSubmit]);
|
|
1108
|
-
const [formState, { field, ...formProps }] = useForm(initialFormState$
|
|
1110
|
+
const [formState, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
|
|
1109
1111
|
const regions = useGetRegions();
|
|
1110
1112
|
const branches = useBranches(formState.region?.key).filter((branch) => branch?.address);
|
|
1111
1113
|
return (jsxs("form", { className: "container space-y-m", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", className: "@xl:text-center" }), renderCreditParameters(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderCreditDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u041E\u0444\u0438\u0441 \u0431\u0430\u043D\u043A\u0430", className: "@xl:text-center" }), renderRegionDepartment({ regions, branches, field }), renderSubmitButton(button), jsx(Footnote, { link: link })] }));
|
|
1112
1114
|
});
|
|
1113
1115
|
|
|
1114
|
-
const initialFormState$
|
|
1116
|
+
const initialFormState$2 = {
|
|
1115
1117
|
name: '',
|
|
1116
1118
|
phone: '',
|
|
1117
1119
|
};
|
|
@@ -1119,8 +1121,7 @@
|
|
|
1119
1121
|
name: nameValidator,
|
|
1120
1122
|
phone: phoneValidator,
|
|
1121
1123
|
});
|
|
1122
|
-
const ApplicationFormDeposit = JSX((
|
|
1123
|
-
const { button, link, onSubmit } = props;
|
|
1124
|
+
const ApplicationFormDeposit = JSX(({ button, link, onSubmit }) => {
|
|
1124
1125
|
const handleSubmit = useCallback((formState) => {
|
|
1125
1126
|
const { name, phone } = formState;
|
|
1126
1127
|
isValidationSuccess(depositValidator(formState)) &&
|
|
@@ -1130,7 +1131,7 @@
|
|
|
1130
1131
|
phone: phone.replace(/[^+\d]/g, ''),
|
|
1131
1132
|
});
|
|
1132
1133
|
}, [onSubmit]);
|
|
1133
|
-
const [, { field, ...formProps }] = useForm(initialFormState$
|
|
1134
|
+
const [, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
|
|
1134
1135
|
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u041E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u0437\u0430\u044F\u0432\u043A\u0443 \u0438 \u043C\u044B \u043E\u0442\u0432\u0435\u0442\u0438\u043C \u043D\u0430 \u043B\u044E\u0431\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043F\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430\u043C", className: "@xl:text-center mb-m" }), jsxs("div", { className: "max-w-[560px] m-auto space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "shrink-0 w-full", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto", children: [jsx("div", { className: "flex-1", children: jsx(Footnote, { link: link }) }), renderSubmitButton(button)] })] }));
|
|
1135
1136
|
});
|
|
1136
1137
|
|
|
@@ -1154,7 +1155,227 @@
|
|
|
1154
1155
|
version: button?.version,
|
|
1155
1156
|
});
|
|
1156
1157
|
const regionHref = regions?.find((_) => _.name === region.key)?.href;
|
|
1157
|
-
return (jsxs("div", { className: "container space-y-s @xl:space-y-lg", children: [regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(Button, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: button?.text ? button.text : 'Перейти' }) })) : null] }));
|
|
1158
|
+
return (jsxs("div", { className: "container space-y-s @xl:space-y-lg", children: [regions ? (jsx(SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? (jsx("div", { className: "text-center", children: jsx(Button, { href: regionHref, target: "_blank", className: style('p-m w-full @xl:w-auto', buttonStyle), children: button?.text ? button.text : 'Перейти' }) })) : null] }));
|
|
1159
|
+
});
|
|
1160
|
+
|
|
1161
|
+
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1162
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
|
|
1163
|
+
});
|
|
1164
|
+
|
|
1165
|
+
const CHECK_PATHS = [
|
|
1166
|
+
{
|
|
1167
|
+
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1168
|
+
fillRule: 'evenodd',
|
|
1169
|
+
clipRule: 'evenodd',
|
|
1170
|
+
fill: 'white',
|
|
1171
|
+
},
|
|
1172
|
+
];
|
|
1173
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1174
|
+
const handleChange = useCallback((e) => {
|
|
1175
|
+
if (disabled) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
e.preventDefault();
|
|
1179
|
+
onChange && onChange(!value);
|
|
1180
|
+
}, [onChange, disabled, value]);
|
|
1181
|
+
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1182
|
+
return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: "checkbox", "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null] }) }));
|
|
1183
|
+
});
|
|
1184
|
+
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1185
|
+
|
|
1186
|
+
const formatDate$1 = (date, toTimeStamp = false) => {
|
|
1187
|
+
if (typeof date === 'string') {
|
|
1188
|
+
return date.split('-').reverse().join('.');
|
|
1189
|
+
}
|
|
1190
|
+
else {
|
|
1191
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
1192
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
1193
|
+
const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
|
|
1194
|
+
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
const noop = () => {
|
|
1199
|
+
// Do nothing
|
|
1200
|
+
};
|
|
1201
|
+
|
|
1202
|
+
const DAY_COUNT = 6;
|
|
1203
|
+
const WEEK_COUNT = 7;
|
|
1204
|
+
const renderCalendarCells = ({ today, firstDayOfWeek, totalDays, currentMonth, currentYear, min, max, onDateClick, }) => {
|
|
1205
|
+
const calendarCells = [];
|
|
1206
|
+
let dayCounter = 1;
|
|
1207
|
+
for (let i = 0; i < DAY_COUNT; i++) {
|
|
1208
|
+
const rowCells = [];
|
|
1209
|
+
for (let j = 0; j < WEEK_COUNT; j++) {
|
|
1210
|
+
if (i === 0 && j < firstDayOfWeek) {
|
|
1211
|
+
rowCells.push(jsx("td", {}, `empty-${j}`));
|
|
1212
|
+
}
|
|
1213
|
+
else if (dayCounter > totalDays) {
|
|
1214
|
+
rowCells.push(jsx("td", {}, `empty-${j}`));
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
const currentDate = new Date(currentYear, currentMonth, dayCounter);
|
|
1218
|
+
const isToday = checkIsToday(currentDate, today);
|
|
1219
|
+
const isDisabled = checkIsDisabled(currentDate, min, max);
|
|
1220
|
+
rowCells.push(jsx("td", { children: jsx("div", { className: getDayStyles(isToday, isDisabled), onClick: () => !isDisabled && onDateClick(currentDate), children: dayCounter }) }, `day-${dayCounter}`));
|
|
1221
|
+
dayCounter++;
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
calendarCells.push(jsx("tr", { children: rowCells }, `row-${i}`));
|
|
1225
|
+
}
|
|
1226
|
+
return calendarCells;
|
|
1227
|
+
};
|
|
1228
|
+
const checkIsToday = (currentDate, today) => today && currentDate.toDateString() === today.toDateString();
|
|
1229
|
+
const checkIsDisabled = (currentDate, min, max) => (min && currentDate.getTime() < min.getTime()) || (max && currentDate.getTime() > max.getTime());
|
|
1230
|
+
const getDayStyles = (isToday, isDisabled) => style('p-s text-center rounded-md border', isToday ? '' : 'border-transparent hover:bg-gray', isDisabled ? 'text-gray hover:bg-transparent' : 'cursor-pointer');
|
|
1231
|
+
|
|
1232
|
+
const WEEK_DAYS = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];
|
|
1233
|
+
const Calendar = JSX(({ today, currentMonth, currentYear, min, max, onDateSelect = noop }) => {
|
|
1234
|
+
const handleDateClick = useCallback((date) => onDateSelect(date), []);
|
|
1235
|
+
const { firstDayOfWeek, totalDays } = useMemo(() => ({
|
|
1236
|
+
firstDayOfWeek: new Date(currentYear, currentMonth, 1).getDay() - 1,
|
|
1237
|
+
totalDays: new Date(currentYear, currentMonth + 1, 0).getDate(),
|
|
1238
|
+
}), [currentYear, currentMonth]);
|
|
1239
|
+
return (jsxs("table", { className: "mx-auto", children: [jsx("thead", { className: "text-gray font-light", children: jsx("tr", { children: WEEK_DAYS.map((day, index) => (jsx("th", { className: "p-s", children: day }, String(index)))) }) }), jsx("tbody", { children: renderCalendarCells({
|
|
1240
|
+
firstDayOfWeek,
|
|
1241
|
+
today,
|
|
1242
|
+
totalDays,
|
|
1243
|
+
currentYear,
|
|
1244
|
+
currentMonth,
|
|
1245
|
+
min,
|
|
1246
|
+
max,
|
|
1247
|
+
onDateClick: handleDateClick,
|
|
1248
|
+
}) })] }));
|
|
1249
|
+
});
|
|
1250
|
+
|
|
1251
|
+
const months = [
|
|
1252
|
+
'Январь',
|
|
1253
|
+
'Февраль',
|
|
1254
|
+
'Март',
|
|
1255
|
+
'Апрель',
|
|
1256
|
+
'Май',
|
|
1257
|
+
'Июнь',
|
|
1258
|
+
'Июль',
|
|
1259
|
+
'Август',
|
|
1260
|
+
'Сентябрь',
|
|
1261
|
+
'Октябрь',
|
|
1262
|
+
'Ноябрь',
|
|
1263
|
+
'Декабрь',
|
|
1264
|
+
];
|
|
1265
|
+
|
|
1266
|
+
const START_YEAR = 1940;
|
|
1267
|
+
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
1268
|
+
|
|
1269
|
+
const MONTHS_COUNT = 11;
|
|
1270
|
+
const MONTHS_OPTIONS = months.map((key) => ({ key }));
|
|
1271
|
+
const YEARS_OPTIONS = getYears()
|
|
1272
|
+
.reverse()
|
|
1273
|
+
.map((key) => ({ key: String(key) }));
|
|
1274
|
+
const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, }) => {
|
|
1275
|
+
const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
|
|
1276
|
+
const ref = useOutsideClick(close);
|
|
1277
|
+
const handleChangeVisibleCalendar = useCallback(() => onShowCalendar(!showCalendar), [showCalendar]);
|
|
1278
|
+
const handleNextMonth = useCallback(() => {
|
|
1279
|
+
if (selectedMonth + 1 <= MONTHS_COUNT) {
|
|
1280
|
+
onMonthSelect(selectedMonth + 1);
|
|
1281
|
+
}
|
|
1282
|
+
else {
|
|
1283
|
+
onMonthSelect(0);
|
|
1284
|
+
onYearSelect(selectedYear + 1);
|
|
1285
|
+
}
|
|
1286
|
+
}, [selectedMonth]);
|
|
1287
|
+
const handlePrevMonth = useCallback(() => {
|
|
1288
|
+
if (selectedMonth - 1 >= 0) {
|
|
1289
|
+
onMonthSelect(selectedMonth - 1);
|
|
1290
|
+
}
|
|
1291
|
+
else {
|
|
1292
|
+
onMonthSelect(11);
|
|
1293
|
+
onYearSelect(selectedYear - 1);
|
|
1294
|
+
}
|
|
1295
|
+
}, [selectedMonth]);
|
|
1296
|
+
const handleSelectMonth = useCallback(({ key }) => onMonthSelect(months.indexOf(key)), []);
|
|
1297
|
+
const handleSelectYear = useCallback(({ key }) => onYearSelect(Number(key)), []);
|
|
1298
|
+
return {
|
|
1299
|
+
handleChangeVisibleCalendar,
|
|
1300
|
+
handleNextMonth,
|
|
1301
|
+
handlePrevMonth,
|
|
1302
|
+
handleSelectMonth,
|
|
1303
|
+
handleSelectYear,
|
|
1304
|
+
monthsOptions: MONTHS_OPTIONS,
|
|
1305
|
+
yearsOptions: YEARS_OPTIONS,
|
|
1306
|
+
ref,
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
const ICON_PROPS = {
|
|
1311
|
+
name: 'ArrowUpIcon',
|
|
1312
|
+
iconVersion: 'black',
|
|
1313
|
+
width: '24',
|
|
1314
|
+
height: '24',
|
|
1315
|
+
};
|
|
1316
|
+
const SELECT_PROPS = {
|
|
1317
|
+
className: 'min-w-32',
|
|
1318
|
+
iconVersion: 'black',
|
|
1319
|
+
isBorder: false,
|
|
1320
|
+
};
|
|
1321
|
+
const formStyle = 'flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer ' +
|
|
1322
|
+
'hover:border-black active:border-black focus:border-black';
|
|
1323
|
+
const DatePicker = JSX(({ className = '', label = '', value, valid = true, minDate, maxDate, onChange }) => {
|
|
1324
|
+
const [showCalendar, { setValue }] = useBool(false);
|
|
1325
|
+
const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
|
|
1326
|
+
const [selectedYear, setSelectedYear] = useState(value?.getFullYear() || new Date().getFullYear());
|
|
1327
|
+
const { handlePrevMonth, handleNextMonth, handleSelectMonth, handleSelectYear, monthsOptions, yearsOptions, handleChangeVisibleCalendar, ref, } = useDatePickerManager({
|
|
1328
|
+
onYearSelect: setSelectedYear,
|
|
1329
|
+
onMonthSelect: setSelectedMonth,
|
|
1330
|
+
onShowCalendar: setValue,
|
|
1331
|
+
selectedYear,
|
|
1332
|
+
selectedMonth,
|
|
1333
|
+
showCalendar,
|
|
1334
|
+
});
|
|
1335
|
+
return (jsxs("div", { className: style(className, 'relative'), ref: ref, children: [jsx(Text, { size: "text-m", children: label }), renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-10 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] }));
|
|
1336
|
+
});
|
|
1337
|
+
const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate$1(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
|
|
1338
|
+
|
|
1339
|
+
const DatePickerControl = JSX(({ className, label, value = undefined, error, onChange }) => (jsxs("div", { className: className, children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx(DatePicker, { value: value, onChange: onChange, valid: Boolean(!error) }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null })] })));
|
|
1340
|
+
|
|
1341
|
+
const renderIndividualsFields = (field) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg", children: [jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E", ...withValidator(field('middleName'), nameValidator) }), jsx(PhoneInputControl, { className: "shrink-0 w-full", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { className: "shrink-0 w-full", label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...withValidator(field('date'), defaultValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
1342
|
+
|
|
1343
|
+
const initialFormState$1 = {
|
|
1344
|
+
surname: '',
|
|
1345
|
+
name: '',
|
|
1346
|
+
middleName: '',
|
|
1347
|
+
phone: '',
|
|
1348
|
+
mail: '',
|
|
1349
|
+
date: undefined,
|
|
1350
|
+
consentDataProcessing: true,
|
|
1351
|
+
};
|
|
1352
|
+
const individualsValidator = objectValidator({
|
|
1353
|
+
surname: nameValidator,
|
|
1354
|
+
name: nameValidator,
|
|
1355
|
+
middleName: nameValidator,
|
|
1356
|
+
phone: phoneValidator,
|
|
1357
|
+
mail: defaultValidator,
|
|
1358
|
+
date: defaultValidator,
|
|
1359
|
+
});
|
|
1360
|
+
const ApplicationFormIndividuals = JSX((props) => {
|
|
1361
|
+
const { button, link, product, onSubmit } = props;
|
|
1362
|
+
const handleSubmit = useCallback((formState) => {
|
|
1363
|
+
const { surname, name, middleName, phone, mail, date, consentDataProcessing } = formState;
|
|
1364
|
+
isValidationSuccess(individualsValidator(formState)) &&
|
|
1365
|
+
onSubmit({
|
|
1366
|
+
typeForm: 'dpst',
|
|
1367
|
+
surname,
|
|
1368
|
+
name,
|
|
1369
|
+
middleName,
|
|
1370
|
+
mail,
|
|
1371
|
+
consentDataProcessing,
|
|
1372
|
+
phone: phone.replace(/[^+\d]/g, ''),
|
|
1373
|
+
date: date?.toISOString().slice(0, 10) || '',
|
|
1374
|
+
product: product || '',
|
|
1375
|
+
}, true);
|
|
1376
|
+
}, [onSubmit]);
|
|
1377
|
+
const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
|
|
1378
|
+
return (jsxs("form", { className: "container space-y-s", onSubmit: formProps.onSubmit, children: [renderIndividualsFields(field), jsxs("div", { className: "@xl:flex justify-between items-center", children: [jsxs("div", { className: "@xl:mb-0 mb-2 flex items-center gap-3", children: [jsx(Checkbox, { ...withValidator(field('consentDataProcessing'), defaultValidator) }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderSubmitButton(button)] })] }));
|
|
1158
1379
|
});
|
|
1159
1380
|
|
|
1160
1381
|
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
@@ -1261,6 +1482,7 @@
|
|
|
1261
1482
|
ApplicationFormCredit,
|
|
1262
1483
|
ApplicationFormAcquiring,
|
|
1263
1484
|
ApplicationFormGrantSupport,
|
|
1485
|
+
ApplicationFormIndividuals,
|
|
1264
1486
|
};
|
|
1265
1487
|
|
|
1266
1488
|
const ResponseNotification = JSX(({ responseType }) => {
|
|
@@ -1269,12 +1491,12 @@
|
|
|
1269
1491
|
return (jsxs("div", { className: `flex items-center p-lg rounded-md space-x-m ${backgroundColor}`, children: [responseOK ? (jsx(Img, { image: { icon: 'ResponseOKIcon' }, width: "42", height: "42" })) : (jsx(Img, { image: { icon: 'ResponseFailIcon' }, width: "37", height: "34" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-2xs" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
|
|
1270
1492
|
});
|
|
1271
1493
|
|
|
1272
|
-
const API =
|
|
1494
|
+
const API = LeadServiceAPI();
|
|
1273
1495
|
const ApplicationForm = JSX((props) => {
|
|
1274
1496
|
const { className, formBlock, ...rest } = props;
|
|
1275
1497
|
const [responseType, setResponseType] = useState('');
|
|
1276
|
-
const handleSubmit = useCallback(async (data) => {
|
|
1277
|
-
const status = (await API.send(data)) ? 'OK' : 'Fail';
|
|
1498
|
+
const handleSubmit = useCallback(async (data, isIndividualType) => {
|
|
1499
|
+
const status = (await API.send(data, isIndividualType)) ? 'OK' : 'Fail';
|
|
1278
1500
|
setResponseType(status);
|
|
1279
1501
|
return status;
|
|
1280
1502
|
}, []);
|
|
@@ -1321,6 +1543,8 @@
|
|
|
1321
1543
|
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: _ }) }, `benefitListItem-${i}`))) })) : null;
|
|
1322
1544
|
};
|
|
1323
1545
|
|
|
1546
|
+
const isIcon = (icon) => Boolean(icon?.src || icon?.icon);
|
|
1547
|
+
|
|
1324
1548
|
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical
|
|
1325
1549
|
? 'flex-col gap-xs justify-items-stretch'
|
|
1326
1550
|
: 'flex-wrap @xl:flex-nowrap gap-lg sm:gap-m', className), children: buttons.map(renderButton(buttonClassName)) })) : null;
|
|
@@ -1335,7 +1559,7 @@
|
|
|
1335
1559
|
const iconVersionDefault = version === 'secondary' ? 'color' : 'white';
|
|
1336
1560
|
return icon?.iconVersion ? icon?.iconVersion : iconVersionDefault;
|
|
1337
1561
|
};
|
|
1338
|
-
const renderButtonIcon = (icon) => icon
|
|
1562
|
+
const renderButtonIcon = (icon) => isIcon(icon) ? (jsx(Img, { image: icon, width: String(icon?.size?.width || DEFAULT_ICON_W), height: String(DEFAULT_ICON_W) })) : null;
|
|
1339
1563
|
|
|
1340
1564
|
const headlineVersionStyles = {
|
|
1341
1565
|
XXL: {
|
|
@@ -1393,17 +1617,17 @@
|
|
|
1393
1617
|
return (jsxs(BlockWrapper, { className: style(isEmbedded ? '@container-normal' : '', className), defaultPadding: isEmbedded ? '' : 'p-6xl', version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, font: versionStyle.descriptionWeight, align: align, ...descriptionStyle, children: description })) : null] }));
|
|
1394
1618
|
});
|
|
1395
1619
|
|
|
1396
|
-
const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap w-full", children: bonusItems.length > 0
|
|
1397
|
-
? bonusItems.map((_, i) => (jsxs("div", { className: "
|
|
1620
|
+
const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap gap-3xl gap-x-m w-full", children: bonusItems.length > 0
|
|
1621
|
+
? bonusItems.map((_, i) => (jsxs("div", { className: "w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow w-full p-xl sm:p-m border border-gray", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
|
|
1398
1622
|
? renderBonusItemContent(_.bonusItemContent)
|
|
1399
1623
|
: null] })] }, String(i))))
|
|
1400
1624
|
: null })] }) })));
|
|
1401
1625
|
const renderBonusItemContent = (bonusItemContent) => bonusItemContent.bonusType === 'count'
|
|
1402
1626
|
? renderBonusCount(bonusItemContent)
|
|
1403
1627
|
: renderBonusImage(bonusItemContent);
|
|
1404
|
-
const renderBonusCount = (_) => (jsxs("div", { className: "w-full pt-default mt-s flex justify-center sm:justify-end items-end", children: [_.bonusCount ? (
|
|
1628
|
+
const renderBonusCount = (_) => (jsxs("div", { className: "w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end", children: [_.bonusCount ? (
|
|
1405
1629
|
// -mb-10 добавлен для выравнивания bonusCount относительно bonusName, тк шрифт font-mohave неправильно высчитывает line-height
|
|
1406
|
-
jsx("div", { className: "shrink-0 -mb-
|
|
1630
|
+
jsx("div", { className: "shrink-0 -mb-6 @xl:-mb-4", children: jsx("span", { className: "font-mohave text-title-large sm:text-title-extra gradient-color-text", children: _.bonusCount }) })) : null, _.bonusName ? (jsx("div", { className: "shrink-0 gradient-color-text", children: jsx(Text, { size: "text-h2", children: _.bonusName }) })) : null] }));
|
|
1407
1631
|
const renderBonusImage = (_) => _.image ? jsx(Img, { className: "min-w-12 p-xs rounded-icon shrink-0", image: _.image }) : null;
|
|
1408
1632
|
|
|
1409
1633
|
const bonusBenefitStyles = 'items-center';
|
|
@@ -1661,31 +1885,6 @@
|
|
|
1661
1885
|
: null, jsxs("div", { className: "flex flex-col gap-y-4xl @xl:w-96", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1662
1886
|
});
|
|
1663
1887
|
|
|
1664
|
-
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1665
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => (jsx("path", { d: d, fill: pathFill || 'currentColor', ...commonOptions, ...options }, i))) }));
|
|
1666
|
-
});
|
|
1667
|
-
|
|
1668
|
-
const CHECK_PATHS = [
|
|
1669
|
-
{
|
|
1670
|
-
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1671
|
-
fillRule: 'evenodd',
|
|
1672
|
-
clipRule: 'evenodd',
|
|
1673
|
-
fill: 'white',
|
|
1674
|
-
},
|
|
1675
|
-
];
|
|
1676
|
-
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1677
|
-
const handleChange = useCallback((e) => {
|
|
1678
|
-
if (disabled) {
|
|
1679
|
-
return;
|
|
1680
|
-
}
|
|
1681
|
-
e.preventDefault();
|
|
1682
|
-
onChange && onChange(!value);
|
|
1683
|
-
}, [onChange, disabled, value]);
|
|
1684
|
-
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1685
|
-
return (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer group/box", onClick: handleChange, children: [jsx("div", { className: style('appearance-none w-5 h-5 border-solid cursor-pointer m-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: "checkbox", "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled) }), value ? icon : null, text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null] }) }));
|
|
1686
|
-
});
|
|
1687
|
-
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1688
|
-
|
|
1689
1888
|
const STEP_DAYS = 1;
|
|
1690
1889
|
const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
|
|
1691
1890
|
const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
|
|
@@ -2569,7 +2768,7 @@
|
|
|
2569
2768
|
const cardWrapperStyle = (_, { someCardsHighlighted }) => style(cardBaseStyle, someCardsHighlighted && (isCardHighlighted(_) ? 'pt-3xl' : 'pt-3xl sm:pt-16'));
|
|
2570
2769
|
const cardStyle = (_, { someCardsHighlighted, showBorder, cardSize = 'normal', }) => style(cardBaseStyle, 'min-w-80', CARD_SIZE_MAP[cardSize], // TODO fix для RecommendationCard
|
|
2571
2770
|
someCardsHighlighted && (isCardHighlighted(_) ? 'pt-3xl sm:pt-16' : 'pt-3xl'), showBorder &&
|
|
2572
|
-
'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider');
|
|
2771
|
+
'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider h-full');
|
|
2573
2772
|
const isCardHighlighted = (_) => _?.content && 'isHighlighting' in _.content && _.content.isHighlighting;
|
|
2574
2773
|
|
|
2575
2774
|
const VISIBLE_ITEM_COUNT = 1;
|
|
@@ -2585,7 +2784,7 @@
|
|
|
2585
2784
|
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
2586
2785
|
// TODO Remove
|
|
2587
2786
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
2588
|
-
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsxs("div", { className: style(isAlignCenter ? 'flex justify-center' : '', 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : undefined, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderCarouselCards({ noCardBorder, activeIndex, cardSize, ...rest }) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }), jsx(SwipeListControlDots, { className: "@
|
|
2787
|
+
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsxs("div", { className: style(isAlignCenter ? 'flex justify-center' : '', 'relative max-w-full'), children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: isGap ? ITEMS_GAP : undefined, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: renderCarouselCards({ noCardBorder, activeIndex, cardSize, ...rest }) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }), jsx(SwipeListControlDots, { className: "@5xl:hidden", containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: count, listType: "horizontal-list" })] }));
|
|
2589
2788
|
});
|
|
2590
2789
|
Carousel.childrenTypes = [
|
|
2591
2790
|
'CarouselCard',
|
|
@@ -2615,11 +2814,11 @@
|
|
|
2615
2814
|
'gradient-color-text-on-yellow',
|
|
2616
2815
|
][blockIndex % 3];
|
|
2617
2816
|
|
|
2618
|
-
const titleSize = '
|
|
2817
|
+
const titleSize = 'XS';
|
|
2619
2818
|
|
|
2620
2819
|
const layerBaseStyle = 'z-10 border border-solid w-full h-full';
|
|
2621
2820
|
const layerStyle = style(layerBaseStyle, 'absolute hidden @xl:block border-transparent');
|
|
2622
|
-
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-6xl sm:pb-4xl @container-normal', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "relative", children: [jsx("div", { className: style(layerStyle, 'top-9 right-12 bg-green-dark') }), jsx("div", { className: style(layerStyle, 'top-6 right-8 bg-green') }), jsx("div", { className: style(layerStyle, 'top-3 right-4 bg-green-light') }), jsxs("div", { className: style(layerBaseStyle, 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isEmbedded: true }), renderButtonsSection([button], {
|
|
2821
|
+
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-6xl sm:pb-4xl @container-normal', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "relative h-full", children: [jsx("div", { className: style(layerStyle, 'top-9 right-12 bg-green-dark') }), jsx("div", { className: style(layerStyle, 'top-6 right-8 bg-green') }), jsx("div", { className: style(layerStyle, 'top-3 right-4 bg-green-light') }), jsxs("div", { className: style(layerBaseStyle, 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isEmbedded: true }), renderButtonsSection([button], {
|
|
2623
2822
|
className: 'mt-m sm:mt-6xl sm:justify-center',
|
|
2624
2823
|
isVertical: true,
|
|
2625
2824
|
})] })] }) })));
|
|
@@ -2629,20 +2828,21 @@
|
|
|
2629
2828
|
center: '@xl:self-center',
|
|
2630
2829
|
end: '@xl:self-end',
|
|
2631
2830
|
};
|
|
2632
|
-
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary = false, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl
|
|
2633
|
-
className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), isImageSecondary
|
|
2831
|
+
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary = false, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col @md:flex-row gap-3xl', leftImage ? 'self-start' : ''), children: [renderImageContainer(leftImage, { imageAlign, className: 'm-auto' }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow space-y-lg min-w-fit", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
2832
|
+
className: style('@xl:justify-self-end @xl:col-start-2', buttons ? rowSpanStyle(isImageAlwaysOnRight) : '', positionStyle(isImageAlwaysOnRight), imageSecondaryStyle(isImageSecondary)),
|
|
2634
2833
|
imageAlign,
|
|
2635
2834
|
}), renderButtons(buttons)] })] })] })));
|
|
2636
2835
|
const rowSpanStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'row-span-2' : '@xl:row-span-2';
|
|
2637
2836
|
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight ? 'justify-self-end col-start-2 self-center' : '';
|
|
2638
2837
|
const renderButtons = (buttons) => buttons ? jsx("div", { className: "self-end", children: buttons }) : null;
|
|
2639
2838
|
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('shrink-1/2 justify-self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
2839
|
+
const imageSecondaryStyle = (isImageSecondary) => isImageSecondary ? 'hidden @md:block' : '';
|
|
2640
2840
|
|
|
2641
2841
|
const cardStyleMap = {
|
|
2642
2842
|
black: 'bg-black',
|
|
2643
2843
|
white: 'bg-white',
|
|
2644
2844
|
};
|
|
2645
|
-
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: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, 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] }) })));
|
|
2845
|
+
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: title || description ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, 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] }) })));
|
|
2646
2846
|
const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
2647
2847
|
|
|
2648
2848
|
const cardColumnsModeStyleMap = {
|
|
@@ -2738,7 +2938,7 @@
|
|
|
2738
2938
|
'description' in _ ? (jsx("span", { className: _.descriptionClassName, children: renderBenefitDescription(_.description, i) }, String(i))) : null,
|
|
2739
2939
|
]);
|
|
2740
2940
|
|
|
2741
|
-
const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m min-w-56
|
|
2941
|
+
const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m min-w-56 items-center', className), children: ['icon' in _ ? renderBenefitIcon(_.icon, benefitsVersion) : null, jsx("div", { children: renderBenefitText(_) })] })));
|
|
2742
2942
|
|
|
2743
2943
|
const MAX_BENEFITS_LEN_DEVIATION = 16;
|
|
2744
2944
|
const benefitLength = (_) => _.type === 'rte'
|
|
@@ -2766,12 +2966,6 @@
|
|
|
2766
2966
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
2767
2967
|
const renderHeadline = ({ title, description, headlineVersion, align }) => title || description ? (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true })) : null;
|
|
2768
2968
|
|
|
2769
|
-
const CarouselProgramsCard = JSX(({ className, title, icon, list, href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl", ...rest, children: jsx(LinkWrapper, { className: "flex items-center h-full", href: href, target: target, children: jsx(BaseProductTile, { title: title, headlineVersion: "XS", image: icon, imageOptions: { directionRight: true, imageAlign: 'center' }, benefits: list?.map((_) => ({
|
|
2770
|
-
type: 'default',
|
|
2771
|
-
label: _.title,
|
|
2772
|
-
description: _.description,
|
|
2773
|
-
})) }) }) })));
|
|
2774
|
-
|
|
2775
2969
|
const ICONS_MAP = [
|
|
2776
2970
|
{
|
|
2777
2971
|
origins: ['t.me', 'telegram.org'],
|
|
@@ -2801,6 +2995,10 @@
|
|
|
2801
2995
|
origins: ['rutube.ru'],
|
|
2802
2996
|
iconMapped: { icon: 'RutubeIcon' },
|
|
2803
2997
|
},
|
|
2998
|
+
{
|
|
2999
|
+
origins: ['dzen.ru'],
|
|
3000
|
+
iconMapped: { icon: 'DzenIcon' },
|
|
3001
|
+
},
|
|
2804
3002
|
];
|
|
2805
3003
|
|
|
2806
3004
|
const findIconByHref = (href) => ICONS_MAP.find(({ origins }) => origins?.some((_) => href?.includes(_))) || {};
|
|
@@ -2810,7 +3008,7 @@
|
|
|
2810
3008
|
const buttons = media?.map((_) => {
|
|
2811
3009
|
const { href, icon, text } = _;
|
|
2812
3010
|
const { iconMapped } = findIconByHref(href);
|
|
2813
|
-
const iconCustom =
|
|
3011
|
+
const iconCustom = isIcon(icon) ? icon : iconMapped;
|
|
2814
3012
|
const buttonText = showButtonText ? { text } : { text: '' };
|
|
2815
3013
|
if (!hasText && text) {
|
|
2816
3014
|
setHasText(true);
|
|
@@ -2822,19 +3020,18 @@
|
|
|
2822
3020
|
version,
|
|
2823
3021
|
};
|
|
2824
3022
|
});
|
|
2825
|
-
const buttonClassName = style('border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media', showButtonText && hasText ? '' : '
|
|
2826
|
-
return (jsxs("div", { className:
|
|
3023
|
+
const buttonClassName = style('border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media', showButtonText && hasText ? '' : 'basis-auto', stretched ? 'flex-1 justify-center' : '');
|
|
3024
|
+
return (jsxs("div", { className: style('flex flex-col gap-xs', className), children: [jsx("div", { className: "flex gap-xs", children: renderButtonsSection(buttons, {
|
|
2827
3025
|
className: stretched ? 'w-full' : '',
|
|
2828
3026
|
buttonClassName,
|
|
2829
|
-
}) })] }));
|
|
3027
|
+
}) }), children ? (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: children })) : null] }));
|
|
2830
3028
|
});
|
|
2831
|
-
const getFilteredIcon = (icon) => (icon?.src || icon?.icon ? icon : undefined);
|
|
2832
3029
|
|
|
2833
3030
|
const ImageAlwaysOnRight = true;
|
|
2834
3031
|
|
|
2835
3032
|
//TODO: replace SocialMedia with renderButtonSection
|
|
2836
|
-
const CarouselRecommendationCard = JSX(({ className, padding, description, href, icon, items = [], listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', isImageAlwaysOnRight = ImageAlwaysOnRight, ...rest }) => {
|
|
2837
|
-
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children:
|
|
3033
|
+
const CarouselRecommendationCard = JSX(({ className, padding, description, href, icon, items = [], listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => {
|
|
3034
|
+
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: align })) : null, ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, listItemSize: listItemSize })] }) }) }));
|
|
2838
3035
|
});
|
|
2839
3036
|
|
|
2840
3037
|
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: className, ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
@@ -2871,9 +3068,8 @@
|
|
|
2871
3068
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
2872
3069
|
const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
|
|
2873
3070
|
const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
|
|
2874
|
-
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-
|
|
3071
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col', className), defaultPadding: "p-2xl", ...rest, children: [isIcon(icon) ? (jsx("div", { className: "self-center", children: jsx(Img, { image: icon }) })) : null, title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button ? jsx(Button, { className: "w-full mt-m mb-lg", ...button }) : null, cardCells.length ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs("div", { children: [visibleCells, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenCells })] })), renderFoldButton: cardCells.length > 1 ? renderFoldButton$1 : null })) : null] }));
|
|
2875
3072
|
});
|
|
2876
|
-
const renderIconBlock$1 = (icon) => (jsx("div", { className: "self-center", children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }));
|
|
2877
3073
|
const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center", onClick: onToggle, children: [jsx("div", { children: isUnfolded ? 'Скрыть' : 'Подробнее о тарифе' }), jsx(Icon, { className: "text-primary-text", name: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" })] }));
|
|
2878
3074
|
|
|
2879
3075
|
const gradientStyle = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
@@ -2966,7 +3162,7 @@
|
|
|
2966
3162
|
return (jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
|
|
2967
3163
|
};
|
|
2968
3164
|
|
|
2969
|
-
const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
3165
|
+
const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
2970
3166
|
|
|
2971
3167
|
const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
2972
3168
|
const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box';
|
|
@@ -3161,164 +3357,11 @@
|
|
|
3161
3357
|
|
|
3162
3358
|
const Pagination = ({ currentPage, onPageChange, totalPages, itemCount, onItemCountChange, }) => (jsxs("div", { className: "mt-3xl flex justify-between items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [jsx(PaginationContainer, { currentPage: currentPage, onPageChange: onPageChange, totalPages: totalPages }), itemCount && onItemCountChange ? (jsx(PageSizeSelector, { itemCount: itemCount, onItemCountChange: onItemCountChange })) : null] }));
|
|
3163
3359
|
|
|
3164
|
-
const formatDate$1 = (date, toTimeStamp = false) => {
|
|
3165
|
-
if (typeof date === 'string') {
|
|
3166
|
-
return date.split('-').reverse().join('.');
|
|
3167
|
-
}
|
|
3168
|
-
else {
|
|
3169
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
3170
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
3171
|
-
const year = toTimeStamp ? String(date.getFullYear()) : String(date.getFullYear()).slice(-2);
|
|
3172
|
-
return toTimeStamp ? `${year}-${month}-${day}` : `${day}.${month}.${year}`;
|
|
3173
|
-
}
|
|
3174
|
-
};
|
|
3175
|
-
|
|
3176
|
-
const noop = () => {
|
|
3177
|
-
// Do nothing
|
|
3178
|
-
};
|
|
3179
|
-
|
|
3180
|
-
const DAY_COUNT = 6;
|
|
3181
|
-
const WEEK_COUNT = 7;
|
|
3182
|
-
const renderCalendarCells = ({ today, firstDayOfWeek, totalDays, currentMonth, currentYear, min, max, onDateClick, }) => {
|
|
3183
|
-
const calendarCells = [];
|
|
3184
|
-
let dayCounter = 1;
|
|
3185
|
-
for (let i = 0; i < DAY_COUNT; i++) {
|
|
3186
|
-
const rowCells = [];
|
|
3187
|
-
for (let j = 0; j < WEEK_COUNT; j++) {
|
|
3188
|
-
if (i === 0 && j < firstDayOfWeek) {
|
|
3189
|
-
rowCells.push(jsx("td", {}, `empty-${j}`));
|
|
3190
|
-
}
|
|
3191
|
-
else if (dayCounter > totalDays) {
|
|
3192
|
-
rowCells.push(jsx("td", {}, `empty-${j}`));
|
|
3193
|
-
}
|
|
3194
|
-
else {
|
|
3195
|
-
const currentDate = new Date(currentYear, currentMonth, dayCounter);
|
|
3196
|
-
const isToday = checkIsToday(currentDate, today);
|
|
3197
|
-
const isDisabled = checkIsDisabled(currentDate, min, max);
|
|
3198
|
-
rowCells.push(jsx("td", { children: jsx("div", { className: getDayStyles(isToday, isDisabled), onClick: () => !isDisabled && onDateClick(currentDate), children: dayCounter }) }, `day-${dayCounter}`));
|
|
3199
|
-
dayCounter++;
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
calendarCells.push(jsx("tr", { children: rowCells }, `row-${i}`));
|
|
3203
|
-
}
|
|
3204
|
-
return calendarCells;
|
|
3205
|
-
};
|
|
3206
|
-
const checkIsToday = (currentDate, today) => today && currentDate.toDateString() === today.toDateString();
|
|
3207
|
-
const checkIsDisabled = (currentDate, min, max) => (min && currentDate.getTime() < min.getTime()) || (max && currentDate.getTime() > max.getTime());
|
|
3208
|
-
const getDayStyles = (isToday, isDisabled) => style('p-s text-center rounded-md border', isToday ? '' : 'border-transparent hover:bg-gray', isDisabled ? 'text-gray hover:bg-transparent' : 'cursor-pointer');
|
|
3209
|
-
|
|
3210
|
-
const WEEK_DAYS = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];
|
|
3211
|
-
const Calendar = JSX(({ today, currentMonth, currentYear, min, max, onDateSelect = noop }) => {
|
|
3212
|
-
const handleDateClick = useCallback((date) => onDateSelect(date), []);
|
|
3213
|
-
const { firstDayOfWeek, totalDays } = useMemo(() => ({
|
|
3214
|
-
firstDayOfWeek: new Date(currentYear, currentMonth, 1).getDay() - 1,
|
|
3215
|
-
totalDays: new Date(currentYear, currentMonth + 1, 0).getDate(),
|
|
3216
|
-
}), [currentYear, currentMonth]);
|
|
3217
|
-
return (jsxs("table", { className: "mx-auto", children: [jsx("thead", { className: "text-gray font-light", children: jsx("tr", { children: WEEK_DAYS.map((day, index) => (jsx("th", { className: "p-s", children: day }, String(index)))) }) }), jsx("tbody", { children: renderCalendarCells({
|
|
3218
|
-
firstDayOfWeek,
|
|
3219
|
-
today,
|
|
3220
|
-
totalDays,
|
|
3221
|
-
currentYear,
|
|
3222
|
-
currentMonth,
|
|
3223
|
-
min,
|
|
3224
|
-
max,
|
|
3225
|
-
onDateClick: handleDateClick,
|
|
3226
|
-
}) })] }));
|
|
3227
|
-
});
|
|
3228
|
-
|
|
3229
|
-
const months = [
|
|
3230
|
-
'Январь',
|
|
3231
|
-
'Февраль',
|
|
3232
|
-
'Март',
|
|
3233
|
-
'Апрель',
|
|
3234
|
-
'Май',
|
|
3235
|
-
'Июнь',
|
|
3236
|
-
'Июль',
|
|
3237
|
-
'Август',
|
|
3238
|
-
'Сентябрь',
|
|
3239
|
-
'Октябрь',
|
|
3240
|
-
'Ноябрь',
|
|
3241
|
-
'Декабрь',
|
|
3242
|
-
];
|
|
3243
|
-
|
|
3244
|
-
const START_YEAR = 1970;
|
|
3245
|
-
const getYears = () => Array.from({ length: new Date().getFullYear() - START_YEAR + 1 }, (_, i) => START_YEAR + i);
|
|
3246
|
-
|
|
3247
|
-
const MONTHS_COUNT = 11;
|
|
3248
|
-
const MONTHS_OPTIONS = months.map((key) => ({ key }));
|
|
3249
|
-
const YEARS_OPTIONS = getYears()
|
|
3250
|
-
.reverse()
|
|
3251
|
-
.map((key) => ({ key: String(key) }));
|
|
3252
|
-
const useDatePickerManager = ({ onShowCalendar, showCalendar, selectedMonth, onMonthSelect, onYearSelect, selectedYear, }) => {
|
|
3253
|
-
const close = useCallback(() => showCalendar && onShowCalendar(false), [showCalendar]);
|
|
3254
|
-
const ref = useOutsideClick(close);
|
|
3255
|
-
const handleChangeVisibleCalendar = useCallback(() => onShowCalendar(!showCalendar), [showCalendar]);
|
|
3256
|
-
const handleNextMonth = useCallback(() => {
|
|
3257
|
-
if (selectedMonth + 1 <= MONTHS_COUNT) {
|
|
3258
|
-
onMonthSelect(selectedMonth + 1);
|
|
3259
|
-
}
|
|
3260
|
-
else {
|
|
3261
|
-
onMonthSelect(0);
|
|
3262
|
-
onYearSelect(selectedYear + 1);
|
|
3263
|
-
}
|
|
3264
|
-
}, [selectedMonth]);
|
|
3265
|
-
const handlePrevMonth = useCallback(() => {
|
|
3266
|
-
if (selectedMonth - 1 >= 0) {
|
|
3267
|
-
onMonthSelect(selectedMonth - 1);
|
|
3268
|
-
}
|
|
3269
|
-
else {
|
|
3270
|
-
onMonthSelect(11);
|
|
3271
|
-
onYearSelect(selectedYear - 1);
|
|
3272
|
-
}
|
|
3273
|
-
}, [selectedMonth]);
|
|
3274
|
-
const handleSelectMonth = useCallback(({ key }) => onMonthSelect(months.indexOf(key)), []);
|
|
3275
|
-
const handleSelectYear = useCallback(({ key }) => onYearSelect(Number(key)), []);
|
|
3276
|
-
return {
|
|
3277
|
-
handleChangeVisibleCalendar,
|
|
3278
|
-
handleNextMonth,
|
|
3279
|
-
handlePrevMonth,
|
|
3280
|
-
handleSelectMonth,
|
|
3281
|
-
handleSelectYear,
|
|
3282
|
-
monthsOptions: MONTHS_OPTIONS,
|
|
3283
|
-
yearsOptions: YEARS_OPTIONS,
|
|
3284
|
-
ref,
|
|
3285
|
-
};
|
|
3286
|
-
};
|
|
3287
|
-
|
|
3288
|
-
const ICON_PROPS = {
|
|
3289
|
-
name: 'ArrowUpIcon',
|
|
3290
|
-
iconVersion: 'black',
|
|
3291
|
-
width: '24',
|
|
3292
|
-
height: '24',
|
|
3293
|
-
};
|
|
3294
|
-
const SELECT_PROPS = {
|
|
3295
|
-
className: 'min-w-32',
|
|
3296
|
-
iconVersion: 'black',
|
|
3297
|
-
isBorder: false,
|
|
3298
|
-
};
|
|
3299
|
-
const formStyle = 'flex justify-between px-m py-s border border-gray rounded-md cursor-pointer ' +
|
|
3300
|
-
'hover:border-black active:border-black focus:border-black';
|
|
3301
|
-
const DatePicker = JSX(({ className = '', label = '', value, minDate, maxDate, onChange }) => {
|
|
3302
|
-
const [showCalendar, { setValue }] = useBool(false);
|
|
3303
|
-
const [selectedMonth, setSelectedMonth] = useState(value?.getMonth() || new Date().getMonth());
|
|
3304
|
-
const [selectedYear, setSelectedYear] = useState(value?.getFullYear() || new Date().getFullYear());
|
|
3305
|
-
const { handlePrevMonth, handleNextMonth, handleSelectMonth, handleSelectYear, monthsOptions, yearsOptions, handleChangeVisibleCalendar, ref, } = useDatePickerManager({
|
|
3306
|
-
onYearSelect: setSelectedYear,
|
|
3307
|
-
onMonthSelect: setSelectedMonth,
|
|
3308
|
-
onShowCalendar: setValue,
|
|
3309
|
-
selectedYear,
|
|
3310
|
-
selectedMonth,
|
|
3311
|
-
showCalendar,
|
|
3312
|
-
});
|
|
3313
|
-
return (jsxs("div", { className: style(className, 'relative'), ref: ref, children: [jsx(Text, { size: "text-m", children: label }), renderDatePickerForm(handleChangeVisibleCalendar, value), showCalendar ? (jsxs("div", { className: "absolute bg-white z-10 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] }));
|
|
3314
|
-
});
|
|
3315
|
-
const renderDatePickerForm = (handleChangeVisibleCalendar, value) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: formStyle, children: [jsx(Paragraph, { children: value && formatDate$1(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
|
|
3316
|
-
|
|
3317
3360
|
const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus, placeholder = 'Поиск по сайту' }) => {
|
|
3318
3361
|
const handleChange = useCallback((ev) => {
|
|
3319
3362
|
onChange && onChange(ev.target?.value || '');
|
|
3320
3363
|
}, [onChange]);
|
|
3321
|
-
return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-
|
|
3364
|
+
return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md', 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'), value: value, type: "text", name: "search-bar-input", placeholder: placeholder, autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
3322
3365
|
});
|
|
3323
3366
|
|
|
3324
3367
|
const DepositoryFilter = JSX(({ field, onClearFilter, filtrationState }) => (jsxs("div", { className: "grid grid-cols-12 mb-3xl space-x-xl", children: [jsx(SearchInput, { className: "col-span-4 mt-auto", placeholder: "\u041F\u043E\u0438\u0441\u043A", ...field('query') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u043E\u0442", maxDate: filtrationState.endDate, ...field('startDate') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u0434\u043E", minDate: filtrationState.startDate, ...field('endDate') }), jsx("div", { className: "col-span-2 mt-auto", children: jsx("button", { className: "px-m py-s rounded-md bg-main-gray text-green cursor-pointer w-full", onClick: onClearFilter, children: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440" }) })] })));
|
|
@@ -3832,7 +3875,7 @@
|
|
|
3832
3875
|
return (jsx("a", { className: `text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
|
|
3833
3876
|
});
|
|
3834
3877
|
|
|
3835
|
-
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex flex-col @
|
|
3878
|
+
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: style('@container', className), children: [jsx("div", { className: "pt-lg", children: jsx(Text, { size: "text-xs", font: "font-light", color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
|
|
3836
3879
|
|
|
3837
3880
|
const LEFT_COL_WIDTH = 'w-52';
|
|
3838
3881
|
const Footer = JSX(({ className, ...rest }) => {
|
|
@@ -3941,16 +3984,16 @@
|
|
|
3941
3984
|
return result;
|
|
3942
3985
|
};
|
|
3943
3986
|
|
|
3944
|
-
const renderForeignOffices = (foreignOffices) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-5xl", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null;
|
|
3987
|
+
const renderForeignOffices = (foreignOffices) => foreignOffices?.length ? (jsxs("div", { className: "sm:border-t sm:border-main-divider mt-2xs pt-2xs", children: [jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex flex-col sm:flex-row gap-5xl", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null;
|
|
3945
3988
|
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
3946
3989
|
const link = useLink();
|
|
3947
3990
|
const { text, target, href, onClick } = link(rest);
|
|
3948
|
-
return (jsxs("div", { className: "flex gap-s", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })) : null] }));
|
|
3991
|
+
return (jsxs("div", { className: "flex gap-s items-center", children: [icon ? jsx(Img, { pathPrefix: "/wcms-resources/", image: icon }) : null, text ? (jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text }) })) : null] }));
|
|
3949
3992
|
});
|
|
3950
3993
|
|
|
3951
|
-
const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-2xs", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
3994
|
+
const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-xs sm:mb-2xs", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
3952
3995
|
onChangeLocation && onChangeLocation(region);
|
|
3953
|
-
}, children: region.name || '' }) }, region.id));
|
|
3996
|
+
}, children: jsx(Text, { size: "text-l", font: "font-light", children: region.name || '' }) }) }, region.id));
|
|
3954
3997
|
|
|
3955
3998
|
const renderRegionGroup = (onChangeLocation) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-2xl w-56", children: [jsx("div", { className: "mb-s", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion(onChangeLocation))] }, letter));
|
|
3956
3999
|
|
|
@@ -3971,9 +4014,9 @@
|
|
|
3971
4014
|
selectCurrentLocation(region);
|
|
3972
4015
|
close();
|
|
3973
4016
|
}, []);
|
|
3974
|
-
return (jsxs(Dialog, { head: jsxs("div", { children: [currentLocation ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
4017
|
+
return (jsxs(Dialog, { className: "pb-20", head: jsxs("div", { children: [jsx(Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? (jsxs("div", { className: "mb-s", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { onClick: () => selectCurrentLocation(currentLocation), children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null, jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
3975
4018
|
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
3976
|
-
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-
|
|
4019
|
+
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), renderForeignOffices(foreignOffices)] }));
|
|
3977
4020
|
});
|
|
3978
4021
|
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
3979
4022
|
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
@@ -4815,7 +4858,7 @@
|
|
|
4815
4858
|
return (jsxs("div", { className: "hidden sm:flex items-center gap-s", children: [jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: jsx(Img, { className: "w-4 h-4", image: {
|
|
4816
4859
|
icon: 'ArrowLeftIcon',
|
|
4817
4860
|
iconVersion: iconVersion,
|
|
4818
|
-
} }) }), jsx(Button, { version: "link", text: text, ariaLabel: text, onClick: handleClick })] }));
|
|
4861
|
+
} }) }), jsx(Button, { version: "link", className: "group-data-secondary:text-white/80", text: text, ariaLabel: text, onClick: handleClick })] }));
|
|
4819
4862
|
}
|
|
4820
4863
|
|
|
4821
4864
|
const ProductBlock = JSX(({ className, padding, backwardButton, showBorder, ...rest }) => {
|
|
@@ -4827,14 +4870,12 @@
|
|
|
4827
4870
|
const borderStyle = showBorder
|
|
4828
4871
|
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
4829
4872
|
: '';
|
|
4830
|
-
return (jsxs(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', borderStyle, className), defaultPadding: "p-6xl", padding: padding, ...rest, children: [backwardButton
|
|
4831
|
-
? renderBackwardButton(!rest.version || rest.version === 'primary' ? 'primary' : 'white', handleClick)
|
|
4832
|
-
: null, jsx(BaseProductTile, { className: "grow h-full", ...rest })] }));
|
|
4873
|
+
return (jsxs(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', borderStyle, className), defaultPadding: "p-6xl", padding: padding, ...rest, children: [backwardButton ? renderBackwardButton(rest.version || 'primary', handleClick) : null, jsx(BaseProductTile, { className: "grow h-full", ...rest })] }));
|
|
4833
4874
|
});
|
|
4834
4875
|
|
|
4835
4876
|
const ProductGallery = JSX(({ className = '', padding, slides = [], ...rest }) => {
|
|
4836
4877
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
4837
|
-
return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden', className), defaultPadding: "py-6xl", padding: padding, ...rest, children: [jsx("div", { className: "flex duration-1000", style: { transform: `translateX(-${activeSlideIndex * 100}%)` }, role: "list", children: slides.map(({ productBlock }, i) => (jsx("div", { className: "box-border grow-0 shrink-0 basis-full", role: "listitem", children: jsx(BaseProductTile, { className: "pl-6xl h-full", headlineVersion: "
|
|
4878
|
+
return (jsxs(BlockWrapper, { className: style('box-border overflow-hidden', className), defaultPadding: "py-6xl", padding: padding, ...rest, children: [jsx("div", { className: "flex duration-1000", style: { transform: `translateX(-${activeSlideIndex * 100}%)` }, role: "list", children: slides.map(({ productBlock }, i) => (jsx("div", { className: "box-border grow-0 shrink-0 basis-full", role: "listitem", children: jsx(BaseProductTile, { className: "pl-6xl h-full", headlineVersion: "M", isFullWidthTitle: false, ...productBlock, ...rest }) }, String(i)))) }), jsx("div", { className: "h-28 px-xs mt-m -mb-m flex gap-xs box-border", children: slides.map(renderNavButton({ activeSlideIndex, onClick: setActiveSlideIndex })) })] }));
|
|
4838
4879
|
});
|
|
4839
4880
|
const renderNavButton = ({ activeSlideIndex, onClick }) => ({ nav }, i) => {
|
|
4840
4881
|
const isActive = i === activeSlideIndex;
|
|
@@ -4863,7 +4904,7 @@
|
|
|
4863
4904
|
return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
|
|
4864
4905
|
}
|
|
4865
4906
|
|
|
4866
|
-
const RepresentativeOfficeInfo = JSX(({ address, email, telephone, button, className = '', __html, icon, title, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border text-left space-y-s', className), version: version, ...rest, children: [jsxs("div", { className: "w-full flex justify-between flex-row-reverse", children: [
|
|
4907
|
+
const RepresentativeOfficeInfo = JSX(({ address, email, telephone, button, className = '', __html, icon, title, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border text-left space-y-s', className), version: version, ...rest, children: [jsxs("div", { className: "w-full flex justify-between flex-row-reverse", children: [isIcon(icon) ? (jsx("div", { className: 'w-10 h-7 sm:w-24 sm:h-16', children: jsx(Img, { image: icon }) })) : null, title ? jsx(Heading, { headingType: "h3", as: "h3", title: title }) : null] }), jsxs("div", { className: "w-full space-y-m", children: [__html ? renderDescriptionBlock(__html) : null, renderBlock({
|
|
4867
4908
|
label: 'Адрес',
|
|
4868
4909
|
data: address,
|
|
4869
4910
|
iconName: 'GeolocationIcon',
|
|
@@ -4873,7 +4914,6 @@
|
|
|
4873
4914
|
iconName: 'MailIcon',
|
|
4874
4915
|
dataColor: 'text-primary-main',
|
|
4875
4916
|
}), button?.text ? renderButtonsSection([button]) : null] })] })));
|
|
4876
|
-
const renderIconBlock = (icon) => (jsx("div", { className: 'w-10 h-7 sm:w-24 sm:h-16', children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }));
|
|
4877
4917
|
const renderDescriptionBlock = (__html) => (jsx("div", { className: "border-b border-main-divider pb-lg", children: jsx(RichText, { __html: __html }) }));
|
|
4878
4918
|
const renderBlock = ({ label, data, iconName, dataColor = '' }) => data ? (jsxs("div", { className: "flex gap-s", children: [jsx(Icon, { iconVersion: "black", name: iconName, width: "24", height: "24" }), jsxs("div", { className: "flex flex-col gap-2xs", children: [jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: label }), jsx(Text, { size: "text-xl", color: dataColor, children: data })] })] })) : null;
|
|
4879
4919
|
|
|
@@ -5040,8 +5080,6 @@
|
|
|
5040
5080
|
});
|
|
5041
5081
|
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
5042
5082
|
|
|
5043
|
-
const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
|
|
5044
|
-
|
|
5045
5083
|
// TODO: Create universal function for this case
|
|
5046
5084
|
const renderStep = (props) => (step, i, arr) => {
|
|
5047
5085
|
const { type } = step;
|
|
@@ -5083,7 +5121,7 @@
|
|
|
5083
5121
|
});
|
|
5084
5122
|
const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
|
|
5085
5123
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
5086
|
-
return (jsx(BlockWrapper, { defaultPadding: "", className: `${getIconSizeStyle(size)} flex justify-center items-center text-center rounded-full box-border z-10`, version: stepVersion, children:
|
|
5124
|
+
return (jsx(BlockWrapper, { defaultPadding: "", className: `${getIconSizeStyle(size)} flex justify-center items-center text-center rounded-full box-border z-10`, version: stepVersion, children: isIcon(icon) ? (jsx(Img, { image: { ...icon, iconVersion: icon?.iconVersion || iconVersion }, width: "48", height: "48" })) : (jsx("span", { className: style('text-h4', stepVersion === 'transparent' ? styleMap.iconText : getIconTextStyle(stepVersion)), children: i + 1 })) }, String(i)));
|
|
5087
5125
|
};
|
|
5088
5126
|
const getIconSizeStyle = (size) => (size === 'normal' ? 'h-24 w-24' : 'h-16 w-16');
|
|
5089
5127
|
const getIconTextStyle = (version) => version === 'secondary' ? 'group-data-primary:text-white' : 'text-secondary-text';
|
|
@@ -5148,8 +5186,9 @@
|
|
|
5148
5186
|
const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
|
|
5149
5187
|
? tabs.findIndex((_) => _.type === 'group' && _.ref === router.query[TAB_QUERY_PARAM_KEY]) || 0
|
|
5150
5188
|
: 0;
|
|
5189
|
+
const defaultTab = tabs[defaultTabIndex] || tabs[0];
|
|
5151
5190
|
setActiveTabIndex(defaultTabIndex);
|
|
5152
|
-
fireTabEvent(
|
|
5191
|
+
fireTabEvent(defaultTab);
|
|
5153
5192
|
}, [isReady]);
|
|
5154
5193
|
useEffect(() => {
|
|
5155
5194
|
const activeTab = tabs[activeTabIndex];
|
|
@@ -5169,9 +5208,12 @@
|
|
|
5169
5208
|
};
|
|
5170
5209
|
const handleChange = useCallback((_) => {
|
|
5171
5210
|
const index = tabsControlItems.indexOf(_);
|
|
5211
|
+
const tab = tabs[index];
|
|
5172
5212
|
setActiveTabIndex(index);
|
|
5173
|
-
fireTabEvent(
|
|
5174
|
-
|
|
5213
|
+
fireTabEvent(tab);
|
|
5214
|
+
if (tab.type === 'group') {
|
|
5215
|
+
updateUrlSearchTabParam(_);
|
|
5216
|
+
}
|
|
5175
5217
|
}, [tabs, tabsControlItems]);
|
|
5176
5218
|
return (jsx(BlockWrapper, { className: style(isSticky ? 'sticky top-1 z-20' : '', className), defaultPadding: "p-0", ...rest, children: renderTabs({
|
|
5177
5219
|
items: tabsControlItems,
|
|
@@ -5371,8 +5413,6 @@
|
|
|
5371
5413
|
return (jsx("ul", { className: style('text-secondary-text group-data-secondary:text-white/80', listStyle), children: items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-s", font: "font-light", children: _ }) }, `listItem-${i}`))) }));
|
|
5372
5414
|
};
|
|
5373
5415
|
|
|
5374
|
-
const Tile = JSX(({ className, padding, headlineVersion = 'S', listItemSize = 'M', ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, headlineVersion: headlineVersion, listItemSize: listItemSize, isFullWidthTitle: false, ...rest }) })));
|
|
5375
|
-
|
|
5376
5416
|
const VerticalLayout = JSX(({ className = '', gap = '', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => (jsx(BlockWrapper, { className: style('relative flex flex-col', gapStyles[gap], className), defaultPadding: isPadding ? 'p-6xl' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
|
|
5377
5417
|
...rest,
|
|
5378
5418
|
extraProps: { className: 'w-full', padding: isInnerPadding ? '' : 'p-0' },
|
|
@@ -5409,7 +5449,6 @@
|
|
|
5409
5449
|
CarouselInvestmentCard,
|
|
5410
5450
|
CarouselLinks,
|
|
5411
5451
|
CarouselProductCard,
|
|
5412
|
-
CarouselProgramsCard,
|
|
5413
5452
|
CarouselRecommendationCard,
|
|
5414
5453
|
CarouselRichTextCard,
|
|
5415
5454
|
CarouselTariffsCard,
|
|
@@ -5448,7 +5487,6 @@
|
|
|
5448
5487
|
Tabs,
|
|
5449
5488
|
TariffsTable,
|
|
5450
5489
|
TextBlock,
|
|
5451
|
-
Tile,
|
|
5452
5490
|
VerticalLayout,
|
|
5453
5491
|
Video,
|
|
5454
5492
|
};
|
|
@@ -5680,7 +5718,7 @@
|
|
|
5680
5718
|
parent: data,
|
|
5681
5719
|
};
|
|
5682
5720
|
useBlockRouterProvider();
|
|
5683
|
-
return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('@container relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @
|
|
5721
|
+
return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('@container relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, {}), jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
|
|
5684
5722
|
});
|
|
5685
5723
|
ContentPage.childrenTypes = [];
|
|
5686
5724
|
ContentPage.slots = () => ['header', 'footer', 'StickyBottomMenu'];
|
|
@@ -5688,7 +5726,7 @@
|
|
|
5688
5726
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5689
5727
|
}
|
|
5690
5728
|
|
|
5691
|
-
const packageVersion = "0.14.
|
|
5729
|
+
const packageVersion = "0.14.27";
|
|
5692
5730
|
|
|
5693
5731
|
exports.Blocks = Blocks;
|
|
5694
5732
|
exports.ContentPage = ContentPage;
|