@redneckz/wildless-cms-uni-blocks 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +199 -206
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BlockContent.d.ts +3 -1
- package/dist/components/Blocks.d.ts +2 -0
- package/dist/components/Blocks.js +5 -1
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Calculator/BonusCalculatorForm.js +1 -1
- package/dist/components/Calculator/Calculator.js +7 -5
- package/dist/components/Calculator/Calculator.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +7 -6
- package/dist/components/Calculator/CalculatorValueBlock.js +1 -1
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/dist/components/Calculator/MortgageCalculatorForm.js +1 -3
- package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Rate.js +1 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/renderCalculatorBlock.js +2 -1
- package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/dist/components/Calculator/renderInitialFeeInput.js +1 -1
- package/dist/components/Calculator/renderMonthsInput.js +1 -1
- package/dist/components/Calculator/renderProposalMortgage.js +2 -1
- package/dist/components/Calculator/renderProposalMortgage.js.map +1 -1
- package/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.d.ts +2 -1
- package/dist/components/ContentPage/normalizePage.js +8 -7
- package/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/dist/components/ContentPage/normalizePage.mobile.d.ts +2 -1
- package/dist/components/ContentPage/normalizePage.mobile.js +7 -7
- package/dist/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/dist/components/ErrorBlock/ErrorBlock.d.ts +5 -0
- package/dist/components/ErrorBlock/ErrorBlock.js +23 -0
- package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -0
- package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
- package/dist/components/ErrorBlock/ErrorBlockContent.js +2 -0
- package/dist/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
- package/dist/components/Footer/HorizontalNavigation.js +1 -1
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +12 -0
- package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
- package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
- package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
- package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
- package/dist/components/PictureText/PictureText.js +4 -4
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
- package/dist/components/SafeDepositRental/RegionsAndBranches.js +9 -0
- package/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
- package/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
- package/dist/components/SafeDepositRental/RenderRadioButtons.js +12 -0
- package/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
- package/dist/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
- package/dist/components/SafeDepositRental/RentalPeriod.js +10 -0
- package/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -0
- package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
- package/dist/components/SafeDepositRental/SafeBoxCases.js +9 -0
- package/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
- package/dist/components/SafeDepositRental/SafeDepositRental.js +5 -71
- package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +51 -67
- package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -10
- package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/dist/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
- package/dist/components/SafeDepositRental/WrapperSelect.js +10 -0
- package/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -0
- package/dist/components/SafeDepositRental/fetchBranches.d.ts +2 -0
- package/dist/components/SafeDepositRental/fetchBranches.js +20 -0
- package/dist/components/SafeDepositRental/fetchBranches.js.map +1 -0
- package/dist/components/SafeDepositRental/useGetRegions.d.ts +6 -0
- package/dist/components/SafeDepositRental/useGetRegions.js +11 -0
- package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +3 -2
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/dist/ui-kit/Foldable/Foldable.js +2 -2
- package/dist/ui-kit/Foldable/Foldable.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/Logo/Logo.js +2 -2
- package/dist/ui-kit/Logo/Logo.js.map +1 -1
- package/dist/ui-kit/Radio/Radio.js +1 -1
- package/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/dist/ui-kit/SearchBar/SearchBarInner.js.map +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/Select/SelectOption.d.ts +1 -0
- package/dist/ui-kit/Select/SelectOption.js +2 -2
- package/dist/ui-kit/Select/SelectOption.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BlockContent.d.ts +3 -1
- package/lib/components/Blocks.d.ts +2 -0
- package/lib/components/Blocks.js +5 -1
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Calculator/BonusCalculatorForm.js +1 -1
- package/lib/components/Calculator/Calculator.js +7 -5
- package/lib/components/Calculator/Calculator.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +7 -6
- package/lib/components/Calculator/CalculatorValueBlock.js +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/lib/components/Calculator/MortgageCalculatorForm.js +1 -3
- package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Rate.js +1 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/renderCalculatorBlock.js +3 -2
- package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/lib/components/Calculator/renderInitialFeeInput.js +1 -1
- package/lib/components/Calculator/renderMonthsInput.js +1 -1
- package/lib/components/Calculator/renderProposalMortgage.js +2 -1
- package/lib/components/Calculator/renderProposalMortgage.js.map +1 -1
- package/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.d.ts +2 -1
- package/lib/components/ContentPage/normalizePage.js +8 -7
- package/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/lib/components/ContentPage/normalizePage.mobile.d.ts +2 -1
- package/lib/components/ContentPage/normalizePage.mobile.js +7 -7
- package/lib/components/ContentPage/normalizePage.mobile.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlock.d.ts +5 -0
- package/lib/components/ErrorBlock/ErrorBlock.fixture.d.ts +6 -0
- package/lib/components/ErrorBlock/ErrorBlock.js +21 -0
- package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -0
- package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
- package/lib/components/ErrorBlock/ErrorBlockContent.js +2 -0
- package/lib/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
- package/lib/components/Footer/HorizontalNavigation.js +1 -1
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.fixture.d.ts +5 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +10 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
- package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
- package/lib/components/PictureText/PictureText.js +4 -4
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
- package/lib/components/SafeDepositRental/RegionsAndBranches.js +7 -0
- package/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
- package/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
- package/lib/components/SafeDepositRental/RenderRadioButtons.js +10 -0
- package/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
- package/lib/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
- package/lib/components/SafeDepositRental/RentalPeriod.js +8 -0
- package/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -0
- package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
- package/lib/components/SafeDepositRental/SafeBoxCases.js +7 -0
- package/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
- package/lib/components/SafeDepositRental/SafeDepositRental.js +5 -71
- package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +50 -65
- package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -9
- package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/lib/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
- package/lib/components/SafeDepositRental/WrapperSelect.js +8 -0
- package/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -0
- package/lib/components/SafeDepositRental/fetchBranches.d.ts +2 -0
- package/lib/components/SafeDepositRental/fetchBranches.js +17 -0
- package/lib/components/SafeDepositRental/fetchBranches.js.map +1 -0
- package/lib/components/SafeDepositRental/useGetRegions.d.ts +6 -0
- package/lib/components/SafeDepositRental/useGetRegions.js +8 -0
- package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +3 -2
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/lib/ui-kit/Foldable/Foldable.js +2 -2
- package/lib/ui-kit/Foldable/Foldable.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/Logo/Logo.js +2 -2
- package/lib/ui-kit/Logo/Logo.js.map +1 -1
- package/lib/ui-kit/Radio/Radio.js +1 -1
- package/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/lib/ui-kit/SearchBar/SearchBarInner.js.map +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/Select/SelectOption.d.ts +1 -0
- package/lib/ui-kit/Select/SelectOption.js +2 -2
- package/lib/ui-kit/Select/SelectOption.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +9 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BlockContent.d.ts +3 -1
- package/mobile/dist/components/Calculator/BonusCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +7 -5
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +7 -6
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +1 -3
- package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.js +1 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js +2 -1
- package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.js +1 -1
- package/mobile/dist/components/Calculator/renderProposalMortgage.js +2 -1
- package/mobile/dist/components/Calculator/renderProposalMortgage.js.map +1 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/mobile/dist/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/dist/components/ContentPage/normalizePage.d.ts +2 -1
- package/mobile/dist/components/ContentPage/normalizePage.js +7 -7
- package/mobile/dist/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlock.d.ts +5 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js +23 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.js +2 -0
- package/mobile/dist/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +12 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
- package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
- package/mobile/dist/components/PictureText/PictureText.js +4 -4
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js +9 -0
- package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +12 -0
- package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
- package/mobile/dist/components/SafeDepositRental/RentalPeriod.js +10 -0
- package/mobile/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js +9 -0
- package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +5 -71
- package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +51 -67
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -10
- package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.js +10 -0
- package/mobile/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/fetchBranches.d.ts +2 -0
- package/mobile/dist/components/SafeDepositRental/fetchBranches.js +20 -0
- package/mobile/dist/components/SafeDepositRental/fetchBranches.js.map +1 -0
- package/mobile/dist/components/SafeDepositRental/useGetRegions.d.ts +6 -0
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js +11 -0
- package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +3 -2
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/mobile/dist/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js +2 -2
- package/mobile/dist/ui-kit/Foldable/Foldable.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/Radio/Radio.js +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +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/Select/SelectOption.d.ts +1 -0
- package/mobile/dist/ui-kit/Select/SelectOption.js +2 -2
- package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BlockContent.d.ts +3 -1
- package/mobile/lib/components/Calculator/BonusCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +7 -5
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +7 -6
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +1 -3
- package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.js +1 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js +3 -2
- package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.js +1 -1
- package/mobile/lib/components/Calculator/renderProposalMortgage.js +2 -1
- package/mobile/lib/components/Calculator/renderProposalMortgage.js.map +1 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.d.ts +2 -1
- package/mobile/lib/components/ContentPage/isBlockInRegistry.js.map +1 -1
- package/mobile/lib/components/ContentPage/normalizePage.d.ts +2 -1
- package/mobile/lib/components/ContentPage/normalizePage.js +7 -7
- package/mobile/lib/components/ContentPage/normalizePage.js.map +1 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlock.d.ts +5 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js +21 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.js +2 -0
- package/mobile/lib/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +10 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
- package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
- package/mobile/lib/components/PictureText/PictureText.js +4 -4
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js +7 -0
- package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +10 -0
- package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
- package/mobile/lib/components/SafeDepositRental/RentalPeriod.js +8 -0
- package/mobile/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js +7 -0
- package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +5 -71
- package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +50 -65
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -9
- package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.js +8 -0
- package/mobile/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/fetchBranches.d.ts +2 -0
- package/mobile/lib/components/SafeDepositRental/fetchBranches.js +17 -0
- package/mobile/lib/components/SafeDepositRental/fetchBranches.js.map +1 -0
- package/mobile/lib/components/SafeDepositRental/useGetRegions.d.ts +6 -0
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js +8 -0
- package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +3 -2
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js +1 -1
- package/mobile/lib/ui-kit/CurrencyInput/CurrencyInput.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js +2 -2
- package/mobile/lib/ui-kit/Foldable/Foldable.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/Radio/Radio.js +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +1 -1
- package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +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/Select/SelectOption.d.ts +1 -0
- package/mobile/lib/ui-kit/Select/SelectOption.js +2 -2
- package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -1
- package/mobile/src/common.css +1 -1
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BlockContent.ts +5 -1
- package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
- package/mobile/src/components/Calculator/Calculator.tsx +7 -5
- package/mobile/src/components/Calculator/CalculatorContent.ts +11 -6
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +2 -8
- package/mobile/src/components/Calculator/Rate.tsx +3 -3
- package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +2 -0
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +1 -1
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +1 -1
- package/mobile/src/components/Calculator/renderProposalMortgage.tsx +7 -2
- package/mobile/src/components/ContentPage/isBlockInRegistry.ts +3 -1
- package/mobile/src/components/ContentPage/normalizePage.ts +8 -6
- package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +13 -0
- package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +45 -0
- package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +38 -0
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.example.json +33 -0
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +41 -0
- package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +26 -0
- package/mobile/src/components/PictureText/PictureText.tsx +6 -6
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +18 -16
- package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +50 -0
- package/mobile/src/components/SafeDepositRental/RenderRadioButtons.tsx +29 -0
- package/mobile/src/components/SafeDepositRental/RentalPeriod.tsx +18 -0
- package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +48 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +8 -78
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalContent.ts +21 -0
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +86 -143
- package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +23 -15
- package/mobile/src/components/SafeDepositRental/WrapperSelect.tsx +45 -0
- package/mobile/src/components/SafeDepositRental/fetchBranches.ts +21 -0
- package/mobile/src/components/SafeDepositRental/useGetRegions.ts +16 -0
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +58 -75
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +12 -9
- package/mobile/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +11 -2
- 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/Radio/Radio.tsx +1 -1
- package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
- package/mobile/src/ui-kit/Select/Select.tsx +1 -0
- package/mobile/src/ui-kit/Select/SelectOption.tsx +3 -2
- package/package.json +1 -1
- package/src/common.css +1 -1
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BlockContent.ts +5 -1
- package/src/components/Blocks.ts +5 -1
- package/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
- package/src/components/Calculator/Calculator.fixture.tsx +1 -0
- package/src/components/Calculator/Calculator.tsx +7 -5
- package/src/components/Calculator/CalculatorContent.ts +11 -6
- package/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
- package/src/components/Calculator/MortgageCalculatorForm.tsx +2 -8
- package/src/components/Calculator/Rate.tsx +3 -3
- package/src/components/Calculator/renderCalculatorBlock.tsx +2 -0
- package/src/components/Calculator/renderInitialFeeInput.tsx +1 -1
- package/src/components/Calculator/renderMonthsInput.tsx +1 -1
- package/src/components/Calculator/renderProposalMortgage.tsx +7 -2
- package/src/components/ContentPage/ContentPage.fixture.mobile.tsx +1 -1
- package/src/components/ContentPage/ContentPage.fixture.tsx +2 -2
- package/src/components/ContentPage/isBlockInRegistry.ts +3 -1
- package/src/components/ContentPage/normalizePage.mobile.ts +8 -6
- package/src/components/ContentPage/normalizePage.ts +9 -6
- package/src/components/ErrorBlock/ErrorBlock.example.json +13 -0
- package/src/components/ErrorBlock/ErrorBlock.fixture.tsx +53 -0
- package/src/components/ErrorBlock/ErrorBlock.tsx +45 -0
- package/src/components/ErrorBlock/ErrorBlockContent.ts +38 -0
- package/src/components/Footer/HorizontalNavigation.tsx +1 -1
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.example.json +33 -0
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +44 -0
- package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +41 -0
- package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +26 -0
- package/src/components/PictureText/PictureText.fixture.tsx +1 -1
- package/src/components/PictureText/PictureText.tsx +6 -6
- package/src/components/Recommendation/RecommendationCard.tsx +18 -16
- package/src/components/SafeDepositRental/RegionsAndBranches.tsx +50 -0
- package/src/components/SafeDepositRental/RenderRadioButtons.tsx +29 -0
- package/src/components/SafeDepositRental/RentalPeriod.tsx +18 -0
- package/src/components/SafeDepositRental/SafeBoxCases.tsx +48 -0
- package/src/components/SafeDepositRental/SafeDepositRental.fixture.tsx +1 -0
- package/src/components/SafeDepositRental/SafeDepositRental.tsx +8 -78
- package/src/components/SafeDepositRental/SafeDepositRentalContent.ts +21 -0
- package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +86 -143
- package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +23 -15
- package/src/components/SafeDepositRental/WrapperSelect.tsx +45 -0
- package/src/components/SafeDepositRental/fetchBranches.ts +21 -0
- package/src/components/SafeDepositRental/useGetRegions.ts +16 -0
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +58 -75
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +12 -9
- package/src/ui-kit/CurrencyInput/CurrencyInput.tsx +1 -1
- package/src/ui-kit/Foldable/Foldable.tsx +11 -2
- package/src/ui-kit/Input/Input.tsx +1 -1
- package/src/ui-kit/InputRange/InputRange.tsx +1 -1
- package/src/ui-kit/Logo/Logo.tsx +2 -2
- package/src/ui-kit/Radio/Radio.tsx +1 -1
- package/src/ui-kit/SearchBar/SearchBarInner.tsx +1 -1
- package/src/ui-kit/Select/Select.tsx +1 -0
- package/src/ui-kit/Select/SelectOption.tsx +3 -2
- package/mobile/src/components/SafeDepositRental/SafeDepositRental.example.json +0 -3
- package/src/components/SafeDepositRental/SafeDepositRental.example.json +0 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -633,6 +633,11 @@
|
|
|
633
633
|
return (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-[50px] bg-white ${className}`, context: context, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, context: context, align: align, headlineVersion: "M", as: "h2" }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] }));
|
|
634
634
|
});
|
|
635
635
|
|
|
636
|
+
const VersionStyleMap = {
|
|
637
|
+
primary: 'bg-white text-primary-text',
|
|
638
|
+
secondary: 'bg-primary-main text-white',
|
|
639
|
+
};
|
|
640
|
+
|
|
636
641
|
const titleStyleMap = {
|
|
637
642
|
primary: 'text-primary-text',
|
|
638
643
|
secondary: 'text-white',
|
|
@@ -644,7 +649,8 @@
|
|
|
644
649
|
const BenefitItem = JSX((props) => {
|
|
645
650
|
const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
|
|
646
651
|
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
647
|
-
|
|
652
|
+
const listItemAlign = description ? 'items-start' : 'items-center';
|
|
653
|
+
return (jsxs("div", { className: `flex gap-5 ${listItemAlign} ${className}`, children: [icon ? (jsx("div", { className: renderBenefitIconBgStyle(version, benefitsVersion), children: jsx(Img, { className: "w-[24px] h-[24px]", image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true }) })) : null, jsxs("div", { className: "gap-0.5", children: [label ? jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
|
|
648
654
|
});
|
|
649
655
|
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
650
656
|
let bgColorStyle = 'bg-primary-main text-black';
|
|
@@ -654,18 +660,13 @@
|
|
|
654
660
|
else if (benefitsVersion === 'normal') {
|
|
655
661
|
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
656
662
|
}
|
|
657
|
-
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
663
|
+
return `w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border flex items-center justify-center ${bgColorStyle}`;
|
|
658
664
|
}
|
|
659
665
|
|
|
660
666
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
|
|
661
667
|
|
|
662
|
-
const VersionStyleMap = {
|
|
663
|
-
primary: 'bg-white text-primary-text',
|
|
664
|
-
secondary: 'bg-primary-main text-white',
|
|
665
|
-
};
|
|
666
|
-
|
|
667
668
|
const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
|
|
668
|
-
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src
|
|
669
|
+
return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(Img, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
|
|
669
670
|
});
|
|
670
671
|
const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
|
|
671
672
|
function renderInsuranceSumMonth(sum, monthLimit) {
|
|
@@ -875,7 +876,7 @@
|
|
|
875
876
|
});
|
|
876
877
|
|
|
877
878
|
const BaseTile = JSX(({ className = '', title = '', children, buttons, image }) => {
|
|
878
|
-
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { children: children }), buttons ? jsx("div", { className: "mt-auto", children: buttons }) : null] }), image] })] }));
|
|
879
|
+
return (jsxs("div", { className: `font-sans flex flex-col grow h-full items-start ${className}`, children: [title, jsxs("div", { className: "flex grow w-full justify-between", children: [jsxs("div", { className: "flex flex-col justify-between w-full", children: [jsx("div", { className: "h-full", children: children }), buttons ? jsx("div", { className: "mt-auto pt-8", children: buttons }) : null] }), image] })] }));
|
|
879
880
|
});
|
|
880
881
|
|
|
881
882
|
const renderBenefit$1 = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => {
|
|
@@ -1235,7 +1236,7 @@
|
|
|
1235
1236
|
};
|
|
1236
1237
|
|
|
1237
1238
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
|
|
1238
|
-
return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-l-light", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
1239
|
+
return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-l-light text-secondary-text", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
|
|
1239
1240
|
});
|
|
1240
1241
|
|
|
1241
1242
|
const DEFAULT_MIN_SUM = 60000;
|
|
@@ -1275,7 +1276,7 @@
|
|
|
1275
1276
|
const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
|
|
1276
1277
|
const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
|
|
1277
1278
|
|
|
1278
|
-
const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light
|
|
1279
|
+
const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light text-secondary-text", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
|
|
1279
1280
|
|
|
1280
1281
|
function renderButtonSection(context, buttons) {
|
|
1281
1282
|
return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-7 gap-2" })) : null;
|
|
@@ -1304,7 +1305,7 @@
|
|
|
1304
1305
|
onChange(max);
|
|
1305
1306
|
}
|
|
1306
1307
|
};
|
|
1307
|
-
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m
|
|
1308
|
+
return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
|
|
1308
1309
|
outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) })] }));
|
|
1309
1310
|
});
|
|
1310
1311
|
|
|
@@ -1438,7 +1439,7 @@
|
|
|
1438
1439
|
step: 500,
|
|
1439
1440
|
isShowItems: false,
|
|
1440
1441
|
}, setTravelExpenseValue), renderWantedSumInput('Сумма покупок в остальных категориях, ₽', {
|
|
1441
|
-
className: 'mt-
|
|
1442
|
+
className: 'mt-7',
|
|
1442
1443
|
minSum: minSumOther,
|
|
1443
1444
|
maxSum: maxSumOther,
|
|
1444
1445
|
moneyValue: restExpenseValue,
|
|
@@ -1475,7 +1476,7 @@
|
|
|
1475
1476
|
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
1476
1477
|
return `${month} ${text}`;
|
|
1477
1478
|
};
|
|
1478
|
-
return (jsx(InputRange, { className: "mt-
|
|
1479
|
+
return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
|
|
1479
1480
|
}
|
|
1480
1481
|
|
|
1481
1482
|
const RadioButtonGroup = JSX(({ items, checkedItem, onChangeCheckedItem }) => {
|
|
@@ -1548,7 +1549,7 @@
|
|
|
1548
1549
|
monthsValue,
|
|
1549
1550
|
};
|
|
1550
1551
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
1551
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "
|
|
1552
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[351px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentTypeSelector(context, {
|
|
1552
1553
|
items: paymentTypeItems,
|
|
1553
1554
|
checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL,
|
|
1554
1555
|
onChange: (text) => toggleIsAnnuity(text === ANNUITY),
|
|
@@ -1587,14 +1588,15 @@
|
|
|
1587
1588
|
const { moneyValue } = props;
|
|
1588
1589
|
const minSum = DEFAULT_MIN_SUM;
|
|
1589
1590
|
const maxSum = DEFAULT_MAX_SUM;
|
|
1590
|
-
return (jsx(InputRange, { className: "mt-
|
|
1591
|
+
return (jsx(InputRange, { className: "mt-7", title: title, items: [
|
|
1591
1592
|
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
1592
1593
|
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
1593
1594
|
], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue, onChange: callback }));
|
|
1594
1595
|
}
|
|
1595
1596
|
|
|
1597
|
+
const monthlyPayment = 777777; // TODO: hardcode
|
|
1596
1598
|
function renderProposalMortgage({ credit, period, taxRefund }) {
|
|
1597
|
-
return (jsxs("div", { children: [jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", value: credit, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u0421\u0440\u043E\u043A", value: period, postfix: "\u043B\u0435\u0442" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
|
|
1599
|
+
return (jsxs("div", { children: [jsxs("div", { className: "flex justify-between", children: [jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", value: credit, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u0421\u0440\u043E\u043A", value: period, postfix: "\u043B\u0435\u0442", className: "w-[120px]" })] }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
|
|
1598
1600
|
}
|
|
1599
1601
|
|
|
1600
1602
|
const STEP_MONEY = 1000;
|
|
@@ -1614,7 +1616,6 @@
|
|
|
1614
1616
|
const minMonths = /*calculatorParams?.minMonths ||*/ DEFAULT_MIN_MONTHS;
|
|
1615
1617
|
const maxMonths = /* calculatorParams?.maxMonths || */ DEFAULT_MAX_MONTHS;
|
|
1616
1618
|
const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
|
|
1617
|
-
const monthlyPayment = 777777; // TODO: hardcode
|
|
1618
1619
|
const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
|
|
1619
1620
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue('Стоимость недвижимости, ₽', { moneyValue }, setMoneyValue), renderInitialFeeInput('Первоначальный взнос, ₽', {
|
|
1620
1621
|
moneyValue,
|
|
@@ -1622,7 +1623,7 @@
|
|
|
1622
1623
|
minMonths,
|
|
1623
1624
|
maxMonths,
|
|
1624
1625
|
monthsValue,
|
|
1625
|
-
}, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\
|
|
1626
|
+
}, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
|
|
1626
1627
|
});
|
|
1627
1628
|
|
|
1628
1629
|
const EmbeddableCalcBlocks = {
|
|
@@ -1638,7 +1639,7 @@
|
|
|
1638
1639
|
return null;
|
|
1639
1640
|
}
|
|
1640
1641
|
const EmbeddedBlock = EmbeddableCalcBlocks[type];
|
|
1641
|
-
return (jsx("section", { className: `box-border relative bg-white flex shrink-0 self-start basis-full ${className}`, role: "listitem", children:
|
|
1642
|
+
return (jsx("section", { className: `box-border relative bg-white flex shrink-0 self-start basis-full ${className}`, role: "listitem", children: jsxs("div", { className: "box-border p-9 w-full", children: [block?.title ? jsx(Heading, { className: "text-center mb-6", title: block.title }) : null, jsx(EmbeddedBlock, { context: context, ...block, className: "flex justify-between" })] }) }, String(i)));
|
|
1642
1643
|
};
|
|
1643
1644
|
|
|
1644
1645
|
const Calculator = JSX(({ className = '', context, calculatorTabs = [], ...rest }) => {
|
|
@@ -1651,7 +1652,7 @@
|
|
|
1651
1652
|
const isGalleryScrollAvailable = calculatorTabs?.length > 3;
|
|
1652
1653
|
const showNextButton = isGalleryScrollAvailable && calculatorTabs?.length > tabsShift + 3;
|
|
1653
1654
|
const showPrevButton = tabsShift > 0;
|
|
1654
|
-
return (jsxs(BlockWrapper, { context: context, className: `box-border overflow-hidden relative font-sans w-100 text-primary-text ${className}`, ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
|
|
1655
|
+
return (jsxs(BlockWrapper, { context: context, className: `box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${className}`, ...rest, children: [jsxs("div", { className: "bg-white", children: [tabsNav.length > 1
|
|
1655
1656
|
? renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex })
|
|
1656
1657
|
: null, renderArrows({
|
|
1657
1658
|
handler: [handlePrevClick, handleNextClick],
|
|
@@ -1666,12 +1667,14 @@
|
|
|
1666
1667
|
const isActiveBtn = i === activeSlideIndex;
|
|
1667
1668
|
const btnClassName = isActiveBtn
|
|
1668
1669
|
? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
|
|
1669
|
-
: `h-[77px] w-[
|
|
1670
|
+
: `h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
|
|
1670
1671
|
const btnTitleClassName = isActiveBtn ? 'text-xl mb-1.5' : `text-l mb-[3px]`;
|
|
1671
|
-
const btnDescClassName = isActiveBtn
|
|
1672
|
+
const btnDescClassName = isActiveBtn
|
|
1673
|
+
? 'text-l-light text-white'
|
|
1674
|
+
: `text-m-light text-secondary-text`;
|
|
1672
1675
|
const iconClassName = isActiveBtn ? '' : `text-primary-main`;
|
|
1673
|
-
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border
|
|
1674
|
-
${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className:
|
|
1676
|
+
return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]
|
|
1677
|
+
${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `${btnDescClassName}`, children: tab.description })] })] }, String(i)));
|
|
1675
1678
|
}
|
|
1676
1679
|
function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
|
|
1677
1680
|
return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$2({
|
|
@@ -1682,6 +1685,40 @@
|
|
|
1682
1685
|
})) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
|
|
1683
1686
|
}
|
|
1684
1687
|
|
|
1688
|
+
const CurrencyMap = {
|
|
1689
|
+
RUB: '₽',
|
|
1690
|
+
USD: '$',
|
|
1691
|
+
EUR: '€',
|
|
1692
|
+
};
|
|
1693
|
+
const CurrencyInput = JSX(({ className = '', label, currency = 'RUB', onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1694
|
+
const handleChange = (e) => {
|
|
1695
|
+
if (!onChange) {
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
const newValue = e.target.value === '' ? '' : String(clamp(e.target.value, minValue, maxValue));
|
|
1699
|
+
onChange(newValue);
|
|
1700
|
+
};
|
|
1701
|
+
return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className: "text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text", onChange: handleChange, value: value, min: minValue, max: maxValue, ...inputProps }), jsx("span", { className: "text-xl-light absolute right-4", children: CurrencyMap[currency] })] })] }));
|
|
1702
|
+
});
|
|
1703
|
+
|
|
1704
|
+
const AMOUNT_KEY = 'amount';
|
|
1705
|
+
const INPUT_LABEL = 'Сумма перевода';
|
|
1706
|
+
const BUTTON_TEXT = 'Далее';
|
|
1707
|
+
const PLACEHOLDER = '1500';
|
|
1708
|
+
const TITLE = 'Укажите сумму перевода';
|
|
1709
|
+
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
1710
|
+
const BUTTON_CLASS_PARAMS = {
|
|
1711
|
+
version: 'primary',
|
|
1712
|
+
className: 'w-full h-[56px] px-9 mt-6',
|
|
1713
|
+
};
|
|
1714
|
+
const CardTransfer = JSX(({ className = '', title = TITLE, ...rest }) => {
|
|
1715
|
+
const [value, setValue] = useState('');
|
|
1716
|
+
const isDisabled = !Number(value);
|
|
1717
|
+
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder: PLACEHOLDER, label: INPUT_LABEL }), jsx("button", { type: "submit", className: isDisabled
|
|
1718
|
+
? getDisabledButtonClasses(BUTTON_CLASS_PARAMS)
|
|
1719
|
+
: getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children: BUTTON_TEXT })] })] }));
|
|
1720
|
+
});
|
|
1721
|
+
|
|
1685
1722
|
const iconVersionMap = {
|
|
1686
1723
|
default: 'normal',
|
|
1687
1724
|
primary: 'white',
|
|
@@ -1741,40 +1778,6 @@
|
|
|
1741
1778
|
});
|
|
1742
1779
|
};
|
|
1743
1780
|
|
|
1744
|
-
const CurrencyMap = {
|
|
1745
|
-
RUB: '₽',
|
|
1746
|
-
USD: '$',
|
|
1747
|
-
EUR: '€',
|
|
1748
|
-
};
|
|
1749
|
-
const CurrencyInput = JSX(({ className = '', label, currency = 'RUB', onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
|
|
1750
|
-
const handleChange = (e) => {
|
|
1751
|
-
if (!onChange) {
|
|
1752
|
-
return;
|
|
1753
|
-
}
|
|
1754
|
-
const newValue = e.target.value === '' ? '' : String(clamp(e.target.value, minValue, maxValue));
|
|
1755
|
-
onChange(newValue);
|
|
1756
|
-
};
|
|
1757
|
-
return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className: "text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke", onChange: handleChange, value: value, min: minValue, max: maxValue, ...inputProps }), jsx("span", { className: "text-xl-light absolute right-4", children: CurrencyMap[currency] })] })] }));
|
|
1758
|
-
});
|
|
1759
|
-
|
|
1760
|
-
const AMOUNT_KEY = 'amount';
|
|
1761
|
-
const INPUT_LABEL = 'Сумма перевода';
|
|
1762
|
-
const BUTTON_TEXT = 'Далее';
|
|
1763
|
-
const PLACEHOLDER = '1500';
|
|
1764
|
-
const TITLE = 'Укажите сумму перевода';
|
|
1765
|
-
const FORM_URL = 'https://www.rshb.ru/p2p/';
|
|
1766
|
-
const BUTTON_CLASS_PARAMS = {
|
|
1767
|
-
version: 'primary',
|
|
1768
|
-
className: 'w-full h-[56px] px-9 mt-6',
|
|
1769
|
-
};
|
|
1770
|
-
const CardTransfer = JSX(({ className = '', title = TITLE, ...rest }) => {
|
|
1771
|
-
const [value, setValue] = useState('');
|
|
1772
|
-
const isDisabled = !Number(value);
|
|
1773
|
-
return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder: PLACEHOLDER, label: INPUT_LABEL }), jsx("button", { type: "submit", className: isDisabled
|
|
1774
|
-
? getDisabledButtonClasses(BUTTON_CLASS_PARAMS)
|
|
1775
|
-
: getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children: BUTTON_TEXT })] })] }));
|
|
1776
|
-
});
|
|
1777
|
-
|
|
1778
1781
|
const useTableArrowScrollControl = ({ columnsLength, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
|
|
1779
1782
|
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
1780
1783
|
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
@@ -1976,18 +1979,18 @@
|
|
|
1976
1979
|
const validInputValue = e.target.validity.valid ? e.target.value : value;
|
|
1977
1980
|
onChange(validInputValue);
|
|
1978
1981
|
};
|
|
1979
|
-
return (jsx("input", { className: className
|
|
1982
|
+
return (jsx("input", { className: `border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${className}`, id: id, name: name || id, type: type, pattern: pattern, placeholder: placeholder, value: value, onChange: handleChange }));
|
|
1980
1983
|
});
|
|
1981
1984
|
|
|
1982
1985
|
const selectStyle = {
|
|
1983
1986
|
background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
|
|
1984
1987
|
};
|
|
1985
1988
|
const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
|
|
1986
|
-
return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
|
|
1989
|
+
return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "", children: children }));
|
|
1987
1990
|
});
|
|
1988
1991
|
|
|
1989
|
-
const SelectOption = JSX(({ className = '', value, selected, children }) => {
|
|
1990
|
-
return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
|
|
1992
|
+
const SelectOption = JSX(({ className = '', value, selected, disabled = false, children }) => {
|
|
1993
|
+
return (jsx("option", { className: className, value: `${value}`, selected: selected, disabled: disabled, children: children }));
|
|
1991
1994
|
});
|
|
1992
1995
|
|
|
1993
1996
|
function renderInput(props) {
|
|
@@ -2084,7 +2087,7 @@
|
|
|
2084
2087
|
transparent: 'text-white',
|
|
2085
2088
|
};
|
|
2086
2089
|
const TEXT_COLOR = {
|
|
2087
|
-
'bg-white': 'text-
|
|
2090
|
+
'bg-white': 'text-primary-text',
|
|
2088
2091
|
transparent: 'text-white',
|
|
2089
2092
|
};
|
|
2090
2093
|
const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', hideTitle, }) => {
|
|
@@ -2092,7 +2095,7 @@
|
|
|
2092
2095
|
});
|
|
2093
2096
|
const renderTitle$1 = (children, bgColor, title) => {
|
|
2094
2097
|
const text = children || title || 'Россельхозбанк';
|
|
2095
|
-
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-
|
|
2098
|
+
return jsx("span", { className: `${TEXT_COLOR[bgColor]} font-medium ml-2.5`, children: text });
|
|
2096
2099
|
};
|
|
2097
2100
|
|
|
2098
2101
|
const useSearch = () => {
|
|
@@ -2110,7 +2113,7 @@
|
|
|
2110
2113
|
const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
|
|
2111
2114
|
const inputPlaceholder = isMobile ? 'some search' : undefined;
|
|
2112
2115
|
return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(Img, { image: "LoupeIcon", width: "24", height: "24" }) }), term ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
|
|
2113
|
-
outline-none pr-[6%] border-main-
|
|
2116
|
+
outline-none pr-[6%] border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text ${SearchBarInputClassName}`, value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input", placeholder: inputPlaceholder }), isMobile ? (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
|
|
2114
2117
|
e.preventDefault();
|
|
2115
2118
|
setTerm('');
|
|
2116
2119
|
}, children: jsx(Img, { image: "CloseIcon", width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-1 right-1", onClick: (ev) => {
|
|
@@ -2153,7 +2156,7 @@
|
|
|
2153
2156
|
const HorizontalNavigation = JSX(({ links, className = '', context }) => {
|
|
2154
2157
|
const router = context.useRouter();
|
|
2155
2158
|
const { handlerDecorator } = context;
|
|
2156
|
-
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "
|
|
2159
|
+
return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-l-light max-w-[292px]", ...useLink({ router, handlerDecorator }, _) }, String(i)))) })) : null }));
|
|
2157
2160
|
});
|
|
2158
2161
|
|
|
2159
2162
|
const cmp = (a) => (b) => a?.href === b?.href;
|
|
@@ -2506,6 +2509,11 @@
|
|
|
2506
2509
|
.map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
|
|
2507
2510
|
});
|
|
2508
2511
|
|
|
2512
|
+
const OfficeServicesBlock = JSX(({ className = '', context, title, servicesList, anchor = '' }) => {
|
|
2513
|
+
return (jsxs(BlockWrapper, { context: context, id: anchor, className: `font-sans bg-white p-12 flex flex-col ${className}`, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-2.5", title: title }) : null, servicesList?.length ? servicesList.map(renderListItems) : null] }));
|
|
2514
|
+
});
|
|
2515
|
+
const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-2.5 list-none", children: [itemList.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", width: "24px", height: "24px", asSVG: true, image: itemList.icon })) : null, itemList.text ? jsx("span", { className: "text-l-light", children: itemList.text }) : null] }, `list_item_${String(i)}`));
|
|
2516
|
+
|
|
2509
2517
|
const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
|
|
2510
2518
|
const useActiveHandler = ({ initialState = false }) => {
|
|
2511
2519
|
const [isActive, setIsActive] = useState(initialState);
|
|
@@ -2531,9 +2539,9 @@
|
|
|
2531
2539
|
initialState: isUnfolded,
|
|
2532
2540
|
});
|
|
2533
2541
|
const buttonClassName = foldButtonClasses ||
|
|
2534
|
-
'border-none bg-primary-main hover:bg-primary-hover px-0 py-
|
|
2542
|
+
'border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
|
|
2535
2543
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
2536
|
-
return blocks ? (jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? jsx(Icon, { name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true }) : null] })) : null] })) : null;
|
|
2544
|
+
return blocks ? (jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? (jsx(Icon, { className: "my-auto", name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true })) : null] })) : null] })) : null;
|
|
2537
2545
|
});
|
|
2538
2546
|
const renderBlocks = (blocks, render, { blocksToHide, isActive, containerClasses = '' }) => {
|
|
2539
2547
|
const visibleBlocks = blocks.slice(0, blocks.length - blocksToHide);
|
|
@@ -2635,7 +2643,7 @@
|
|
|
2635
2643
|
const RecommendationCard = JSX(({ context, className = '', title, description, items, image, version, socialMedia }) => {
|
|
2636
2644
|
const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
2637
2645
|
const tileImage = image?.src ? (jsx(Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
2638
|
-
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children:
|
|
2646
|
+
return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children: jsx(BaseTile, { context: context, className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx(Description, { className: "mb-2", description: description }) : null, items?.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia ? (jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version, context: context })) : null] }) }) }));
|
|
2639
2647
|
});
|
|
2640
2648
|
|
|
2641
2649
|
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
@@ -2670,162 +2678,130 @@
|
|
|
2670
2678
|
}) }));
|
|
2671
2679
|
};
|
|
2672
2680
|
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
? renderSelect({
|
|
2693
|
-
data: offices,
|
|
2694
|
-
field: 'office',
|
|
2695
|
-
selected: offices[0],
|
|
2696
|
-
setSelected,
|
|
2697
|
-
label: 'Отделение',
|
|
2698
|
-
})
|
|
2699
|
-
: null })] }));
|
|
2681
|
+
const BRANCHES_URL = '/api/v1/safeboxes';
|
|
2682
|
+
async function fetchBranches(regionCode) {
|
|
2683
|
+
try {
|
|
2684
|
+
const response = await fetch(BRANCHES_URL + `?regionCode=${regionCode}`, {
|
|
2685
|
+
headers: {
|
|
2686
|
+
'Content-Type': 'application/json',
|
|
2687
|
+
},
|
|
2688
|
+
});
|
|
2689
|
+
const result = await response.json();
|
|
2690
|
+
return Promise.resolve(result);
|
|
2691
|
+
}
|
|
2692
|
+
catch (err) {
|
|
2693
|
+
console.error(err);
|
|
2694
|
+
return Promise.reject();
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = 'Выберите значение', setSelected, label, }) => {
|
|
2699
|
+
return (jsxs("div", { children: [jsx("span", { className: "block text-m-light mb-2", children: label }), jsxs(Select, { className: `h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer ${!selected ? 'text-secondary-text' : ''}`, value: selected, onChange: (_) => setSelected(_), children: [jsx(SelectOption, { value: "", children: placeholder }), data.map((_, i) => (jsx(SelectOption, { value: _?.[fieldValue || fieldLabel], children: _?.[fieldLabel] }, String(i))))] })] }));
|
|
2700
2700
|
});
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", children: cellDimensions.length
|
|
2705
|
-
? renderSelect({
|
|
2706
|
-
data: cellDimensions,
|
|
2707
|
-
field: 'dimension',
|
|
2708
|
-
selected: selectedDimension,
|
|
2709
|
-
setSelected: setSelectedDimension,
|
|
2710
|
-
label: 'Размер ячейки',
|
|
2711
|
-
})
|
|
2712
|
-
: null }), jsx("div", { className: "w-full", children: cellOptions.length
|
|
2713
|
-
? renderSelect({
|
|
2714
|
-
data: cellOptions,
|
|
2715
|
-
field: 'option',
|
|
2716
|
-
selected: selectedOption,
|
|
2717
|
-
setSelected: setSelectedOption,
|
|
2718
|
-
label: 'Параметры ячейки, мм (ВхШхД)',
|
|
2719
|
-
})
|
|
2720
|
-
: null })] }));
|
|
2701
|
+
|
|
2702
|
+
const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => {
|
|
2703
|
+
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "w-full mr-4", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0413\u043E\u0440\u043E\u0434" }) }), jsx("div", { className: "w-full", 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" }) })] }));
|
|
2721
2704
|
});
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
const
|
|
2728
|
-
return (jsxs("div", {
|
|
2729
|
-
};
|
|
2730
|
-
|
|
2731
|
-
const
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2705
|
+
|
|
2706
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "font-sans ml-3 cursor-pointer", children: text }) : null] }) })));
|
|
2707
|
+
|
|
2708
|
+
const RenderRadioButtons = JSX(() => {
|
|
2709
|
+
const [selectedOption, setSelectedOption] = useState('option1');
|
|
2710
|
+
const onChange = (_) => setSelectedOption(_.target.value);
|
|
2711
|
+
return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", 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 })] }));
|
|
2712
|
+
});
|
|
2713
|
+
|
|
2714
|
+
const ITEMS = ['От 1 дня', 'До 365 дней'];
|
|
2715
|
+
const MIN = 1;
|
|
2716
|
+
const MAX = 365;
|
|
2717
|
+
const RentalPeriod = JSX(({ days, setDays }) => (jsxs("div", { className: "mb-6", children: [jsx("span", { className: "block text-m-light mb-[3px]", children: "\u0421\u0440\u043E\u043A \u0430\u0440\u0435\u043D\u0434\u044B" }), jsx(InputRange, { min: MIN, max: MAX, value: days, items: ITEMS, onChange: setDays })] })));
|
|
2718
|
+
|
|
2719
|
+
const SafeBoxCases = JSX(({ caseVolumes = [], selectedCaseVolume, onSelectedCaseVolume, safeBoxCases = [], selectedBoxSize, onSelectedBoxSize, }) => {
|
|
2720
|
+
return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", 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: "w-full", 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" }) })] }));
|
|
2735
2721
|
});
|
|
2736
2722
|
|
|
2737
|
-
const SafeDepositRentalTotal = ({ days }) => {
|
|
2738
|
-
const price = calculatePrice(days);
|
|
2723
|
+
const SafeDepositRentalTotal = JSX(({ days, tariffs = [] }) => {
|
|
2724
|
+
const price = calculatePrice(days, tariffs);
|
|
2739
2725
|
return (jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex", children: [renderTotal('Аренда за', days, 'mr-11'), renderTotal('Цена', price + ' ₽')] }), jsxs("div", { className: "bg-primary-main px-10 pt-10 pb-4 text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, width: "290", height: "257", asSVG: true }), jsxs("span", { className: "text-s-light text-white opacity-80 mt-2 inline-block", children: ["\u041D\u0430 \u0440\u0438\u0441\u0443\u043D\u043A\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0430 \u043F\u0430\u0447\u043A\u0430", jsx("br", {}), " \u043B\u0438\u0441\u0442\u043E\u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0430 \u04104"] })] })] }));
|
|
2740
|
-
};
|
|
2726
|
+
});
|
|
2741
2727
|
const renderTotal = (label, total, className = '') => {
|
|
2742
2728
|
return (jsxs("div", { className: className, children: [jsx("span", { className: "block text-m-light mb-1", children: label }), jsx("span", { className: "text-h3", children: total })] }));
|
|
2743
2729
|
};
|
|
2744
|
-
const calculatePrice = (days) => {
|
|
2745
|
-
|
|
2730
|
+
const calculatePrice = (days, tariffs) => {
|
|
2731
|
+
const tariffType = getTariffType(days);
|
|
2732
|
+
const tariffValue = tariffs?.find((_) => _.tariffType === String(tariffType))?.tariffValue || 0;
|
|
2733
|
+
return days * tariffValue;
|
|
2734
|
+
};
|
|
2735
|
+
const getTariffType = (days) => {
|
|
2736
|
+
let tariffType = 1;
|
|
2746
2737
|
switch (true) {
|
|
2747
2738
|
case days > 30 && days <= 90:
|
|
2748
|
-
|
|
2739
|
+
tariffType = 2;
|
|
2749
2740
|
break;
|
|
2750
2741
|
case days > 90 && days <= 180:
|
|
2751
|
-
|
|
2742
|
+
tariffType = 3;
|
|
2752
2743
|
break;
|
|
2753
2744
|
case days > 180 && days <= 365:
|
|
2754
|
-
|
|
2745
|
+
tariffType = 4;
|
|
2755
2746
|
break;
|
|
2756
2747
|
}
|
|
2757
|
-
return
|
|
2748
|
+
return tariffType;
|
|
2758
2749
|
};
|
|
2759
2750
|
|
|
2760
2751
|
const DEFAULT_DAYS = 26;
|
|
2761
|
-
const
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
office: 'выберите отделение',
|
|
2768
|
-
rate: null,
|
|
2769
|
-
},
|
|
2770
|
-
{
|
|
2771
|
-
office: 'МоскваОфис1',
|
|
2772
|
-
rate: 1,
|
|
2773
|
-
},
|
|
2774
|
-
{
|
|
2775
|
-
office: 'МоскваОфис2',
|
|
2776
|
-
rate: 2,
|
|
2777
|
-
},
|
|
2778
|
-
{
|
|
2779
|
-
office: 'МоскваОфис3',
|
|
2780
|
-
rate: 3,
|
|
2781
|
-
},
|
|
2782
|
-
],
|
|
2783
|
-
},
|
|
2784
|
-
{
|
|
2785
|
-
city: 'Краснодар',
|
|
2786
|
-
offices: [
|
|
2787
|
-
{
|
|
2788
|
-
office: 'КраснодарОфис1',
|
|
2789
|
-
rate: 2,
|
|
2790
|
-
},
|
|
2791
|
-
{
|
|
2792
|
-
office: 'КраснодарОфис2',
|
|
2793
|
-
rate: 4,
|
|
2794
|
-
},
|
|
2795
|
-
{
|
|
2796
|
-
office: 'КраснодарОфис3',
|
|
2797
|
-
rate: 6,
|
|
2798
|
-
},
|
|
2799
|
-
],
|
|
2800
|
-
},
|
|
2801
|
-
],
|
|
2802
|
-
cellDimensions: [
|
|
2803
|
-
{
|
|
2804
|
-
dimension: 'маленькая',
|
|
2805
|
-
},
|
|
2806
|
-
{
|
|
2807
|
-
dimension: 'средняя',
|
|
2808
|
-
},
|
|
2809
|
-
{
|
|
2810
|
-
dimension: 'большая',
|
|
2811
|
-
},
|
|
2812
|
-
],
|
|
2813
|
-
cellOptions: [
|
|
2814
|
-
{
|
|
2815
|
-
option: '125x225x375',
|
|
2816
|
-
},
|
|
2817
|
-
{
|
|
2818
|
-
option: '200x300x400',
|
|
2819
|
-
},
|
|
2820
|
-
{
|
|
2821
|
-
option: '300x400x500',
|
|
2822
|
-
},
|
|
2823
|
-
],
|
|
2824
|
-
};
|
|
2825
|
-
const SafeDepositRental = JSX(({ context, className = '', ...rest }) => {
|
|
2752
|
+
const SafeDepositRentalForm = JSX(({ regions }) => {
|
|
2753
|
+
const [selectedRegion, setSelectedRegion] = useState('');
|
|
2754
|
+
const [branches, setBranches] = useState([]);
|
|
2755
|
+
const [selectedBranch, setSelectedBranch] = useState('');
|
|
2756
|
+
const [selectedCaseVolume, setSelectedCaseVolume] = useState('');
|
|
2757
|
+
const [selectedBoxSize, setSelectedBoxSize] = useState('');
|
|
2826
2758
|
const [days, setDays] = useState(DEFAULT_DAYS);
|
|
2827
|
-
|
|
2828
|
-
|
|
2759
|
+
useEffect(() => {
|
|
2760
|
+
setSelectedRegion(getInitialValueSelectedRegion(regions));
|
|
2761
|
+
}, [regions]);
|
|
2762
|
+
useEffect(() => {
|
|
2763
|
+
if (selectedRegion) {
|
|
2764
|
+
fetchBranches(selectedRegion).then((result) => {
|
|
2765
|
+
setBranches(result);
|
|
2766
|
+
});
|
|
2767
|
+
}
|
|
2768
|
+
else {
|
|
2769
|
+
setBranches([]);
|
|
2770
|
+
}
|
|
2771
|
+
setSelectedBranch('');
|
|
2772
|
+
setSelectedCaseVolume('');
|
|
2773
|
+
setSelectedBoxSize('');
|
|
2774
|
+
}, [regions, selectedRegion]);
|
|
2775
|
+
const onSelectedBranch = (value) => {
|
|
2776
|
+
setSelectedBranch(value);
|
|
2777
|
+
setSelectedCaseVolume('');
|
|
2778
|
+
setSelectedBoxSize('');
|
|
2779
|
+
};
|
|
2780
|
+
const onSelectedCaseVolume = (value) => {
|
|
2781
|
+
setSelectedCaseVolume(value);
|
|
2782
|
+
setSelectedBoxSize('');
|
|
2783
|
+
};
|
|
2784
|
+
const branch = getBranch(branches, selectedBranch);
|
|
2785
|
+
const caseVolumes = getCaseVolumes(branch?.safeBoxCaseVolumes);
|
|
2786
|
+
const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, selectedCaseVolume)?.safeBoxCases;
|
|
2787
|
+
const tariffs = getTariffs(safeBoxCases, selectedBoxSize);
|
|
2788
|
+
return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [jsxs("div", { className: "flex-1 mr-9", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: setSelectedRegion, branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch }), jsx(RentalPeriod, { days: days, setDays: setDays }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume, safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: setSelectedBoxSize }), jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RenderRadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary" })] })] }), jsx(SafeDepositRentalTotal, { days: days, tariffs: tariffs })] }));
|
|
2789
|
+
});
|
|
2790
|
+
const getInitialValueSelectedRegion = (regions) => regions?.find((_) => _.name === 'Москва')?.code || '';
|
|
2791
|
+
const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
|
|
2792
|
+
const getCaseVolumes = (safeBoxCaseVolumes) => safeBoxCaseVolumes?.length ? safeBoxCaseVolumes?.filter((_) => _?.safeBoxCases?.length) : [];
|
|
2793
|
+
const getCaseVolume = (caseVolumes, selectedCaseVolume) => caseVolumes?.find((_) => _.volume === selectedCaseVolume);
|
|
2794
|
+
const getTariffs = (safeBoxCases, selectedBoxSize) => safeBoxCases?.find((_) => _.safeBoxCasesSize === selectedBoxSize)?.tariffs;
|
|
2795
|
+
|
|
2796
|
+
const REGIONS_URL = '/api/v1/admin/regions';
|
|
2797
|
+
function useGetRegions() {
|
|
2798
|
+
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
2799
|
+
return data || [];
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
const SafeDepositRental = JSX(({ title, context, className = '', ...rest }) => {
|
|
2803
|
+
const regions = useGetRegions();
|
|
2804
|
+
return (jsxs(BlockWrapper, { context: context, className: `bg-white px-8 py-12 ${className}`, ...rest, children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions }), jsx("p", { className: "text-s-light text-secondary-text", children: "\u0410\u0440\u0435\u043D\u0434\u0430 \u0421\u042F, \u0432 \u0441\u043B\u0443\u0447\u0430\u0435 \u043F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u043A\u0443\u043F\u043B\u0438-\u043F\u0440\u043E\u0434\u0430\u0436\u0438, \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445 \u0434\u0435\u043D\u0435\u0433 \u0438\u043B\u0438 \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u0438\u043F\u043E\u0442\u0435\u0447\u043D\u043E\u0439 \u0441\u0434\u0435\u043B\u043A\u0438" })] }));
|
|
2829
2805
|
});
|
|
2830
2806
|
|
|
2831
2807
|
const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
|
|
@@ -3101,6 +3077,21 @@
|
|
|
3101
3077
|
return (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
|
|
3102
3078
|
});
|
|
3103
3079
|
|
|
3080
|
+
const renderErrorContent = (error) => {
|
|
3081
|
+
if (error?.errorContentType === 'Image' && error?.image) {
|
|
3082
|
+
return jsx(Img, { className: "mb-7", image: error.image });
|
|
3083
|
+
}
|
|
3084
|
+
if (error?.errorContentType === 'Code' && error.code) {
|
|
3085
|
+
return jsx("div", { className: "text-title-extra gradient-color-text", children: error.code });
|
|
3086
|
+
}
|
|
3087
|
+
return null;
|
|
3088
|
+
};
|
|
3089
|
+
const ErrorBlock = JSX(({ context, className = '', title, subtitle, error, button }) => {
|
|
3090
|
+
const { useRouter, handlerDecorator } = context;
|
|
3091
|
+
const router = useRouter();
|
|
3092
|
+
return (jsxs("section", { className: `flex flex-col justify-center items-center ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center mb-7", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? jsx("div", { className: "text-xl-light text-left mb-7", children: subtitle }) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
|
|
3093
|
+
});
|
|
3094
|
+
|
|
3104
3095
|
const Blocks = {
|
|
3105
3096
|
Accordion,
|
|
3106
3097
|
BenefitsBlock,
|
|
@@ -3135,6 +3126,8 @@
|
|
|
3135
3126
|
BonusBenefitsBlock,
|
|
3136
3127
|
SafeDepositRental,
|
|
3137
3128
|
Tabs,
|
|
3129
|
+
ErrorBlock,
|
|
3130
|
+
OfficeServicesBlock,
|
|
3138
3131
|
};
|
|
3139
3132
|
|
|
3140
3133
|
const api = LikeAPI();
|