@redneckz/wildless-cms-uni-blocks 0.12.10 → 0.12.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.12.9.js +30 -0
- package/bundle/BlockRenderer/renderBlock.d.ts +2 -4
- package/bundle/BlockRenderer/renderBlockList.d.ts +5 -2
- package/bundle/BlockRenderer/renderChildren.d.ts +5 -4
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +558 -471
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/bundle/components/BenefitsBlock/benefitImageStyles.mobile.d.ts +1 -0
- package/bundle/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +1 -1
- package/bundle/components/Calculator/CalculatorContent.d.ts +20 -1
- package/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/bundle/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/bundle/components/Calculator/constants.d.ts +12 -0
- package/bundle/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/bundle/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/bundle/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/bundle/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/bundle/components/Carousel/CarouselContent.d.ts +3 -9
- package/bundle/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/bundle/components/Carousel/renderControlButtons.d.ts +2 -3
- package/bundle/components/CarouselBankHistoryCard/CarouselBankHistoryCard.d.ts +2 -2
- package/bundle/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/bundle/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/bundle/components/CarouselProductCard/alignTextStyle.mobile.d.ts +1 -0
- package/bundle/components/Footer/Footer.d.ts +1 -4
- package/bundle/components/Footer/Footer.mobile.d.ts +1 -4
- package/bundle/components/Footer/FooterProps.d.ts +6 -0
- package/bundle/components/Header/Header.d.ts +1 -4
- package/bundle/components/Header/Header.mobile.d.ts +2 -5
- package/bundle/components/Header/HeaderContent.d.ts +0 -2
- package/bundle/components/Header/HeaderProps.d.ts +8 -0
- package/bundle/components/HorizontalLayout/HorizontalLayout.mobile.d.ts +5 -0
- package/bundle/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/bundle/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/bundle/hooks/useCarouselControls.d.ts +1 -1
- package/bundle/model/Attachment.d.ts +2 -0
- package/bundle/model/JSXBlock.d.ts +1 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/bundle/utils/formatBytes.d.ts +1 -0
- package/dist/BlockRenderer/renderBlock.d.ts +2 -4
- package/dist/BlockRenderer/renderBlock.js +1 -2
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/BlockRenderer/renderBlockList.d.ts +5 -2
- package/dist/BlockRenderer/renderBlockList.js +12 -7
- package/dist/BlockRenderer/renderBlockList.js.map +1 -1
- package/dist/BlockRenderer/renderChildren.d.ts +5 -4
- package/dist/BlockRenderer/renderChildren.js +2 -2
- package/dist/BlockRenderer/renderChildren.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/ResponseNotification.js +1 -1
- package/dist/components/ApplicationForm/ResponseNotification.js.map +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +4 -4
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/dist/components/BenefitsBlock/benefitImageStyles.js +4 -0
- package/dist/components/BenefitsBlock/benefitImageStyles.js.map +1 -0
- package/dist/components/BenefitsBlock/benefitImageStyles.mobile.d.ts +1 -0
- package/dist/components/BenefitsBlock/benefitImageStyles.mobile.js +4 -0
- package/dist/components/BenefitsBlock/benefitImageStyles.mobile.js.map +1 -0
- package/dist/components/Blocks.mobile.js +6 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +2 -2
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +1 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.mobile.js.map +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/dist/components/BusinessBlock/BusinessCard.js +2 -2
- package/dist/components/BusinessBlock/BusinessCard.js.map +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.js +2 -2
- package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.js +5 -5
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +20 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +2 -2
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +3 -3
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/dist/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/dist/components/Calculator/RefinancingCalculatorForm.js +63 -0
- package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -0
- package/dist/components/Calculator/UnknownRate.js +1 -1
- package/dist/components/Calculator/UnknownRate.js.map +1 -1
- package/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.js +23 -0
- package/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.js.map +1 -0
- package/dist/components/Calculator/constants.d.ts +12 -0
- package/dist/components/Calculator/constants.js +25 -1
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/dist/components/Calculator/getMonthlyPayment.js +7 -2
- package/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/dist/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/dist/components/Calculator/getRefinancingCalculatorLimitParams.js +10 -0
- package/dist/components/Calculator/getRefinancingCalculatorLimitParams.js.map +1 -0
- package/dist/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/dist/components/Calculator/getRefinancingCalculatorRateParams.js +16 -0
- package/dist/components/Calculator/getRefinancingCalculatorRateParams.js.map +1 -0
- package/dist/components/Calculator/rangeHelpers.js +7 -3
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/dist/components/Calculator/useRefinancingCalculatorParams.js +57 -0
- package/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -0
- package/dist/components/CardTransfer/CardTransfer.js +1 -1
- package/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +18 -33
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselContent.d.ts +3 -9
- package/dist/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/dist/components/Carousel/CarouselScrollButtons.js +4 -4
- package/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/dist/components/Carousel/renderControlButtons.d.ts +2 -3
- package/dist/components/Carousel/renderControlButtons.js +3 -3
- package/dist/components/Carousel/renderControlButtons.js.map +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.d.ts +2 -2
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +7 -40
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js +1 -2
- package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/dist/components/CarouselCard/CarouselCard.js +6 -5
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/CarouselCard/constants.js +2 -2
- package/dist/components/CarouselCard/constants.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -3
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -2
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +2 -2
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +13 -12
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/dist/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/dist/components/CarouselProductCard/alignTextStyle.js +4 -0
- package/dist/components/CarouselProductCard/alignTextStyle.js.map +1 -0
- package/dist/components/CarouselProductCard/alignTextStyle.mobile.d.ts +1 -0
- package/dist/components/CarouselProductCard/alignTextStyle.mobile.js +4 -0
- package/dist/components/CarouselProductCard/alignTextStyle.mobile.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +3 -4
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -2
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -2
- package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
- package/dist/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.js +2 -2
- package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableBody.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js +1 -1
- package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/dist/components/ComparisonTable/HeaderCell.mobile.js +2 -2
- package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.js +1 -1
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableColumn.js +2 -2
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.js +2 -2
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +17 -10
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/ExchangeRateOffice/ExchangeRateOffice.js +1 -1
- package/dist/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -1
- package/dist/components/ExchangeRateOffice/renderCurrencies.js +3 -3
- package/dist/components/ExchangeRateOffice/renderCurrencies.js.map +1 -1
- package/dist/components/ExchangeRateOffice/renderTableHeader.js +1 -1
- package/dist/components/ExchangeRateOffice/renderTableHeader.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyTable.js +4 -3
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrentLocation.js +3 -2
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/Footer/Contacts.js +4 -3
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/Footer.d.ts +1 -4
- package/dist/components/Footer/Footer.js +3 -5
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.d.ts +1 -4
- package/dist/components/Footer/Footer.mobile.js +3 -5
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/FooterProps.d.ts +6 -0
- package/dist/components/Footer/FooterProps.js +2 -0
- package/dist/components/Footer/FooterProps.js.map +1 -0
- package/dist/components/GracePeriod/GracePeriod.js +2 -2
- package/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/dist/components/Header/Header.d.ts +1 -4
- package/dist/components/Header/Header.js +3 -9
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.mobile.d.ts +2 -5
- package/dist/components/Header/Header.mobile.js +3 -6
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +0 -2
- package/dist/components/Header/HeaderProps.d.ts +8 -0
- package/dist/components/Header/HeaderProps.js +2 -0
- package/dist/components/Header/HeaderProps.js.map +1 -0
- package/dist/components/Header/HeaderSubMenu.js +1 -1
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/Header/HeaderTop.js +1 -1
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Headline/Headline.js +1 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/headlineVersionStyles.js +4 -4
- package/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.mobile.d.ts +5 -0
- package/dist/components/HorizontalLayout/HorizontalLayout.mobile.js +8 -0
- package/dist/components/HorizontalLayout/HorizontalLayout.mobile.js.map +1 -0
- package/dist/components/HorizontalLayout/gapStyles.js +6 -6
- package/dist/components/HorizontalLayout/gapStyles.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.js +12 -14
- package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +6 -2
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/renderDescription.js +1 -1
- package/dist/components/MobileAppTile/renderList.js +1 -1
- package/dist/components/MobileAppTile/renderList.js.map +1 -1
- package/dist/components/OfficeMap/OfficeMap.js +1 -1
- package/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +1 -1
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/renderInsuranceSumMonth.js +1 -1
- package/dist/components/PictureText/renderInsuranceSumMonth.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +2 -2
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +4 -8
- package/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +5 -2
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/dist/components/SafeDepositRental/RadioButtons.js +13 -0
- package/dist/components/SafeDepositRental/RadioButtons.js.map +1 -0
- package/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -1
- package/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/dist/components/SafeDepositRental/RentalPeriod.js +2 -1
- package/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeBoxCases.js +1 -1
- package/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -3
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +5 -5
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/renderStep.js +2 -2
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/dist/components/Tabs/ScrollableTabs.js +0 -1
- package/dist/components/Tabs/ScrollableTabs.js.map +1 -1
- package/dist/components/Tabs/renderGroupTab.js +1 -1
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js +1 -1
- package/dist/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TableTileHeader.js +1 -1
- package/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.js +4 -10
- package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/dist/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRenderCell.js +1 -1
- package/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +4 -14
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/dist/content-page-repository/transformDocument.js +3 -0
- package/dist/content-page-repository/transformDocument.js.map +1 -1
- package/dist/hooks/useCarouselControls.d.ts +1 -1
- package/dist/hooks/useCarouselControls.js +5 -6
- package/dist/hooks/useCarouselControls.js.map +1 -1
- package/dist/model/Attachment.d.ts +2 -0
- package/dist/model/JSXBlock.d.ts +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/dist/ui-kit/Button/renderButtonsSection.js +1 -1
- package/dist/ui-kit/Dialog/Dialog.js +1 -1
- package/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js +3 -3
- package/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableHeader.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableHeader.js.map +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/InputRange/InputRange.js +1 -1
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/LinkButton/LinkButton.js +3 -3
- package/dist/ui-kit/LinkList/LinkList.js +2 -2
- package/dist/ui-kit/LinkList/LinkList.js.map +1 -1
- package/dist/ui-kit/List/List.js +4 -4
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js +3 -3
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -4
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/SearchBar.js +1 -1
- package/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -1
- package/dist/ui-kit/Logo/renderTitle.js +1 -1
- package/dist/ui-kit/Logo/renderTitle.js.map +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/dist/ui-kit/SearchDialog/SearchDialog.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/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
- package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +11 -11
- package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/dist/ui-kit/YandexMap/renderSearchField.js +1 -1
- package/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -1
- package/dist/utils/formatBytes.d.ts +1 -0
- package/dist/utils/formatBytes.js +13 -0
- package/dist/utils/formatBytes.js.map +1 -0
- package/lib/BlockRenderer/renderBlock.d.ts +2 -4
- package/lib/BlockRenderer/renderBlock.js +1 -2
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/BlockRenderer/renderBlockList.d.ts +5 -2
- package/lib/BlockRenderer/renderBlockList.js +12 -7
- package/lib/BlockRenderer/renderBlockList.js.map +1 -1
- package/lib/BlockRenderer/renderChildren.d.ts +5 -4
- package/lib/BlockRenderer/renderChildren.js +2 -2
- package/lib/BlockRenderer/renderChildren.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/ResponseNotification.js +1 -1
- package/lib/components/ApplicationForm/ResponseNotification.js.map +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +4 -4
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/lib/components/BenefitsBlock/benefitImageStyles.js +2 -0
- package/lib/components/BenefitsBlock/benefitImageStyles.js.map +1 -0
- package/lib/components/BenefitsBlock/benefitImageStyles.mobile.d.ts +1 -0
- package/lib/components/BenefitsBlock/benefitImageStyles.mobile.js +2 -0
- package/lib/components/BenefitsBlock/benefitImageStyles.mobile.js.map +1 -0
- package/lib/components/Blocks.mobile.js +6 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +2 -2
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +1 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.mobile.js.map +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/lib/components/BusinessBlock/BusinessCard.js +2 -2
- package/lib/components/BusinessBlock/BusinessCard.js.map +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +2 -2
- package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.fixture.d.ts +1 -0
- package/lib/components/Calculator/Calculator.js +5 -5
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +20 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +2 -2
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +3 -3
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/lib/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/lib/components/Calculator/RefinancingCalculatorForm.js +61 -0
- package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -0
- package/lib/components/Calculator/UnknownRate.js +1 -1
- package/lib/components/Calculator/UnknownRate.js.map +1 -1
- package/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.js +20 -0
- package/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.js.map +1 -0
- package/lib/components/Calculator/constants.d.ts +12 -0
- package/lib/components/Calculator/constants.js +24 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/lib/components/Calculator/getMonthlyPayment.js +7 -2
- package/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/lib/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/lib/components/Calculator/getRefinancingCalculatorLimitParams.js +7 -0
- package/lib/components/Calculator/getRefinancingCalculatorLimitParams.js.map +1 -0
- package/lib/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/lib/components/Calculator/getRefinancingCalculatorRateParams.js +13 -0
- package/lib/components/Calculator/getRefinancingCalculatorRateParams.js.map +1 -0
- package/lib/components/Calculator/rangeHelpers.js +7 -3
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/lib/components/Calculator/useRefinancingCalculatorParams.js +54 -0
- package/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -0
- package/lib/components/CardTransfer/CardTransfer.js +1 -1
- package/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +18 -33
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Carousel/CarouselContent.d.ts +3 -9
- package/lib/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/lib/components/Carousel/CarouselScrollButtons.js +4 -4
- package/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/lib/components/Carousel/renderControlButtons.d.ts +3 -3
- package/lib/components/Carousel/renderControlButtons.js +3 -3
- package/lib/components/Carousel/renderControlButtons.js.map +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.d.ts +2 -2
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +7 -40
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js +1 -2
- package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/lib/components/CarouselCard/CarouselCard.js +6 -5
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/CarouselCard/constants.js +2 -2
- package/lib/components/CarouselCard/constants.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -3
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -2
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +2 -2
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js +13 -12
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/lib/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/lib/components/CarouselProductCard/alignTextStyle.js +2 -0
- package/lib/components/CarouselProductCard/alignTextStyle.js.map +1 -0
- package/lib/components/CarouselProductCard/alignTextStyle.mobile.d.ts +1 -0
- package/lib/components/CarouselProductCard/alignTextStyle.mobile.js +2 -0
- package/lib/components/CarouselProductCard/alignTextStyle.mobile.js.map +1 -0
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -5
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js +1 -2
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.js.map +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -2
- package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js +1 -1
- package/lib/components/CarouselTariffsCard/getPaddingStyle.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.js +2 -2
- package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableBody.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js +1 -1
- package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/lib/components/ComparisonTable/HeaderCell.mobile.js +2 -2
- package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.js +1 -1
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableColumn.js +2 -2
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.js +2 -2
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +17 -10
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/ExchangeRateOffice/ExchangeRateOffice.js +1 -1
- package/lib/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -1
- package/lib/components/ExchangeRateOffice/renderCurrencies.js +3 -3
- package/lib/components/ExchangeRateOffice/renderCurrencies.js.map +1 -1
- package/lib/components/ExchangeRateOffice/renderTableHeader.js +1 -1
- package/lib/components/ExchangeRateOffice/renderTableHeader.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyTable.js +4 -3
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrentLocation.js +3 -2
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.d.ts +6 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/Footer/Contacts.js +4 -3
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Footer.d.ts +1 -4
- package/lib/components/Footer/Footer.js +3 -5
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.d.ts +1 -4
- package/lib/components/Footer/Footer.mobile.js +3 -5
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/FooterProps.d.ts +6 -0
- package/lib/components/Footer/FooterProps.js +2 -0
- package/lib/components/Footer/FooterProps.js.map +1 -0
- package/lib/components/GracePeriod/GracePeriod.js +2 -2
- package/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/lib/components/Header/Header.d.ts +1 -4
- package/lib/components/Header/Header.fixture.d.ts +0 -1
- package/lib/components/Header/Header.js +3 -9
- package/lib/components/Header/Header.js.map +1 -1
- package/lib/components/Header/Header.mobile.d.ts +2 -5
- package/lib/components/Header/Header.mobile.js +3 -6
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +0 -2
- package/lib/components/Header/HeaderProps.d.ts +8 -0
- package/lib/components/Header/HeaderProps.js +2 -0
- package/lib/components/Header/HeaderProps.js.map +1 -0
- package/lib/components/Header/HeaderSubMenu.js +1 -1
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/Header/HeaderTop.js +1 -1
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Headline/Headline.js +1 -1
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/headlineVersionStyles.js +4 -4
- package/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.fixture.mobile.d.ts +8 -0
- package/lib/components/HorizontalLayout/HorizontalLayout.js +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.mobile.d.ts +5 -0
- package/lib/components/HorizontalLayout/HorizontalLayout.mobile.js +6 -0
- package/lib/components/HorizontalLayout/HorizontalLayout.mobile.js.map +1 -0
- package/lib/components/HorizontalLayout/gapStyles.js +6 -6
- package/lib/components/HorizontalLayout/gapStyles.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.js +12 -14
- package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +6 -2
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/renderDescription.js +1 -1
- package/lib/components/MobileAppTile/renderList.js +1 -1
- package/lib/components/MobileAppTile/renderList.js.map +1 -1
- package/lib/components/OfficeMap/OfficeMap.js +1 -1
- package/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/lib/components/PictureText/PictureText.js +1 -1
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/renderInsuranceSumMonth.js +1 -1
- package/lib/components/PictureText/renderInsuranceSumMonth.js.map +1 -1
- package/lib/components/Placeholder/Placeholder.js +2 -2
- package/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +1 -1
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.fixture.mobile.d.ts +16 -0
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +4 -8
- package/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +5 -2
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/lib/components/SafeDepositRental/RadioButtons.js +11 -0
- package/lib/components/SafeDepositRental/RadioButtons.js.map +1 -0
- package/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -1
- package/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/lib/components/SafeDepositRental/RentalPeriod.js +2 -1
- package/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeBoxCases.js +1 -1
- package/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.fixture.mobile.d.ts +6 -0
- package/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -3
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +5 -5
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +3 -3
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/renderStep.js +2 -2
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/Tabs/ScrollableTabs.js +0 -1
- package/lib/components/Tabs/ScrollableTabs.js.map +1 -1
- package/lib/components/Tabs/renderGroupTab.js +1 -1
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js +1 -1
- package/lib/components/TariffsTable/EmbeddableCellData.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TableTileHeader.js +1 -1
- package/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.js +4 -10
- package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js +1 -1
- package/lib/components/TariffsTable/TariffsTable.mobile.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRenderCell.js +1 -1
- package/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +3 -3
- package/lib/components/VerticalLayout/VerticalLayout.js +4 -14
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/lib/content-page-repository/transformDocument.js +3 -0
- package/lib/content-page-repository/transformDocument.js.map +1 -1
- package/lib/hooks/useCarouselControls.d.ts +1 -1
- package/lib/hooks/useCarouselControls.js +5 -6
- package/lib/hooks/useCarouselControls.js.map +1 -1
- package/lib/model/Attachment.d.ts +2 -0
- package/lib/model/JSXBlock.d.ts +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/lib/ui-kit/Button/renderButtonsSection.js +1 -1
- package/lib/ui-kit/Dialog/Dialog.js +1 -1
- package/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js +3 -3
- package/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableHeader.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableHeader.js.map +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/InputRange/InputRange.js +1 -1
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/LinkButton/LinkButton.js +3 -3
- package/lib/ui-kit/LinkList/LinkList.js +2 -2
- package/lib/ui-kit/LinkList/LinkList.js.map +1 -1
- package/lib/ui-kit/List/List.js +4 -4
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListItem.js +3 -3
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -4
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/SearchBar.js +1 -1
- package/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -1
- package/lib/ui-kit/Logo/renderTitle.js +1 -1
- package/lib/ui-kit/Logo/renderTitle.js.map +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/lib/ui-kit/SearchDialog/SearchDialog.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/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
- package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +11 -11
- package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/ui-kit/YandexMap/renderOpenMap.d.ts +0 -1
- package/lib/ui-kit/YandexMap/renderSearchField.d.ts +0 -1
- package/lib/ui-kit/YandexMap/renderSearchField.js +1 -1
- package/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -1
- package/lib/ui-kit/YandexMap/renderUserGeolocation.d.ts +0 -1
- package/lib/utils/formatBytes.d.ts +1 -0
- package/lib/utils/formatBytes.js +10 -0
- package/lib/utils/formatBytes.js.map +1 -0
- package/mobile/bundle/BlockRenderer/renderBlock.d.ts +2 -4
- package/mobile/bundle/BlockRenderer/renderBlockList.d.ts +5 -2
- package/mobile/bundle/BlockRenderer/renderChildren.d.ts +5 -4
- package/mobile/bundle/bundle.umd.js +1101 -243
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/mobile/bundle/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +1 -1
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +20 -1
- package/mobile/bundle/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/mobile/bundle/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/constants.d.ts +12 -0
- package/mobile/bundle/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/mobile/bundle/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/mobile/bundle/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/mobile/bundle/components/Carousel/CarouselContent.d.ts +3 -9
- package/mobile/bundle/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/mobile/bundle/components/Carousel/renderControlButtons.d.ts +2 -3
- package/mobile/bundle/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/mobile/bundle/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/mobile/bundle/components/Footer/Footer.d.ts +1 -4
- package/mobile/bundle/components/Footer/FooterProps.d.ts +6 -0
- package/mobile/bundle/components/Header/Header.d.ts +2 -5
- package/mobile/bundle/components/Header/HeaderContent.d.ts +0 -2
- package/mobile/bundle/components/Header/HeaderProps.d.ts +8 -0
- package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/mobile/bundle/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/bundle/hooks/useCarouselControls.d.ts +1 -1
- package/mobile/bundle/model/Attachment.d.ts +2 -0
- package/mobile/bundle/model/JSXBlock.d.ts +1 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/mobile/bundle/utils/formatBytes.d.ts +1 -0
- package/mobile/dist/BlockRenderer/renderBlock.d.ts +2 -4
- package/mobile/dist/BlockRenderer/renderBlock.js +1 -2
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/BlockRenderer/renderBlockList.d.ts +5 -2
- package/mobile/dist/BlockRenderer/renderBlockList.js +12 -7
- package/mobile/dist/BlockRenderer/renderBlockList.js.map +1 -1
- package/mobile/dist/BlockRenderer/renderChildren.d.ts +5 -4
- package/mobile/dist/BlockRenderer/renderChildren.js +2 -2
- package/mobile/dist/BlockRenderer/renderChildren.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js +1 -1
- package/mobile/dist/components/ApplicationForm/ResponseNotification.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +4 -4
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/mobile/dist/components/BenefitsBlock/benefitImageStyles.js +4 -0
- package/mobile/dist/components/BenefitsBlock/benefitImageStyles.js.map +1 -0
- package/mobile/dist/components/Blocks.js +6 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +2 -2
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefits.js.map +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/mobile/dist/components/BusinessBlock/BusinessCard.js +2 -2
- package/mobile/dist/components/BusinessBlock/BusinessCard.js.map +1 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +2 -2
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +5 -5
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +20 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +2 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +3 -3
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/mobile/dist/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +63 -0
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -0
- package/mobile/dist/components/Calculator/UnknownRate.js +1 -1
- package/mobile/dist/components/Calculator/UnknownRate.js.map +1 -1
- package/mobile/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.js +23 -0
- package/mobile/dist/components/Calculator/checkRefinancingSourceBookRowCommonParams.js.map +1 -0
- package/mobile/dist/components/Calculator/constants.d.ts +12 -0
- package/mobile/dist/components/Calculator/constants.js +25 -1
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/mobile/dist/components/Calculator/getMonthlyPayment.js +7 -2
- package/mobile/dist/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/getRefinancingCalculatorLimitParams.js +10 -0
- package/mobile/dist/components/Calculator/getRefinancingCalculatorLimitParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/mobile/dist/components/Calculator/getRefinancingCalculatorRateParams.js +16 -0
- package/mobile/dist/components/Calculator/getRefinancingCalculatorRateParams.js.map +1 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js +7 -3
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js +57 -0
- package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -0
- package/mobile/dist/components/CardTransfer/CardTransfer.js +1 -1
- package/mobile/dist/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +18 -33
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Carousel/CarouselContent.d.ts +3 -9
- package/mobile/dist/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js +4 -4
- package/mobile/dist/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/dist/components/Carousel/renderControlButtons.d.ts +2 -3
- package/mobile/dist/components/Carousel/renderControlButtons.js +3 -3
- package/mobile/dist/components/Carousel/renderControlButtons.js.map +1 -1
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -2
- package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js +6 -5
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/CarouselCard/constants.js +2 -2
- package/mobile/dist/components/CarouselCard/constants.js.map +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -3
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -2
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -2
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +13 -12
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/mobile/dist/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/mobile/dist/components/CarouselProductCard/alignTextStyle.js +4 -0
- package/mobile/dist/components/CarouselProductCard/alignTextStyle.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -2
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -2
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/mobile/dist/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/HeaderCell.js +2 -2
- package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableColumn.js +2 -2
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +2 -2
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +17 -10
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOffice.js +1 -1
- package/mobile/dist/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -1
- package/mobile/dist/components/ExchangeRateOffice/renderCurrencies.js +3 -3
- package/mobile/dist/components/ExchangeRateOffice/renderCurrencies.js.map +1 -1
- package/mobile/dist/components/ExchangeRateOffice/renderTableHeader.js +1 -1
- package/mobile/dist/components/ExchangeRateOffice/renderTableHeader.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +4 -3
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +3 -2
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.js +4 -3
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.d.ts +1 -4
- package/mobile/dist/components/Footer/Footer.js +3 -5
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/FooterProps.d.ts +6 -0
- package/mobile/dist/components/Footer/FooterProps.js +2 -0
- package/mobile/dist/components/Footer/FooterProps.js.map +1 -0
- package/mobile/dist/components/GracePeriod/GracePeriod.js +2 -2
- package/mobile/dist/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/dist/components/Header/Header.d.ts +2 -5
- package/mobile/dist/components/Header/Header.js +3 -6
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderContent.d.ts +0 -2
- package/mobile/dist/components/Header/HeaderProps.d.ts +8 -0
- package/mobile/dist/components/Header/HeaderProps.js +2 -0
- package/mobile/dist/components/Header/HeaderProps.js.map +1 -0
- package/mobile/dist/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +1 -1
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +1 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/headlineVersionStyles.js +4 -4
- package/mobile/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js +3 -8
- package/mobile/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/gapStyles.js +6 -6
- package/mobile/dist/components/HorizontalLayout/gapStyles.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/dist/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +12 -14
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +6 -2
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/renderDescription.js +1 -1
- package/mobile/dist/components/MobileAppTile/renderList.js +1 -1
- package/mobile/dist/components/MobileAppTile/renderList.js.map +1 -1
- package/mobile/dist/components/OfficeMap/OfficeMap.js +1 -1
- package/mobile/dist/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +1 -1
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js +1 -1
- package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js.map +1 -1
- package/mobile/dist/components/Placeholder/Placeholder.js +2 -2
- package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +4 -8
- package/mobile/dist/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +5 -2
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/mobile/dist/components/SafeDepositRental/RadioButtons.js +13 -0
- package/mobile/dist/components/SafeDepositRental/RadioButtons.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js +1 -1
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RentalPeriod.js +2 -1
- package/mobile/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -3
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStep.js +2 -2
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.js +0 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -1
- package/mobile/dist/components/Tabs/renderGroupTab.js +1 -1
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +1 -1
- package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.js +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +4 -14
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/dist/content-page-repository/transformDocument.js +3 -0
- package/mobile/dist/content-page-repository/transformDocument.js.map +1 -1
- package/mobile/dist/hooks/useCarouselControls.d.ts +1 -1
- package/mobile/dist/hooks/useCarouselControls.js +5 -6
- package/mobile/dist/hooks/useCarouselControls.js.map +1 -1
- package/mobile/dist/model/Attachment.d.ts +2 -0
- package/mobile/dist/model/JSXBlock.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- 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/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/dist/ui-kit/Button/renderButtonsSection.js +1 -1
- package/mobile/dist/ui-kit/Dialog/Dialog.js +1 -1
- package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js +3 -3
- package/mobile/dist/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js.map +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/InputRange/InputRange.js +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +3 -3
- package/mobile/dist/ui-kit/LinkList/LinkList.js +2 -2
- package/mobile/dist/ui-kit/LinkList/LinkList.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.js +4 -4
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +3 -3
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -4
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/SearchBar.js +1 -1
- package/mobile/dist/ui-kit/LocationDialog/SearchBar.js.map +1 -1
- package/mobile/dist/ui-kit/Logo/renderTitle.js +1 -1
- package/mobile/dist/ui-kit/Logo/renderTitle.js.map +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.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/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
- package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +11 -11
- package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/mobile/dist/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/renderSearchField.js +1 -1
- package/mobile/dist/ui-kit/YandexMap/renderSearchField.js.map +1 -1
- package/mobile/dist/utils/formatBytes.d.ts +1 -0
- package/mobile/dist/utils/formatBytes.js +13 -0
- package/mobile/dist/utils/formatBytes.js.map +1 -0
- package/mobile/fonts/mohave/Mohave-Regular.otf +0 -0
- package/mobile/fonts/mohave/Mohave-Regular.ttf +0 -0
- package/mobile/fonts/mohave/mohave.css +7 -0
- package/mobile/fonts/ubuntu/ubuntu.css +67 -0
- package/mobile/fonts/ubuntu/ubuntu.eot +0 -0
- package/mobile/fonts/ubuntu/ubuntu.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntu.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntu.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntubold.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntubold.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntubold.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntubolditalic.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntubolditalic.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntubolditalic.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntuitalic.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntuitalic.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntuitalic.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntulight.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntulight.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntulight.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntulightitalic.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntulightitalic.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntulightitalic.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntumedium.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntumedium.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntumedium.woff2 +0 -0
- package/mobile/fonts/ubuntu/ubuntumediumitalic.ttf +0 -0
- package/mobile/fonts/ubuntu/ubuntumediumitalic.woff +0 -0
- package/mobile/fonts/ubuntu/ubuntumediumitalic.woff2 +0 -0
- package/mobile/lib/BlockRenderer/renderBlock.d.ts +2 -4
- package/mobile/lib/BlockRenderer/renderBlock.js +1 -2
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/BlockRenderer/renderBlockList.d.ts +5 -2
- package/mobile/lib/BlockRenderer/renderBlockList.js +12 -7
- package/mobile/lib/BlockRenderer/renderBlockList.js.map +1 -1
- package/mobile/lib/BlockRenderer/renderChildren.d.ts +5 -4
- package/mobile/lib/BlockRenderer/renderChildren.js +2 -2
- package/mobile/lib/BlockRenderer/renderChildren.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js +1 -1
- package/mobile/lib/components/ApplicationForm/ResponseNotification.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +4 -4
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/benefitImageStyles.d.ts +1 -0
- package/mobile/lib/components/BenefitsBlock/benefitImageStyles.js +2 -0
- package/mobile/lib/components/BenefitsBlock/benefitImageStyles.js.map +1 -0
- package/mobile/lib/components/Blocks.js +6 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +2 -2
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefits.js.map +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +1 -1
- package/mobile/lib/components/BusinessBlock/BusinessCard.js +2 -2
- package/mobile/lib/components/BusinessBlock/BusinessCard.js.map +1 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +2 -2
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +5 -5
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +20 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +2 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +3 -3
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.d.ts +3 -1
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js +2 -0
- package/mobile/lib/components/Calculator/EmbeddableCalcBlocks.js.map +1 -1
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.d.ts +5 -0
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +61 -0
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -0
- package/mobile/lib/components/Calculator/UnknownRate.js +1 -1
- package/mobile/lib/components/Calculator/UnknownRate.js.map +1 -1
- package/mobile/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.js +20 -0
- package/mobile/lib/components/Calculator/checkRefinancingSourceBookRowCommonParams.js.map +1 -0
- package/mobile/lib/components/Calculator/constants.d.ts +12 -0
- package/mobile/lib/components/Calculator/constants.js +24 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/getMonthlyPayment.d.ts +8 -2
- package/mobile/lib/components/Calculator/getMonthlyPayment.js +7 -2
- package/mobile/lib/components/Calculator/getMonthlyPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/getRefinancingCalculatorLimitParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/getRefinancingCalculatorLimitParams.js +7 -0
- package/mobile/lib/components/Calculator/getRefinancingCalculatorLimitParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getRefinancingCalculatorRateParams.d.ts +13 -0
- package/mobile/lib/components/Calculator/getRefinancingCalculatorRateParams.js +13 -0
- package/mobile/lib/components/Calculator/getRefinancingCalculatorRateParams.js.map +1 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js +7 -3
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.d.ts +43 -0
- package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js +54 -0
- package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -0
- package/mobile/lib/components/CardTransfer/CardTransfer.js +1 -1
- package/mobile/lib/components/CardTransfer/CardTransfer.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +18 -33
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Carousel/CarouselContent.d.ts +3 -9
- package/mobile/lib/components/Carousel/CarouselScrollButtons.d.ts +5 -6
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js +4 -4
- package/mobile/lib/components/Carousel/CarouselScrollButtons.js.map +1 -1
- package/mobile/lib/components/Carousel/renderControlButtons.d.ts +2 -3
- package/mobile/lib/components/Carousel/renderControlButtons.js +3 -3
- package/mobile/lib/components/Carousel/renderControlButtons.js.map +1 -1
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -2
- package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.d.ts +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js +6 -5
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/CarouselCard/constants.js +2 -2
- package/mobile/lib/components/CarouselCard/constants.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -3
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -2
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -2
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +13 -12
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +6 -4
- package/mobile/lib/components/CarouselProductCard/alignTextStyle.d.ts +1 -0
- package/mobile/lib/components/CarouselProductCard/alignTextStyle.js +2 -0
- package/mobile/lib/components/CarouselProductCard/alignTextStyle.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -2
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +1 -2
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +2 -2
- package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js +1 -1
- package/mobile/lib/components/CarouselTariffsCard/getPaddingStyle.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableBody.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableRows.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/HeaderCell.js +2 -2
- package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableColumn.js +2 -2
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +2 -2
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +17 -10
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOffice.js +1 -1
- package/mobile/lib/components/ExchangeRateOffice/ExchangeRateOffice.js.map +1 -1
- package/mobile/lib/components/ExchangeRateOffice/renderCurrencies.js +3 -3
- package/mobile/lib/components/ExchangeRateOffice/renderCurrencies.js.map +1 -1
- package/mobile/lib/components/ExchangeRateOffice/renderTableHeader.js +1 -1
- package/mobile/lib/components/ExchangeRateOffice/renderTableHeader.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +4 -3
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +3 -2
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.js +4 -3
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.d.ts +1 -4
- package/mobile/lib/components/Footer/Footer.js +3 -5
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/FooterProps.d.ts +6 -0
- package/mobile/lib/components/Footer/FooterProps.js +2 -0
- package/mobile/lib/components/Footer/FooterProps.js.map +1 -0
- package/mobile/lib/components/GracePeriod/GracePeriod.js +2 -2
- package/mobile/lib/components/GracePeriod/GracePeriod.js.map +1 -1
- package/mobile/lib/components/Header/Header.d.ts +2 -5
- package/mobile/lib/components/Header/Header.js +3 -6
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderContent.d.ts +0 -2
- package/mobile/lib/components/Header/HeaderProps.d.ts +8 -0
- package/mobile/lib/components/Header/HeaderProps.js +2 -0
- package/mobile/lib/components/Header/HeaderProps.js.map +1 -0
- package/mobile/lib/components/Header/HeaderSubMenu.js +1 -1
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +1 -1
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +1 -1
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/headlineVersionStyles.js +4 -4
- package/mobile/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js +3 -8
- package/mobile/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/gapStyles.js +6 -6
- package/mobile/lib/components/HorizontalLayout/gapStyles.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlock.js.map +1 -1
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js +2 -2
- package/mobile/lib/components/InsuranceAmountBlock/InsuranceAmountBlockInner.js.map +1 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +12 -14
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +6 -2
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +0 -2
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +2 -2
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/renderDescription.js +1 -1
- package/mobile/lib/components/MobileAppTile/renderList.js +1 -1
- package/mobile/lib/components/MobileAppTile/renderList.js.map +1 -1
- package/mobile/lib/components/OfficeMap/OfficeMap.js +1 -1
- package/mobile/lib/components/OfficeMap/OfficeMap.js.map +1 -1
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +2 -2
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +1 -1
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js +1 -1
- package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js.map +1 -1
- package/mobile/lib/components/Placeholder/Placeholder.js +2 -2
- package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js +4 -8
- package/mobile/lib/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +5 -2
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RadioButtons.d.ts +6 -0
- package/mobile/lib/components/SafeDepositRental/RadioButtons.js +11 -0
- package/mobile/lib/components/SafeDepositRental/RadioButtons.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js +1 -1
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RentalPeriod.js +2 -1
- package/mobile/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js +2 -2
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalFields.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +4 -3
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +3 -3
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStep.js +2 -2
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.js +0 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -1
- package/mobile/lib/components/Tabs/renderGroupTab.js +1 -1
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +1 -1
- package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.js +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +4 -14
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
- package/mobile/lib/content-page-repository/transformDocument.js +3 -0
- package/mobile/lib/content-page-repository/transformDocument.js.map +1 -1
- package/mobile/lib/hooks/useCarouselControls.d.ts +1 -1
- package/mobile/lib/hooks/useCarouselControls.js +5 -6
- package/mobile/lib/hooks/useCarouselControls.js.map +1 -1
- package/mobile/lib/model/Attachment.d.ts +2 -0
- package/mobile/lib/model/JSXBlock.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- 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/BaseProductTile/BaseProductTileContent.d.ts +5 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- 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/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/Button/ButtonInner.js +1 -1
- package/mobile/lib/ui-kit/Button/renderButtonsSection.js +1 -1
- package/mobile/lib/ui-kit/Dialog/Dialog.js +1 -1
- package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js +3 -3
- package/mobile/lib/ui-kit/InnerTable/InnerTableBodyItem.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js.map +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/InputRange/InputRange.js +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +3 -3
- package/mobile/lib/ui-kit/LinkList/LinkList.js +2 -2
- package/mobile/lib/ui-kit/LinkList/LinkList.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.js +4 -4
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +3 -3
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -4
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/SearchBar.js +1 -1
- package/mobile/lib/ui-kit/LocationDialog/SearchBar.js.map +1 -1
- package/mobile/lib/ui-kit/Logo/renderTitle.js +1 -1
- package/mobile/lib/ui-kit/Logo/renderTitle.js.map +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +1 -1
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.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/ui-kit/SlideCheckbox/SlideCheckbox.js +1 -1
- package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -2
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +11 -11
- package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js +1 -1
- package/mobile/lib/ui-kit/TableArrowScrollControl/TableArrowScrollControl.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/renderSearchField.js +1 -1
- package/mobile/lib/ui-kit/YandexMap/renderSearchField.js.map +1 -1
- package/mobile/lib/utils/formatBytes.d.ts +1 -0
- package/mobile/lib/utils/formatBytes.js +10 -0
- package/mobile/lib/utils/formatBytes.js.map +1 -0
- package/mobile/src/BlockRenderer/renderBlock.tsx +3 -6
- package/mobile/src/BlockRenderer/renderBlockList.tsx +29 -12
- package/mobile/src/BlockRenderer/renderChildren.ts +7 -6
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +4 -4
- package/mobile/src/components/ApplicationForm/ResponseNotification.tsx +3 -3
- package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +6 -6
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -5
- package/mobile/src/components/BenefitsBlock/benefitImageStyles.tsx +1 -0
- package/mobile/src/components/Blocks.ts +6 -0
- package/mobile/src/components/Bonus/Bonus.tsx +3 -3
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +2 -3
- package/mobile/src/components/BonusBenefitsBlock/renderBonusBenefits.tsx +2 -1
- package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +2 -2
- package/mobile/src/components/BusinessBlock/BusinessCard.tsx +9 -7
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +2 -2
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +2 -2
- package/mobile/src/components/Calculator/Calculator.tsx +7 -7
- package/mobile/src/components/Calculator/CalculatorContent.ts +25 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +5 -5
- package/mobile/src/components/Calculator/EmbeddableCalcBlocks.tsx +4 -1
- package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +147 -0
- package/mobile/src/components/Calculator/UnknownRate.tsx +2 -2
- package/mobile/src/components/Calculator/checkRefinancingSourceBookRowCommonParams.ts +45 -0
- package/mobile/src/components/Calculator/constants.ts +26 -0
- package/mobile/src/components/Calculator/getMonthlyPayment.ts +14 -4
- package/mobile/src/components/Calculator/getRefinancingCalculatorLimitParams.ts +25 -0
- package/mobile/src/components/Calculator/getRefinancingCalculatorRateParams.ts +40 -0
- package/mobile/src/components/Calculator/rangeHelpers.ts +7 -3
- package/mobile/src/components/Calculator/useRefinancingCalculatorParams.ts +136 -0
- package/mobile/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +47 -45
- package/mobile/src/components/Carousel/CarouselContent.ts +3 -9
- package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +22 -25
- package/mobile/src/components/Carousel/renderControlButtons.tsx +2 -4
- package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +1 -2
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +15 -21
- package/mobile/src/components/CarouselCard/constants.ts +2 -2
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +14 -20
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +3 -4
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +3 -11
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +3 -8
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +42 -43
- package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +6 -4
- package/mobile/src/components/CarouselProductCard/alignTextStyle.tsx +1 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +16 -23
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +3 -8
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -2
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +3 -3
- package/mobile/src/components/CarouselTariffsCard/getPaddingStyle.tsx +1 -1
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
- package/mobile/src/components/ComparisonTable/ComparisonTableBody.tsx +1 -1
- package/mobile/src/components/ComparisonTable/ComparisonTableRows.tsx +1 -1
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +4 -9
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +2 -2
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +5 -5
- package/mobile/src/components/ContentPage/ContentPage.tsx +69 -51
- package/mobile/src/components/ExchangeRateOffice/ExchangeRateOffice.tsx +5 -5
- package/mobile/src/components/ExchangeRateOffice/renderCurrencies.tsx +3 -3
- package/mobile/src/components/ExchangeRateOffice/renderTableHeader.tsx +1 -1
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +26 -10
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +9 -6
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/mobile/src/components/Footer/Contacts.tsx +7 -6
- package/mobile/src/components/Footer/Footer.tsx +8 -12
- package/mobile/src/components/Footer/FooterProps.ts +7 -0
- package/mobile/src/components/GracePeriod/GracePeriod.tsx +11 -5
- package/mobile/src/components/Header/Header.tsx +5 -16
- package/mobile/src/components/Header/HeaderContent.ts +0 -2
- package/mobile/src/components/Header/HeaderProps.ts +9 -0
- package/mobile/src/components/Header/HeaderSubMenu.tsx +3 -3
- package/mobile/src/components/Header/HeaderTop.tsx +1 -1
- package/mobile/src/components/Header/sitemap.wcms-resource.json +144 -0
- package/mobile/src/components/Headline/Headline.tsx +1 -1
- package/mobile/src/components/Headline/headlineVersionStyles.ts +4 -4
- package/mobile/src/components/HorizontalLayout/HorizontalLayout.tsx +3 -25
- package/mobile/src/components/HorizontalLayout/gapStyles.ts +6 -6
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +4 -4
- package/mobile/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +3 -3
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +15 -24
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +11 -3
- package/mobile/src/components/LinkDocs/LinkDocs.ui.json +3 -0
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +0 -2
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +3 -3
- package/mobile/src/components/MobileAppTile/renderDescription.tsx +1 -1
- package/mobile/src/components/MobileAppTile/renderList.tsx +1 -1
- package/mobile/src/components/OfficeMap/OfficeMap.tsx +6 -6
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +5 -5
- package/mobile/src/components/PictureText/PictureText.tsx +1 -1
- package/mobile/src/components/PictureText/renderInsuranceSumMonth.tsx +1 -1
- package/mobile/src/components/Placeholder/Placeholder.tsx +2 -2
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +2 -2
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -1
- package/mobile/src/components/PromoTile/PromoTile.tsx +1 -1
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +15 -16
- package/mobile/src/components/RollupItem/RollupItem.tsx +7 -4
- package/mobile/src/components/SafeDepositRental/{RenderRadioButtons.tsx → RadioButtons.tsx} +8 -3
- package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +3 -3
- package/mobile/src/components/SafeDepositRental/RentalPeriod.tsx +5 -2
- package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +3 -3
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +10 -8
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -12
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +5 -5
- package/mobile/src/components/StepsBlock/renderStep.tsx +7 -7
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +0 -1
- package/mobile/src/components/Tabs/renderGroupTab.tsx +1 -1
- package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +1 -1
- package/mobile/src/components/TariffsTable/TableTileHeader.tsx +1 -1
- package/mobile/src/components/TariffsTable/TariffsTable.tsx +1 -2
- package/mobile/src/components/TariffsTable/TariffsTableRenderCell.tsx +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +2 -2
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +1 -1
- package/mobile/src/components/Tile/Tile.tsx +1 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +0 -1
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +14 -35
- package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/mobile/src/content-page-repository/transformDocument.ts +3 -0
- package/mobile/src/hooks/useCarouselControls.ts +8 -7
- package/mobile/src/model/Attachment.ts +2 -0
- package/mobile/src/model/JSXBlock.ts +1 -1
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +1 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +5 -5
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +7 -5
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +2 -2
- package/mobile/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/mobile/src/ui-kit/Button/renderButtonsSection.tsx +1 -1
- package/mobile/src/ui-kit/Dialog/Dialog.tsx +3 -3
- package/mobile/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +4 -6
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/mobile/src/ui-kit/InnerTable/InnerTableHeader.tsx +4 -4
- package/mobile/src/ui-kit/Input/Input.tsx +1 -1
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -1
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +3 -3
- package/mobile/src/ui-kit/LinkList/LinkList.tsx +2 -2
- package/mobile/src/ui-kit/List/List.tsx +4 -4
- package/mobile/src/ui-kit/List/ListItem.tsx +3 -3
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +6 -7
- package/mobile/src/ui-kit/LocationDialog/SearchBar.tsx +1 -1
- package/mobile/src/ui-kit/Logo/renderTitle.tsx +1 -1
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -4
- package/mobile/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +1 -1
- package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +3 -3
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -12
- package/mobile/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +1 -1
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +1 -1
- package/mobile/src/ui-kit/YandexMap/renderSearchField.tsx +2 -1
- package/mobile/src/utils/formatBytes.ts +12 -0
- package/package.json +4 -2
- package/src/BlockRenderer/renderBlock.tsx +3 -6
- package/src/BlockRenderer/renderBlockList.tsx +29 -12
- package/src/BlockRenderer/renderChildren.ts +7 -6
- package/src/components/ApplicationForm/ApplicationForm.tsx +1 -1
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +4 -4
- package/src/components/ApplicationForm/ResponseNotification.tsx +3 -3
- package/src/components/ApplicationForm/renderWedDataOrganization.tsx +6 -6
- package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +0 -1
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +5 -5
- package/src/components/BenefitsBlock/benefitImageStyles.mobile.tsx +1 -0
- package/src/components/BenefitsBlock/benefitImageStyles.tsx +1 -0
- package/src/components/Blocks.mobile.ts +6 -0
- package/src/components/Bonus/Bonus.tsx +3 -3
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +2 -3
- package/src/components/BonusBenefitsBlock/renderBonusBenefits.mobile.tsx +2 -1
- package/src/components/BusinessBlock/BusinessBlock.tsx +2 -2
- package/src/components/BusinessBlock/BusinessCard.tsx +9 -7
- package/src/components/Calculator/BonusCalculatorForm.tsx +2 -2
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +2 -2
- package/src/components/Calculator/Calculator.fixture.tsx +40 -0
- package/src/components/Calculator/Calculator.tsx +7 -7
- package/src/components/Calculator/CalculatorContent.ts +25 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +4 -4
- package/src/components/Calculator/DepositCalculatorForm.tsx +5 -5
- package/src/components/Calculator/EmbeddableCalcBlocks.tsx +4 -1
- package/src/components/Calculator/RefinancingCalculatorForm.tsx +147 -0
- package/src/components/Calculator/UnknownRate.tsx +2 -2
- package/src/components/Calculator/checkRefinancingSourceBookRowCommonParams.ts +45 -0
- package/src/components/Calculator/constants.ts +26 -0
- package/src/components/Calculator/getMonthlyPayment.ts +14 -4
- package/src/components/Calculator/getRefinancingCalculatorLimitParams.ts +25 -0
- package/src/components/Calculator/getRefinancingCalculatorRateParams.ts +40 -0
- package/src/components/Calculator/rangeHelpers.ts +7 -3
- package/src/components/Calculator/useRefinancingCalculatorParams.ts +136 -0
- package/src/components/CardTransfer/CardTransfer.tsx +1 -1
- package/src/components/Carousel/Carousel.fixture.mobile.tsx +8 -53
- package/src/components/Carousel/Carousel.fixture.tsx +4 -26
- package/src/components/Carousel/Carousel.tsx +47 -45
- package/src/components/Carousel/CarouselContent.ts +3 -9
- package/src/components/Carousel/CarouselScrollButtons.tsx +22 -25
- package/src/components/Carousel/renderControlButtons.tsx +2 -4
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -7
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.mobile.tsx +1 -2
- package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +34 -67
- package/src/components/CarouselCard/CarouselCard.fixture.mobile.tsx +1 -1
- package/src/components/CarouselCard/CarouselCard.fixture.tsx +1 -1
- package/src/components/CarouselCard/CarouselCard.tsx +15 -21
- package/src/components/CarouselCard/constants.ts +2 -2
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +14 -20
- package/src/components/CarouselEventCard/CarouselEventCard.fixture.tsx +5 -3
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +3 -4
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +3 -11
- package/src/components/CarouselLinks/CarouselLinks.tsx +3 -8
- package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +7 -4
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +42 -43
- package/src/components/CarouselProductCard/CarouselProductCardContent.ts +6 -4
- package/src/components/CarouselProductCard/alignTextStyle.mobile.tsx +1 -0
- package/src/components/CarouselProductCard/alignTextStyle.tsx +1 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +16 -23
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.mobile.tsx +3 -8
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +24 -30
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.fixture.tsx +1 -1
- package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +1 -2
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +3 -3
- package/src/components/CarouselTariffsCard/getPaddingStyle.mobile.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +2 -2
- package/src/components/ComparisonTable/ComparisonTable.tsx +2 -2
- package/src/components/ComparisonTable/ComparisonTableBody.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTableRows.tsx +1 -1
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +4 -9
- package/src/components/ComparisonTable/HeaderCell.tsx +5 -10
- package/src/components/ComparisonTable/TableCell.tsx +1 -1
- package/src/components/ComparisonTable/TableColumn.tsx +2 -2
- package/src/components/ContactsBlock/ContactsBlock.tsx +5 -5
- package/src/components/ContentPage/ContentPage.tsx +69 -51
- package/src/components/ExchangeRateOffice/ExchangeRateOffice.tsx +5 -5
- package/src/components/ExchangeRateOffice/renderCurrencies.tsx +3 -3
- package/src/components/ExchangeRateOffice/renderTableHeader.tsx +1 -1
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +26 -10
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +9 -6
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.tsx +19 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +1 -1
- package/src/components/Footer/Contacts.tsx +7 -6
- package/src/components/Footer/Footer.fixture.mobile.tsx +3 -1
- package/src/components/Footer/Footer.fixture.tsx +4 -17
- package/src/components/Footer/Footer.mobile.tsx +8 -12
- package/src/components/Footer/Footer.tsx +13 -17
- package/src/components/Footer/FooterProps.ts +7 -0
- package/src/components/GracePeriod/GracePeriod.tsx +11 -5
- package/src/components/Header/Header.fixture.mobile.tsx +5 -2
- package/src/components/Header/Header.fixture.tsx +4 -3
- package/src/components/Header/Header.mobile.tsx +5 -16
- package/src/components/Header/Header.tsx +11 -32
- package/src/components/Header/HeaderContent.ts +0 -2
- package/src/components/Header/HeaderProps.ts +9 -0
- package/src/components/Header/HeaderSubMenu.tsx +3 -3
- package/src/components/Header/HeaderTop.tsx +1 -1
- package/src/components/Header/sitemap.wcms-resource.json +144 -0
- package/src/components/Headline/Headline.tsx +1 -1
- package/src/components/Headline/headlineVersionStyles.ts +4 -4
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.mobile.tsx +72 -0
- package/src/components/HorizontalLayout/HorizontalLayout.mobile.tsx +12 -0
- package/src/components/HorizontalLayout/HorizontalLayout.tsx +1 -1
- package/src/components/HorizontalLayout/gapStyles.ts +6 -6
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlock.tsx +4 -4
- package/src/components/InsuranceAmountBlock/InsuranceAmountBlockInner.tsx +3 -3
- package/src/components/InvestmentInfo/InvestmentInfo.tsx +15 -24
- package/src/components/LinkDocs/LinkDocs.tsx +11 -3
- package/src/components/LinkDocs/LinkDocs.ui.json +3 -0
- package/src/components/LinkDocs/LinkDocsContent.ts +0 -2
- package/src/components/MobileAppTile/MobileAppTile.tsx +3 -3
- package/src/components/MobileAppTile/renderDescription.tsx +1 -1
- package/src/components/MobileAppTile/renderList.tsx +1 -1
- package/src/components/OfficeMap/OfficeMap.tsx +6 -6
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +5 -5
- package/src/components/PictureText/PictureText.tsx +1 -1
- package/src/components/PictureText/renderInsuranceSumMonth.tsx +1 -1
- package/src/components/Placeholder/Placeholder.tsx +2 -2
- package/src/components/ProductBlock/ProductBlock.tsx +2 -2
- package/src/components/ProductGallery/ProductGallery.tsx +2 -2
- package/src/components/ProductTile/ProductTile.fixture.mobile.tsx +214 -0
- package/src/components/ProductTile/ProductTile.tsx +1 -1
- package/src/components/PromoTile/PromoTile.tsx +1 -1
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.mobile.tsx +1 -1
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.fixture.tsx +1 -1
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.tsx +15 -16
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +15 -19
- package/src/components/RollupItem/RollupItem.tsx +7 -4
- package/src/components/SafeDepositRental/{RenderRadioButtons.tsx → RadioButtons.tsx} +8 -3
- package/src/components/SafeDepositRental/RegionsAndBranches.tsx +3 -3
- package/src/components/SafeDepositRental/RentalPeriod.tsx +5 -2
- package/src/components/SafeDepositRental/SafeBoxCases.tsx +3 -3
- package/src/components/SafeDepositRental/SafeDepositRental.fixture.mobile.tsx +15 -0
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +2 -2
- package/src/components/SafeDepositRental/SafeDepositRentalFields.tsx +10 -8
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +1 -1
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +15 -12
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +5 -5
- package/src/components/StepsBlock/StepsBlock.tsx +20 -20
- package/src/components/StepsBlock/renderStep.tsx +7 -7
- package/src/components/Tabs/ScrollableTabs.tsx +0 -1
- package/src/components/Tabs/renderGroupTab.tsx +1 -1
- package/src/components/TariffsTable/EmbeddableCellData.mobile.tsx +1 -1
- package/src/components/TariffsTable/TableTileHeader.tsx +1 -1
- package/src/components/TariffsTable/TariffsTable.mobile.tsx +1 -2
- package/src/components/TariffsTable/TariffsTable.tsx +6 -21
- package/src/components/TariffsTable/TariffsTableRenderCell.tsx +1 -1
- package/src/components/TariffsTable/TariffsTableRow.tsx +2 -2
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +1 -1
- package/src/components/Tile/Tile.tsx +1 -1
- package/src/components/VerticalLayout/VerticalLayout.example.json +0 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +0 -3
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +3 -10
- package/src/components/VerticalLayout/VerticalLayout.tsx +14 -35
- package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
- package/src/content-page-repository/transformDocument.ts +3 -0
- package/src/hooks/useCarouselControls.ts +8 -7
- package/src/model/Attachment.ts +2 -0
- package/src/model/JSXBlock.ts +1 -1
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +1 -1
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +1 -1
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +5 -5
- package/src/ui-kit/BaseTile/BaseTile.tsx +7 -5
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/src/ui-kit/BlockWrapper.tsx +2 -2
- package/src/ui-kit/Button/ButtonInner.tsx +1 -1
- package/src/ui-kit/Button/renderButtonsSection.tsx +1 -1
- package/src/ui-kit/Dialog/Dialog.tsx +3 -3
- package/src/ui-kit/InnerTable/InnerTableBodyItem.tsx +4 -6
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTableHeader.tsx +4 -4
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/InputRange/InputRange.tsx +1 -1
- package/src/ui-kit/LinkButton/LinkButton.tsx +3 -3
- package/src/ui-kit/LinkList/LinkList.tsx +2 -2
- package/src/ui-kit/List/List.fixture.tsx +4 -4
- package/src/ui-kit/List/List.tsx +4 -4
- package/src/ui-kit/List/ListItem.tsx +3 -3
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +6 -7
- package/src/ui-kit/LocationDialog/SearchBar.tsx +1 -1
- package/src/ui-kit/Logo/renderTitle.tsx +1 -1
- package/src/ui-kit/NumberInput/NumberInput.fixture.tsx +1 -1
- package/src/ui-kit/RichText/RichText.fixture.tsx +1 -1
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +1 -4
- package/src/ui-kit/SearchDialog/SearchInput.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +1 -1
- package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +3 -3
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +1 -1
- package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -12
- package/src/ui-kit/TableArrowScrollControl/TableArrowScrollControl.tsx +1 -1
- package/src/ui-kit/Tags/Tags.fixture.tsx +1 -1
- package/src/ui-kit/YandexMap/YandexMap.tsx +1 -1
- package/src/ui-kit/YandexMap/renderSearchField.tsx +2 -1
- package/src/utils/formatBytes.ts +12 -0
- package/tailwind.config.cjs +13 -16
- package/bundle/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/bundle/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/bundle/components/Header/HeaderBurger.d.ts +0 -9
- package/bundle/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/dist/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/dist/components/Calculator/renderProposalMortgage.js +0 -10
- package/dist/components/Calculator/renderProposalMortgage.js.map +0 -1
- package/dist/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/dist/components/CarouselCard/getCardWidth.js +0 -18
- package/dist/components/CarouselCard/getCardWidth.js.map +0 -1
- package/dist/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/dist/components/CarouselRecommendationCard/cardStyle.js +0 -4
- package/dist/components/CarouselRecommendationCard/cardStyle.js.map +0 -1
- package/dist/components/Header/HeaderBurger.d.ts +0 -9
- package/dist/components/Header/HeaderBurger.js +0 -17
- package/dist/components/Header/HeaderBurger.js.map +0 -1
- package/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/dist/components/SafeDepositRental/RenderRadioButtons.js +0 -12
- package/dist/components/SafeDepositRental/RenderRadioButtons.js.map +0 -1
- package/lib/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/lib/components/Calculator/renderProposalMortgage.js +0 -7
- package/lib/components/Calculator/renderProposalMortgage.js.map +0 -1
- package/lib/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/lib/components/CarouselCard/getCardWidth.js +0 -15
- package/lib/components/CarouselCard/getCardWidth.js.map +0 -1
- package/lib/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/lib/components/CarouselRecommendationCard/cardStyle.js +0 -2
- package/lib/components/CarouselRecommendationCard/cardStyle.js.map +0 -1
- package/lib/components/Header/HeaderBurger.d.ts +0 -9
- package/lib/components/Header/HeaderBurger.js +0 -15
- package/lib/components/Header/HeaderBurger.js.map +0 -1
- package/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/lib/components/SafeDepositRental/RenderRadioButtons.js +0 -10
- package/lib/components/SafeDepositRental/RenderRadioButtons.js.map +0 -1
- package/mobile/bundle/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/mobile/bundle/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/mobile/bundle/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/mobile/bundle/components/Header/HeaderBurger.d.ts +0 -9
- package/mobile/bundle/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/mobile/dist/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/mobile/dist/components/Calculator/renderProposalMortgage.js +0 -10
- package/mobile/dist/components/Calculator/renderProposalMortgage.js.map +0 -1
- package/mobile/dist/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/mobile/dist/components/CarouselCard/getCardWidth.js +0 -18
- package/mobile/dist/components/CarouselCard/getCardWidth.js.map +0 -1
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js +0 -4
- package/mobile/dist/components/CarouselRecommendationCard/cardStyle.js.map +0 -1
- package/mobile/dist/components/Header/HeaderBurger.d.ts +0 -9
- package/mobile/dist/components/Header/HeaderBurger.js +0 -17
- package/mobile/dist/components/Header/HeaderBurger.js.map +0 -1
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +0 -12
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js.map +0 -1
- package/mobile/lib/components/Calculator/renderProposalMortgage.d.ts +0 -8
- package/mobile/lib/components/Calculator/renderProposalMortgage.js +0 -7
- package/mobile/lib/components/Calculator/renderProposalMortgage.js.map +0 -1
- package/mobile/lib/components/CarouselCard/getCardWidth.d.ts +0 -1
- package/mobile/lib/components/CarouselCard/getCardWidth.js +0 -15
- package/mobile/lib/components/CarouselCard/getCardWidth.js.map +0 -1
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.d.ts +0 -1
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js +0 -2
- package/mobile/lib/components/CarouselRecommendationCard/cardStyle.js.map +0 -1
- package/mobile/lib/components/Header/HeaderBurger.d.ts +0 -9
- package/mobile/lib/components/Header/HeaderBurger.js +0 -15
- package/mobile/lib/components/Header/HeaderBurger.js.map +0 -1
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +0 -2
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +0 -10
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js.map +0 -1
- package/mobile/src/components/Calculator/renderProposalMortgage.tsx +0 -22
- package/mobile/src/components/CarouselCard/getCardWidth.tsx +0 -16
- package/mobile/src/components/CarouselRecommendationCard/cardStyle.ts +0 -2
- package/mobile/src/components/Header/HeaderBurger.tsx +0 -54
- package/src/components/Calculator/renderProposalMortgage.tsx +0 -22
- package/src/components/CarouselCard/getCardWidth.tsx +0 -16
- package/src/components/CarouselRecommendationCard/cardStyle.ts +0 -2
- package/src/components/Header/HeaderBurger.tsx +0 -54
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
transparent: 'bg-transparent text-primary-text',
|
|
338
338
|
'': '',
|
|
339
339
|
};
|
|
340
|
-
const BlockWrapper = JSX(({ className, version = 'primary', isTheme = true, defaultPadding = 'p-
|
|
340
|
+
const BlockWrapper = JSX(({ className, version = 'primary', isTheme = true, defaultPadding = 'p-xl', padding, block, tag = 'section', role, children, }) => {
|
|
341
341
|
const Tag = tag;
|
|
342
342
|
const ref = useBlockIntersectionObserver(block);
|
|
343
343
|
const [isHidden, setHidden] = useState(false);
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
setHidden(Boolean(event.label && block?.labels?.length && !block.labels.includes(event.label)));
|
|
346
346
|
}), [block]);
|
|
347
347
|
const isGroup = version && isTheme;
|
|
348
|
-
return (jsx(Tag, { className: style('font-sans', isGroup ? 'group' : '', blockStyles[version], isHidden ? 'hidden' : '', padding || defaultPadding, className), ...(isGroup ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
|
|
348
|
+
return (jsx(Tag, { className: style('@container font-sans', isGroup ? 'group' : '', blockStyles[version], isHidden ? 'hidden' : '', padding || defaultPadding, className), ...(isGroup ? { 'data-ver': version } : {}), ...(block?.anchor ? { id: block.anchor, ref } : {}), role: role, children: children }));
|
|
349
349
|
});
|
|
350
350
|
|
|
351
351
|
const mobileHeadingTagMap = {
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
};
|
|
359
359
|
const headingTag = (tag) => mobileHeadingTagMap[tag] || 'h3';
|
|
360
360
|
|
|
361
|
-
const styles = {
|
|
361
|
+
const styles$4 = {
|
|
362
362
|
h0: 'text-h0',
|
|
363
363
|
h1: 'text-h1',
|
|
364
364
|
h2: 'text-h2',
|
|
@@ -369,7 +369,7 @@
|
|
|
369
369
|
};
|
|
370
370
|
const Heading = JSX(({ className = '', headingType = 'h3', as = 'h3', title, children }) => {
|
|
371
371
|
const Tag = headingTag(as);
|
|
372
|
-
return (jsx(Tag, { className: style('font-sans m-0', styles[headingType], className), children: title || children }));
|
|
372
|
+
return (jsx(Tag, { className: style('font-sans m-0', styles$4[headingType], className), children: title || children }));
|
|
373
373
|
});
|
|
374
374
|
|
|
375
375
|
const identity = (_) => _;
|
|
@@ -505,11 +505,11 @@
|
|
|
505
505
|
return await response.json();
|
|
506
506
|
}
|
|
507
507
|
|
|
508
|
-
const REGIONS_URL = '/api/v1/regions';
|
|
509
|
-
const EMPTY_VALUE$
|
|
508
|
+
const REGIONS_URL$1 = '/api/v1/regions';
|
|
509
|
+
const EMPTY_VALUE$3 = [];
|
|
510
510
|
function useGetRegions() {
|
|
511
|
-
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
512
|
-
return data || EMPTY_VALUE$
|
|
511
|
+
const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
|
|
512
|
+
return data || EMPTY_VALUE$3;
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
const useDialog = (id = '') => ({
|
|
@@ -630,7 +630,7 @@
|
|
|
630
630
|
|
|
631
631
|
const ButtonInner = JSX((props) => {
|
|
632
632
|
const { text, aboveText, appendLeft, appendRight, version = 'primary' } = props;
|
|
633
|
-
return (jsxs("div", { className: style(getButtonStyle(props), 'flex gap-2'), children: [appendLeft ? jsx("div", { className: iconStyleMap[version], children: appendLeft }) : null, isWithText(props) ? (jsxs("div", { children: [aboveText ? jsx("div", { className: "text-xs font-light text-left", children: aboveText }) : null, jsx("div", { className: `text-left ${aboveText ? 'text-s -mt-
|
|
633
|
+
return (jsxs("div", { className: style(getButtonStyle(props), 'flex gap-2'), children: [appendLeft ? jsx("div", { className: iconStyleMap[version], children: appendLeft }) : null, isWithText(props) ? (jsxs("div", { 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: iconStyleMap[version], children: appendRight }) : null] }));
|
|
634
634
|
});
|
|
635
635
|
const getButtonStyle = (props) => {
|
|
636
636
|
const { version, aboveText, rounded } = props;
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
const validStyle = valid
|
|
696
696
|
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
697
697
|
: 'border-error';
|
|
698
|
-
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-
|
|
698
|
+
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", { className: style('w-full border rounded-md text-primary-text outline-none p-4', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
699
699
|
});
|
|
700
700
|
|
|
701
701
|
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 })] })));
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
onChange && onChange(option);
|
|
807
807
|
}, [onChange]);
|
|
808
808
|
const isSelected = (option) => option.key === value?.key;
|
|
809
|
-
return (jsxs("div", { className: className, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-
|
|
809
|
+
return (jsxs("div", { className: className, ref: wrapperRef, children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", color: "text-primary-text", font: "font-light", children: label }) })) : null, jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), children: [jsxs("div", { className: style('text-l flex justify-between items-center text-primary-text cursor-pointer', getBorderStyle(isBorder, valid)), onClick: toggle, children: [jsx("p", { className: "p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), name: "ArrowUpIcon", width: "16", height: "16" })] }), options?.length ? (jsx("div", { className: style('h-0', isOpen ? '' : 'overflow-hidden'), children: jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: options.map(renderOption(handleChange, isOpen, isSelected)) }) })) : null] })] }));
|
|
810
810
|
});
|
|
811
811
|
const renderOption = (handleChange, isOpen, isSelected) => (option, i) => (jsxs("div", { onClick: () => {
|
|
812
812
|
handleChange(option);
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
|
|
819
819
|
const renderAcquiringRegion = ({ regions, field }) => (jsxs("div", { className: "mb-4 pb-1 border-b border-b-main-divider sm:flex sm:justify-between sm:gap-5 sm:mb-7 sm:border-none sm:pb-0", children: [jsx("div", { className: "mb-3 sm:mb-0 sm:w-1/2", children: jsx(SelectControl, { label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433", options: ACQUIRING_TYPES.map(({ name: key = '' }) => ({ key, text: key })), ...withValidator(field('acquiringType'), defaultValidator) }) }), jsx("div", { className: "mb-3 sm:mb-0 sm:w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) })] }));
|
|
820
820
|
|
|
821
|
-
const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-
|
|
821
|
+
const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })] })));
|
|
822
822
|
|
|
823
823
|
const renderSlideCheckboxes = (field) => (jsxs("div", { className: "sm:mb-5", children: [jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') }), jsx(SlideCheckbox, { text: "\u0425\u043E\u0447\u0443 \u043A\u0443\u043F\u0438\u0442\u044C POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })] }));
|
|
824
824
|
|
|
@@ -869,7 +869,7 @@
|
|
|
869
869
|
|
|
870
870
|
const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "sm:flex sm:justify-between sm:gap-5", children: [jsxs("div", { className: "sm:w-1/2", children: [jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "sm:w-1/2", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full mb-3", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full mb-3", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
|
|
871
871
|
|
|
872
|
-
const renderRegion = ({ regions, field }) => (jsx("div", { className: "w-full mb-3 sm:mb-5", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }));
|
|
872
|
+
const renderRegion$1 = ({ regions, field }) => (jsx("div", { className: "w-full mb-3 sm:mb-5", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }));
|
|
873
873
|
|
|
874
874
|
const initialFormState$3 = {
|
|
875
875
|
name: '',
|
|
@@ -900,18 +900,18 @@
|
|
|
900
900
|
}, [onSubmit]);
|
|
901
901
|
const [, { field, ...formProps }] = useForm(initialFormState$3, handleSubmit);
|
|
902
902
|
const regions = useGetRegions();
|
|
903
|
-
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
903
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [renderRegion$1({ regions, field }), renderBusinessCardDataOrganization(field), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
904
904
|
});
|
|
905
905
|
|
|
906
906
|
const BRANCHES_URL = '/api/v1/branches';
|
|
907
|
-
const EMPTY_VALUE$
|
|
907
|
+
const EMPTY_VALUE$2 = [];
|
|
908
908
|
function useBranches(regionCode) {
|
|
909
|
-
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
|
|
910
|
-
return data || EMPTY_VALUE$
|
|
909
|
+
const { data } = useAsyncData(regionCode ? `${BRANCHES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes$1);
|
|
910
|
+
return data || EMPTY_VALUE$2;
|
|
911
911
|
}
|
|
912
|
-
const fetchSafeBoxes = async (url) => {
|
|
912
|
+
const fetchSafeBoxes$1 = async (url) => {
|
|
913
913
|
const result = await fetchJSON(url, { method: 'GET' });
|
|
914
|
-
return result || EMPTY_VALUE$
|
|
914
|
+
return result || EMPTY_VALUE$2;
|
|
915
915
|
};
|
|
916
916
|
|
|
917
917
|
const MIN_CREDIT_AMOUNT = 1000;
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
const handleChange = useCallback((e) => {
|
|
980
980
|
onChange && onChange(parseDecimal(e.target?.value));
|
|
981
981
|
}, [onChange]);
|
|
982
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-
|
|
982
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: title })) : null, jsx("input", { className: style('m-0 mt-xs font-sans text-h3 w-full h-14', 'border border-solid border-gray rounded-md outline-none', 'p-0 pl-4 box-border', 'text-primary-text hover:border-primary-hover focus:border-primary-text', DISABLED_INPUT_CLASSES), disabled: disabled, onInput: handleChange, ...normalizedProps }), renderRangeWithTicks({ list, min, max, step, disabled, value, onChange })] }), renderRangeCaption(items)] }));
|
|
983
983
|
});
|
|
984
984
|
const closestValue = (list) => (_) => list.reduce((prev, curr) => (Math.abs(curr - _) < Math.abs(prev - _) ? curr : prev));
|
|
985
985
|
const renderRangeCaption = (items) => (jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx(Text, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item }, String(i)))) }));
|
|
@@ -1112,7 +1112,7 @@
|
|
|
1112
1112
|
return (jsxs("div", { className: "mb-3 sm:mb-6", children: [jsxs("div", { className: "mb-4 sm:flex sm:items-center sm:gap-6", children: [jsx(Checkbox, { className: "mb-3 sm:mb-0", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", ...field('currencyControl') }), jsx(Checkbox, { className: "mb-3 sm:mb-0", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('documentaryOperations') }), jsx(Checkbox, { className: "mb-3 sm:mb-0", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", ...field('conversionOperations') })] }), jsx("textarea", { placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441, \u043C\u0435\u0441\u0442\u043E \u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0431\u0438\u0437\u043D\u0435\u0441\u0430 \u0438 \u0443\u0434\u043E\u0431\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F \u0434\u043B\u044F \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u0432\u043E\u043D\u043A\u0430", className: "block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text", value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }));
|
|
1113
1113
|
};
|
|
1114
1114
|
|
|
1115
|
-
const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "sm:flex sm:justify-between sm:gap-
|
|
1115
|
+
const renderWedDataOrganization = (field) => (jsxs("div", { children: [jsxs("div", { className: "sm:flex sm:justify-between sm:gap-lg", children: [jsx("div", { className: "sm:w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-s", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }) }), jsx("div", { className: "sm:w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-s", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }) })] }), jsxs("div", { className: "sm:flex sm:justify-between sm:gap-lg sm:mb-2xl", children: [jsx("div", { className: "sm:w-1/2", children: jsx(PhoneInputControl, { className: "shrink-0 w-full mb-s", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }) }), jsx("div", { className: "sm:w-1/2", children: jsx(InputControl, { className: "shrink-0 w-full mb-s", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) }) })] })] }));
|
|
1116
1116
|
|
|
1117
1117
|
const initialFormState = {
|
|
1118
1118
|
fullName: '',
|
|
@@ -1145,13 +1145,13 @@
|
|
|
1145
1145
|
});
|
|
1146
1146
|
}, [onSubmit]);
|
|
1147
1147
|
const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
|
|
1148
|
-
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "sm:text-center mb-
|
|
1148
|
+
return (jsxs("form", { className: "container", onSubmit: formProps.onSubmit, children: [jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "sm:text-center mb-m" }), renderWedDataOrganization(field), jsx(Heading, { headingType: "h6", title: "\u0418\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u043E\u043F\u0440\u043E\u0441", className: "sm:text-center mb-m" }), renderQuestionsInterested(field), jsxs("div", { className: "flex flex-col border-b border-main-divider mb-5 pb-5 sm:items-center sm:flex-row sm:mb-9 sm:pb-9", children: [renderSubmitButton(button, 'mb-m sm:mr-lg sm:mb-0'), jsx(Footnote, { link: link })] }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "sm:text-center mb-m" }), renderContacts()] }));
|
|
1149
1149
|
});
|
|
1150
1150
|
|
|
1151
1151
|
const ResponseNotification = JSX(({ responseType }) => {
|
|
1152
1152
|
const responseOK = responseType === 'OK';
|
|
1153
1153
|
const backgroundColor = responseOK ? 'bg-ok' : 'bg-fail';
|
|
1154
|
-
return (jsxs("div", { className: `flex items-center mt-
|
|
1154
|
+
return (jsxs("div", { className: `flex items-center mt-lg p-lg rounded-md space-x-m ${backgroundColor}`, children: [responseOK ? (jsx(Img, { image: { icon: 'ResponceOKIcon' }, width: "42", height: "42" })) : (jsx(Img, { image: { icon: 'ResponceFailIcon' }, width: "37", height: "34" })), jsxs("div", { children: [jsx(Heading, { headingType: "h6", title: responseOK ? 'Ваша заявка отправлена' : 'Не удалось отправить заявку', className: "mb-1" }), jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: responseOK ? 'Совсем скоро мы с вами свяжемся' : 'Пожалуйста, повторите позднее' })] })] }));
|
|
1155
1155
|
});
|
|
1156
1156
|
|
|
1157
1157
|
const COMPONENTS_MAP = {
|
|
@@ -1170,7 +1170,7 @@
|
|
|
1170
1170
|
setResponseType(status);
|
|
1171
1171
|
return status;
|
|
1172
1172
|
}, []);
|
|
1173
|
-
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-
|
|
1173
|
+
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? (jsx(Heading, { headingType: "h3", title: title, className: "mb-4 sm:mb-8 sm:text-center" })) : null, COMPONENTS_MAP[typeForm]({ button, link, onSubmit: handleSubmit }), responseType ? jsx(ResponseNotification, { responseType: responseType }) : null] }) }));
|
|
1174
1174
|
});
|
|
1175
1175
|
|
|
1176
1176
|
const iconBgStyles = {
|
|
@@ -1189,17 +1189,17 @@
|
|
|
1189
1189
|
|
|
1190
1190
|
const defaultIconSize = 56;
|
|
1191
1191
|
|
|
1192
|
-
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-
|
|
1193
|
-
const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-
|
|
1192
|
+
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: "text-center", title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
1193
|
+
const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center md:basis-1/2 md:max-w-[400px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
|
|
1194
1194
|
const renderDescription$3 = (description) => {
|
|
1195
1195
|
const benefitType = description?.benefitType || null;
|
|
1196
|
-
return description && benefitType ? (jsx("div", { className: "mt-
|
|
1196
|
+
return description && benefitType ? (jsx("div", { className: "mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80", children: benefitType === 'list'
|
|
1197
1197
|
? renderListBenefit(description)
|
|
1198
1198
|
: renderTextBenefit(description) })) : null;
|
|
1199
1199
|
};
|
|
1200
1200
|
const renderTextBenefit = (description) => description?.name || null;
|
|
1201
1201
|
const renderListBenefit = (description) => {
|
|
1202
|
-
const listStyleType = description?.bullets ? 'list-disc pl-
|
|
1202
|
+
const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
|
|
1203
1203
|
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: _ }, `benefitListItem-${i}`))) })) : null;
|
|
1204
1204
|
};
|
|
1205
1205
|
|
|
@@ -1208,25 +1208,25 @@
|
|
|
1208
1208
|
title: { headingType: 'h0', as: 'h1' },
|
|
1209
1209
|
descriptionSize: 'text-h5',
|
|
1210
1210
|
descriptionWeight: 'font-normal',
|
|
1211
|
-
descriptionStyle: 'mt-
|
|
1211
|
+
descriptionStyle: 'mt-xl',
|
|
1212
1212
|
},
|
|
1213
1213
|
XL: {
|
|
1214
1214
|
title: { headingType: 'h1', as: 'h1' },
|
|
1215
1215
|
descriptionSize: 'text-xl',
|
|
1216
1216
|
descriptionWeight: 'font-light',
|
|
1217
|
-
descriptionStyle: 'mt-
|
|
1217
|
+
descriptionStyle: 'mt-m',
|
|
1218
1218
|
},
|
|
1219
1219
|
L: {
|
|
1220
1220
|
title: { headingType: 'h2', as: 'h2' },
|
|
1221
1221
|
descriptionSize: 'text-xl',
|
|
1222
1222
|
descriptionWeight: 'font-light',
|
|
1223
|
-
descriptionStyle: 'mt-
|
|
1223
|
+
descriptionStyle: 'mt-m',
|
|
1224
1224
|
},
|
|
1225
1225
|
M: {
|
|
1226
1226
|
title: { headingType: 'h3', as: 'h2' },
|
|
1227
1227
|
descriptionSize: 'text-xl',
|
|
1228
1228
|
descriptionWeight: 'font-light',
|
|
1229
|
-
descriptionStyle: 'mt-
|
|
1229
|
+
descriptionStyle: 'mt-s',
|
|
1230
1230
|
},
|
|
1231
1231
|
S: {
|
|
1232
1232
|
title: { headingType: 'h4', as: 'h2' },
|
|
@@ -1256,7 +1256,7 @@
|
|
|
1256
1256
|
const Headline = JSX(({ className, version = '', headlineVersion = 'XL', title, description, align = 'text-center', as, isPadding = true, isTheme = false, ...rest }) => {
|
|
1257
1257
|
const versionStyle = headlineVersionStyles[headlineVersion];
|
|
1258
1258
|
const descriptionStyle = { marginTop: versionStyle.descriptionStyle };
|
|
1259
|
-
return (jsxs(BlockWrapper, { className: className, defaultPadding: isPadding ? 'p-
|
|
1259
|
+
return (jsxs(BlockWrapper, { className: className, defaultPadding: isPadding ? '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] }));
|
|
1260
1260
|
});
|
|
1261
1261
|
|
|
1262
1262
|
const mapChildren = (mapper) => (children) => {
|
|
@@ -1286,7 +1286,7 @@
|
|
|
1286
1286
|
return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
|
|
1287
1287
|
});
|
|
1288
1288
|
|
|
1289
|
-
const childStyleMap = ['min-w-
|
|
1289
|
+
const childStyleMap = ['min-w-full', 'min-w-1/2', 'min-w-1/3', 'min-w-1/4'];
|
|
1290
1290
|
const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
1291
1291
|
const observerOptions = {
|
|
1292
1292
|
sensitivity: 1,
|
|
@@ -1348,6 +1348,7 @@
|
|
|
1348
1348
|
|
|
1349
1349
|
const defaultDiscriminator = (_) => _;
|
|
1350
1350
|
const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1351
|
+
const max = maxBy();
|
|
1351
1352
|
|
|
1352
1353
|
const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
|
|
1353
1354
|
|
|
@@ -1364,7 +1365,7 @@
|
|
|
1364
1365
|
container.scrollTo({ left: 0, behavior: 'smooth' });
|
|
1365
1366
|
};
|
|
1366
1367
|
|
|
1367
|
-
const useSwipeListScroll = ({ itemCount,
|
|
1368
|
+
const useSwipeListScroll = ({ itemCount, onVisibleIndicesChange, }) => {
|
|
1368
1369
|
const containerRef = useRef(null);
|
|
1369
1370
|
const [visibleIndices, setVisibleIndices] = useState([]);
|
|
1370
1371
|
const handleVisibleIndicesChange = useCallback((indices) => {
|
|
@@ -1380,31 +1381,31 @@
|
|
|
1380
1381
|
if (!containerRef.current) {
|
|
1381
1382
|
return;
|
|
1382
1383
|
}
|
|
1383
|
-
if (
|
|
1384
|
-
|
|
1384
|
+
if (canScrollLeft) {
|
|
1385
|
+
scrollBy(containerRef.current)(itemCount, -1);
|
|
1385
1386
|
}
|
|
1386
1387
|
else {
|
|
1387
|
-
|
|
1388
|
+
scrollToEnd(containerRef.current);
|
|
1388
1389
|
}
|
|
1389
|
-
}, [
|
|
1390
|
+
}, [itemCount, canScrollLeft]);
|
|
1390
1391
|
const scrollRight = useCallback(() => {
|
|
1391
1392
|
if (!containerRef.current) {
|
|
1392
1393
|
return;
|
|
1393
1394
|
}
|
|
1394
|
-
if (
|
|
1395
|
-
|
|
1395
|
+
if (canScrollRight) {
|
|
1396
|
+
scrollBy(containerRef.current)(itemCount, 1);
|
|
1396
1397
|
}
|
|
1397
1398
|
else {
|
|
1398
|
-
|
|
1399
|
+
scrollToStart(containerRef.current);
|
|
1399
1400
|
}
|
|
1400
|
-
}, [itemCount,
|
|
1401
|
+
}, [itemCount, canScrollRight]);
|
|
1401
1402
|
return [
|
|
1402
1403
|
containerRef,
|
|
1403
1404
|
{
|
|
1404
1405
|
scrollLeft,
|
|
1405
1406
|
scrollRight,
|
|
1406
|
-
canScrollLeft
|
|
1407
|
-
canScrollRight
|
|
1407
|
+
canScrollLeft,
|
|
1408
|
+
canScrollRight,
|
|
1408
1409
|
visibleIndicesRange: [minIndex, maxIndex],
|
|
1409
1410
|
handleVisibleIndicesChange,
|
|
1410
1411
|
},
|
|
@@ -1436,11 +1437,11 @@
|
|
|
1436
1437
|
|
|
1437
1438
|
const renderBonusBenefits = (bonusBenefits, _columnsCount, _cardTextAlign) => (jsx(SwipeListControl, { children: bonusBenefits.map((_, i) => renderBonusBenefit({ ..._ }, i)) }));
|
|
1438
1439
|
|
|
1439
|
-
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className:
|
|
1440
|
+
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsx(Headline, { className: "mb-4 sm:mb-3xl", isPadding: false, title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length
|
|
1440
1441
|
? renderBonusBenefits(bonusBenefits)
|
|
1441
1442
|
: null] })));
|
|
1442
1443
|
|
|
1443
|
-
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-
|
|
1444
|
+
const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-m', className), children: buttons.map(renderButton$1(buttonClassName)) })) : null;
|
|
1444
1445
|
const renderButton$1 = (buttonClassName = '') => (button, index) => {
|
|
1445
1446
|
const { text, icon, iconRight, version, ...rest } = button || {};
|
|
1446
1447
|
const iconVersionDefault = version === 'secondary' ? 'color' : 'white';
|
|
@@ -1482,7 +1483,7 @@
|
|
|
1482
1483
|
? getDisabledButtonClasses({ version: button?.version })
|
|
1483
1484
|
: getRegularButtonClasses({ className: 'text-white', version: button?.version });
|
|
1484
1485
|
const link = useLink();
|
|
1485
|
-
return (jsxs(BlockWrapper, { className: style('flex flex-col items-center', className), defaultPadding: "p-
|
|
1486
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col items-center', className), defaultPadding: "p-6xl", ...rest, children: [title ? (jsx(Heading, { className: "pb-5 xl:pb-9 self-start xl:self-center", headingType: "h2", title: title })) : null, jsxs("form", { className: "w-full xl:max-w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, valid: !isDisabled, placeholder: placeholder, label: label, ...field(AMOUNT_KEY, { parse: Number, format: String }) }), button?.text ? (jsx("button", { type: "submit", className: style('w-full p-4 mt-5 xl:mt-6', buttonStyle), disabled: isDisabled, ...link(button), children: button.text })) : null] })] }));
|
|
1486
1487
|
});
|
|
1487
1488
|
|
|
1488
1489
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
@@ -1497,8 +1498,7 @@
|
|
|
1497
1498
|
}
|
|
1498
1499
|
const BlockComponent = type && blocksRegistry[type];
|
|
1499
1500
|
return blockDecorator({
|
|
1500
|
-
blockClassName: style(
|
|
1501
|
-
className, block.style || defaultStyle),
|
|
1501
|
+
blockClassName: style(block.style?.length ? block.style : defaultStyle, className),
|
|
1502
1502
|
block,
|
|
1503
1503
|
ancestors,
|
|
1504
1504
|
// Adjusted by decorator block and blockClassName
|
|
@@ -1512,24 +1512,49 @@
|
|
|
1512
1512
|
const DEFAULT_SLOT_NAME = null;
|
|
1513
1513
|
|
|
1514
1514
|
const EMPTY_ANCESTORS = [];
|
|
1515
|
-
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, renderProps = renderBlock, ...options }) =>
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1515
|
+
const renderBlocksList = (blocks, { key, ancestors = EMPTY_ANCESTORS, slotName = DEFAULT_SLOT_NAME, extraProps, renderProps = renderBlock, ...options }) => {
|
|
1516
|
+
const renderChildBlock = extraProps
|
|
1517
|
+
? (childBlock, childOptions) => renderBlock(childBlock, childOptions, extraProps)
|
|
1518
|
+
: renderProps;
|
|
1519
|
+
return (blocks || []).map((_, i) => renderChildBlock(_, {
|
|
1520
|
+
...options,
|
|
1521
|
+
key: `${key ? key : _.type}-${i}`,
|
|
1522
|
+
ancestors: options.parent
|
|
1523
|
+
? [...(ancestors || EMPTY_ANCESTORS), [options.parent, slotName]]
|
|
1524
|
+
: ancestors,
|
|
1525
|
+
}, i));
|
|
1526
|
+
};
|
|
1522
1527
|
|
|
1523
|
-
function renderChildren({
|
|
1528
|
+
function renderChildren({ block, options, children, extraProps, renderProps, }) {
|
|
1524
1529
|
if (children) {
|
|
1525
1530
|
return children;
|
|
1526
1531
|
}
|
|
1527
1532
|
return block && options
|
|
1528
|
-
? renderBlocksList(block.blocks, { ...options, parent: block, renderProps })
|
|
1533
|
+
? renderBlocksList(block.blocks, { ...options, parent: block, extraProps, renderProps })
|
|
1529
1534
|
: null;
|
|
1530
1535
|
}
|
|
1531
1536
|
|
|
1532
|
-
const
|
|
1537
|
+
const useCarouselControls = (props, initialIndex = 0) => {
|
|
1538
|
+
const { itemCount, visibleItemCount } = props;
|
|
1539
|
+
const [activeIndex, setActiveIndex] = useState(initialIndex);
|
|
1540
|
+
const inc = useCallback(() => setActiveIndex((_) => Math.min(_ + 1, itemCount - 1)), [itemCount]);
|
|
1541
|
+
const dec = useCallback(() => setActiveIndex((_) => Math.max(_ - 1, 0)), [itemCount]);
|
|
1542
|
+
const canInc = visibleItemCount
|
|
1543
|
+
? itemCount > visibleItemCount && activeIndex < itemCount - visibleItemCount
|
|
1544
|
+
: activeIndex < itemCount - 1;
|
|
1545
|
+
const canDec = activeIndex > 0;
|
|
1546
|
+
const isScrollAvailable = canDec || canInc;
|
|
1547
|
+
return [
|
|
1548
|
+
activeIndex,
|
|
1549
|
+
{
|
|
1550
|
+
inc,
|
|
1551
|
+
dec,
|
|
1552
|
+
canInc,
|
|
1553
|
+
canDec,
|
|
1554
|
+
isScrollAvailable,
|
|
1555
|
+
},
|
|
1556
|
+
];
|
|
1557
|
+
};
|
|
1533
1558
|
|
|
1534
1559
|
const ArrowButton = JSX(({ className, disabled, ...rest }) => (jsx(Button, { rounded: true, className: `group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${disabled
|
|
1535
1560
|
? 'bg-secondary-light text-secondary-text'
|
|
@@ -1538,8 +1563,8 @@
|
|
|
1538
1563
|
const ScrollRightButton = JSX((props) => (jsx(ArrowButton, { ...props, className: `${props.className || ''} rotate-180`, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right" })));
|
|
1539
1564
|
|
|
1540
1565
|
const scrollButtonStyle$1 = 'absolute top-[calc(50%-24px)] z-40';
|
|
1541
|
-
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 w-
|
|
1542
|
-
const CarouselScrollButtons = JSX(({ scroll,
|
|
1566
|
+
const blurBaseStyle = 'absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none';
|
|
1567
|
+
const CarouselScrollButtons = JSX(({ scroll, activeIndex, itemCount, arrowsPadded, hasEdgeBlocks, onScrollLeft, onScrollRight, }) => {
|
|
1543
1568
|
const { canScrollLeft, canScrollRight, scrollLeft, scrollRight } = scroll;
|
|
1544
1569
|
const canMoveLeft = hasEdgeBlocks ? activeIndex > 0 : canScrollLeft;
|
|
1545
1570
|
const canMoveRight = hasEdgeBlocks ? activeIndex < itemCount - 1 : canScrollRight;
|
|
@@ -1561,52 +1586,33 @@
|
|
|
1561
1586
|
onScrollRight();
|
|
1562
1587
|
}
|
|
1563
1588
|
}, [scrollRight, onScrollRight, hasEdgeBlocks, canScrollLeft, activeIndex, itemCount]);
|
|
1564
|
-
return (jsxs("div", { children: [renderBlur(
|
|
1589
|
+
return (jsxs("div", { children: [renderBlur(scroll), canMoveLeft ? (jsx(ScrollLeftButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'left-1 @lg:left-8' : 'left-0'), onClick: handleScrollLeft })) : null, canMoveRight ? (jsx(ScrollRightButton, { className: style(scrollButtonStyle$1, arrowsPadded ? 'right-1 @lg:right-8' : 'right-0'), onClick: handleScrollRight })) : null] }));
|
|
1565
1590
|
});
|
|
1566
|
-
const renderBlur = (
|
|
1591
|
+
const renderBlur = (scroll) => (jsxs("div", { children: [scroll.canScrollLeft ? (jsx("div", { className: style(blurBaseStyle, 'left-0 bg-opacity-from-white') })) : null, scroll.canScrollRight ? (jsx("div", { className: style(blurBaseStyle, 'right-0 bg-opacity-to-white') })) : null] }));
|
|
1567
1592
|
|
|
1568
|
-
const
|
|
1569
|
-
return [
|
|
1570
|
-
showArrows ? jsx(CarouselScrollButtons, { ...scrollButtonsProps }, "0") : null,
|
|
1571
|
-
showDots ? jsx(SwipeListControlDots, { ...dotsProps, listType: "horizontal-list" }, "1") : null,
|
|
1572
|
-
];
|
|
1573
|
-
};
|
|
1593
|
+
const ITEMS_GAP = 16;
|
|
1574
1594
|
|
|
1575
|
-
const Carousel = JSX(({ className
|
|
1595
|
+
const Carousel = JSX(({ className, itemCount, visibleItemCount = 0, noCardBorder, isAlignCenter, showDots, arrowsPadded = true, isGap = true, ...rest }) => {
|
|
1576
1596
|
const { blocks: childBlocks = [] } = rest.block || {};
|
|
1577
1597
|
const count = itemCount || childBlocks?.length;
|
|
1578
|
-
const [activeIndex,
|
|
1579
|
-
const increaseActiveIndex = useCallback(() => setActiveIndex((_) => _ + 1), []);
|
|
1580
|
-
const decreaseActiveIndex = useCallback(() => setActiveIndex((_) => _ - 1), []);
|
|
1581
|
-
const [containerRef, scroll] = useSwipeListScroll({
|
|
1598
|
+
const [activeIndex, { inc: increaseActiveIndex, dec: decreaseActiveIndex }] = useCarouselControls({
|
|
1582
1599
|
itemCount: count,
|
|
1583
|
-
|
|
1584
|
-
});
|
|
1600
|
+
visibleItemCount,
|
|
1601
|
+
}, Math.floor(visibleItemCount / 2));
|
|
1602
|
+
const [containerRef, scroll] = useSwipeListScroll({ itemCount: count });
|
|
1585
1603
|
const [dotsActiveIndex] = scroll.visibleIndicesRange;
|
|
1604
|
+
// TODO Remove
|
|
1586
1605
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
1587
|
-
return (jsx(BlockWrapper, { className: className, defaultPadding:
|
|
1606
|
+
return (jsx(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: renderChildren({
|
|
1588
1607
|
...rest,
|
|
1589
|
-
renderProps:
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
:
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
showDots,
|
|
1598
|
-
scrollButtonsProps: {
|
|
1599
|
-
scroll,
|
|
1600
|
-
arrowsPadded,
|
|
1601
|
-
isBlur,
|
|
1602
|
-
onScrollLeft: decreaseActiveIndex,
|
|
1603
|
-
onScrollRight: increaseActiveIndex,
|
|
1604
|
-
hasEdgeBlocks: isBankHistoryCarousel,
|
|
1605
|
-
activeIndex,
|
|
1606
|
-
itemCount: count,
|
|
1607
|
-
},
|
|
1608
|
-
dotsProps: { containerRef, activeIndex: dotsActiveIndex, dotCount: count },
|
|
1609
|
-
})] }) }));
|
|
1608
|
+
renderProps: (block, options, blockIndex) => renderBlock(block, options, {
|
|
1609
|
+
className: style('h-full min-w-80 sm:min-w-96', noCardBorder
|
|
1610
|
+
? ''
|
|
1611
|
+
: 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'),
|
|
1612
|
+
blockIndex,
|
|
1613
|
+
isActive: activeIndex === blockIndex,
|
|
1614
|
+
}),
|
|
1615
|
+
}) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: dotsActiveIndex, dotCount: count, listType: "horizontal-list" })) : null] }) }));
|
|
1610
1616
|
});
|
|
1611
1617
|
Carousel.childrenTypes = [
|
|
1612
1618
|
'CarouselCard',
|
|
@@ -1621,10 +1627,8 @@
|
|
|
1621
1627
|
'CarouselInvestmentCard',
|
|
1622
1628
|
'CarouselEventCard',
|
|
1623
1629
|
];
|
|
1624
|
-
const getPaddingStyle$1 = (isPadding) => (isPadding ? 'p-default' : '');
|
|
1625
|
-
const getAlignStyle = (isAlignCenter) => isAlignCenter ? 'flex justify-center' : '';
|
|
1626
1630
|
|
|
1627
|
-
const CarouselBankHistoryCard = JSX(({ title, description, className }) => (jsx(BlockWrapper, { className:
|
|
1631
|
+
const CarouselBankHistoryCard = JSX(({ title, description, className }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", children: jsx(Headline, { headlineVersion: "S", title: title, description: description, align: "text-left", className: "text-primary-text", isPadding: false }) })));
|
|
1628
1632
|
|
|
1629
1633
|
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
1630
1634
|
const link = useLink({ isRemote });
|
|
@@ -1636,15 +1640,13 @@
|
|
|
1636
1640
|
const cardTitleFont = 'font-light';
|
|
1637
1641
|
const cardDescriptionColor = '';
|
|
1638
1642
|
|
|
1639
|
-
const CarouselProgramsCard = JSX(({ className
|
|
1640
|
-
|
|
1641
|
-
});
|
|
1642
|
-
const renderList$2 = (_, i) => (jsxs("div", { className: "flex flex-row-reverse justify-between gap-y-1 sm:flex-col", children: [_.title ? (jsx(Text, { size: "text-l", font: cardTitleFont, children: _.title })) : null, _.description ? (jsx(Paragraph, { size: "text-l", font: "font-light", color: cardDescriptionColor, children: _.description })) : null] }, String(i)));
|
|
1643
|
+
const CarouselProgramsCard = JSX(({ className, title, icon, list = [], href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl sm:p-0", ...rest, children: jsxs(LinkWrapper, { className: "sm:flex sm:items-center", href: href, target: target, children: [jsx("div", { className: "flex justify-center px-xl", children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }), jsxs("div", { className: "sm:px-s p-5xl", children: [title ? jsx(Heading, { className: "mb-xs sm:mb-m", headingType: "h6", title: title }) : null, list.length ? (jsx("div", { className: "flex flex-col gap-xs sm:gap-s", children: list?.map(renderList$2) })) : null] })] }) })));
|
|
1644
|
+
const renderList$2 = (_, i) => (jsxs("div", { className: "flex flex-row-reverse justify-between gap-y-2xs sm:flex-col", children: [_.title ? (jsx(Text, { size: "text-l", font: cardTitleFont, children: _.title })) : null, _.description ? (jsx(Paragraph, { size: "text-l", font: "font-light", color: cardDescriptionColor, children: _.description })) : null] }, String(i)));
|
|
1643
1645
|
|
|
1644
1646
|
const DOT_SIZE_MAP = {
|
|
1645
|
-
L: 'w-1.5 h-1.5 mr-
|
|
1646
|
-
M: 'w-1.5 h-1.5 mr-
|
|
1647
|
-
S: 'w-1 h-1 mr-
|
|
1647
|
+
L: 'w-1.5 h-1.5 mr-m',
|
|
1648
|
+
M: 'w-1.5 h-1.5 mr-s',
|
|
1649
|
+
S: 'w-1 h-1 mr-xs',
|
|
1648
1650
|
};
|
|
1649
1651
|
const ListItem = JSX(({ className, isDotted = true, children, size = 'M' }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white', DOT_SIZE_MAP[size]) }) })) : null, jsx("span", { children: children })] })));
|
|
1650
1652
|
|
|
@@ -1654,11 +1656,11 @@
|
|
|
1654
1656
|
L: 'text-h5',
|
|
1655
1657
|
};
|
|
1656
1658
|
const ITEM_INDENT_MAP = {
|
|
1657
|
-
S: 'ml-
|
|
1658
|
-
M: 'ml-
|
|
1659
|
-
L: 'ml-
|
|
1659
|
+
S: 'ml-xs',
|
|
1660
|
+
M: 'ml-s',
|
|
1661
|
+
L: 'ml-m',
|
|
1660
1662
|
};
|
|
1661
|
-
const List = JSX(({ className, hasIndent, isDotted, items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: style('flex flex-col gap-
|
|
1663
|
+
const List = JSX(({ className, hasIndent, isDotted, items, listItemSize = 'M' }) => items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', TEXT_SIZE_MAP[listItemSize], hasIndent ? ITEM_INDENT_MAP[listItemSize] : '', className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
1662
1664
|
|
|
1663
1665
|
const buttonSizeStyles = {
|
|
1664
1666
|
default: 'w-24 h-14',
|
|
@@ -1713,10 +1715,8 @@
|
|
|
1713
1715
|
|
|
1714
1716
|
const SocialMedia = JSX(({ className = '', media }) => (jsx("div", { className: `flex gap-2 items-start justify-start ${className}`, children: media?.map((_, index) => (jsx(MediaButton, { ..._ }, String(index)))) })));
|
|
1715
1717
|
|
|
1716
|
-
const BORDER_STYLE = 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider';
|
|
1717
|
-
|
|
1718
1718
|
const CarouselRecommendationCard = JSX(({ className = '', description, href, icon, items = [], socialMedia = [], target, title, align = 'text-left', ...rest }) => {
|
|
1719
|
-
return (jsx(BlockWrapper, { className: style('relative
|
|
1719
|
+
return (jsx(BlockWrapper, { className: style('relative group-data-gray:bg-main-divider/50', className), defaultPadding: "p-6xl", ...rest, children: jsxs(LinkWrapper, { href: href, target: target, children: [jsx(Headline, { className: "mb-xs", title: title, description: description, headlineVersion: "S", isPadding: false, align: align }), items.length ? (jsx(List, { className: "flex flex-col gap-2", items: items, listItemSize: "S" })) : null, renderIcon$1(icon), socialMedia.length ? jsx(SocialMedia, { className: "mt-5", media: socialMedia }) : null] }) }));
|
|
1720
1720
|
});
|
|
1721
1721
|
const renderIcon$1 = (icon) => icon?.src || icon?.icon ? (jsx("div", { children: jsx(Img, { image: icon }) })) : null;
|
|
1722
1722
|
|
|
@@ -1742,7 +1742,7 @@
|
|
|
1742
1742
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
1743
1743
|
});
|
|
1744
1744
|
|
|
1745
|
-
const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-
|
|
1745
|
+
const getPaddingStyle = (isHighlighting = false) => isHighlighting ? 'p-6xl mt-6' : 'mt-6 p-6xl'; // Хак для мобильной версии т.к. контракт должен быть идентичный
|
|
1746
1746
|
|
|
1747
1747
|
const renderCardInfo = (cell, i) => {
|
|
1748
1748
|
const { title, description, buttons } = cell;
|
|
@@ -1754,37 +1754,18 @@
|
|
|
1754
1754
|
const cellsNode = cardCells.map(renderCardInfo);
|
|
1755
1755
|
const visibleCells = cellsNode.slice(0, VISIBLE_CELLS_COUNT);
|
|
1756
1756
|
const hiddenCells = cellsNode.slice(VISIBLE_CELLS_COUNT);
|
|
1757
|
-
return (jsxs(BlockWrapper, { className: style('relative
|
|
1757
|
+
return (jsxs(BlockWrapper, { className: style('relative flex flex-col', className), defaultPadding: getPaddingStyle(isHighlighting), ...rest, children: [isHighlighting ? renderHitIcon() : null, renderIconBlock(icon), title ? (jsx(Heading, { className: style('pt-xs', align), headingType: "h5", title: title })) : null, button ? jsx(Button, { className: "w-full mt-m", ...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] }));
|
|
1758
1758
|
});
|
|
1759
|
-
const renderIconBlock = (icon) => (jsx("div", { className: "
|
|
1759
|
+
const renderIconBlock = (icon) => (jsx("div", { className: "basis-full self-center", children: icon?.src || icon?.icon ? jsx(Img, { image: icon }) : null }));
|
|
1760
1760
|
const renderFoldButton$1 = ({ isUnfolded, onToggle }) => (jsxs("button", { className: "w-full cursor-pointer text-primary-main pt-5 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" })] }));
|
|
1761
1761
|
const renderHitIcon = () => (jsxs("div", { className: "absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "23", height: "22" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: "\u0425\u0418\u0422" })] }));
|
|
1762
1762
|
|
|
1763
|
-
const getColSpan = (className) => {
|
|
1764
|
-
const colSpanPrefix = 'col-span-';
|
|
1765
|
-
const colSpanStr = className?.split(/\s+/).find((_) => _.startsWith(colSpanPrefix));
|
|
1766
|
-
return colSpanStr ? parseInt(colSpanStr.substring(colSpanPrefix.length), 10) : 12;
|
|
1767
|
-
};
|
|
1768
|
-
|
|
1769
|
-
const CARD_WIDTH_MAP = {
|
|
1770
|
-
normal: 'min-w-[970px]',
|
|
1771
|
-
small: 'min-w-[355px]',
|
|
1772
|
-
};
|
|
1773
|
-
function getCardWidth(className = '', carouselVersion = 'normal') {
|
|
1774
|
-
const colSpan = getColSpan(className);
|
|
1775
|
-
if (colSpan <= 4) {
|
|
1776
|
-
return 'w-[375px]';
|
|
1777
|
-
}
|
|
1778
|
-
else {
|
|
1779
|
-
return CARD_WIDTH_MAP[carouselVersion];
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
1763
|
const titleSize = 'XS';
|
|
1784
1764
|
|
|
1785
|
-
const
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1765
|
+
const layerBaseStyle = 'z-10 border border-solid w-full h-full';
|
|
1766
|
+
const layerStyle = style(layerBaseStyle, 'absolute hidden sm:block border-transparent');
|
|
1767
|
+
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-12 sm:pb-9', 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-10 bg-white border-green-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isPadding: false }), renderButtonsSection([button], {
|
|
1768
|
+
className: 'mt-6xl sm:justify-center',
|
|
1788
1769
|
isVertical: true,
|
|
1789
1770
|
})] })] }) })));
|
|
1790
1771
|
|
|
@@ -1792,27 +1773,29 @@
|
|
|
1792
1773
|
black: 'bg-black',
|
|
1793
1774
|
white: 'bg-white',
|
|
1794
1775
|
};
|
|
1795
|
-
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: style('
|
|
1776
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors, ...rest }) => (jsxs(BlockWrapper, { className: style('flex flex-col justify-left gap-m', className), defaultPadding: "p-6xl sm:p-7", ...rest, children: [image?.src ? jsx(Img, { className: "flex justify-center", image: image }) : null, jsx(Headline, { title: title, description: description, headlineVersion: "XS", isPadding: false, align: "text-left" }), colors?.length ? (jsxs("div", { className: "flex text-secondary-text", 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, renderButtonsSection([button], { buttonClassName: 'w-full' })] })));
|
|
1796
1777
|
const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-1 sm:ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
1797
1778
|
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1779
|
+
const alignTextStyle = 'text-left';
|
|
1780
|
+
|
|
1781
|
+
const CarouselProductCard = JSX(({ additionalDescription, align = alignTextStyle, button = {}, className = '', description, headlineSmallVersion = 'H6', href, icon, isDotted = true, isButtonFullWidth = true, isImageFullWidth = false, isTopPosition = false, items = [], target, title, version = 'primary', ...rest }) => {
|
|
1782
|
+
return (jsxs(BlockWrapper, { className: style('flex flex-col justify-between', align, className), defaultPadding: "p-0", version: version, ...rest, children: [jsxs(LinkWrapper, { className: "p-m flex flex-col gap-xs", href: href, target: target, children: [renderCardTitle(headlineSmallVersion, title), renderDescription$2(description), renderItems(items, isDotted, version), renderAdditionalDescription(additionalDescription), renderImage$2(icon, isImageFullWidth, isTopPosition)] }), renderButtonsSection([button], {
|
|
1783
|
+
className: style('p-m pt-0', isButtonFullWidth ? '' : 'self-center'),
|
|
1784
|
+
isVertical: isButtonFullWidth,
|
|
1802
1785
|
})] }));
|
|
1803
1786
|
});
|
|
1804
|
-
const renderImage$2 = (image) => (jsxs("div", { className:
|
|
1805
|
-
const renderCardTitle = (headlineSmallVersion, title) => title ?
|
|
1806
|
-
const renderDescription$2 = (description
|
|
1807
|
-
const renderAdditionalDescription = (additionalDescription) => additionalDescription ? (jsx(
|
|
1808
|
-
const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: style('
|
|
1787
|
+
const renderImage$2 = (image, isImageFullWidth, isTopPosition) => (jsxs("div", { className: style('flex gap-lg', isTopPosition ? 'order-first' : 'order-last', !isImageFullWidth ? 'justify-center' : ''), children: [image?.src ? jsx(Img, { className: "shrink-0", image: image }) : null, image?.icon ? (jsx(Img, { className: style('shrink-0', !isImageFullWidth ? 'w-8 h-8 min-w-8' : ''), image: image })) : null] }));
|
|
1788
|
+
const renderCardTitle = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
|
|
1789
|
+
const renderDescription$2 = (description) => description ? jsx(Paragraph, { size: "text-l", children: description }) : null;
|
|
1790
|
+
const renderAdditionalDescription = (additionalDescription) => additionalDescription ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", children: additionalDescription })) : null;
|
|
1791
|
+
const renderItems = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: style('text-s', version === 'primary' ? '!text-secondary-text' : ''), items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, listItemSize: "S" })) : null;
|
|
1809
1792
|
|
|
1810
1793
|
const GRADIENT = 'bg-gradient-to-r from-main-gradient-start to-main-gradient-end';
|
|
1811
1794
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
1812
1795
|
|
|
1813
1796
|
const headingStyle = (isFillGradient = false) => (isFillGradient ? 'text-white' : '');
|
|
1814
|
-
const subtitleStyle = (isFillGradient = false) => `text-s mb-
|
|
1815
|
-
const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (jsxs("div", { role: "columnheader", children: [icon ? (jsx(Img, { className: "h-
|
|
1797
|
+
const subtitleStyle = (isFillGradient = false) => `text-s mb-m ${isFillGradient ? 'text-white' : 'text-secondary-text/80'}`;
|
|
1798
|
+
const HeaderCell = JSX(({ icon, image, title, subtitle, isFillGradient }) => (jsxs("div", { className: "space-y-4", role: "columnheader", children: [icon ? (jsx(Img, { className: "h-16 w-16 min-w-16 min-h-16", image: icon, width: "64", height: "64" })) : null, image?.src && (jsx("div", { children: jsx(Img, { image: image }) })), title ? (jsx(Heading, { headingType: "h4", className: headingStyle(isFillGradient), title: title })) : null, subtitle ? jsx("div", { className: subtitleStyle(isFillGradient), children: subtitle }) : null] })));
|
|
1816
1799
|
|
|
1817
1800
|
const TableCell = JSX(({ cell, rowHeader, isFillGradient = false }) => {
|
|
1818
1801
|
const cellWrapperClasses = `box-border flex flex-col`;
|
|
@@ -1825,15 +1808,15 @@
|
|
|
1825
1808
|
const columnDataView = columnData?.slice(0, showRow ? columnData.length : visibleRowLength);
|
|
1826
1809
|
const gradientClassName = isFillGradient ? GRADIENT : '';
|
|
1827
1810
|
const buttonVersion = isFillGradient ? 'secondary' : 'primary';
|
|
1828
|
-
return (jsxs("div", { className: `border border-gray rounded-md p-
|
|
1811
|
+
return (jsxs("div", { className: `border border-gray rounded-md p-m mb-m ${gradientClassName}`, role: "row", children: [jsx(HeaderCell, { ...header, isFillGradient: isFillGradient }), columnDataView?.length
|
|
1829
1812
|
? columnDataView.map(({ rowHeader, cell }, i) => (jsx(TableCell, { cell: cell, rowHeader: rowHeader, isFillGradient: isFillGradient }, String(i))))
|
|
1830
|
-
: null, showRow && header?.link ? (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "text-s font-medium mt-
|
|
1813
|
+
: null, showRow && header?.link ? (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "text-s font-medium mt-m py-s", children: header.link.text })) : null, renderToggleButton({ onToggleColumn, isFillGradient, showRow })] }));
|
|
1831
1814
|
});
|
|
1832
1815
|
const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow, }) => (jsx("div", { className: "mt-5", role: "cell", children: jsx("a", { role: "link", onClick: onToggleColumn, className: `text-s font-medium cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
|
|
1833
1816
|
|
|
1834
1817
|
const ComparisonTable = JSX((props) => {
|
|
1835
1818
|
const { className, title } = props;
|
|
1836
|
-
return (jsxs("section", { className: `bg-white font-sans
|
|
1819
|
+
return (jsxs("section", { className: `bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${className || ''}`, children: [title ? (jsx(Heading, { headingType: "h3", className: "font-medium text-center", title: title })) : null, jsx("div", { role: "table", children: jsx(TableInner, { ...props }) })] }));
|
|
1837
1820
|
});
|
|
1838
1821
|
const TableInner = JSX(({ columns = [], rowHeaders, isColoredFirstColumn, visibleRowLength, orientation, ...rest }) => {
|
|
1839
1822
|
const [columnsViewState, setColumnsViewState] = useState(new Array(columns.length).fill(!visibleRowLength));
|
|
@@ -1847,20 +1830,203 @@
|
|
|
1847
1830
|
return orientation === 'horizontal' ? (jsx(SwipeListControl, { onVisibleIndicesChange: handleSlideChange, children: tableColumns })) : (tableColumns);
|
|
1848
1831
|
});
|
|
1849
1832
|
|
|
1850
|
-
const
|
|
1833
|
+
const imageAlignmentMap = {
|
|
1834
|
+
start: 'self-start',
|
|
1835
|
+
center: 'self-center',
|
|
1836
|
+
end: 'self-end',
|
|
1837
|
+
};
|
|
1838
|
+
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap @xl:flex-nowrap justify-between items-stretch gap-3xl", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-3xl max-w-[600px] xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), backImage ? (jsx("div", { className: "mx-auto sm:absolute sm:-z-10 sm:-bottom-4 sm:-right-4", children: backImage })) : null, buttons] }), renderImageContainer(rightImage, { className: '-order-1 @xl:order-1', imageAlign })] })] })));
|
|
1839
|
+
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
1840
|
+
|
|
1841
|
+
var Currency;
|
|
1842
|
+
(function (Currency) {
|
|
1843
|
+
Currency["RUB"] = "RUB";
|
|
1844
|
+
Currency["EUR"] = "EUR";
|
|
1845
|
+
Currency["USD"] = "USD";
|
|
1846
|
+
})(Currency || (Currency = {}));
|
|
1847
|
+
|
|
1848
|
+
const currencyNumberFormat = new Intl.NumberFormat('ru', {
|
|
1849
|
+
style: 'currency',
|
|
1850
|
+
currency: Currency.RUB,
|
|
1851
|
+
});
|
|
1852
|
+
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
1853
|
+
|
|
1854
|
+
const TABLE_HEAD_STYLE = 'text-left text-m font-light text-secondary-text';
|
|
1855
|
+
const TABLE_HEAD_STYLE_WITH_PADDING = `${TABLE_HEAD_STYLE} pl-5xl`;
|
|
1856
|
+
const CURRENCY_ICONS_MAP = {
|
|
1857
|
+
USD: 'DollarIcon',
|
|
1858
|
+
EUR: 'EuroIcon',
|
|
1859
|
+
};
|
|
1860
|
+
const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
|
|
1861
|
+
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
1862
|
+
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
1863
|
+
return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m", children: jsxs("div", { className: "flex items-center", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24", className: "mr-2" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
|
|
1864
|
+
};
|
|
1865
|
+
|
|
1866
|
+
const icon = { icon: 'GpsIcon' };
|
|
1867
|
+
const CurrentLocation$1 = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary" }), jsxs("div", { className: "space-y-2xs", children: [address ? jsx("p", { className: "text-primary-main text-l", children: address }) : null, jsx("p", { className: "text-secondary-text text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
1868
|
+
|
|
1869
|
+
const roundTo = (value, precision = 2) => {
|
|
1870
|
+
const factor = 10 ** precision;
|
|
1871
|
+
return Math.round(parseFloat(String(value)) * factor) / factor;
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
const calculateResult = (value, rate, precision) => {
|
|
1875
|
+
const result = Number(formatValue(value)) * Math.pow(rate, precision ? -1 : 1);
|
|
1876
|
+
return Number.isInteger(result) ? result : roundTo(result);
|
|
1877
|
+
};
|
|
1878
|
+
const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
|
|
1879
|
+
|
|
1880
|
+
const tableFunc = (table) => (input) => {
|
|
1881
|
+
const [, output] = table.find(([predicate]) => predicate(input)) || [];
|
|
1882
|
+
return output;
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1885
|
+
const callbackCurrencySelect = (props) => tableFunc([
|
|
1886
|
+
[
|
|
1887
|
+
(_) => _.value !== Currency.RUB && _.oppositeValue !== Currency.RUB,
|
|
1888
|
+
() => props.handleConvert(props.value, Currency.RUB),
|
|
1889
|
+
],
|
|
1890
|
+
[
|
|
1891
|
+
(_) => _.value === Currency.RUB && _.oppositeValue === Currency.RUB,
|
|
1892
|
+
() => props.handleConvert(props.value, Currency.USD),
|
|
1893
|
+
],
|
|
1894
|
+
[() => true, () => props.handleConvert(props.value)],
|
|
1895
|
+
])(props)?.();
|
|
1896
|
+
|
|
1897
|
+
function renderInput(props) {
|
|
1898
|
+
const { placeholder, rates, selected, value, setValue, setSelected } = props;
|
|
1899
|
+
const ratesOptions = rates.map((_) => ({
|
|
1900
|
+
key: _?.currency?.currency ?? '',
|
|
1901
|
+
text: _?.currency?.currency ?? '',
|
|
1902
|
+
}));
|
|
1903
|
+
const selectedValue = { key: selected, text: selected };
|
|
1904
|
+
return (jsxs("div", { className: "relative flex", children: [jsx(Input, { className: "shrink-0 text-l w-full appearance-none mr-[-90px]", placeholder: placeholder, type: "text", value: value, onChange: setValue }), ratesOptions.length ? (jsx(Select, { isBorder: false, onChange: (_) => setSelected(_.key), options: ratesOptions, value: selectedValue })) : null] }));
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
const ExchangeCurrencyCalculator = JSX(({ className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
1908
|
+
const [calcState, setCalcState] = useState({
|
|
1909
|
+
inputSell: '',
|
|
1910
|
+
inputBuy: '',
|
|
1911
|
+
selectSell: currencyRatesBuy?.[0]?.currency?.currency || Currency.RUB,
|
|
1912
|
+
selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
|
|
1913
|
+
});
|
|
1914
|
+
const handleSetCalcState = useCallback((newState) => setCalcState((oldState) => ({ ...oldState, ...newState })), []);
|
|
1915
|
+
return (jsxs("div", { className: `grid gap-m pt-2xl ${className}`, children: [renderInput({
|
|
1916
|
+
placeholder: 'Хочу продать',
|
|
1917
|
+
rates: currencyRatesSell,
|
|
1918
|
+
selected: calcState.selectSell,
|
|
1919
|
+
setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
|
|
1920
|
+
value: calcState.inputSell,
|
|
1921
|
+
setValue: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
|
|
1922
|
+
}), renderInput({
|
|
1923
|
+
placeholder: 'Получу',
|
|
1924
|
+
rates: currencyRatesBuy,
|
|
1925
|
+
selected: calcState.selectBuy,
|
|
1926
|
+
setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
|
|
1927
|
+
value: calcState.inputBuy,
|
|
1928
|
+
setValue: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
|
|
1929
|
+
}), button?.text ? (jsx(Button, { className: "py-4", version: button?.version, ...button, children: button.text })) : null] }));
|
|
1930
|
+
});
|
|
1931
|
+
const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
|
|
1932
|
+
setCalcState({ selectSell: value });
|
|
1933
|
+
callbackCurrencySelect({
|
|
1934
|
+
value,
|
|
1935
|
+
oppositeValue: calcState.selectBuy,
|
|
1936
|
+
handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
|
|
1937
|
+
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, currencyFrom, currencyTo);
|
|
1938
|
+
},
|
|
1939
|
+
});
|
|
1940
|
+
};
|
|
1941
|
+
const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
|
|
1942
|
+
setCalcState({ selectBuy: value });
|
|
1943
|
+
callbackCurrencySelect({
|
|
1944
|
+
value,
|
|
1945
|
+
oppositeValue: calcState.selectSell,
|
|
1946
|
+
handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, currencyTo, currencyFrom),
|
|
1947
|
+
});
|
|
1948
|
+
};
|
|
1949
|
+
const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
|
|
1950
|
+
setCalcState({ inputSell: formatValue(value), selectBuy: currencyTo });
|
|
1951
|
+
const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
|
|
1952
|
+
currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate;
|
|
1953
|
+
if (rate) {
|
|
1954
|
+
setCalcState({
|
|
1955
|
+
inputBuy: String(calculateResult(value, rate, currencyFrom === Currency.RUB) || ''),
|
|
1956
|
+
});
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
|
|
1960
|
+
setCalcState({ inputBuy: formatValue(value), selectSell: currencyFrom });
|
|
1961
|
+
const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
|
|
1962
|
+
currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate;
|
|
1963
|
+
if (rate) {
|
|
1964
|
+
setCalcState({
|
|
1965
|
+
inputSell: String(calculateResult(value, rate, currencyTo === Currency.RUB) || ''),
|
|
1966
|
+
});
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
|
|
1971
|
+
const REGION_URL$1 = '/api/v1/region';
|
|
1972
|
+
function useFetchExchangeRateData() {
|
|
1973
|
+
const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
|
|
1974
|
+
return data || {};
|
|
1975
|
+
}
|
|
1976
|
+
const fetchData = async (urlExchangeRates) => {
|
|
1977
|
+
const region = await fetchRegion();
|
|
1978
|
+
const regionCode = region?.code || '000';
|
|
1979
|
+
const exchangeRates = await fetchExchangeRates(urlExchangeRates, regionCode);
|
|
1980
|
+
return { region, exchangeRates };
|
|
1981
|
+
};
|
|
1982
|
+
const fetchRegion = async () => {
|
|
1983
|
+
try {
|
|
1984
|
+
return await fetchJSONUnsafe(REGION_URL$1, { method: 'GET' });
|
|
1985
|
+
}
|
|
1986
|
+
catch (error) {
|
|
1987
|
+
console.log(error);
|
|
1988
|
+
return {};
|
|
1989
|
+
}
|
|
1990
|
+
};
|
|
1991
|
+
const fetchExchangeRates = async (url, regionCode) => {
|
|
1992
|
+
try {
|
|
1993
|
+
return await fetchJSONUnsafe(url + `?regionCode=${regionCode}`, {
|
|
1994
|
+
method: 'GET',
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
catch (error) {
|
|
1998
|
+
console.log(error);
|
|
1999
|
+
return {};
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
|
|
2003
|
+
const ExchangeRateTile = JSX(({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
|
|
2004
|
+
const { exchangeRates } = useFetchExchangeRateData();
|
|
2005
|
+
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
2006
|
+
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
2007
|
+
currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
|
|
2008
|
+
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
2009
|
+
currencyRatesSell.push({ currency: { currency: Currency.RUB } });
|
|
2010
|
+
return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex gap-6xl flex-wrap", children: [jsxs("div", { children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation$1, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
|
|
2011
|
+
});
|
|
2012
|
+
const getCurrencyRates = (currencies) => {
|
|
2013
|
+
return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
const EMPTY_VALUE$1 = {};
|
|
1851
2017
|
function useSWRResource(filename, fallback = {}) {
|
|
1852
2018
|
const { data } = useAsyncData(`/wcms-resources/${filename}.json`, fetchJSONUnsafe, {
|
|
1853
2019
|
fallback,
|
|
1854
2020
|
});
|
|
1855
|
-
return data || EMPTY_VALUE;
|
|
2021
|
+
return data || EMPTY_VALUE$1;
|
|
1856
2022
|
}
|
|
1857
2023
|
|
|
1858
2024
|
const linkListStyles = '';
|
|
1859
2025
|
|
|
1860
|
-
const LinkList = JSX(({ className = '', items }) => items?.length ? (jsx("ul", { className: style('flex flex-col p-0', linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
2026
|
+
const LinkList = JSX(({ className = '', items }) => items?.length ? (jsx("ul", { className: style('flex flex-col p-0 gap-m sm:gap-xl', linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
1861
2027
|
const renderLinkListItem = (item, i) => {
|
|
1862
2028
|
const { text, ...linkProps } = item;
|
|
1863
|
-
return (jsx("li", { className: "list-none
|
|
2029
|
+
return (jsx("li", { className: "list-none", children: jsx("a", { className: "hover:text-primary-main sm:font-light", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
1864
2030
|
};
|
|
1865
2031
|
|
|
1866
2032
|
const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', disabled = false, onClick }) => {
|
|
@@ -1883,7 +2049,10 @@
|
|
|
1883
2049
|
const rollupItemStyles = '';
|
|
1884
2050
|
|
|
1885
2051
|
const RollupItem = JSX(({ className = '', label = 'Развернуть', labelIcon, labelIconBgVersion, isExpanded, isFoldButtonOnTop = true, version = 'primary', ...rest }) => {
|
|
1886
|
-
return (jsx(BlockWrapper, { className: style('w-full', rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: style('gap-5
|
|
2052
|
+
return (jsx(BlockWrapper, { className: style('w-full', rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: style('gap-5', foldableSectionStyles), isUnfolded: isUnfolded, children: renderChildren({
|
|
2053
|
+
...rest,
|
|
2054
|
+
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
2055
|
+
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({
|
|
1887
2056
|
version,
|
|
1888
2057
|
label,
|
|
1889
2058
|
labelIcon,
|
|
@@ -1906,12 +2075,12 @@
|
|
|
1906
2075
|
})) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
1907
2076
|
};
|
|
1908
2077
|
const renderPrimaryFoldButton = ({ label, labelIconBgVersion, icon, onToggle, labelIcon, }) => {
|
|
1909
|
-
return (jsxs("button", { className: style('border-none bg-transparent px-0 flex justify-between items-center w-full group/button', labelIcon?.icon ? 'py-
|
|
2078
|
+
return (jsxs("button", { className: style('border-none bg-transparent px-0 flex justify-between items-center w-full group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, children: [jsxs("div", { className: "flex items-center group-hover/button:text-primary-main gap-s", children: [renderRoundedIcon(labelIcon, labelIconBgVersion), label ? (jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), icon ? jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null] }));
|
|
1910
2079
|
};
|
|
1911
2080
|
|
|
1912
|
-
const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContactsGroup) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
|
|
1913
|
-
const renderContactsGroup = (item, i) => (jsxs("div", { className: "
|
|
1914
|
-
const renderContact = (item, index) => (jsxs("div", { className: "
|
|
2081
|
+
const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: style('space-y-xl', className), children: [items?.length ? items.map(renderContactsGroup) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
|
|
2082
|
+
const renderContactsGroup = (item, i) => (jsxs("div", { className: "space-y-m", children: [jsx("div", { className: "", children: jsx(Text, { size: "text-l", font: "font-medium", children: item?.title }) }), jsx("div", { className: "space-y-m", children: item.items?.map(renderContact) })] }, String(i)));
|
|
2083
|
+
const renderContact = (item, index) => (jsxs("div", { className: "space-y-2xs", children: [jsx("div", { children: renderText(item.type, item.text) }), jsx("div", { className: "text-s font-light text-secondary-text", children: item.description })] }, String(index)));
|
|
1915
2084
|
const renderText = (type, text = '') => {
|
|
1916
2085
|
switch (type) {
|
|
1917
2086
|
case 'tel':
|
|
@@ -1942,11 +2111,9 @@
|
|
|
1942
2111
|
|
|
1943
2112
|
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: className, children: [jsx("div", { className: "pt-4 xl:pt-5", 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 justify-start items-start gap-5 pt-4", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
|
|
1944
2113
|
|
|
1945
|
-
const Footer = JSX(({ className
|
|
1946
|
-
const
|
|
1947
|
-
|
|
1948
|
-
const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
|
|
1949
|
-
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "px-4 py-6", ...rest, children: [jsx("div", { className: "mb-4 pb-5 border-b border-main-divider", children: sitemap.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, labelIcon: item?.icon, children: jsx(LinkList, { items: item.items, className: "my-3" }) }, String(i)))) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsx(SocialMedia, { className: "mb-4", media: socialMedia }), mobileApps?.map(renderButton), jsx(HorizontalNavigation, { className: "pt-4 pb-7 border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, {})] }));
|
|
2114
|
+
const Footer = JSX(({ className, sitemap, ...rest }) => {
|
|
2115
|
+
const { relatedEnterprises, contacts, socialMedia, mobileApps, horizontalNavigationTitle } = useSWRResource(projectSettings.FOOTER || 'footer', rest.options?.page?.fallback);
|
|
2116
|
+
return (jsxs(BlockWrapper, { tag: "footer", className: className, defaultPadding: "px-4 py-6", ...rest, children: [jsx("div", { className: "mb-4 pb-5 border-b border-main-divider", children: sitemap?.topItems?.map((item, i) => (jsx(RollupItem, { label: item?.text, labelIcon: item?.icon, children: jsx(LinkList, { items: item.items, className: "my-3" }) }, String(i)))) }), jsx(Contacts, { className: "overflow-hidden", items: contacts }), jsx(SocialMedia, { className: "mb-4", media: socialMedia }), mobileApps?.map(renderButton), jsx(HorizontalNavigation, { className: "pt-m pb-2xl border-y border-main-divider", title: horizontalNavigationTitle, links: relatedEnterprises }), jsx(TextInformation, {})] }));
|
|
1950
2117
|
});
|
|
1951
2118
|
const renderButton = ({ href = '/' }, i) => {
|
|
1952
2119
|
const { label } = findIconByHref(href);
|
|
@@ -1973,7 +2140,7 @@
|
|
|
1973
2140
|
transparent: 'text-white',
|
|
1974
2141
|
};
|
|
1975
2142
|
const renderTitle = (title, bgColor, className) => {
|
|
1976
|
-
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-
|
|
2143
|
+
return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-s font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
|
|
1977
2144
|
};
|
|
1978
2145
|
|
|
1979
2146
|
const Logo = JSX(({ bgColor = 'bg-white', children, className = '', href, logo, showTitle = true, targetBlank, }) => {
|
|
@@ -1993,24 +2160,52 @@
|
|
|
1993
2160
|
return (jsxs("div", { className: "flex items-center justify-between w-full", children: [isRootLocation ? (jsx(Logo, { bgColor: bgColor, logo: logo })) : (jsxs(Button, { className: "flex items-center text-l", ariaLabel: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434", onClick: onClick, children: [jsx(Img, { className: "w-6 h-6", image: {
|
|
1994
2161
|
icon: 'ChevronLeft',
|
|
1995
2162
|
iconVersion: 'black',
|
|
1996
|
-
} }), "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434"] })), internetBankUrl ? (jsx(Button, { href: internetBankUrl, ariaLabel: "\u0412\u043E\u0439\u0442\u0438", target: "_blank", className: style('p-
|
|
2163
|
+
} }), "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434"] })), internetBankUrl ? (jsx(Button, { href: internetBankUrl, ariaLabel: "\u0412\u043E\u0439\u0442\u0438", target: "_blank", className: style('p-s my-2xs text-s whitespace-nowrap text-primary-main hover:text-primary-hover', BUTTON_STYLE[version === 'transparent' ? 'transparent' : 'default']), children: "\u0412\u043E\u0439\u0442\u0438" })) : null] }));
|
|
1997
2164
|
});
|
|
1998
2165
|
|
|
1999
2166
|
const BG_COLOR_TO_BLOCK_VERSION = {
|
|
2000
2167
|
'bg-white': 'primary',
|
|
2001
2168
|
transparent: 'transparent',
|
|
2002
2169
|
};
|
|
2003
|
-
const Header = JSX(({ bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], ...rest }) => {
|
|
2004
|
-
const
|
|
2005
|
-
|
|
2006
|
-
return (jsx(BlockWrapper, { tag: "header", defaultPadding: "", version: version, ...rest, children: jsx("div", { className: "container px-4 py-1 box-border", children: jsx(HeaderTop, { bgColor: bgColor, logo: logo, internetBankUrl: internetBankUrl, version: version, ...rest }) }) }));
|
|
2170
|
+
const Header = JSX(({ bgColor = 'bg-white', version = BG_COLOR_TO_BLOCK_VERSION[bgColor], sitemap, ...rest }) => {
|
|
2171
|
+
const { logo, internetBankUrl } = sitemap || {};
|
|
2172
|
+
return (jsx(BlockWrapper, { tag: "header", defaultPadding: "", version: version, ...rest, children: jsx("div", { className: "container px-4 py-2xs box-border", children: jsx(HeaderTop, { bgColor: bgColor, logo: logo, internetBankUrl: internetBankUrl, version: version, ...rest }) }) }));
|
|
2007
2173
|
});
|
|
2008
2174
|
|
|
2175
|
+
const gapStyles = {
|
|
2176
|
+
XXL: 'gap-6xl',
|
|
2177
|
+
XL: 'gap-5xl',
|
|
2178
|
+
L: 'gap-3xl',
|
|
2179
|
+
M: 'gap-m',
|
|
2180
|
+
S: 'gap-xs',
|
|
2181
|
+
XS: 'gap-2xs',
|
|
2182
|
+
'': '',
|
|
2183
|
+
};
|
|
2184
|
+
|
|
2185
|
+
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({
|
|
2186
|
+
...rest,
|
|
2187
|
+
extraProps: { className: 'w-full', padding: isInnerPadding ? '' : 'p-0' },
|
|
2188
|
+
}) })));
|
|
2189
|
+
VerticalLayout.childrenTypes = [];
|
|
2190
|
+
|
|
2191
|
+
const HorizontalLayout = JSX((props) => jsx(VerticalLayout, { ...props }));
|
|
2192
|
+
HorizontalLayout.childrenTypes = [];
|
|
2193
|
+
|
|
2009
2194
|
const ImgBlock = JSX((props) => {
|
|
2010
2195
|
const { className, image, ...rest } = props;
|
|
2011
2196
|
return (jsx(BlockWrapper, { className: className, defaultPadding: "p-0", ...rest, children: jsx(Img, { image: image }) }));
|
|
2012
2197
|
});
|
|
2013
2198
|
|
|
2199
|
+
const KILO = 1024;
|
|
2200
|
+
const KILO_SIZES = ['байт', 'Кб', 'Мб', 'Гб', 'Тб', 'Пб'];
|
|
2201
|
+
const formatBytes = (bytes, decimals = 2) => {
|
|
2202
|
+
if (bytes === 0) {
|
|
2203
|
+
return '';
|
|
2204
|
+
}
|
|
2205
|
+
const i = Math.floor(Math.log(bytes) / Math.log(KILO));
|
|
2206
|
+
return `${parseFloat((bytes / Math.pow(KILO, i)).toFixed(decimals))} ${KILO_SIZES[i]}`;
|
|
2207
|
+
};
|
|
2208
|
+
|
|
2014
2209
|
const LinkDocItem = JSX(({ icon, text, fileSize, ...linkProps }) => (jsxs("a", { className: "flex box-border gap-3 group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main", role: "link", ...linkProps, children: [icon, text ? (jsxs(Text, { size: "text-l", font: "font-light", children: [text, jsx(Text, { color: "text-secondary-text", children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })) : null] })));
|
|
2015
2210
|
const formatSuffix = (ext, fileSize) => {
|
|
2016
2211
|
const prefix = ext || fileSize ? ',' : '';
|
|
@@ -2034,13 +2229,16 @@
|
|
|
2034
2229
|
};
|
|
2035
2230
|
const LinkDocs = JSX(({ className = '', title, description, align = 'text-center', documents, icon = { icon: 'DocIcon' }, columnsMode = 'double', ...rest }) => {
|
|
2036
2231
|
const router = useRouter();
|
|
2037
|
-
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-
|
|
2232
|
+
return (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [jsx(Headline, { title: title, description: description, align: align, headlineVersion: "M", as: "h2", isPadding: false }), documents?.length ? (jsx("div", { className: style('mt-5 sm:mt-8 flex flex-col gap-6', linkColumnsModeStyleMap[columnsMode]), role: "list", children: documents.map(renderLinkDocItem(router, columnsMode, icon)) })) : null] }));
|
|
2038
2233
|
});
|
|
2039
2234
|
const renderLinkDocItem = (router, columnsMode, icon) => (docBlockDef, i) => {
|
|
2040
2235
|
const href = docBlockDef?.docType === 'Attachment'
|
|
2041
2236
|
? adjustHref(router)(docBlockDef?.attachment?.src)
|
|
2042
2237
|
: docBlockDef?.href;
|
|
2043
|
-
|
|
2238
|
+
const fileSize = docBlockDef?.docType === 'Attachment'
|
|
2239
|
+
? formatBytes(docBlockDef?.attachment?.fileSize || 0)
|
|
2240
|
+
: docBlockDef?.fileSize;
|
|
2241
|
+
return (jsx("div", { className: columnsMode === 'double' ? 'basis-[calc(50%-20px)]' : '', role: "listitem", children: jsx(LinkDocItem, { text: docBlockDef?.text, target: docBlockDef?.target, href: href, fileSize: fileSize, icon: icon ? jsx(Img, { className: linkIconStyle, image: icon, width: "24", height: "24" }) : null }) }, String(i)));
|
|
2044
2242
|
};
|
|
2045
2243
|
|
|
2046
2244
|
/**
|
|
@@ -2052,23 +2250,15 @@
|
|
|
2052
2250
|
right: 'text-right',
|
|
2053
2251
|
};
|
|
2054
2252
|
|
|
2055
|
-
const
|
|
2056
|
-
start: 'self-start',
|
|
2057
|
-
center: 'self-center',
|
|
2058
|
-
end: 'self-end',
|
|
2059
|
-
};
|
|
2060
|
-
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-lg font-sans overflow-hidden', padding || defaultPadding, className), children: [backImage ? jsx("div", { className: "absolute bottom-0 right-0 z-0", children: backImage }) : null, title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: "grow relative flex flex-wrap sm:flex-nowrap justify-between items-stretch gap-lg", children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('flex flex-col gap-lg max-w-[600px] xl:max-w-[728px]', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), buttons] }), renderImageContainer(rightImage, { className: '-order-1 sm:order-1', imageAlign })] })] })));
|
|
2061
|
-
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
2062
|
-
|
|
2063
|
-
const renderDescription$1 = (description) => description ? (jsx("div", { className: "mb-5 pt-0.5 sm:mb-0 sm:pt-0", children: jsx(Text, { size: "text-xl", "font-weight": "light", children: description }) })) : null;
|
|
2253
|
+
const renderDescription$1 = (description) => description ? (jsx("div", { className: "mb-5 pt-3xs sm:mb-0 sm:pt-0", children: jsx(Text, { size: "text-xl", "font-weight": "light", children: description }) })) : null;
|
|
2064
2254
|
|
|
2065
2255
|
const renderList$1 = (items) => {
|
|
2066
|
-
return items?.length ? (jsx(List, { items: items, className: "text-l font-light mb-
|
|
2256
|
+
return items?.length ? (jsx(List, { items: items, className: "text-l font-light mb-xs last:mb-0" })) : (jsx("span", { className: "text-m font-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
|
|
2067
2257
|
};
|
|
2068
2258
|
|
|
2069
2259
|
const MobileAppTile = JSX(({ className, padding, alignTitle = 'left', buttons = [], description, headingType = 'h4', image, items, qr, title = 'Мобильное приложение', version = 'primary', ...rest }) => {
|
|
2070
|
-
const containerStyle = version === 'secondary' ? 'p-
|
|
2071
|
-
return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-
|
|
2260
|
+
const containerStyle = version === 'secondary' ? 'p-m min-w-32' : 'min-w-24';
|
|
2261
|
+
return (jsx(BlockWrapper, { className: style('min-h-80', className), padding: "p-0", version: version, ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, defaultPadding: "p-6xl", title: title ? (jsx(Heading, { headingType: headingType, title: title, className: style('whitespace-pre-wrap', AlignText[alignTitle]) })) : null, buttons: renderButtonsSection(buttons, { isVertical: buttons.length > 4 }), children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 flex-wrap gap-m items-center", children: [qr?.src ? (jsx("div", { className: style('flex justify-center bg-white rounded-md', containerStyle), children: jsx(Img, { className: "w-fit", image: qr }) })) : null, renderList$1(items), image?.src ? jsx(Img, { image: image }) : null] })] }) }));
|
|
2072
2262
|
});
|
|
2073
2263
|
|
|
2074
2264
|
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
@@ -2095,7 +2285,7 @@
|
|
|
2095
2285
|
'description' in _ ? renderBenefitDescription(_.description, i) : null,
|
|
2096
2286
|
]);
|
|
2097
2287
|
|
|
2098
|
-
const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-
|
|
2288
|
+
const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m', 'description' in _ && _.description ? 'items-start' : 'items-center', className), children: ['icon' in _ ? renderBenefitIcon(_.icon, benefitsVersion) : null, jsx("div", { children: renderBenefitText(_) })] })));
|
|
2099
2289
|
|
|
2100
2290
|
const MAX_BENEFITS_LEN_DEVIATION = 16;
|
|
2101
2291
|
const benefitLength = (_) => _.type === 'rte'
|
|
@@ -2114,21 +2304,21 @@
|
|
|
2114
2304
|
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', isInsetTitle = true, benefitsVersion, isTabularBenefits, benefits, __html, items, isDotted = true, listItemSize, tags, buttons, image, imageOptions: { imageAlign = 'end', directionRight = true, isBackground } = {}, children, }) => {
|
|
2115
2305
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2116
2306
|
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isPadding: false }));
|
|
2117
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isInsetTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-
|
|
2307
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isInsetTitle ? { insetTitle: headline } : { title: headline }), ...(isBackground ? { backImage: img } : leftOrRightImage(img, directionRight)), imageAlign: imageAlign, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col gap-xl", children: [jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: benefits }), __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, tags?.length ? jsx(Tags, { tags: tags }) : null] }) }));
|
|
2118
2308
|
});
|
|
2119
2309
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2120
2310
|
|
|
2121
|
-
const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-
|
|
2311
|
+
const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: [Number(sum) > 0 ? renderValueBlock('Страховая сумма:', sum) : null, Number(monthLimit) > 0 ? renderValueBlock('Ежемесячный лимит:', monthLimit) : null] })) : null;
|
|
2122
2312
|
const renderValueBlock = (title, value = 0) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", children: title }), jsxs(Text, { size: "text-h6", color: "text-primary-text", children: [toLocalNumberFormat(2)(value), " \u20BD"] })] }));
|
|
2123
2313
|
|
|
2124
|
-
const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-
|
|
2314
|
+
const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isInsetTitle: false, imageOptions: { directionRight: false, imageAlign: 'center', ...imageOptions }, ...rest, children: renderInsuranceSumMonth(Number(sum), Number(monthLimit)) }) })));
|
|
2125
2315
|
|
|
2126
2316
|
const GOLDEN_RATIO = 1.618;
|
|
2127
|
-
const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isPadding: false }), jsx("figure", { className: "m-0 mt-
|
|
2317
|
+
const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isPadding: false }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
|
|
2128
2318
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
2129
2319
|
.map((_) => Math.floor(_))
|
|
2130
2320
|
.map(renderShimmerItem);
|
|
2131
|
-
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-
|
|
2321
|
+
const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
|
|
2132
2322
|
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
2133
2323
|
|
|
2134
2324
|
function renderBackwardButton({ text, href, target, icon }, version) {
|
|
@@ -2141,7 +2331,7 @@
|
|
|
2141
2331
|
} }) }), jsx(Button, { version: "link", ...commonProps })] }));
|
|
2142
2332
|
}
|
|
2143
2333
|
|
|
2144
|
-
const ProductBlock = JSX(({ className, padding, backwardButton, ...rest }) => (jsxs(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-
|
|
2334
|
+
const ProductBlock = JSX(({ className, padding, backwardButton, ...rest }) => (jsxs(BlockWrapper, { className: style('overflow-hidden flex flex-col gap-3xl box-border', className), defaultPadding: "p-6xl", padding: padding, ...rest, children: [backwardButton?.text
|
|
2145
2335
|
? renderBackwardButton(backwardButton, !rest.version || rest.version === 'primary' ? 'primary' : 'white')
|
|
2146
2336
|
: null, jsx(BaseProductTile, { className: "grow h-full", ...rest })] })));
|
|
2147
2337
|
|
|
@@ -2154,6 +2344,387 @@
|
|
|
2154
2344
|
return (jsx(BlockWrapper, { defaultPadding: "p-0", ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) }));
|
|
2155
2345
|
});
|
|
2156
2346
|
|
|
2347
|
+
const mockPoints = [
|
|
2348
|
+
{ coords: [55.77, 37.46], text: 'Трактир' },
|
|
2349
|
+
{ coords: [55.66, 37.48], text: 'Трактор' },
|
|
2350
|
+
{ coords: [55.65, 37.42], text: 'Ресторан' },
|
|
2351
|
+
{ coords: [55.64, 37.54], text: 'Музей' },
|
|
2352
|
+
{ coords: [55.54, 37.52], text: 'Библиотека' },
|
|
2353
|
+
{ coords: [55.53, 37.56], text: 'Школа' },
|
|
2354
|
+
{ coords: [55.61, 37.61], text: 'Аптека' },
|
|
2355
|
+
{ coords: [55.8, 37.58], text: 'Бар' },
|
|
2356
|
+
{ coords: [55.71, 37.35], text: 'Институт' },
|
|
2357
|
+
{ coords: [55.74, 37.57], text: 'Университет' },
|
|
2358
|
+
{ coords: [55.58, 37.69], text: 'Больница' },
|
|
2359
|
+
{ coords: [55.57, 37.7], text: 'Цирк' },
|
|
2360
|
+
{ coords: [55.55, 37.64], text: 'Магазин' },
|
|
2361
|
+
{ coords: [55.5, 37.75], text: 'Булочная' },
|
|
2362
|
+
{ coords: [55.81, 37.73], text: 'Полиция' },
|
|
2363
|
+
{ coords: [55.73, 37.68], text: 'Салон красоты' },
|
|
2364
|
+
{ coords: [55.86, 37.76], text: 'Баня' },
|
|
2365
|
+
{ coords: [55.38, 37.69], text: 'Гараж' },
|
|
2366
|
+
{ coords: [55.91, 37.5], text: 'Дом' },
|
|
2367
|
+
{ coords: [55.62, 37.32], text: 'Прачечная' },
|
|
2368
|
+
{ coords: [55.85, 37.41], text: 'Стадион' },
|
|
2369
|
+
{ coords: [55.67, 37.24], text: 'Вокзал' },
|
|
2370
|
+
{ coords: [55.79, 37.41], text: 'Кафе' },
|
|
2371
|
+
];
|
|
2372
|
+
|
|
2373
|
+
function renderClusterer(yandexMaps, map, points) {
|
|
2374
|
+
map.geoObjects.removeAll();
|
|
2375
|
+
const clusterIconContentLayout = yandexMaps.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>');
|
|
2376
|
+
const clusterer = new yandexMaps.Clusterer({
|
|
2377
|
+
clusterIcons: [
|
|
2378
|
+
{
|
|
2379
|
+
href: 'icons/MapMarkerClusterIcon.svg',
|
|
2380
|
+
size: [78, 84],
|
|
2381
|
+
offset: [-35, -50],
|
|
2382
|
+
},
|
|
2383
|
+
],
|
|
2384
|
+
clusterIconContentLayout,
|
|
2385
|
+
clusterHideIconOnBalloonOpen: false,
|
|
2386
|
+
geoObjectHideIconOnBalloonOpen: false,
|
|
2387
|
+
});
|
|
2388
|
+
const geoObjects = points.map((point) => new yandexMaps.Placemark(point, {}, {
|
|
2389
|
+
iconLayout: 'default#image',
|
|
2390
|
+
iconImageHref: 'icons/MapMarkerSingleIcon.svg',
|
|
2391
|
+
iconImageSize: [78, 84],
|
|
2392
|
+
iconImageOffset: [-35, -50],
|
|
2393
|
+
}));
|
|
2394
|
+
clusterer.add(geoObjects);
|
|
2395
|
+
map.geoObjects.add(clusterer);
|
|
2396
|
+
// TODO: Fix
|
|
2397
|
+
// @ts-ignore
|
|
2398
|
+
map.setBounds(yandexMaps.util.bounds.fromPoints(points)).then(() => {
|
|
2399
|
+
if (map.getZoom() > 10) {
|
|
2400
|
+
map.setZoom(10);
|
|
2401
|
+
}
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
const styles$3 = {
|
|
2406
|
+
focus: 'focus:border-primary-text focus:border',
|
|
2407
|
+
hover: 'hover:bg-primary-hover',
|
|
2408
|
+
active: 'active:bg-primary-active',
|
|
2409
|
+
border: 'border border-transparent rounded-md',
|
|
2410
|
+
position: 'flex items-center justify-center',
|
|
2411
|
+
font: 'text-center font-sans',
|
|
2412
|
+
};
|
|
2413
|
+
const renderOpenMap = (pointsCenter) => {
|
|
2414
|
+
const getYandexMapUrl = () => {
|
|
2415
|
+
return `https://yandex.ru/maps/?ll=${[pointsCenter[1], pointsCenter[0]]}&z=10&l=map`;
|
|
2416
|
+
};
|
|
2417
|
+
return (jsx("a", { className: `select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(styles$3).join(' ')}`, href: getYandexMapUrl(), target: "_blank", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435" }));
|
|
2418
|
+
};
|
|
2419
|
+
|
|
2420
|
+
const styles$2 = {
|
|
2421
|
+
border: 'border border-transparent rounded-md',
|
|
2422
|
+
position: 'relative flex items-center',
|
|
2423
|
+
font: 'text-center font-sans',
|
|
2424
|
+
shadow: 'shadow-[0_4px_25px_rgba(0,0,0,0.07)]',
|
|
2425
|
+
};
|
|
2426
|
+
const renderSearchField = (points, yandexMaps, updatePointsToRender) => {
|
|
2427
|
+
const onChange = (e) => {
|
|
2428
|
+
const value = e.target?.value ? e.target?.value.toLowerCase() : '';
|
|
2429
|
+
if (value) {
|
|
2430
|
+
const searchResult = points.filter((_) => {
|
|
2431
|
+
const textLowerCase = _.text.toLowerCase();
|
|
2432
|
+
if (textLowerCase.indexOf(value) > -1) {
|
|
2433
|
+
return _;
|
|
2434
|
+
}
|
|
2435
|
+
return null;
|
|
2436
|
+
});
|
|
2437
|
+
updatePointsToRender(searchResult);
|
|
2438
|
+
}
|
|
2439
|
+
else {
|
|
2440
|
+
updatePointsToRender(null);
|
|
2441
|
+
}
|
|
2442
|
+
};
|
|
2443
|
+
return (jsxs("div", { className: `${Object.values(styles$2).join(' ')} bg-white py-s pl-5xl pr-m w-full`, children: [jsx(Icon, { name: "LoupeIcon", iconVersion: "black", width: "20", height: "20", className: "absolute left-4" }), jsx("input", { type: "text", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0438\u043B\u0438 \u043C\u0435\u0442\u0440\u043E", onChange: onChange, className: "border-0 focus:border-0 outline-0 w-full" })] }));
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2446
|
+
const styles$1 = {
|
|
2447
|
+
focus: 'focus:border-primary-text focus:border',
|
|
2448
|
+
hover: 'hover:bg-primary-hover',
|
|
2449
|
+
active: 'active:bg-primary-active',
|
|
2450
|
+
border: 'border border-transparent rounded-md',
|
|
2451
|
+
position: 'absolute flex items-center justify-center',
|
|
2452
|
+
font: 'text-center font-sans',
|
|
2453
|
+
};
|
|
2454
|
+
const renderUserGeolocation = (map, yandexMaps, className) => {
|
|
2455
|
+
const setUserGeoLocation = () => {
|
|
2456
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2457
|
+
// @ts-ignore
|
|
2458
|
+
yandexMaps.geolocation
|
|
2459
|
+
.get({
|
|
2460
|
+
provider: 'yandex',
|
|
2461
|
+
autoReverseGeocode: true,
|
|
2462
|
+
mapStateAutoApply: true,
|
|
2463
|
+
})
|
|
2464
|
+
.then(function (result) {
|
|
2465
|
+
map.geoObjects.add(result.geoObjects);
|
|
2466
|
+
});
|
|
2467
|
+
};
|
|
2468
|
+
return (jsx("div", { className: `select-none cursor-pointer py-4 w-12 bg-white ${Object.values(styles$1).join(' ')} ${className}`, onClick: setUserGeoLocation, children: jsx(Icon, { name: "UserGeoLocationIcon", width: "20", height: "16" }) }));
|
|
2469
|
+
};
|
|
2470
|
+
|
|
2471
|
+
const getNS = (_) => globalThis[_];
|
|
2472
|
+
function useExternalNS(namespaceName, url) {
|
|
2473
|
+
const [externalNS, setExternalNS] = useState();
|
|
2474
|
+
const setNS = useCallback(() => setExternalNS(getNS(namespaceName)), [namespaceName]);
|
|
2475
|
+
useEffect(() => {
|
|
2476
|
+
const script = document.getElementById(url);
|
|
2477
|
+
if (script) {
|
|
2478
|
+
if (getNS(namespaceName)) {
|
|
2479
|
+
setNS();
|
|
2480
|
+
}
|
|
2481
|
+
else {
|
|
2482
|
+
script.addEventListener('load', setNS);
|
|
2483
|
+
return () => {
|
|
2484
|
+
script.removeEventListener('load', setNS);
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
else {
|
|
2489
|
+
const newScript = document.createElement('script');
|
|
2490
|
+
newScript.src = url;
|
|
2491
|
+
newScript.async = true;
|
|
2492
|
+
newScript.id = url;
|
|
2493
|
+
newScript.addEventListener('load', setNS);
|
|
2494
|
+
document.head.appendChild(newScript);
|
|
2495
|
+
return () => {
|
|
2496
|
+
document.head.removeChild(newScript);
|
|
2497
|
+
setExternalNS(undefined);
|
|
2498
|
+
};
|
|
2499
|
+
}
|
|
2500
|
+
return undefined;
|
|
2501
|
+
}, [namespaceName, url]);
|
|
2502
|
+
return externalNS;
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
const YMAPS_NAMESPACE = 'ymaps';
|
|
2506
|
+
const useYandexMaps = () => {
|
|
2507
|
+
const url = `https://api-maps.yandex.ru/2.1/?apikey=${projectSettings.YANDEX_MAP_API_KEY || ''}&lang=ru_RU`;
|
|
2508
|
+
return useExternalNS(YMAPS_NAMESPACE, url);
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
const styles = {
|
|
2512
|
+
focus: 'focus:border-primary-text focus:border',
|
|
2513
|
+
hover: 'hover:bg-primary-hover',
|
|
2514
|
+
active: 'active:bg-primary-active',
|
|
2515
|
+
border: 'border-b border-b-2 border-gray last:border-0',
|
|
2516
|
+
position: 'relative flex items-center justify-center',
|
|
2517
|
+
font: 'text-center font-sans text-l',
|
|
2518
|
+
};
|
|
2519
|
+
// TODO: Добавить метод определения центральной точки
|
|
2520
|
+
const ZoomButton = JSX(({ yandexMaps, direction = 'in' }) => {
|
|
2521
|
+
const iconName = direction === 'in' ? 'PlusIcon' : 'MinusIcon';
|
|
2522
|
+
const changeZoom = () => {
|
|
2523
|
+
const currentZoom = yandexMaps.current.getZoom();
|
|
2524
|
+
const newZoom = direction === 'in' ? currentZoom + 1 : currentZoom - 1;
|
|
2525
|
+
yandexMaps.current.setZoom(newZoom, { checkZoomRange: true });
|
|
2526
|
+
};
|
|
2527
|
+
return (jsx("div", { onClick: changeZoom, className: `${Object.values(styles).join(' ')} bg-white select-none cursor-pointer w-12 h-12`, children: jsx(Icon, { name: iconName, width: "20", height: "16" }) }));
|
|
2528
|
+
});
|
|
2529
|
+
|
|
2530
|
+
const FULLSCREEN_STYLES = {
|
|
2531
|
+
border: 'border border-transparent rounded-md ',
|
|
2532
|
+
position: 'absolute flex items-center justify-center',
|
|
2533
|
+
size: 'w-12 h-12',
|
|
2534
|
+
focus: 'focus:border-primary-text focus:border',
|
|
2535
|
+
font: 'text-center font-sans',
|
|
2536
|
+
active: 'active:bg-primary-active',
|
|
2537
|
+
hover: 'hover:bg-primary-hover',
|
|
2538
|
+
other: 'select-none cursor-pointer',
|
|
2539
|
+
};
|
|
2540
|
+
// TODO: Поле для поиска: невыяснено среди каких данных делать поиск (искать в имени офиса, в адресе, метро и т.д.).
|
|
2541
|
+
// Сейчас реализован поиск среди тестовых данных
|
|
2542
|
+
// TODO: Также выяснить что делать когда ничего не найдено
|
|
2543
|
+
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
2544
|
+
const YandexMap = JSX(({ points, className = '', zoom = 5, showSearchField = false }) => {
|
|
2545
|
+
const map = useRef(null);
|
|
2546
|
+
const yandexMaps = useYandexMaps();
|
|
2547
|
+
const [isFullScreen, setIsFullScreen] = useState();
|
|
2548
|
+
const [pointsToRender, setPointsToRender] = useState(normalizePoints(mockPoints));
|
|
2549
|
+
const pointsCenter = getCenterPoint(points);
|
|
2550
|
+
useEffect(() => {
|
|
2551
|
+
if (!map?.current) {
|
|
2552
|
+
yandexMaps?.ready(() => {
|
|
2553
|
+
map.current = new yandexMaps.Map('map', {
|
|
2554
|
+
center: pointsCenter,
|
|
2555
|
+
zoom,
|
|
2556
|
+
controls: [],
|
|
2557
|
+
suppressMapOpenBlock: true,
|
|
2558
|
+
});
|
|
2559
|
+
renderClusterer(yandexMaps, map.current, pointsToRender);
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
}, [yandexMaps, map, pointsToRender]);
|
|
2563
|
+
useEffect(() => {
|
|
2564
|
+
if (map.current && pointsToRender && yandexMaps) {
|
|
2565
|
+
const newPoints = pointsToRender.length < 1 ? normalizePoints(mockPoints) : pointsToRender;
|
|
2566
|
+
renderClusterer(yandexMaps, map.current, newPoints);
|
|
2567
|
+
}
|
|
2568
|
+
}, [map, pointsToRender, yandexMaps]);
|
|
2569
|
+
if (!yandexMaps) {
|
|
2570
|
+
return null;
|
|
2571
|
+
}
|
|
2572
|
+
const toggleFullscreen = () => {
|
|
2573
|
+
const container = map.current.container;
|
|
2574
|
+
if (!isFullScreen) {
|
|
2575
|
+
container.enterFullscreen();
|
|
2576
|
+
}
|
|
2577
|
+
else {
|
|
2578
|
+
container.exitFullscreen();
|
|
2579
|
+
}
|
|
2580
|
+
setIsFullScreen(container.isFullscreen());
|
|
2581
|
+
};
|
|
2582
|
+
const zIndex = isFullScreen ? 'z-[100000]' : 'z-10';
|
|
2583
|
+
const updatePointsToRender = (newPoints) => {
|
|
2584
|
+
if (newPoints) {
|
|
2585
|
+
const normalizedPoints = normalizePoints(newPoints);
|
|
2586
|
+
setPointsToRender(normalizedPoints);
|
|
2587
|
+
}
|
|
2588
|
+
};
|
|
2589
|
+
return (jsxs("div", { id: "map", className: `${isFullScreen ? '' : 'relative'} w-full ${className}`, children: [jsx("div", { className: `absolute flex left-2 top-4 w-1/2 ${zIndex}`, children: showSearchField
|
|
2590
|
+
? renderSearchField(mockPoints, yandexMaps, updatePointsToRender)
|
|
2591
|
+
: renderOpenMap(pointsCenter) }), jsx("div", { className: `${Object.values(FULLSCREEN_STYLES).join(' ')} ${zIndex} right-2 top-4 bg-white`, onClick: toggleFullscreen, children: jsx(Icon, { name: "FullScreenIcon", width: "16", height: "16" }) }), jsxs("div", { className: `absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${zIndex}`, children: [jsx(ZoomButton, { yandexMaps: map }), jsx(ZoomButton, { yandexMaps: map, direction: "out" })] }), renderUserGeolocation(map.current, yandexMaps, `right-2 top-80 ${zIndex}`)] }));
|
|
2592
|
+
});
|
|
2593
|
+
const getCenterPoint = (points) => [
|
|
2594
|
+
getArraySumAndAverage(mapByIndex(points, 0)),
|
|
2595
|
+
getArraySumAndAverage(mapByIndex(points, 1)),
|
|
2596
|
+
];
|
|
2597
|
+
const mapByIndex = (arr, index) => arr.map((a) => a[index]);
|
|
2598
|
+
const getArraySumAndAverage = (arr) => arr.reduce((a, b) => a + b) / arr.length;
|
|
2599
|
+
const normalizePoints = (points) => (points ? points.map((_) => _.coords) : null);
|
|
2600
|
+
|
|
2601
|
+
const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label }) => {
|
|
2602
|
+
const dataFormat = data
|
|
2603
|
+
.filter(Boolean)
|
|
2604
|
+
.map((_) => ({ key: _?.[fieldValue || fieldLabel], text: _?.[fieldLabel] }));
|
|
2605
|
+
const selectedObj = dataFormat.find((_) => _.key === selected);
|
|
2606
|
+
return (jsx(Select, { options: dataFormat, label: label, placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj }));
|
|
2607
|
+
});
|
|
2608
|
+
|
|
2609
|
+
const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => (jsxs("div", { className: "flex flex-col sm:flex-row gap-m order-1", children: [jsx("div", { className: "flex-1 min-w-0", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0420\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "flex-1 min-w-0", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] })));
|
|
2610
|
+
|
|
2611
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer", type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange(_.target.value) }), text ? jsx("span", { className: "text-primary-text ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
2612
|
+
|
|
2613
|
+
const RadioButtons = JSX(({ className }) => {
|
|
2614
|
+
const [selectedOption, setSelectedOption] = useState('option2');
|
|
2615
|
+
const onChange = useCallback((_) => setSelectedOption(_), []);
|
|
2616
|
+
return (jsxs("div", { className: style('order-4', className), children: [jsx(Radio, { className: "mb-xs", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selectedOption === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selectedOption === 'option2', onChange: onChange })] }));
|
|
2617
|
+
});
|
|
2618
|
+
|
|
2619
|
+
const ITEMS = ['От 1 дня', 'До 365 дней'];
|
|
2620
|
+
const MIN = 1;
|
|
2621
|
+
const MAX = 365;
|
|
2622
|
+
const RentalPeriod = JSX(({ days, setDays }) => (jsxs("div", { className: "order-1", children: [jsx(Text, { size: "text-m", font: "font-light", children: "\u0421\u0440\u043E\u043A \u0430\u0440\u0435\u043D\u0434\u044B" }), jsx(InputRange, { min: MIN, max: MAX, value: days, items: ITEMS, onChange: setDays })] })));
|
|
2623
|
+
|
|
2624
|
+
const SafeBoxCases = JSX(({ caseVolumes = [], selectedCaseVolume, onSelectedCaseVolume, safeBoxCases = [], selectedBoxSize, onSelectedBoxSize, }) => {
|
|
2625
|
+
return (jsxs("div", { className: "flex flex-col sm:flex-row gap-4 order-1", children: [jsx("div", { className: "flex-1 min-w-0", children: jsx(WrapperSelect, { data: caseVolumes, fieldLabel: "volume", selected: selectedCaseVolume, setSelected: onSelectedCaseVolume, label: "\u0420\u0430\u0437\u043C\u0435\u0440", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440" }) }), jsx("div", { className: "flex-1 min-w-0", children: jsx(WrapperSelect, { data: safeBoxCases, fieldLabel: "safeBoxCasesSize", selected: selectedBoxSize, setSelected: onSelectedBoxSize, label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438, \u043C\u043C (\u0412\u0445\u0428\u0445\u0414)", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u044F\u0447\u0435\u0439\u043A\u0438" }) })] }));
|
|
2626
|
+
});
|
|
2627
|
+
|
|
2628
|
+
const SafeDepositRentalFields = JSX(({ regions, selectedRegion, branches, selectedBranch, days, selectedCaseVolume, selectedBoxSize, safeBoxCases, caseVolumes, onChange, onClick, }) => {
|
|
2629
|
+
return (jsxs("div", { className: "contents sm:block flex-1 space-y-xl", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: (value) => onChange({ selectedRegion: value }), branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch(onChange) }), jsx(RentalPeriod, { days: days, setDays: (value) => onChange({ days: value }) }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume(onChange), safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: (value) => onChange({ selectedBoxSize: value }) }), jsx("div", { className: "order-4", children: jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }) }), jsxs("div", { className: "contents sm:flex justify-between items-center", children: [jsx(RadioButtons, { className: "mb-4 sm:mb-0" }), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary", onClick: onClick, className: "order-6" })] })] }));
|
|
2630
|
+
});
|
|
2631
|
+
const onSelectedBranch = (onChange) => (value) => {
|
|
2632
|
+
onChange({ selectedBranch: value, selectedCaseVolume: '', selectedBoxSize: '' });
|
|
2633
|
+
};
|
|
2634
|
+
const onSelectedCaseVolume = (onChange) => (value) => {
|
|
2635
|
+
onChange({ selectedCaseVolume: value, selectedBoxSize: '' });
|
|
2636
|
+
};
|
|
2637
|
+
|
|
2638
|
+
const SafeDepositRentalTotal = JSX(({ days, tariffs = [] }) => {
|
|
2639
|
+
const price = calculatePrice(days, tariffs);
|
|
2640
|
+
const imageDescription = 'На рисунке изображена пачка листов\nформата А4';
|
|
2641
|
+
return (jsxs("div", { className: "contents sm:flex flex-col justify-between order-2", children: [jsxs("div", { className: "flex flex-col sm:flex-row gap-x-11 gap-y-7 order-5 sm:order-none py-7 sm:py-0 border-t border-main-divider sm:border-none", children: [renderTotal('Аренда за', days), renderTotal('Цена', price + ' ₽')] }), jsx("span", { className: "sm:hidden order-3 mb-2 text-s-light text-secondary-text", children: imageDescription }), jsxs("div", { className: "flex flex-col items-center gap-3 order-3 sm:order-none mb-6 sm:mb-0 bg-primary-main py-3 sm:p-8 text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, className: "sm:h-[246px]" }), jsx("span", { className: "hidden sm:inline text-s font-light text-white opacity-80 whitespace-pre-line", children: imageDescription })] })] }));
|
|
2642
|
+
});
|
|
2643
|
+
const renderTotal = (label, total) => {
|
|
2644
|
+
return (jsxs("div", { className: "flex justify-between items-center gap-y-1 sm:flex-col sm:items-start", children: [jsx("div", { className: "text-l font-light text-secondary-text", children: label }), jsx("span", { className: "text-l sm:text-h3 text-primary-text", children: total })] }));
|
|
2645
|
+
};
|
|
2646
|
+
const calculatePrice = (days, tariffs) => {
|
|
2647
|
+
const tariffType = getTariffType(days);
|
|
2648
|
+
const tariffValue = tariffs?.find((_) => _.tariffType === String(tariffType))?.tariffValue || 0;
|
|
2649
|
+
return days * tariffValue;
|
|
2650
|
+
};
|
|
2651
|
+
const getTariffType = (days) => {
|
|
2652
|
+
let tariffType = 1;
|
|
2653
|
+
switch (true) {
|
|
2654
|
+
case days > 30 && days <= 90:
|
|
2655
|
+
tariffType = 2;
|
|
2656
|
+
break;
|
|
2657
|
+
case days > 90 && days <= 180:
|
|
2658
|
+
tariffType = 3;
|
|
2659
|
+
break;
|
|
2660
|
+
case days > 180 && days <= 365:
|
|
2661
|
+
tariffType = 4;
|
|
2662
|
+
break;
|
|
2663
|
+
}
|
|
2664
|
+
return tariffType;
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2667
|
+
const getCoordinates = (data) => {
|
|
2668
|
+
if (Array.isArray(data)) {
|
|
2669
|
+
return data.map((_) => _.gpsLatitude && _.gpsLongitude ? [_.gpsLatitude, _.gpsLongitude] : []);
|
|
2670
|
+
}
|
|
2671
|
+
if (data?.gpsLatitude && data?.gpsLongitude) {
|
|
2672
|
+
return [[data.gpsLatitude, data.gpsLongitude]];
|
|
2673
|
+
}
|
|
2674
|
+
return [];
|
|
2675
|
+
};
|
|
2676
|
+
const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
|
|
2677
|
+
|
|
2678
|
+
const SafeDepositRentalForm = JSX((props) => {
|
|
2679
|
+
const { regions, data, branches, onChange, onClick } = props;
|
|
2680
|
+
useEffect(() => {
|
|
2681
|
+
onChange({
|
|
2682
|
+
selectedBranch: '',
|
|
2683
|
+
selectedCaseVolume: '',
|
|
2684
|
+
selectedBoxSize: '',
|
|
2685
|
+
});
|
|
2686
|
+
}, [data.selectedRegion, onChange]);
|
|
2687
|
+
const branch = getBranch(branches, data.selectedBranch);
|
|
2688
|
+
const caseVolumes = getCaseVolumes(branch?.safeBoxCaseVolumes);
|
|
2689
|
+
const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, data.selectedCaseVolume)?.safeBoxCases;
|
|
2690
|
+
const tariffs = getTariffs(safeBoxCases, data.selectedBoxSize);
|
|
2691
|
+
return (jsxs("div", { className: "flex flex-col sm:flex-row gap-x-9 align-top mb-6", children: [jsx(SafeDepositRentalFields, { ...data, regions: regions, onClick: onClick, branches: branches, caseVolumes: caseVolumes, safeBoxCases: safeBoxCases, onChange: onChange }), jsx(SafeDepositRentalTotal, { days: data.days, tariffs: tariffs })] }));
|
|
2692
|
+
});
|
|
2693
|
+
const getCaseVolumes = (safeBoxCaseVolumes) => safeBoxCaseVolumes?.length ? safeBoxCaseVolumes?.filter((_) => _?.safeBoxCases?.length) : [];
|
|
2694
|
+
const getCaseVolume = (caseVolumes, selectedCaseVolume) => caseVolumes?.find((_) => _.volume === selectedCaseVolume);
|
|
2695
|
+
const getTariffs = (safeBoxCases, selectedBoxSize) => safeBoxCases?.find((_) => _.safeBoxCasesSize === selectedBoxSize)?.tariffs;
|
|
2696
|
+
|
|
2697
|
+
const SAFEBOXES_URL = '/api/v1/safeboxes';
|
|
2698
|
+
const EMPTY_VALUE = [];
|
|
2699
|
+
function useSafeBoxes(regionCode) {
|
|
2700
|
+
const { data } = useAsyncData(regionCode ? `${SAFEBOXES_URL}?regionCode=${regionCode}` : null, fetchSafeBoxes);
|
|
2701
|
+
return data || EMPTY_VALUE;
|
|
2702
|
+
}
|
|
2703
|
+
const fetchSafeBoxes = async (url) => {
|
|
2704
|
+
const result = await fetchJSON(url, { method: 'GET' });
|
|
2705
|
+
return result || EMPTY_VALUE;
|
|
2706
|
+
};
|
|
2707
|
+
|
|
2708
|
+
const DEFAULT_DAYS = 26;
|
|
2709
|
+
const SafeDepositRental = JSX(({ title, footnote, className = '', ...rest }) => {
|
|
2710
|
+
const [showMap, setShowMap] = useState(false);
|
|
2711
|
+
const handleShowMap = useCallback(() => setShowMap((_) => !_), []);
|
|
2712
|
+
const [safeDepositState, setStateDepositState] = useState({
|
|
2713
|
+
selectedRegion: '',
|
|
2714
|
+
selectedBranch: '',
|
|
2715
|
+
selectedCaseVolume: '',
|
|
2716
|
+
selectedBoxSize: '',
|
|
2717
|
+
days: DEFAULT_DAYS,
|
|
2718
|
+
});
|
|
2719
|
+
const regions = useGetRegions();
|
|
2720
|
+
const selectedRegion = normalizeSelectedRegion(safeDepositState.selectedRegion, regions);
|
|
2721
|
+
const branches = useSafeBoxes(selectedRegion);
|
|
2722
|
+
const handleChangeSafeDepositState = useCallback((state) => setStateDepositState((oldState) => ({ ...oldState, ...state })), [setStateDepositState]);
|
|
2723
|
+
const points = getCoordinates(getBranch(branches, safeDepositState.selectedBranch) || branches);
|
|
2724
|
+
return (jsxs(BlockWrapper, { className: className, defaultPadding: "", ...rest, children: [jsxs("div", { className: "p-4xl", children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "text-primary-text mb-s text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions, branches: branches, data: { ...safeDepositState, selectedRegion }, onClick: handleShowMap, onChange: handleChangeSafeDepositState }), footnote ? (jsx(Paragraph, { size: "text-s", font: "font-light", children: footnote })) : null] }), points.length && showMap ? jsx(YandexMap, { points: points, className: "h-[640px]" }) : null] }));
|
|
2725
|
+
});
|
|
2726
|
+
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
2727
|
+
|
|
2157
2728
|
function assertUnreachable(x) {
|
|
2158
2729
|
throw new Error(x);
|
|
2159
2730
|
}
|
|
@@ -2174,10 +2745,10 @@
|
|
|
2174
2745
|
};
|
|
2175
2746
|
const STEPS_TILE_DESCRIPTION_HEIGHT_MAP = {
|
|
2176
2747
|
normal: '',
|
|
2177
|
-
small: 'min-h-
|
|
2748
|
+
small: 'min-h-6xl',
|
|
2178
2749
|
};
|
|
2179
2750
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
2180
|
-
const StepsBlock = JSX(({ className = '', title, description, steps, buttons, size = 'normal', version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border flex flex-col gap-
|
|
2751
|
+
const StepsBlock = JSX(({ className = '', title, description, steps, buttons, size = 'normal', version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border flex flex-col gap-xs', className), defaultPadding: "p-6xl", version: version, ...rest, children: [title ? jsx(Heading, { headingType: "h3", className: "text-left", title: title }) : null, description ? (jsx(Paragraph, { size: "text-xl", font: "font-light", children: jsx("span", { className: styleMap.description, children: description }) })) : null, steps?.length ? (jsx("div", { className: "box-border", children: jsx("div", { className: "flex flex-col justify-between", children: steps.map(renderStep(size, version)) }) })) : null, renderButtonsSection(buttons, { className: 'mt-3', isVertical: true })] })));
|
|
2181
2752
|
// TODO: Create universal function for this case
|
|
2182
2753
|
const renderStep = (size, version) =>
|
|
2183
2754
|
// Linter doesn't understand that switch processes all cases
|
|
@@ -2203,7 +2774,7 @@
|
|
|
2203
2774
|
const isImg = Boolean(step?.icon?.src);
|
|
2204
2775
|
const iconAreaSize = STEPS_SIZE_MAP[size][isImg ? 'image' : 'icon'];
|
|
2205
2776
|
const containerStyle = isImg ? '' : `rounded-md ${styleMap.iconBackground}`;
|
|
2206
|
-
return (jsx("div", { className: style(iconAreaSize, containerStyle, 'z-10 mr-
|
|
2777
|
+
return (jsx("div", { className: style(iconAreaSize, containerStyle, 'z-10 mr-s flex justify-center content-center'), children: jsx("span", { className: "flex self-center text-h4 text-secondary-text group-data-secondary:text-white", children: checkCanRenderIcon(step?.icon) ? (jsx(Img, { image: { ...step.icon, iconVersion: step.icon?.iconVersion || iconVersion }, width: iconSize, height: iconSize })) : (jsx("span", { children: i + 1 })) }) }));
|
|
2207
2778
|
};
|
|
2208
2779
|
|
|
2209
2780
|
const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
|
|
@@ -2261,7 +2832,7 @@
|
|
|
2261
2832
|
return (jsx("div", { className: getTabClassName('block', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsx("a", { role: "tab", className: style('flex flex-1 items-center justify-center h-full', getTabClassName('text', active, tabsMode)), target: tab.target, href: adjustedProps.href, onClick: handleClick, children: jsx("span", { children: tab.text }) }) }));
|
|
2262
2833
|
});
|
|
2263
2834
|
|
|
2264
|
-
const BADGE_CLASSES = 'bg-main-divider min-w-[22px] h-[22px] rounded-full text-xs ml-
|
|
2835
|
+
const BADGE_CLASSES = 'bg-main-divider min-w-[22px] h-[22px] rounded-full text-xs ml-xs flex justify-center items-center';
|
|
2265
2836
|
const LIGHT_BADGE_CLASSES = 'bg-white/30 text-white';
|
|
2266
2837
|
const DARK_BADGE_CLASSES = 'text-secondary-text group-hover/btn:text-primary-main';
|
|
2267
2838
|
const renderGroupTab = ({ page, currentTab, showCounter, onClick, tabsMode }) => (tab, i) => {
|
|
@@ -2299,7 +2870,6 @@
|
|
|
2299
2870
|
const { tabs, ...rest } = props;
|
|
2300
2871
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
2301
2872
|
itemCount: tabs?.length || 0,
|
|
2302
|
-
isCyclic: false,
|
|
2303
2873
|
});
|
|
2304
2874
|
return (jsxs("div", { className: "relative max-w-full m-auto", children: [jsx("div", { className: `font-sans max-w-full w-full overflow-hidden relative bg-white`, children: jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs?.map(renderTab({ ...rest })) }) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: `${scrollButtonStyle} left-6`, onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: `${scrollButtonStyle} rotate-180 right-6`, onClick: scroll.scrollRight })) : null] }));
|
|
2305
2875
|
});
|
|
@@ -2348,7 +2918,7 @@
|
|
|
2348
2918
|
className: 'mt-3',
|
|
2349
2919
|
buttonClassName: 'w-12 h-12',
|
|
2350
2920
|
});
|
|
2351
|
-
const renderLabelDescriptionCellData = ({ label, description }) => (jsxs("div", { children: [label ? jsx("div", { className: "mb-
|
|
2921
|
+
const renderLabelDescriptionCellData = ({ label, description }) => (jsxs("div", { children: [label ? jsx("div", { className: "mb-xs", children: label }) : null, description ? jsx("div", { className: "text-s text-secondary-text", children: description }) : null] }));
|
|
2352
2922
|
const renderImgCellData = ({ image }) => image?.src ? jsx(Img, { image: image, className: "m-0", imageClassName: "m-0" }) : null;
|
|
2353
2923
|
const renderListCellData = ({ isDotted, ...rest }) => (jsx(List, { className: "flex flex-col justify-between items-start text-m pl-2 text-base", isDotted: isDotted ?? true, ...rest }));
|
|
2354
2924
|
const EmbeddableCellData = {
|
|
@@ -2358,10 +2928,10 @@
|
|
|
2358
2928
|
LabelDescription: renderLabelDescriptionCellData,
|
|
2359
2929
|
};
|
|
2360
2930
|
|
|
2361
|
-
const TableTileHeader = JSX(({ title, icon }) => (jsxs("div", { className: "mb-
|
|
2931
|
+
const TableTileHeader = JSX(({ title, icon }) => (jsxs("div", { className: "mb-xs", children: [title ? (jsx(Text, { size: "text-l", font: "font-light", children: title })) : null, icon ? jsx(Img, { className: "ml-auto min-w-6", image: icon, width: "24", height: "24" }) : null] })));
|
|
2362
2932
|
|
|
2363
2933
|
const TariffsTableTileCell = JSX(({ tile, ...rest }) => (jsxs("div", { className: "h-full", children: [jsx(TableTileHeader, { title: tile?.header?.title }), tile?.data?.length
|
|
2364
|
-
? tile.data.map((cell, i) => (jsx("div", { className: "mb-
|
|
2934
|
+
? tile.data.map((cell, i) => (jsx("div", { className: "mb-xs", children: renderCell(cell, rest) }, String(i))))
|
|
2365
2935
|
: null] })));
|
|
2366
2936
|
function renderCell(cell, props) {
|
|
2367
2937
|
if (!cell || !cell.tableCellType || !(cell.tableCellType in EmbeddableCellData)) {
|
|
@@ -2378,7 +2948,7 @@
|
|
|
2378
2948
|
const TariffsTable = JSX(({ className, title, description, tariffsColumns: columns, rowHeaders, orientation = 'vertical', ...rest }) => {
|
|
2379
2949
|
const colData = getColData(columns);
|
|
2380
2950
|
const tiles = getTiles(rowHeaders, colData);
|
|
2381
|
-
return (jsxs("section", { className: `p-
|
|
2951
|
+
return (jsxs("section", { className: `p-6xl space-3xl bg-white font-sans text-primary-text overflow-x-hidden ${className}`, children: [jsx(Headline, { title: title, description: description, headlineVersion: "M", align: "text-left", isPadding: false }), orientation === 'vertical' ? (jsx(TariffsTableVertical, { tiles: tiles, ...rest })) : (jsx(TariffsTableHorizontal, { tiles: tiles, ...rest }))] }));
|
|
2382
2952
|
});
|
|
2383
2953
|
const getColData = (columns) => columns?.[0]?.data ? columns[0].data : [];
|
|
2384
2954
|
const getTiles = (rowHeaders, colData) => rowHeaders?.map((header, i) => ({
|
|
@@ -2395,31 +2965,6 @@
|
|
|
2395
2965
|
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}`))) }));
|
|
2396
2966
|
};
|
|
2397
2967
|
|
|
2398
|
-
const gapStyles = {
|
|
2399
|
-
XXL: 'gap-12',
|
|
2400
|
-
XL: 'gap-10',
|
|
2401
|
-
L: 'gap-8',
|
|
2402
|
-
M: 'gap-4',
|
|
2403
|
-
S: 'gap-2',
|
|
2404
|
-
XS: 'gap-1',
|
|
2405
|
-
'': '',
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
const alignStyle = {
|
|
2409
|
-
stretch: 'items-stretch',
|
|
2410
|
-
left: 'items-start',
|
|
2411
|
-
center: 'items-center',
|
|
2412
|
-
right: 'items-end',
|
|
2413
|
-
};
|
|
2414
|
-
const VerticalLayout = JSX(({ className = '', gap = '', align = 'stretch', isPadding = false, isInnerPadding = true, version = 'transparent', isTheme = false, ...rest }) => {
|
|
2415
|
-
const innerPaddingStyle = isInnerPadding ? '' : '!p-0';
|
|
2416
|
-
return (jsx(BlockWrapper, { className: style('relative', 'flex flex-col [&>*]:max-w-full', gapStyles[gap], align && alignStyle[align], className), defaultPadding: isPadding ? 'p-default' : '', version: version, isTheme: isTheme, ...rest, children: renderChildren({
|
|
2417
|
-
...rest,
|
|
2418
|
-
renderProps: (block, options) => renderBlock(block, options, { className: innerPaddingStyle }),
|
|
2419
|
-
}) }));
|
|
2420
|
-
});
|
|
2421
|
-
VerticalLayout.childrenTypes = [];
|
|
2422
|
-
|
|
2423
2968
|
const Blocks = {
|
|
2424
2969
|
ApplicationForm,
|
|
2425
2970
|
ButtonsBlock,
|
|
@@ -2435,6 +2980,7 @@
|
|
|
2435
2980
|
Footer,
|
|
2436
2981
|
Header,
|
|
2437
2982
|
Headline,
|
|
2983
|
+
HorizontalLayout,
|
|
2438
2984
|
ImgBlock,
|
|
2439
2985
|
LinkDocs,
|
|
2440
2986
|
MobileAppTile,
|
|
@@ -2447,13 +2993,61 @@
|
|
|
2447
2993
|
TextBlock,
|
|
2448
2994
|
RichTextBlock,
|
|
2449
2995
|
RollupItem,
|
|
2996
|
+
SafeDepositRental,
|
|
2450
2997
|
VerticalLayout,
|
|
2451
2998
|
CarouselRecommendationCard,
|
|
2999
|
+
ExchangeRateTile,
|
|
2452
3000
|
CarouselProgramsCard,
|
|
2453
3001
|
ProductGallery,
|
|
2454
3002
|
BenefitsBlock,
|
|
2455
3003
|
};
|
|
2456
3004
|
|
|
3005
|
+
const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
|
|
3006
|
+
function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
|
|
3007
|
+
const cachedFetcher = useCallback(async (...args) => {
|
|
3008
|
+
const storageKey = `async:${key}`;
|
|
3009
|
+
const storageData = storage.getItem(storageKey);
|
|
3010
|
+
const cachedData = getParsedData(storageData);
|
|
3011
|
+
if (cachedData) {
|
|
3012
|
+
return cachedData;
|
|
3013
|
+
}
|
|
3014
|
+
const data = await fetcher(...args);
|
|
3015
|
+
storage.setItem(storageKey, JSON.stringify({ data, timestamp: Date.now() }));
|
|
3016
|
+
return data;
|
|
3017
|
+
}, [key, fetcher]);
|
|
3018
|
+
return useAsyncData(key, cachedFetcher);
|
|
3019
|
+
}
|
|
3020
|
+
function getParsedData(storageData) {
|
|
3021
|
+
const { data = null, timestamp = null } = storageData ? JSON.parse(storageData) : {};
|
|
3022
|
+
return data && Date.now() - timestamp < STORAGE_DEFAULT_TTL ? data : undefined;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
const REGION_URL = '/api/v1/region';
|
|
3026
|
+
function useLocation(defaultLocation = 'Москва') {
|
|
3027
|
+
const currentLocation = getLocalStorageLocation();
|
|
3028
|
+
const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
|
|
3029
|
+
const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
|
|
3030
|
+
useEffect(() => {
|
|
3031
|
+
setLocation(currentLocation?.region && currentLocation?.manual
|
|
3032
|
+
? currentLocation.region
|
|
3033
|
+
: data || { name: defaultLocation });
|
|
3034
|
+
}, [data]);
|
|
3035
|
+
const onChangeLocation = useCallback((region) => {
|
|
3036
|
+
globalThis.localStorage?.setItem('location', JSON.stringify({ manual: true, region }));
|
|
3037
|
+
setLocation(region);
|
|
3038
|
+
}, []);
|
|
3039
|
+
return [location, onChangeLocation];
|
|
3040
|
+
}
|
|
3041
|
+
const getLocalStorageLocation = () => {
|
|
3042
|
+
const localStorageLocation = globalThis.localStorage?.getItem('location');
|
|
3043
|
+
try {
|
|
3044
|
+
return localStorageLocation ? JSON.parse(localStorageLocation) : null;
|
|
3045
|
+
}
|
|
3046
|
+
catch (_) {
|
|
3047
|
+
return null;
|
|
3048
|
+
}
|
|
3049
|
+
};
|
|
3050
|
+
|
|
2457
3051
|
const debounce = (fn, delay = 600) => {
|
|
2458
3052
|
let timerId;
|
|
2459
3053
|
const debouncedCallback = (...args) => {
|
|
@@ -2582,6 +3176,269 @@
|
|
|
2582
3176
|
});
|
|
2583
3177
|
const getStyleLinkWrapper = (href) => ['inline mx-1', href ? 'text-green-dark' : ''];
|
|
2584
3178
|
|
|
3179
|
+
const REGIONS_URL = '/api/v1/regions';
|
|
3180
|
+
function useRegions() {
|
|
3181
|
+
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
3182
|
+
return data || [];
|
|
3183
|
+
}
|
|
3184
|
+
|
|
3185
|
+
const JARO_WINKLER_P = 0.1;
|
|
3186
|
+
const JARO_WINKLER_MAX_L = 4;
|
|
3187
|
+
const jaroWinklerDistance = (s1) => (s2) => {
|
|
3188
|
+
if (s1 === s2) {
|
|
3189
|
+
return 1;
|
|
3190
|
+
}
|
|
3191
|
+
if (!s1 || !s2) {
|
|
3192
|
+
return 0;
|
|
3193
|
+
}
|
|
3194
|
+
const { m, s1Matches, s2Matches } = computeM(s1, s2);
|
|
3195
|
+
if (m === 0) {
|
|
3196
|
+
return 0;
|
|
3197
|
+
}
|
|
3198
|
+
const t = computeT(s1, s2, { s1Matches, s2Matches });
|
|
3199
|
+
const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
|
|
3200
|
+
const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
|
|
3201
|
+
return jaroWeight + winklerWeight * (1 - jaroWeight);
|
|
3202
|
+
};
|
|
3203
|
+
function computeM(s1, s2) {
|
|
3204
|
+
const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
|
|
3205
|
+
const s1Matches = new Array(s1.length);
|
|
3206
|
+
const s2Matches = new Array(s2.length);
|
|
3207
|
+
let m = 0;
|
|
3208
|
+
for (let i = 0; i < s1.length; i++) {
|
|
3209
|
+
const low = Math.max(0, i - range);
|
|
3210
|
+
const high = Math.min(i + range, s2.length - 1);
|
|
3211
|
+
for (let j = low; j <= high; j++) {
|
|
3212
|
+
if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
|
|
3213
|
+
continue;
|
|
3214
|
+
}
|
|
3215
|
+
m++;
|
|
3216
|
+
s1Matches[i] = true;
|
|
3217
|
+
s2Matches[j] = true;
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
return { m, s1Matches, s2Matches };
|
|
3221
|
+
}
|
|
3222
|
+
function computeT(s1, s2, { s1Matches, s2Matches }) {
|
|
3223
|
+
let t = 0;
|
|
3224
|
+
for (let i = 0, k = 0; i < s1.length; i++) {
|
|
3225
|
+
if (!s1Matches[i]) {
|
|
3226
|
+
continue;
|
|
3227
|
+
}
|
|
3228
|
+
let j = k;
|
|
3229
|
+
for (; j < s2.length; j++) {
|
|
3230
|
+
if (s2Matches[j]) {
|
|
3231
|
+
k = j + 1;
|
|
3232
|
+
break;
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
if (s1[i] !== s2[j]) {
|
|
3236
|
+
t++;
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
return t;
|
|
3240
|
+
}
|
|
3241
|
+
function computePrefixL(s1, s2) {
|
|
3242
|
+
let prefixL = 0;
|
|
3243
|
+
while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
|
|
3244
|
+
prefixL++;
|
|
3245
|
+
}
|
|
3246
|
+
return prefixL;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
const groupBy = (list, keyGetter) => {
|
|
3250
|
+
const result = new Map();
|
|
3251
|
+
for (const item of list) {
|
|
3252
|
+
const key = keyGetter(item);
|
|
3253
|
+
const group = result.get(key) || [];
|
|
3254
|
+
result.set(key, [...group, item]);
|
|
3255
|
+
}
|
|
3256
|
+
return result;
|
|
3257
|
+
};
|
|
3258
|
+
|
|
3259
|
+
const Dialog = JSX(({ className, isOpened, head, children, onClose }) => {
|
|
3260
|
+
useEffect(() => {
|
|
3261
|
+
const handleEscape = ({ key }) => {
|
|
3262
|
+
if (key === 'Escape') {
|
|
3263
|
+
onClose && onClose();
|
|
3264
|
+
}
|
|
3265
|
+
};
|
|
3266
|
+
globalThis.document?.addEventListener('keydown', handleEscape);
|
|
3267
|
+
return () => {
|
|
3268
|
+
globalThis.document?.removeEventListener('keydown', handleEscape);
|
|
3269
|
+
};
|
|
3270
|
+
}, [onClose]);
|
|
3271
|
+
return isOpened ? (jsx("div", { className: style('fixed inset-0 bg-white text-l font-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-6xl min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-xl top-0", children: [jsx(CloseButton, { className: "absolute top-0 -right-6xl", onClick: onClose }), head] }), children] }) })) : null;
|
|
3272
|
+
});
|
|
3273
|
+
|
|
3274
|
+
const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
|
|
3275
|
+
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-44 gap-3.5 pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: `h-12 pl-4 w-full peer text-l text-black border border-solid rounded-md box-border
|
|
3276
|
+
outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
|
|
3277
|
+
});
|
|
3278
|
+
|
|
3279
|
+
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
3280
|
+
const LOCATION_DIALOG_ID = 'location';
|
|
3281
|
+
const LocationDialog = JSX(({ currentLocation, onChangeLocation, foreignOffices }) => {
|
|
3282
|
+
const dialogProps = useDialogProps(LOCATION_DIALOG_ID);
|
|
3283
|
+
const [query, setQuery] = useState('');
|
|
3284
|
+
const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
|
|
3285
|
+
const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
|
|
3286
|
+
const handleChangeLocation = useCallback((region) => {
|
|
3287
|
+
dialogProps.onClose && dialogProps.onClose();
|
|
3288
|
+
onChangeLocation && onChangeLocation(region);
|
|
3289
|
+
}, [dialogProps.onClose, onChangeLocation]);
|
|
3290
|
+
return (jsxs(Dialog, { ...dialogProps, head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation, onChangeLocation: handleChangeLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
|
|
3291
|
+
.filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
3292
|
+
.map(renderRegion(handleChangeLocation)) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup(handleChangeLocation)) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
|
|
3293
|
+
});
|
|
3294
|
+
const regionFirstLetter = (region) => region.name?.charAt(0) || '';
|
|
3295
|
+
const cleanUpRegions = (regions) => regions.map((region) => ({
|
|
3296
|
+
...region,
|
|
3297
|
+
name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
|
|
3298
|
+
}));
|
|
3299
|
+
const CurrentLocation = JSX(({ currentLocation, onChangeLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", 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", { className: "cursor-pointer", onClick: () => {
|
|
3300
|
+
onChangeLocation && onChangeLocation(currentLocation);
|
|
3301
|
+
}, children: jsx(Text, { color: "text-primary-main", children: currentLocation.name }) })] })) : null);
|
|
3302
|
+
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));
|
|
3303
|
+
const renderRegion = (onChangeLocation) => (region) => (jsx("div", { className: "mb-2xs", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
|
|
3304
|
+
onChangeLocation && onChangeLocation(region);
|
|
3305
|
+
}, children: region.name || '' }) }, region.id));
|
|
3306
|
+
const ForeignOffices = JSX(({ 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-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
|
|
3307
|
+
const ForeignOffice = JSX(({ icon, ...rest }) => {
|
|
3308
|
+
const link = useLink();
|
|
3309
|
+
const { text, target, href, onClick } = link(rest);
|
|
3310
|
+
return (jsxs("div", { className: "flex gap-x-3", 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] }));
|
|
3311
|
+
});
|
|
3312
|
+
|
|
3313
|
+
const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
|
|
3314
|
+
const desc = (cmp) => (a, b) => -cmp(a, b);
|
|
3315
|
+
|
|
3316
|
+
function zip(firstCol, ...restCols) {
|
|
3317
|
+
return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
const joinMaps = (aggregate, emptyVal) => (acc, map) => {
|
|
3321
|
+
for (const [key, b] of map) {
|
|
3322
|
+
acc.set(key, aggregate(acc.get(key) || emptyVal, b));
|
|
3323
|
+
}
|
|
3324
|
+
return acc;
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
const MIN_TERM_LEN = 3;
|
|
3328
|
+
const tokenize = (text) => text
|
|
3329
|
+
.toLowerCase()
|
|
3330
|
+
.split(/[^0-9a-zа-я-]+/)
|
|
3331
|
+
.filter((token) => token.length >= MIN_TERM_LEN && !/[0-9a-z]/.test(token));
|
|
3332
|
+
|
|
3333
|
+
const textRank = (queryTokens) => (text) => {
|
|
3334
|
+
const textTokens = tokenize(text || '');
|
|
3335
|
+
return textTokens.length
|
|
3336
|
+
? sum(queryTokens.map((qToken) => max(textTokens.map(jaroWinklerDistance(qToken)))))
|
|
3337
|
+
: 0;
|
|
3338
|
+
};
|
|
3339
|
+
|
|
3340
|
+
const JW_THRESHOLD = 0.8;
|
|
3341
|
+
const RANK_EPS = 0.001;
|
|
3342
|
+
const search = (query) => (searchIndex) => {
|
|
3343
|
+
const { corpus, dictionary } = searchIndex || {};
|
|
3344
|
+
if (!query || !corpus?.length || !dictionary || !Object.keys(dictionary).length) {
|
|
3345
|
+
return [];
|
|
3346
|
+
}
|
|
3347
|
+
const queryTokens = tokenize(query);
|
|
3348
|
+
if (!queryTokens.length) {
|
|
3349
|
+
return [];
|
|
3350
|
+
}
|
|
3351
|
+
const dictEntries = Object.entries(dictionary);
|
|
3352
|
+
const pagesRanking = queryTokens
|
|
3353
|
+
.map(computePagesRankingPerToken(dictEntries))
|
|
3354
|
+
.reduce(joinMaps((a, b) => a + b, 0), new Map());
|
|
3355
|
+
const relevantPages = [...pagesRanking.entries()]
|
|
3356
|
+
.filter(([, pageRank]) => pageRank >= (JW_THRESHOLD - RANK_EPS) * queryTokens.length) // Multiplication of query tokens
|
|
3357
|
+
.map(([pageIndex]) => corpus[pageIndex]);
|
|
3358
|
+
return sortResultsByRank(queryTokens)(relevantPages);
|
|
3359
|
+
};
|
|
3360
|
+
const computePagesRankingPerToken = (dictEntries) => (qToken) => dictEntries
|
|
3361
|
+
.map(([stem, pageIndices]) => [jaroWinklerDistance(qToken)(stem), pageIndices])
|
|
3362
|
+
.filter(([stemRank]) => stemRank >= JW_THRESHOLD)
|
|
3363
|
+
.map(([stemRank, pageIndices]) => fillMapWith(pageIndices, stemRank))
|
|
3364
|
+
.reduce(joinMaps(Math.max, 0), new Map());
|
|
3365
|
+
const sortResultsByRank = (queryTokens) => (results) => zip(results, results.map(({ title }) => title).map(textRank(queryTokens)))
|
|
3366
|
+
.sort(desc(compareBy(([, pageTitleRank]) => pageTitleRank)))
|
|
3367
|
+
.map(([corpusItem]) => corpusItem);
|
|
3368
|
+
const fillMapWith = (keys, value) => new Map(keys.map((_) => [_, value]));
|
|
3369
|
+
|
|
3370
|
+
const SEARCH_INDEX_FILENAME = 'search.index.json';
|
|
3371
|
+
const DEFAULT_BASE_PATH = ['/'];
|
|
3372
|
+
const useSearch = ({ basePathList = DEFAULT_BASE_PATH, initialQuery = '', wasOpened, }) => {
|
|
3373
|
+
const [query, setQuery] = useState(initialQuery || '');
|
|
3374
|
+
useEffect(() => {
|
|
3375
|
+
if (initialQuery !== undefined && initialQuery !== null) {
|
|
3376
|
+
setQuery(initialQuery);
|
|
3377
|
+
}
|
|
3378
|
+
}, [initialQuery]);
|
|
3379
|
+
const key = useMemo(() => basePathList.map((_) => (wasOpened ? _ : null)), // Load search index on very first search
|
|
3380
|
+
[wasOpened, basePathList]);
|
|
3381
|
+
const { data } = useAsyncData(key, fetchSearchIndex);
|
|
3382
|
+
const [result, setResult] = useState(null);
|
|
3383
|
+
useDebouncedEffect(() => {
|
|
3384
|
+
if (data) {
|
|
3385
|
+
setResult(data.map(search(query)));
|
|
3386
|
+
}
|
|
3387
|
+
}, [data, query]);
|
|
3388
|
+
return [result, { value: query, onChange: setQuery }];
|
|
3389
|
+
};
|
|
3390
|
+
const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
|
|
3391
|
+
|
|
3392
|
+
const Sitemap = JSX(({ className, topItems }) => {
|
|
3393
|
+
const link = useLink({ isRemote: true });
|
|
3394
|
+
return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
|
|
3395
|
+
});
|
|
3396
|
+
const renderColumn = (menuItem, index) => {
|
|
3397
|
+
const { text, items, href, target, onClick } = menuItem;
|
|
3398
|
+
return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: appendSlash(href), index: i }, String(i))))] }, String(index)));
|
|
3399
|
+
};
|
|
3400
|
+
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
3401
|
+
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
3402
|
+
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
3403
|
+
const { href, target, onClick } = link(rest);
|
|
3404
|
+
return (jsx("a", { className: style('text-l font-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
3405
|
+
});
|
|
3406
|
+
|
|
3407
|
+
const SearchInput = JSX(({ className, value, autoFocus, onChange, onFocus }) => {
|
|
3408
|
+
const handleChange = useCallback((ev) => {
|
|
3409
|
+
onChange && onChange(ev.target?.value || '');
|
|
3410
|
+
}, [onChange]);
|
|
3411
|
+
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' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full 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: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
3412
|
+
});
|
|
3413
|
+
|
|
3414
|
+
const SEARCH_DIALOG_ID = 'search';
|
|
3415
|
+
const SearchDialog = JSX(({ topItems }) => {
|
|
3416
|
+
const dialogProps = useDialogProps(SEARCH_DIALOG_ID);
|
|
3417
|
+
const basePathList = useMemo(() => topItems?.map((_) => _.href || '/'), [topItems]);
|
|
3418
|
+
const [searchResult, searchInputProps] = useSearch({
|
|
3419
|
+
basePathList,
|
|
3420
|
+
initialQuery: dialogProps.message,
|
|
3421
|
+
wasOpened: dialogProps.wasOpened,
|
|
3422
|
+
});
|
|
3423
|
+
const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
|
|
3424
|
+
useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
|
|
3425
|
+
return (jsx(Dialog, { ...dialogProps, head: jsx(SearchInput, { autoFocus: true, ...searchInputProps }), children: jsx(Sitemap, { topItems: searchItems }) }));
|
|
3426
|
+
});
|
|
3427
|
+
const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
|
|
3428
|
+
? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
|
|
3429
|
+
..._,
|
|
3430
|
+
items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: joinPath('/', uri) })),
|
|
3431
|
+
}))
|
|
3432
|
+
: [];
|
|
3433
|
+
// Temp
|
|
3434
|
+
function printSearchItems(topItems) {
|
|
3435
|
+
for (const _ of topItems.filter(({ items }) => items?.length)) {
|
|
3436
|
+
console.group(_.text);
|
|
3437
|
+
console.table(_.items, ['text', 'href']);
|
|
3438
|
+
console.groupEnd();
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
|
|
2585
3442
|
const api = LikeAPI();
|
|
2586
3443
|
function useLikeService(pagePath) {
|
|
2587
3444
|
const [likeCount, setLikeCount] = useState(0);
|
|
@@ -2623,9 +3480,8 @@
|
|
|
2623
3480
|
return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className}`, children: [jsx(LikeButton, { onClick: handlerDecorator(likeService.like), ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: handlerDecorator(likeService.dislike), className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
2624
3481
|
});
|
|
2625
3482
|
|
|
2626
|
-
const ContentPage = JSX((
|
|
2627
|
-
const {
|
|
2628
|
-
const { style: pageStyle, blocks, slots, likeControl, colorPalette = 'pc' } = data;
|
|
3483
|
+
const ContentPage = JSX(({ className, blocksRegistry, blockDecorator, data = {} }) => {
|
|
3484
|
+
const { style: pageStyle, slots, likeControl, colorPalette = 'pc' } = data;
|
|
2629
3485
|
const options = {
|
|
2630
3486
|
key: '',
|
|
2631
3487
|
page: data,
|
|
@@ -2633,6 +3489,8 @@
|
|
|
2633
3489
|
blockDecorator,
|
|
2634
3490
|
parent: data,
|
|
2635
3491
|
};
|
|
3492
|
+
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', data?.fallback);
|
|
3493
|
+
const [location, onChangeLocation] = useLocation(sitemap?.defaultLocation);
|
|
2636
3494
|
useBlockRouterProvider();
|
|
2637
3495
|
const [isSomeDialogOpened, { setTrue: setSomeDialogOpened, setFalse: resetSomeDialogOpened }] = useBool();
|
|
2638
3496
|
useDialogHandlers({
|
|
@@ -2642,22 +3500,22 @@
|
|
|
2642
3500
|
return (jsxs("section", { className: style('relative', pageStyle, className, isSomeDialogOpened ? 'overflow-hidden h-screen' : ''), "data-theme": colorPalette, children: [slots?.header ? (jsx("div", { className: "mb-5 shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, {
|
|
2643
3501
|
...options,
|
|
2644
3502
|
slotName: 'header',
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
}
|
|
2650
|
-
|
|
3503
|
+
extraProps: { sitemap, location },
|
|
3504
|
+
}) })) : null, jsxs("div", { className: "container grid grid-cols-12 gap-1", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, {
|
|
3505
|
+
...options,
|
|
3506
|
+
slotName: 'footer',
|
|
3507
|
+
extraProps: { sitemap, location },
|
|
3508
|
+
})] }), likeControl ? renderLikeControl() : null, jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } }), jsx(SearchDialog, { topItems: sitemap?.topItems }), jsx(LocationDialog, { currentLocation: location, foreignOffices: sitemap?.foreignOffices, onChangeLocation: onChangeLocation })] }));
|
|
2651
3509
|
});
|
|
2652
3510
|
ContentPage.childrenTypes = [];
|
|
2653
3511
|
ContentPage.slots = () => ['header', 'footer'];
|
|
2654
3512
|
function renderLikeControl() {
|
|
2655
|
-
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-
|
|
3513
|
+
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" }) }));
|
|
2656
3514
|
}
|
|
2657
3515
|
|
|
2658
3516
|
const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
|
|
2659
3517
|
|
|
2660
|
-
const packageVersion = "0.12.
|
|
3518
|
+
const packageVersion = "0.12.12";
|
|
2661
3519
|
|
|
2662
3520
|
exports.Blocks = Blocks;
|
|
2663
3521
|
exports.ContentPage = ContentPage;
|