@redneckz/wildless-cms-uni-blocks 0.12.14 → 0.13.0
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.12.js +19 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +252 -231
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/Calculator.mobile.d.ts +5 -0
- package/bundle/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/bundle/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/bundle/components/Calculator/renderRate.d.ts +9 -0
- package/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/bundle/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
- package/bundle/components/Tabs/renderTabs.d.ts +12 -0
- package/bundle/hooks/useForm.d.ts +1 -0
- package/bundle/icons/IconName.d.ts +3 -3
- package/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/bundle/ui-kit/ListControlProps.d.ts +4 -0
- package/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/bundle/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/bundle/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/bundle/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/bundle/ui-kit/TabsControl/renderTab.d.ts +4 -0
- package/bundle/utils/BoolComparator.d.ts +11 -0
- package/cosmos-static/icons/ArrowDownSolidIcon.svg +1 -1
- package/cosmos-static/icons/ArrowUpSolidIcon.svg +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/Calculator.mobile.d.ts +5 -0
- package/dist/components/Calculator/Calculator.mobile.js +33 -0
- package/dist/components/Calculator/Calculator.mobile.js.map +1 -0
- package/dist/components/Calculator/CalculatorValueBlock.js +2 -1
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/dist/components/Calculator/CreditCalculatorForm.js +18 -11
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/dist/components/Calculator/RefinancingCalculatorForm.js +1 -0
- package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/dist/components/Calculator/renderDaysInput.js +1 -1
- package/dist/components/Calculator/renderDaysInput.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.js +1 -1
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/renderPaymentType.js +1 -0
- package/dist/components/Calculator/renderPaymentType.js.map +1 -1
- package/dist/components/Calculator/renderRate.d.ts +9 -0
- package/dist/components/Calculator/renderRate.js +16 -0
- package/dist/components/Calculator/renderRate.js.map +1 -0
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +6 -7
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +1 -1
- package/dist/components/Header/HeaderTop.js +9 -6
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/dist/components/MortgageFiltration/HotFilterRecord.js +5 -0
- package/dist/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
- package/dist/components/MortgageFiltration/MortgageFiltration.js +24 -4
- package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/dist/components/RollupItem/RollupItem.js +1 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/renderRoundedIcon.mobile.js +1 -1
- package/dist/components/RollupItem/renderRoundedIcon.mobile.js.map +1 -1
- package/dist/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
- package/dist/components/RollupItem/rollupIconVersion.mobile.js +1 -1
- package/dist/components/RollupItem/rollupIconVersion.mobile.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +19 -24
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/renderTabs.d.ts +12 -0
- package/dist/components/Tabs/renderTabs.js +19 -0
- package/dist/components/Tabs/renderTabs.js.map +1 -0
- package/dist/hooks/useForm.d.ts +1 -0
- package/dist/hooks/useForm.js +5 -0
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/icons/IconName.d.ts +3 -3
- package/dist/icons/IconName.js +3 -3
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
- package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/dist/ui-kit/ListControlProps.d.ts +4 -0
- package/dist/ui-kit/ListControlProps.js +2 -0
- package/dist/ui-kit/ListControlProps.js.map +1 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +17 -0
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
- package/dist/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/dist/ui-kit/TabsControl/TabItem.js +38 -0
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -0
- package/dist/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/dist/ui-kit/TabsControl/TabsControl.js +8 -0
- package/dist/ui-kit/TabsControl/TabsControl.js.map +1 -0
- package/dist/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/dist/ui-kit/TabsControl/TabsControlProps.js +2 -0
- package/dist/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
- package/dist/ui-kit/TabsControl/renderTab.d.ts +4 -0
- package/dist/ui-kit/TabsControl/renderTab.js +7 -0
- package/dist/ui-kit/TabsControl/renderTab.js.map +1 -0
- package/dist/utils/BoolComparator.d.ts +11 -0
- package/dist/utils/BoolComparator.js +19 -0
- package/dist/utils/BoolComparator.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/Calculator.fixture.mobile.d.ts +8 -0
- package/lib/components/Calculator/Calculator.mobile.d.ts +5 -0
- package/lib/components/Calculator/Calculator.mobile.js +31 -0
- package/lib/components/Calculator/Calculator.mobile.js.map +1 -0
- package/lib/components/Calculator/CalculatorValueBlock.js +2 -1
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/lib/components/Calculator/CreditCalculatorForm.js +18 -11
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +13 -11
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/lib/components/Calculator/RefinancingCalculatorForm.js +1 -0
- package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -2
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/lib/components/Calculator/renderDaysInput.d.ts +0 -1
- package/lib/components/Calculator/renderDaysInput.js +1 -1
- package/lib/components/Calculator/renderDaysInput.js.map +1 -1
- package/lib/components/Calculator/renderFootnote.d.ts +0 -1
- package/lib/components/Calculator/renderInterestPayment.d.ts +0 -1
- package/lib/components/Calculator/renderMonthsInput.d.ts +0 -1
- package/lib/components/Calculator/renderMonthsInput.js +1 -1
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/renderPaymentType.d.ts +0 -1
- package/lib/components/Calculator/renderPaymentType.js +1 -0
- package/lib/components/Calculator/renderPaymentType.js.map +1 -1
- package/lib/components/Calculator/renderRate.d.ts +8 -0
- package/lib/components/Calculator/renderRate.js +13 -0
- package/lib/components/Calculator/renderRate.js.map +1 -0
- package/lib/components/Calculator/renderRegistrationType.d.ts +0 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +7 -8
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +1 -1
- package/lib/components/Header/HeaderTop.js +9 -6
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/lib/components/MortgageFiltration/HotFilterRecord.js +3 -0
- package/lib/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
- package/lib/components/MortgageFiltration/MortgageFiltration.js +24 -4
- package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/lib/components/RollupItem/RollupItem.js +1 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/renderRoundedIcon.mobile.js +1 -1
- package/lib/components/RollupItem/renderRoundedIcon.mobile.js.map +1 -1
- package/lib/components/RollupItem/rollupIconVersion.mobile.d.ts +1 -1
- package/lib/components/RollupItem/rollupIconVersion.mobile.js +1 -1
- package/lib/components/RollupItem/rollupIconVersion.mobile.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +20 -25
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/renderTabs.d.ts +11 -0
- package/lib/components/Tabs/renderTabs.js +16 -0
- package/lib/components/Tabs/renderTabs.js.map +1 -0
- package/lib/hooks/useForm.d.ts +1 -0
- package/lib/hooks/useForm.js +5 -0
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/icons/IconName.d.ts +3 -3
- package/lib/icons/IconName.js +3 -3
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +5 -3
- package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/lib/ui-kit/ListControlProps.d.ts +4 -0
- package/lib/ui-kit/ListControlProps.js +2 -0
- package/lib/ui-kit/ListControlProps.js.map +1 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -0
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
- package/lib/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/lib/ui-kit/TabsControl/TabItem.js +36 -0
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -0
- package/lib/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/lib/ui-kit/TabsControl/TabsControl.fixture.d.ts +8 -0
- package/lib/ui-kit/TabsControl/TabsControl.js +6 -0
- package/lib/ui-kit/TabsControl/TabsControl.js.map +1 -0
- package/lib/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/lib/ui-kit/TabsControl/TabsControlProps.js +2 -0
- package/lib/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
- package/lib/ui-kit/TabsControl/renderTab.d.ts +3 -0
- package/lib/ui-kit/TabsControl/renderTab.js +4 -0
- package/lib/ui-kit/TabsControl/renderTab.js.map +1 -0
- package/lib/utils/BoolComparator.d.ts +11 -0
- package/lib/utils/BoolComparator.js +12 -0
- package/lib/utils/BoolComparator.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +898 -205
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/mobile/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/bundle/components/Calculator/renderRate.d.ts +9 -0
- package/mobile/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/mobile/bundle/components/RollupItem/rollupIconVersion.d.ts +1 -1
- package/mobile/bundle/components/Tabs/renderTabs.d.ts +12 -0
- package/mobile/bundle/hooks/useForm.d.ts +1 -0
- package/mobile/bundle/icons/IconName.d.ts +3 -3
- package/mobile/bundle/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/bundle/ui-kit/ListControlProps.d.ts +4 -0
- package/mobile/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/mobile/bundle/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/mobile/bundle/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/mobile/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/mobile/bundle/ui-kit/TabsControl/renderTab.d.ts +4 -0
- package/mobile/bundle/utils/BoolComparator.d.ts +11 -0
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/Calculator.js +27 -49
- package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +2 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +18 -11
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -11
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +1 -0
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/dist/components/Calculator/renderDaysInput.js +1 -1
- package/mobile/dist/components/Calculator/renderDaysInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.js +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/renderPaymentType.js +1 -0
- package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRate.d.ts +9 -0
- package/mobile/dist/components/Calculator/renderRate.js +16 -0
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -0
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +6 -7
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +1 -1
- package/mobile/dist/components/Header/HeaderTop.js +9 -6
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js +5 -0
- package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +24 -4
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/mobile/dist/components/RollupItem/RollupItem.js +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/RollupItem/renderRoundedIcon.js +1 -1
- package/mobile/dist/components/RollupItem/renderRoundedIcon.js.map +1 -1
- package/mobile/dist/components/RollupItem/rollupIconVersion.d.ts +1 -1
- package/mobile/dist/components/RollupItem/rollupIconVersion.js +1 -1
- package/mobile/dist/components/RollupItem/rollupIconVersion.js.map +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +19 -24
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTabs.d.ts +12 -0
- package/mobile/dist/components/Tabs/renderTabs.js +19 -0
- package/mobile/dist/components/Tabs/renderTabs.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +1 -0
- package/mobile/dist/hooks/useForm.js +5 -0
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +3 -3
- package/mobile/dist/icons/IconName.js +3 -3
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- 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/BenefitsList/DefaultBenefitsList.js +5 -3
- package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/dist/ui-kit/ListControlProps.d.ts +4 -0
- package/mobile/dist/ui-kit/ListControlProps.js +2 -0
- package/mobile/dist/ui-kit/ListControlProps.js.map +1 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +17 -0
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
- package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/mobile/dist/ui-kit/TabsControl/TabItem.js +38 -0
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControl.js +8 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControl.js.map +1 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControlProps.js +2 -0
- package/mobile/dist/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
- package/mobile/dist/ui-kit/TabsControl/renderTab.d.ts +4 -0
- package/mobile/dist/ui-kit/TabsControl/renderTab.js +7 -0
- package/mobile/dist/ui-kit/TabsControl/renderTab.js.map +1 -0
- package/mobile/dist/utils/BoolComparator.d.ts +11 -0
- package/mobile/dist/utils/BoolComparator.js +19 -0
- package/mobile/dist/utils/BoolComparator.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +19 -13
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/Calculator.js +28 -50
- package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +2 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +1 -0
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +18 -11
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +13 -11
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -1
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +1 -0
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +2 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/lib/components/Calculator/renderDaysInput.js +1 -1
- package/mobile/lib/components/Calculator/renderDaysInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.js +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/renderPaymentType.js +1 -0
- package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRate.d.ts +9 -0
- package/mobile/lib/components/Calculator/renderRate.js +13 -0
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -0
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +7 -8
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +1 -1
- package/mobile/lib/components/Header/HeaderTop.js +9 -6
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/HotFilterRecord.d.ts +11 -0
- package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js +3 -0
- package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js.map +1 -0
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +24 -4
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +12 -0
- package/mobile/lib/components/RollupItem/RollupItem.js +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/RollupItem/renderRoundedIcon.js +1 -1
- package/mobile/lib/components/RollupItem/renderRoundedIcon.js.map +1 -1
- package/mobile/lib/components/RollupItem/rollupIconVersion.d.ts +1 -1
- package/mobile/lib/components/RollupItem/rollupIconVersion.js +1 -1
- package/mobile/lib/components/RollupItem/rollupIconVersion.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +20 -25
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTabs.d.ts +12 -0
- package/mobile/lib/components/Tabs/renderTabs.js +16 -0
- package/mobile/lib/components/Tabs/renderTabs.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +1 -0
- package/mobile/lib/hooks/useForm.js +5 -0
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +3 -3
- package/mobile/lib/icons/IconName.js +3 -3
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +2 -2
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +2 -2
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- 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/BenefitsList/DefaultBenefitsList.js +5 -3
- package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/InputRangeProps.d.ts +1 -0
- package/mobile/lib/ui-kit/ListControlProps.d.ts +4 -0
- package/mobile/lib/ui-kit/ListControlProps.js +2 -0
- package/mobile/lib/ui-kit/ListControlProps.js.map +1 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +1 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.d.ts +2 -0
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -0
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -0
- package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +11 -0
- package/mobile/lib/ui-kit/TabsControl/TabItem.js +36 -0
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControl.d.ts +2 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControl.js +6 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControl.js.map +1 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControlProps.d.ts +6 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControlProps.js +2 -0
- package/mobile/lib/ui-kit/TabsControl/TabsControlProps.js.map +1 -0
- package/mobile/lib/ui-kit/TabsControl/renderTab.d.ts +4 -0
- package/mobile/lib/ui-kit/TabsControl/renderTab.js +4 -0
- package/mobile/lib/ui-kit/TabsControl/renderTab.js.map +1 -0
- package/mobile/lib/utils/BoolComparator.d.ts +11 -0
- package/mobile/lib/utils/BoolComparator.js +12 -0
- package/mobile/lib/utils/BoolComparator.js.map +1 -0
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +35 -40
- package/mobile/src/components/Calculator/Calculator.tsx +69 -118
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +3 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +29 -27
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +23 -16
- package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +5 -2
- package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +4 -0
- package/mobile/src/components/Calculator/renderDaysInput.tsx +0 -1
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +0 -1
- package/mobile/src/components/Calculator/renderPaymentType.tsx +1 -0
- package/mobile/src/components/Calculator/renderRate.tsx +37 -0
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -33
- package/mobile/src/components/Header/Header.tsx +1 -1
- package/mobile/src/components/Header/HeaderTop.tsx +27 -14
- package/mobile/src/components/MobileAppTile/MobileAppTile.tsx +2 -1
- package/mobile/src/components/MortgageFiltration/HotFilterRecord.ts +14 -0
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.example.json +54 -4
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +51 -4
- package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -0
- package/mobile/src/components/RollupItem/RollupItem.tsx +1 -1
- package/mobile/src/components/RollupItem/renderRoundedIcon.tsx +1 -1
- package/mobile/src/components/RollupItem/rollupIconVersion.tsx +1 -1
- package/mobile/src/components/Tabs/Tabs.tsx +42 -53
- package/mobile/src/components/Tabs/renderTabs.tsx +37 -0
- package/mobile/src/hooks/useForm.ts +7 -0
- package/mobile/src/icons/ArrowDownSolidIcon.svg +1 -1
- package/mobile/src/icons/ArrowUpSolidIcon.svg +1 -1
- package/mobile/src/icons/IconName.ts +4 -4
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +2 -2
- package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +4 -4
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/mobile/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +8 -3
- package/mobile/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/mobile/src/ui-kit/ListControlProps.ts +5 -0
- package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +10 -2
- package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +41 -0
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +81 -0
- package/mobile/src/ui-kit/TabsControl/TabsControl.tsx +12 -0
- package/mobile/src/ui-kit/TabsControl/TabsControlProps.ts +7 -0
- package/mobile/src/ui-kit/TabsControl/renderTab.tsx +15 -0
- package/mobile/src/utils/BoolComparator.ts +47 -0
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +35 -40
- package/src/components/Calculator/Calculator.fixture.mobile.tsx +114 -0
- package/src/components/Calculator/Calculator.mobile.tsx +85 -0
- package/src/components/Calculator/CalculatorValueBlock.tsx +3 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +29 -27
- package/src/components/Calculator/DepositCalculatorForm.tsx +23 -16
- package/src/components/Calculator/RefinancingCalculatorForm.tsx +5 -2
- package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +4 -0
- package/src/components/Calculator/renderDaysInput.tsx +0 -1
- package/src/components/Calculator/renderMonthsInput.tsx +0 -1
- package/src/components/Calculator/renderPaymentType.tsx +1 -0
- package/src/components/Calculator/renderRate.tsx +37 -0
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -33
- package/src/components/Header/Header.mobile.tsx +1 -1
- package/src/components/Header/HeaderTop.tsx +27 -14
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -3
- package/src/components/MobileAppTile/MobileAppTile.tsx +2 -1
- package/src/components/MortgageFiltration/HotFilterRecord.ts +14 -0
- package/src/components/MortgageFiltration/MortgageFiltration.example.json +54 -4
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +51 -14
- package/src/components/MortgageFiltration/MortgageFiltration.tsx +51 -4
- package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -0
- package/src/components/RollupItem/RollupItem.tsx +1 -1
- package/src/components/RollupItem/renderRoundedIcon.mobile.tsx +1 -1
- package/src/components/RollupItem/rollupIconVersion.mobile.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +42 -53
- package/src/components/Tabs/renderTabs.tsx +37 -0
- package/src/hooks/useForm.ts +7 -0
- package/src/icons/ArrowDownSolidIcon.svg +1 -1
- package/src/icons/ArrowUpSolidIcon.svg +1 -1
- package/src/icons/IconName.ts +4 -4
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +2 -2
- package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +4 -4
- package/src/ui-kit/BaseTile/BaseTile.tsx +1 -1
- package/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +8 -3
- package/src/ui-kit/InputRange/InputRangeProps.ts +1 -0
- package/src/ui-kit/ListControlProps.ts +5 -0
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +10 -2
- package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +41 -0
- package/src/ui-kit/TabsControl/TabItem.tsx +81 -0
- package/src/ui-kit/TabsControl/TabsControl.fixture.tsx +103 -0
- package/src/ui-kit/TabsControl/TabsControl.tsx +12 -0
- package/src/ui-kit/TabsControl/TabsControlProps.ts +7 -0
- package/src/ui-kit/TabsControl/renderTab.tsx +15 -0
- package/src/utils/BoolComparator.ts +47 -0
- package/bundle/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/bundle/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
- package/bundle/components/Tabs/CenteredTabs.d.ts +0 -7
- package/bundle/components/Tabs/LinkTab.d.ts +0 -9
- package/bundle/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/bundle/components/Tabs/renderGroupTab.d.ts +0 -4
- package/bundle/components/Tabs/renderTab.d.ts +0 -11
- package/bundle/components/Tabs/tabItemClasses.d.ts +0 -11
- package/bundle/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/dist/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/dist/components/CarouselProgramsCard/programCardStyles.js +0 -5
- package/dist/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
- package/dist/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
- package/dist/components/CarouselProgramsCard/programCardStyles.mobile.js +0 -5
- package/dist/components/CarouselProgramsCard/programCardStyles.mobile.js.map +0 -1
- package/dist/components/Tabs/CenteredTabs.d.ts +0 -7
- package/dist/components/Tabs/CenteredTabs.js +0 -7
- package/dist/components/Tabs/CenteredTabs.js.map +0 -1
- package/dist/components/Tabs/LinkTab.d.ts +0 -9
- package/dist/components/Tabs/LinkTab.js +0 -19
- package/dist/components/Tabs/LinkTab.js.map +0 -1
- package/dist/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/dist/components/Tabs/ScrollableTabs.js +0 -17
- package/dist/components/Tabs/ScrollableTabs.js.map +0 -1
- package/dist/components/Tabs/renderGroupTab.d.ts +0 -4
- package/dist/components/Tabs/renderGroupTab.js +0 -20
- package/dist/components/Tabs/renderGroupTab.js.map +0 -1
- package/dist/components/Tabs/renderTab.d.ts +0 -11
- package/dist/components/Tabs/renderTab.js +0 -24
- package/dist/components/Tabs/renderTab.js.map +0 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +0 -11
- package/dist/components/Tabs/tabItemClasses.js +0 -48
- package/dist/components/Tabs/tabItemClasses.js.map +0 -1
- package/dist/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/dist/ui-kit/BaseTile/getTileRightPadding.js +0 -17
- package/dist/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
- package/lib/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/lib/components/CarouselProgramsCard/programCardStyles.js +0 -3
- package/lib/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
- package/lib/components/CarouselProgramsCard/programCardStyles.mobile.d.ts +0 -2
- package/lib/components/CarouselProgramsCard/programCardStyles.mobile.js +0 -3
- package/lib/components/CarouselProgramsCard/programCardStyles.mobile.js.map +0 -1
- package/lib/components/Tabs/CenteredTabs.d.ts +0 -7
- package/lib/components/Tabs/CenteredTabs.js +0 -5
- package/lib/components/Tabs/CenteredTabs.js.map +0 -1
- package/lib/components/Tabs/LinkTab.d.ts +0 -9
- package/lib/components/Tabs/LinkTab.js +0 -17
- package/lib/components/Tabs/LinkTab.js.map +0 -1
- package/lib/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/lib/components/Tabs/ScrollableTabs.js +0 -15
- package/lib/components/Tabs/ScrollableTabs.js.map +0 -1
- package/lib/components/Tabs/renderGroupTab.d.ts +0 -3
- package/lib/components/Tabs/renderGroupTab.js +0 -17
- package/lib/components/Tabs/renderGroupTab.js.map +0 -1
- package/lib/components/Tabs/renderTab.d.ts +0 -10
- package/lib/components/Tabs/renderTab.js +0 -21
- package/lib/components/Tabs/renderTab.js.map +0 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +0 -11
- package/lib/components/Tabs/tabItemClasses.js +0 -45
- package/lib/components/Tabs/tabItemClasses.js.map +0 -1
- package/lib/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/lib/ui-kit/BaseTile/getTileRightPadding.js +0 -14
- package/lib/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
- package/mobile/bundle/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/mobile/bundle/components/Tabs/CenteredTabs.d.ts +0 -7
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +0 -9
- package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +0 -4
- package/mobile/bundle/components/Tabs/renderTab.d.ts +0 -11
- package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +0 -11
- package/mobile/bundle/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/mobile/dist/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/mobile/dist/components/CarouselProgramsCard/programCardStyles.js +0 -5
- package/mobile/dist/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
- package/mobile/dist/components/Tabs/CenteredTabs.d.ts +0 -7
- package/mobile/dist/components/Tabs/CenteredTabs.js +0 -7
- package/mobile/dist/components/Tabs/CenteredTabs.js.map +0 -1
- package/mobile/dist/components/Tabs/LinkTab.d.ts +0 -9
- package/mobile/dist/components/Tabs/LinkTab.js +0 -19
- package/mobile/dist/components/Tabs/LinkTab.js.map +0 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/mobile/dist/components/Tabs/ScrollableTabs.js +0 -17
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +0 -1
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +0 -4
- package/mobile/dist/components/Tabs/renderGroupTab.js +0 -20
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +0 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +0 -11
- package/mobile/dist/components/Tabs/renderTab.js +0 -24
- package/mobile/dist/components/Tabs/renderTab.js.map +0 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +0 -11
- package/mobile/dist/components/Tabs/tabItemClasses.js +0 -48
- package/mobile/dist/components/Tabs/tabItemClasses.js.map +0 -1
- package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.js +0 -17
- package/mobile/dist/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
- package/mobile/lib/components/CarouselProgramsCard/programCardStyles.d.ts +0 -2
- package/mobile/lib/components/CarouselProgramsCard/programCardStyles.js +0 -3
- package/mobile/lib/components/CarouselProgramsCard/programCardStyles.js.map +0 -1
- package/mobile/lib/components/Tabs/CenteredTabs.d.ts +0 -7
- package/mobile/lib/components/Tabs/CenteredTabs.js +0 -5
- package/mobile/lib/components/Tabs/CenteredTabs.js.map +0 -1
- package/mobile/lib/components/Tabs/LinkTab.d.ts +0 -9
- package/mobile/lib/components/Tabs/LinkTab.js +0 -17
- package/mobile/lib/components/Tabs/LinkTab.js.map +0 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +0 -8
- package/mobile/lib/components/Tabs/ScrollableTabs.js +0 -15
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +0 -1
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +0 -4
- package/mobile/lib/components/Tabs/renderGroupTab.js +0 -17
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +0 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +0 -11
- package/mobile/lib/components/Tabs/renderTab.js +0 -21
- package/mobile/lib/components/Tabs/renderTab.js.map +0 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +0 -11
- package/mobile/lib/components/Tabs/tabItemClasses.js +0 -45
- package/mobile/lib/components/Tabs/tabItemClasses.js.map +0 -1
- package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.d.ts +0 -1
- package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.js +0 -14
- package/mobile/lib/ui-kit/BaseTile/getTileRightPadding.js.map +0 -1
- package/mobile/src/components/CarouselProgramsCard/programCardStyles.ts +0 -2
- package/mobile/src/components/Tabs/CenteredTabs.tsx +0 -12
- package/mobile/src/components/Tabs/LinkTab.tsx +0 -47
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +0 -46
- package/mobile/src/components/Tabs/renderGroupTab.tsx +0 -53
- package/mobile/src/components/Tabs/renderTab.tsx +0 -35
- package/mobile/src/components/Tabs/tabItemClasses.ts +0 -56
- package/mobile/src/ui-kit/BaseTile/getTileRightPadding.ts +0 -12
- package/src/components/CarouselProgramsCard/programCardStyles.mobile.ts +0 -2
- package/src/components/CarouselProgramsCard/programCardStyles.ts +0 -2
- package/src/components/Tabs/CenteredTabs.tsx +0 -12
- package/src/components/Tabs/LinkTab.tsx +0 -47
- package/src/components/Tabs/ScrollableTabs.tsx +0 -46
- package/src/components/Tabs/renderGroupTab.tsx +0 -53
- package/src/components/Tabs/renderTab.tsx +0 -35
- package/src/components/Tabs/tabItemClasses.ts +0 -56
- package/src/ui-kit/BaseTile/getTileRightPadding.ts +0 -12
- /package/cosmos-static/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
- /package/mobile/src/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
- /package/src/icons/{ChevronLeft.svg → ChevronLeftIcon.svg} +0 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -386,6 +386,10 @@
|
|
|
386
386
|
onChange: handlersMap.current[fieldName],
|
|
387
387
|
};
|
|
388
388
|
}, [formState, isDirtyForm, dirtyFieldsMap]);
|
|
389
|
+
const update = useCallback((_) => {
|
|
390
|
+
setFormState(_);
|
|
391
|
+
setDirtyFieldsMap(_);
|
|
392
|
+
}, []);
|
|
389
393
|
const reset = useCallback(() => {
|
|
390
394
|
setFormState(initialState);
|
|
391
395
|
setDirtyForm(false);
|
|
@@ -401,6 +405,7 @@
|
|
|
401
405
|
{
|
|
402
406
|
isDirty: isDirtyForm || Object.values(dirtyFieldsMap).some(Boolean),
|
|
403
407
|
field,
|
|
408
|
+
update,
|
|
404
409
|
reset,
|
|
405
410
|
onSubmit: handleSubmit,
|
|
406
411
|
},
|
|
@@ -1385,7 +1390,8 @@
|
|
|
1385
1390
|
return isVisible ? (jsxs("div", { children: [canDec ? (jsx(ArrowButton, { className: `absolute z-40 ${btnClass[0]} ${className}`, onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (jsx(ArrowButton, { className: `absolute z-40 rotate-180 ${btnClass[1]} ${className}`, onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] })) : null;
|
|
1386
1391
|
}
|
|
1387
1392
|
|
|
1388
|
-
const
|
|
1393
|
+
const calculatorValueBlockStyle = 'flex justify-between md:mb-7 md:flex-col';
|
|
1394
|
+
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style(calculatorValueBlockStyle, className), children: [title ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", toLocalNumberFormat(2)(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
1389
1395
|
|
|
1390
1396
|
const DEFAULT_MIN_SUM$1 = 10000;
|
|
1391
1397
|
const DEFAULT_MAX_SUM$1 = 5000000;
|
|
@@ -1545,28 +1551,6 @@
|
|
|
1545
1551
|
})] }), jsx("div", { children: monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null }), jsxs("div", { className: "w-96", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1546
1552
|
});
|
|
1547
1553
|
|
|
1548
|
-
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
1549
|
-
|
|
1550
|
-
const STEP_DAYS = 1;
|
|
1551
|
-
const renderDaysInput = (props) => (jsx(InputRange, { className: "mt-7", items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
|
|
1552
|
-
const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
|
|
1553
|
-
|
|
1554
|
-
const orientationStyleMap = {
|
|
1555
|
-
horizontal: 'gap-10',
|
|
1556
|
-
vertical: 'flex-col gap-3',
|
|
1557
|
-
};
|
|
1558
|
-
const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
|
|
1559
|
-
|
|
1560
|
-
const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, onChange, }) => (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
|
|
1561
|
-
|
|
1562
|
-
const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
|
|
1563
|
-
...props,
|
|
1564
|
-
items: [
|
|
1565
|
-
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
1566
|
-
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
1567
|
-
],
|
|
1568
|
-
});
|
|
1569
|
-
|
|
1570
1554
|
const defaultDiscriminator = (_) => _;
|
|
1571
1555
|
const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1572
1556
|
const max = maxBy();
|
|
@@ -1657,6 +1641,37 @@
|
|
|
1657
1641
|
}
|
|
1658
1642
|
};
|
|
1659
1643
|
|
|
1644
|
+
const STEP_DAYS = 1;
|
|
1645
|
+
const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
|
|
1646
|
+
const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
|
|
1647
|
+
|
|
1648
|
+
const orientationStyleMap = {
|
|
1649
|
+
horizontal: 'gap-10',
|
|
1650
|
+
vertical: 'flex-col gap-3',
|
|
1651
|
+
};
|
|
1652
|
+
const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
|
|
1653
|
+
|
|
1654
|
+
const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
|
|
1655
|
+
|
|
1656
|
+
const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
|
|
1657
|
+
...props,
|
|
1658
|
+
items: [
|
|
1659
|
+
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
1660
|
+
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
1661
|
+
],
|
|
1662
|
+
});
|
|
1663
|
+
|
|
1664
|
+
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: jsxs(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
1665
|
+
|
|
1666
|
+
const renderDesktopRate = ({ rate, depositeName, isShowDepositeName }) => (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
|
|
1667
|
+
const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
|
|
1668
|
+
const renderRate = (props) => {
|
|
1669
|
+
if (props.isShowUnknownRate) {
|
|
1670
|
+
return jsx(UnknownRate, {});
|
|
1671
|
+
}
|
|
1672
|
+
return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1660
1675
|
const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
|
|
1661
1676
|
const [userInputParams, { field }] = useForm({
|
|
1662
1677
|
moneyValue: BUSINESS_DEFAULT_SUM,
|
|
@@ -1667,8 +1682,8 @@
|
|
|
1667
1682
|
isMonthlyInterestPayment: false,
|
|
1668
1683
|
});
|
|
1669
1684
|
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
1670
|
-
const { income, finalSum, rate,
|
|
1671
|
-
return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-2/5", children: [renderWantedSumInput({
|
|
1685
|
+
const { income, finalSum, rate, isShowUnknownRate, depositeName } = calculatorParams;
|
|
1686
|
+
return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex flex-col justify-between sm:flex-row", children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg", children: [renderWantedSumInput({
|
|
1672
1687
|
title: 'Сумма, ₽',
|
|
1673
1688
|
min: calculatorParams.minSum,
|
|
1674
1689
|
max: calculatorParams.maxSum,
|
|
@@ -1680,26 +1695,25 @@
|
|
|
1680
1695
|
max: calculatorParams.maxDays,
|
|
1681
1696
|
...field('daysValue'),
|
|
1682
1697
|
value: calculatorParams.daysValue,
|
|
1683
|
-
}), jsxs("div", { className: "
|
|
1698
|
+
}), jsxs("div", { className: "flex flex-col gap-xl justify-between sm:flex-row sm:gap-0", children: [renderBusinessDepositParamsForm(calculatorParams, field), renderInterestPayment({
|
|
1684
1699
|
title: 'Выплата процентов',
|
|
1685
1700
|
orientation: 'vertical',
|
|
1686
1701
|
...field('isMonthlyInterestPayment'),
|
|
1687
|
-
|
|
1702
|
+
radioGroupClassName: 'sm:flex-col',
|
|
1703
|
+
})] })] }), jsx("div", { className: "border-b border-main-divider my-xl sm:hidden" }), renderRate({
|
|
1704
|
+
rate,
|
|
1705
|
+
depositeName,
|
|
1706
|
+
isShowDepositeName,
|
|
1707
|
+
isShowUnknownRate,
|
|
1708
|
+
}), jsxs("div", { className: "flex flex-col gap-y-xl mt-3xl sm:gap-0 sm:w-96 sm:mt-0", children: [renderDepositResults(finalSum, income), renderButtonsSection(buttons, { isVertical: true }), jsx("div", { className: "sm:mt-2xl", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-lg", children: renderFootnote(bottomFootnote) })] }));
|
|
1688
1709
|
});
|
|
1689
|
-
const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, {
|
|
1710
|
+
const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { className: "flex flex-col gap-y-xl sm:gap-y-s", children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { text: "\u0418\u041F / \u043C\u0430\u043B\u043E\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
|
|
1711
|
+
const renderDepositResults = (finalSum, income) => (jsxs("div", { className: "flex flex-col gap-2xl sm:gap-0", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })] }));
|
|
1690
1712
|
|
|
1691
1713
|
const STEP_MONTHS = 1;
|
|
1692
|
-
const renderMonthsInput = ({ min = 0, max = 0, availableMonths, ...rest }) => (jsx(InputRange, {
|
|
1714
|
+
const renderMonthsInput = ({ min = 0, max = 0, availableMonths, ...rest }) => (jsx(InputRange, { items: [`От ${monthText(min)}`, `До ${monthText(max)}`], step: STEP_MONTHS, ...(availableMonths?.length ? { list: availableMonths } : { min, max }), ...rest }));
|
|
1693
1715
|
const monthText = (month) => `${month} ${Number(month) % 10 === 1 ? 'месяца' : 'месяцев'}`;
|
|
1694
1716
|
|
|
1695
|
-
const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
|
|
1696
|
-
...props,
|
|
1697
|
-
items: [
|
|
1698
|
-
{ id: 'annuity', text: 'Аннуитетный' },
|
|
1699
|
-
{ id: 'differential', text: 'Дифференцированный' },
|
|
1700
|
-
],
|
|
1701
|
-
});
|
|
1702
|
-
|
|
1703
1717
|
const checkCreditSourceBookRowCommonParams = (props) => checkRowParam$1({
|
|
1704
1718
|
...props,
|
|
1705
1719
|
fieldKey: 'isSalaryClient',
|
|
@@ -1798,7 +1812,16 @@
|
|
|
1798
1812
|
}), [userInputParams, data]);
|
|
1799
1813
|
};
|
|
1800
1814
|
|
|
1801
|
-
const
|
|
1815
|
+
const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
|
|
1816
|
+
...props,
|
|
1817
|
+
radioGroupClassName: 'sm:flex-col',
|
|
1818
|
+
items: [
|
|
1819
|
+
{ id: 'annuity', text: 'Аннуитетный' },
|
|
1820
|
+
{ id: 'differential', text: 'Дифференцированный' },
|
|
1821
|
+
],
|
|
1822
|
+
});
|
|
1823
|
+
|
|
1824
|
+
const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings, isMobile }) => {
|
|
1802
1825
|
const [userInputParams, { field }] = useForm({
|
|
1803
1826
|
isAnnuity: true,
|
|
1804
1827
|
isInsurance: true,
|
|
@@ -1809,7 +1832,12 @@
|
|
|
1809
1832
|
monthsValue: DEFAULT_MONTHS,
|
|
1810
1833
|
});
|
|
1811
1834
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
1812
|
-
|
|
1835
|
+
const paymentTypeElement = renderPaymentType({
|
|
1836
|
+
title: isMobile ? 'Тип платежа' : '',
|
|
1837
|
+
orientation: 'vertical',
|
|
1838
|
+
...field('isAnnuity'),
|
|
1839
|
+
});
|
|
1840
|
+
return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row', className), children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 sm:gap-y-lg", children: [renderWantedSumInput({
|
|
1813
1841
|
title: 'Сумма кредита, ₽',
|
|
1814
1842
|
step: 500,
|
|
1815
1843
|
min: calculatorParams.minSum,
|
|
@@ -1822,17 +1850,11 @@
|
|
|
1822
1850
|
max: calculatorParams.maxMonths,
|
|
1823
1851
|
...field('monthsValue'),
|
|
1824
1852
|
value: calculatorParams.monthsValue,
|
|
1825
|
-
}),
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
|
|
1830
|
-
...props,
|
|
1831
|
-
items: [
|
|
1832
|
-
{ id: 'remote', text: 'Дистанционно' },
|
|
1833
|
-
{ id: 'office', text: 'Офис Банка' },
|
|
1834
|
-
],
|
|
1853
|
+
}), renderCreditParamsForm$1({ ...calculatorParams, ...paramsViewSettings }, field), jsx("div", { className: "mt-s sm:hidden", children: paymentTypeElement })] }), jsx("div", { className: "border-b border-main-divider mt-xl mb-3xl sm:hidden" }), renderRate({
|
|
1854
|
+
rate: calculatorParams.rate,
|
|
1855
|
+
}), jsxs("div", { className: "mt-6xl flex flex-col gap-lg sm:w-96 sm:mt-0 sm:gap-0", children: [jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { className: 'mt-2xl', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1835
1856
|
});
|
|
1857
|
+
const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "gap-xl flex flex-col sm:gap-s", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { 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", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null] }));
|
|
1836
1858
|
|
|
1837
1859
|
const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
|
|
1838
1860
|
|
|
@@ -1888,6 +1910,14 @@
|
|
|
1888
1910
|
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
1889
1911
|
const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
|
|
1890
1912
|
|
|
1913
|
+
const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
|
|
1914
|
+
...props,
|
|
1915
|
+
items: [
|
|
1916
|
+
{ id: 'remote', text: 'Дистанционно' },
|
|
1917
|
+
{ id: 'office', text: 'Офис Банка' },
|
|
1918
|
+
],
|
|
1919
|
+
});
|
|
1920
|
+
|
|
1891
1921
|
const DepositCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
1892
1922
|
const [userInputParams, { field }] = useForm({
|
|
1893
1923
|
moneyValue: DEPOSIT_DEFAULT_SUM,
|
|
@@ -1896,12 +1926,12 @@
|
|
|
1896
1926
|
isRemoteRegistration: false,
|
|
1897
1927
|
});
|
|
1898
1928
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
1899
|
-
const { defaultMonth, income, finalSum
|
|
1929
|
+
const { defaultMonth, rate, income, finalSum } = calculatorParams;
|
|
1900
1930
|
const { onChange: setMonthsValue } = field('monthsValue');
|
|
1901
1931
|
useEffect(() => {
|
|
1902
1932
|
setMonthsValue && setMonthsValue(defaultMonth);
|
|
1903
1933
|
}, [defaultMonth]);
|
|
1904
|
-
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-2/5", children: [renderWantedSumInput({
|
|
1934
|
+
return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row', className), children: [jsxs("div", { className: "flex flex-col gap-lg sm:w-2/5", children: [renderWantedSumInput({
|
|
1905
1935
|
title: 'Сумма, ₽',
|
|
1906
1936
|
min: calculatorParams.minSum,
|
|
1907
1937
|
max: calculatorParams.maxSum,
|
|
@@ -1914,7 +1944,9 @@
|
|
|
1914
1944
|
availableMonths: calculatorParams.availableMonths,
|
|
1915
1945
|
...field('monthsValue'),
|
|
1916
1946
|
value: calculatorParams.monthsValue,
|
|
1917
|
-
}), jsx("div", { className: "
|
|
1947
|
+
}), jsx("div", { className: "flex flex-col gap-y-2xl", children: renderDepositParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) })] }), jsx("div", { className: "border-b border-main-divider mt-lg mb-2xl md:hidden" }), renderRate({
|
|
1948
|
+
rate,
|
|
1949
|
+
}), jsxs("div", { className: "mt-2xl flex flex-col gap-y-2xl sm:w-96 sm:gap-y-0 sm:mt-0", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1918
1950
|
});
|
|
1919
1951
|
const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowMonthlyInterestPayment
|
|
1920
1952
|
? renderInterestPayment({
|
|
@@ -2045,6 +2077,7 @@
|
|
|
2045
2077
|
max: calculatorParams.maxMonths,
|
|
2046
2078
|
...field('monthsValue'),
|
|
2047
2079
|
value: calculatorParams.monthsValue,
|
|
2080
|
+
className: 'mt-2xl',
|
|
2048
2081
|
}), jsx("div", { className: style('mt-7', calculatorParams.isExtraMoney ? 'mb-3' : ''), children: renderCreditParamsForm({ ...calculatorParams, ...paramsViewSettings }, field) }), calculatorParams.isExtraMoney
|
|
2049
2082
|
? renderWantedSumInput({
|
|
2050
2083
|
title: 'Дополнительная сумма, ₽ ',
|
|
@@ -2453,7 +2486,7 @@
|
|
|
2453
2486
|
center: 'self-center',
|
|
2454
2487
|
end: 'self-end',
|
|
2455
2488
|
};
|
|
2456
|
-
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 })] })] })));
|
|
2489
|
+
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-around @xl: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 })] })] })));
|
|
2457
2490
|
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
2458
2491
|
|
|
2459
2492
|
const getItemListFontSize = (colValue) => (colValue === 1 ? 'text-h6' : 'text-l');
|
|
@@ -2519,11 +2552,60 @@
|
|
|
2519
2552
|
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;
|
|
2520
2553
|
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;
|
|
2521
2554
|
|
|
2522
|
-
const
|
|
2523
|
-
|
|
2555
|
+
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
2556
|
+
|
|
2557
|
+
const avg = (items = []) => (items?.length ? sum(items) / items.length : 0);
|
|
2558
|
+
|
|
2559
|
+
const deviation = (items) => items?.length ? Math.sqrt(Math.abs(avg(items.map((_) => _ ** 2)) - avg(items) ** 2)) : 0;
|
|
2560
|
+
|
|
2561
|
+
const renderBenefitIcon = (icon, benefitsVersion = 'normal') => icon ? (jsx("div", { className: style('w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon', benefitsVersion === 'normal'
|
|
2562
|
+
? 'bg-secondary-light text-primary-main'
|
|
2563
|
+
: 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
|
|
2564
|
+
|
|
2565
|
+
const RichText = JSX((props) => {
|
|
2566
|
+
const { __html = '', richVersion = '' } = props;
|
|
2567
|
+
return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
|
|
2568
|
+
});
|
|
2569
|
+
|
|
2570
|
+
const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
|
|
2571
|
+
|
|
2572
|
+
const renderBenefitLabel = (label, i) => label ? (jsx(Text, { color: "text-primary-text group-data-secondary:text-white", size: "text-h6", children: label }, `label-${i}`)) : null;
|
|
2573
|
+
|
|
2574
|
+
const renderBenefitText = (_, i) => _.type === 'rte' && '__html' in _ && _.__html ? (jsx(RichText, { ..._ }, `rte-${i}`)) : ([
|
|
2575
|
+
'label' in _ ? renderBenefitLabel(_.label, i) : null,
|
|
2576
|
+
'description' in _ ? renderBenefitDescription(_.description, i) : null,
|
|
2577
|
+
]);
|
|
2578
|
+
|
|
2579
|
+
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(_) })] })));
|
|
2580
|
+
|
|
2581
|
+
const MAX_BENEFITS_LEN_DEVIATION = 16;
|
|
2582
|
+
const benefitLength = (_) => _.type === 'rte'
|
|
2583
|
+
? _?.__html?.length || 0
|
|
2584
|
+
: Math.max(_?.label?.length || 0, _?.description?.length || 0);
|
|
2585
|
+
const isDistortedBenefits = (benefits) => deviation(benefits.map(benefitLength)) > MAX_BENEFITS_LEN_DEVIATION;
|
|
2586
|
+
const hasIcon = (_) => _ && 'icon' in _ && _.icon && (_.icon.icon || _.icon.src);
|
|
2587
|
+
const isTextualBenefits = (benefits) => !benefits.some(hasIcon);
|
|
2588
|
+
const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s', isDistortedBenefits(benefits) || isTextualBenefits(benefits) ? 'flex-col' : 'flex-wrap', className), children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
|
|
2589
|
+
|
|
2590
|
+
const TabularBenefitsList = JSX(({ className, benefits }) => benefits?.length ? (jsx("div", { className: style('grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs', className), children: benefits.flatMap(renderBenefitText) })) : null);
|
|
2591
|
+
|
|
2592
|
+
const BenefitsList = JSX(({ isTabularBenefits, ...rest }) => isTabularBenefits ? jsx(TabularBenefitsList, { ...rest }) : jsx(DefaultBenefitsList, { ...rest }));
|
|
2593
|
+
|
|
2594
|
+
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
2595
|
+
const renderTag = (tag, key) => (jsx("div", { className: "py-2 px-2.5 border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
|
|
2596
|
+
|
|
2597
|
+
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, }) => {
|
|
2598
|
+
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2599
|
+
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isPadding: false }));
|
|
2600
|
+
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] }) }));
|
|
2601
|
+
});
|
|
2602
|
+
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2524
2603
|
|
|
2525
|
-
const CarouselProgramsCard = JSX(({ className, title, icon, list
|
|
2526
|
-
|
|
2604
|
+
const CarouselProgramsCard = JSX(({ className, title, icon, list, href, target, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-3xl", ...rest, children: jsx(LinkWrapper, { className: "flex items-center h-full", href: href, target: target, children: jsx(BaseProductTile, { title: title, headlineVersion: "XS", image: icon, imageOptions: { directionRight: false, imageAlign: 'center' }, benefits: list?.map((_) => ({
|
|
2605
|
+
type: 'default',
|
|
2606
|
+
label: _.title,
|
|
2607
|
+
description: _.description,
|
|
2608
|
+
})) }) }) })));
|
|
2527
2609
|
|
|
2528
2610
|
const buttonSizeStyles = {
|
|
2529
2611
|
default: 'w-14 h-14',
|
|
@@ -2583,11 +2665,6 @@
|
|
|
2583
2665
|
return (jsx(BlockWrapper, { className: style('relative min-h-[218px] group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsx(BaseTile, { className: "h-full", defaultPadding: "p-m", padding: padding, title: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "S", isPadding: false, align: align })) : null, backImage: icon?.icon || icon?.src ? jsx(Img, { image: icon }) : null, buttons: socialMedia.length ? jsx(SocialMedia, { media: socialMedia }) : null, children: items.length ? jsx(List, { items: items, listItemSize: "S" }) : null }) }) }));
|
|
2584
2666
|
});
|
|
2585
2667
|
|
|
2586
|
-
const RichText = JSX((props) => {
|
|
2587
|
-
const { __html = '', richVersion = '' } = props;
|
|
2588
|
-
return (jsx("div", { className: style(richVersion, 'md-container'), dangerouslySetInnerHTML: { __html } }));
|
|
2589
|
-
});
|
|
2590
|
-
|
|
2591
2668
|
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: className, ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
2592
2669
|
|
|
2593
2670
|
const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
|
|
@@ -2758,8 +2835,8 @@
|
|
|
2758
2835
|
const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
|
|
2759
2836
|
? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
|
|
2760
2837
|
: [blocksToRender, []];
|
|
2761
|
-
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? renderNotFound(notFound) : null }), jsxs("div", { className: style(blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: style('mb-
|
|
2762
|
-
return (jsx(FoldableSection, { className: style(resultsGridStyle, isUnfolded ? 'mb-
|
|
2838
|
+
return (jsxs("div", { children: [jsx("div", { className: style(blocksToRender.length ? 'hidden' : 'block'), children: notFound ? renderNotFound(notFound) : null }), jsxs("div", { className: style(blocksToRender.length ? '' : 'hidden'), children: [jsx("div", { className: style('mb-2xs', resultsGridStyle), children: renderBlocksList(visibleBlocks, { ...rest.options, parent: block }) }), jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => {
|
|
2839
|
+
return (jsx(FoldableSection, { className: style(resultsGridStyle, isUnfolded ? 'mb-2xs' : ''), isUnfolded: isUnfolded, children: renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }) }));
|
|
2763
2840
|
}, renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(DefaultFoldButton, { className: style(topItemsCount < 1 ? 'hidden' : ''), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] })] }));
|
|
2764
2841
|
});
|
|
2765
2842
|
function renderNotFound({ title, description }) {
|
|
@@ -2782,7 +2859,7 @@
|
|
|
2782
2859
|
return items.map((item) => (jsx(SlideCheckbox, { text: item.title, value: [value].flatMap((_) => _).includes(item.value), onChange: () => handleChange(item.value), type: multiple ? 'checkbox' : 'radio' }, item.value)));
|
|
2783
2860
|
});
|
|
2784
2861
|
|
|
2785
|
-
const renderFiltrationForm = ({ field, reset, filtrationSchema, resetButton, children, }) => (jsxs("form", { className: "flex justify-between bg-white p-
|
|
2862
|
+
const renderFiltrationForm = ({ field, reset, filtrationSchema, resetButton, children, }) => (jsxs("form", { className: "flex justify-between bg-white p-4xl mb-2xs", children: [jsxs("div", { className: "flex gap-5xl", children: [children, Object.entries(filtrationSchema).map(renderFormItem(field))] }), resetButton ? (jsx("div", { children: jsx(Button, { className: "w-72 ml-s", onClick: reset, ...resetButton }) })) : null] }));
|
|
2786
2863
|
const renderFormItem = (field) => ([key, item]) => {
|
|
2787
2864
|
const type = item?.type;
|
|
2788
2865
|
switch (type) {
|
|
@@ -2795,7 +2872,7 @@
|
|
|
2795
2872
|
const renderCheckboxes = (key, field) => (item) => {
|
|
2796
2873
|
const options = item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
2797
2874
|
[];
|
|
2798
|
-
return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-
|
|
2875
|
+
return (jsxs("div", { children: [item?.title ? (jsx("div", { className: "mb-m", children: jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.title }) })) : null, jsx(SlideCheckboxGroup, { items: options, multiple: true, ...field(key) })] }, key));
|
|
2799
2876
|
};
|
|
2800
2877
|
|
|
2801
2878
|
const initialFiltrationState$1 = {
|
|
@@ -3172,8 +3249,6 @@
|
|
|
3172
3249
|
return acc;
|
|
3173
3250
|
};
|
|
3174
3251
|
|
|
3175
|
-
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
3176
|
-
|
|
3177
3252
|
const MIN_TERM_LEN = 3;
|
|
3178
3253
|
const tokenize = (text) => text
|
|
3179
3254
|
.toLowerCase()
|
|
@@ -3828,13 +3903,78 @@
|
|
|
3828
3903
|
|
|
3829
3904
|
const MobileAppTile = JSX(({ className, padding, alignTitle = 'left', buttons = [], description, headingType = 'h4', image, items, qr, title = 'Мобильное приложение', version = 'primary', ...rest }) => {
|
|
3830
3905
|
const containerStyle = version === 'secondary' ? 'p-m min-w-32' : 'min-w-24';
|
|
3831
|
-
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] })] }) }));
|
|
3906
|
+
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, rightImage: image?.src ? jsx(Img, { className: "hidden lg:block", image: image }) : 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, { className: "lg:hidden", image: image }) : null] })] }) }));
|
|
3832
3907
|
});
|
|
3833
3908
|
|
|
3834
|
-
const
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3909
|
+
const tabPaddingStyleMap = {
|
|
3910
|
+
default: 'px-xs',
|
|
3911
|
+
underlined: 'px-m',
|
|
3912
|
+
rounded: 'px-lg rounded-md',
|
|
3913
|
+
};
|
|
3914
|
+
const tabTextStyle = 'text-secondary-text hover:text-primary-main';
|
|
3915
|
+
const activeTabTextStyleMap = {
|
|
3916
|
+
default: 'text-black sm:text-white',
|
|
3917
|
+
underlined: 'text-primary-main border-b-2',
|
|
3918
|
+
rounded: 'text-white',
|
|
3919
|
+
};
|
|
3920
|
+
const tabBgStyleMap = {
|
|
3921
|
+
default: 'bg-white',
|
|
3922
|
+
underlined: 'bg-white',
|
|
3923
|
+
rounded: 'bg-transparent',
|
|
3924
|
+
};
|
|
3925
|
+
const activeTabBgStyleMap = {
|
|
3926
|
+
default: 'sm:bg-primary-main',
|
|
3927
|
+
underlined: 'bg-white',
|
|
3928
|
+
rounded: 'bg-primary-main',
|
|
3929
|
+
};
|
|
3930
|
+
const TabItem = JSX(({ item = {}, isActive, onClick, type = 'default' }) => {
|
|
3931
|
+
const link = useLink();
|
|
3932
|
+
const handleClick = () => {
|
|
3933
|
+
onClick && onClick(item);
|
|
3934
|
+
};
|
|
3935
|
+
const { text, ...linkProps } = link({ ...item, onClick: handleClick });
|
|
3936
|
+
const Tag = item.href ? 'a' : 'div';
|
|
3937
|
+
return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tab", "aria-selected": isActive, ...linkProps, children: jsx("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: jsx(Text, { size: "text-m", children: text }) }) }));
|
|
3938
|
+
});
|
|
3939
|
+
|
|
3940
|
+
const renderTab = (activeTab, onClick, type) => (tab, i) => (jsx(TabItem, { isActive: tab === activeTab, onClick: onClick, type: type, item: tab }, String(i)));
|
|
3941
|
+
|
|
3942
|
+
const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tablist", children: items.map(renderTab(value, onChange, tabsType)) })));
|
|
3943
|
+
|
|
3944
|
+
const scalarCmp = (a, b) => a === b;
|
|
3945
|
+
const arrCmp = (cmp = scalarCmp) => (a, b) => a === b || Boolean(a && b && a.length === b.length && a.every((_, i) => cmp(_, b[i])));
|
|
3946
|
+
const objCmp = (cmp) => (a, b) => a === b ||
|
|
3947
|
+
Boolean(a &&
|
|
3948
|
+
b &&
|
|
3949
|
+
Object.keys(a).length === Object.keys(b).length &&
|
|
3950
|
+
Object.entries(a).every(([key, value]) => cmp(value, b[key])));
|
|
3951
|
+
function combineBoolCmps(...comparators) {
|
|
3952
|
+
return (a, b) => comparators.some((cmp) => cmp(a, b));
|
|
3953
|
+
}
|
|
3954
|
+
|
|
3955
|
+
const hotFilterRecordCmp = objCmp(combineBoolCmps(scalarCmp, arrCmp()));
|
|
3956
|
+
|
|
3957
|
+
const initialFiltrationState = {
|
|
3958
|
+
categories: [],
|
|
3959
|
+
extraOptions: [],
|
|
3960
|
+
propertyType: [],
|
|
3961
|
+
stage: [],
|
|
3962
|
+
};
|
|
3963
|
+
const MortgageFiltration = JSX(({ className, hotFilters = [], filtrationSchema = {}, resetButton, ...rest }) => {
|
|
3964
|
+
const [filtrationState, { field, reset, update: replaceFiltrationState }] = useForm(initialFiltrationState);
|
|
3965
|
+
const normalizedHotFilters = useMemo(() => hotFilters.map(({ text }) => ({
|
|
3966
|
+
text,
|
|
3967
|
+
})), [hotFilters]);
|
|
3968
|
+
const [hotFilterIndex, setHotFilterIndex] = useState(0);
|
|
3969
|
+
const handleHotFilterSelect = useCallback((_) => {
|
|
3970
|
+
setHotFilterIndex(normalizedHotFilters.indexOf(_));
|
|
3971
|
+
replaceFiltrationState(hotFilters[normalizedHotFilters.indexOf(_)].filter || initialFiltrationState);
|
|
3972
|
+
}, [normalizedHotFilters]);
|
|
3973
|
+
useEffect(() => {
|
|
3974
|
+
const suggestedHotFilterIndex = hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState));
|
|
3975
|
+
setHotFilterIndex(suggestedHotFilterIndex !== -1 ? suggestedHotFilterIndex : 0);
|
|
3976
|
+
}, [hotFilters, filtrationState]);
|
|
3977
|
+
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(TabsControl, { className: "mb-2xs", items: normalizedHotFilters, value: normalizedHotFilters[hotFilterIndex], onChange: handleHotFilterSelect }), renderFiltrationForm({ field, reset, filtrationSchema, resetButton }), jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
|
|
3838
3978
|
});
|
|
3839
3979
|
MortgageFiltration.childrenTypes = ['ProductTile'];
|
|
3840
3980
|
MortgageFiltration.childSchema = (content) => content?.filtrationSchema || {};
|
|
@@ -4197,46 +4337,6 @@
|
|
|
4197
4337
|
|
|
4198
4338
|
const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { defaultPadding: "p-0", ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
|
|
4199
4339
|
|
|
4200
|
-
const avg = (items = []) => (items?.length ? sum(items) / items.length : 0);
|
|
4201
|
-
|
|
4202
|
-
const deviation = (items) => items?.length ? Math.sqrt(Math.abs(avg(items.map((_) => _ ** 2)) - avg(items) ** 2)) : 0;
|
|
4203
|
-
|
|
4204
|
-
const renderBenefitIcon = (icon, benefitsVersion = 'normal') => icon ? (jsx("div", { className: style('w-12 h-12 min-w-12 box-border flex items-center justify-center rounded-icon', benefitsVersion === 'normal'
|
|
4205
|
-
? 'bg-secondary-light text-primary-main'
|
|
4206
|
-
: 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
|
|
4207
|
-
|
|
4208
|
-
const renderBenefitDescription = (description, i) => description ? (jsx(Paragraph, { font: "font-light", size: "text-m", color: "text-secondary-text group-data-secondary:text-white", children: description }, `description-${i}`)) : null;
|
|
4209
|
-
|
|
4210
|
-
const renderBenefitLabel = (label, i) => label ? (jsx(Text, { color: "text-primary-text group-data-secondary:text-white", size: "text-h6", children: label }, `label-${i}`)) : null;
|
|
4211
|
-
|
|
4212
|
-
const renderBenefitText = (_, i) => _.type === 'rte' && '__html' in _ && _.__html ? (jsx(RichText, { ..._ }, `rte-${i}`)) : ([
|
|
4213
|
-
'label' in _ ? renderBenefitLabel(_.label, i) : null,
|
|
4214
|
-
'description' in _ ? renderBenefitDescription(_.description, i) : null,
|
|
4215
|
-
]);
|
|
4216
|
-
|
|
4217
|
-
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(_) })] })));
|
|
4218
|
-
|
|
4219
|
-
const MAX_BENEFITS_LEN_DEVIATION = 16;
|
|
4220
|
-
const benefitLength = (_) => _.type === 'rte'
|
|
4221
|
-
? _.__html?.length || 0
|
|
4222
|
-
: Math.max(_.label?.length || 0, _.description?.length || 0);
|
|
4223
|
-
const isDistortedBenefits = (benefits) => deviation(benefits.map(benefitLength)) > MAX_BENEFITS_LEN_DEVIATION;
|
|
4224
|
-
const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s', isDistortedBenefits(benefits) ? 'flex-col' : 'flex-wrap', className), children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
|
|
4225
|
-
|
|
4226
|
-
const TabularBenefitsList = JSX(({ className, benefits }) => benefits?.length ? (jsx("div", { className: style('grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs', className), children: benefits.flatMap(renderBenefitText) })) : null);
|
|
4227
|
-
|
|
4228
|
-
const BenefitsList = JSX(({ isTabularBenefits, ...rest }) => isTabularBenefits ? jsx(TabularBenefitsList, { ...rest }) : jsx(DefaultBenefitsList, { ...rest }));
|
|
4229
|
-
|
|
4230
|
-
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
4231
|
-
const renderTag = (tag, key) => (jsx("div", { className: "py-2 px-2.5 border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
|
|
4232
|
-
|
|
4233
|
-
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, }) => {
|
|
4234
|
-
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
4235
|
-
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isPadding: false }));
|
|
4236
|
-
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] }) }));
|
|
4237
|
-
});
|
|
4238
|
-
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
4239
|
-
|
|
4240
4340
|
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;
|
|
4241
4341
|
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"] })] }));
|
|
4242
4342
|
|
|
@@ -4343,7 +4443,7 @@
|
|
|
4343
4443
|
})) : (jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
4344
4444
|
};
|
|
4345
4445
|
const renderPrimaryFoldButton = ({ label, labelIconBgVersion, icon, onToggle, labelIcon, }) => {
|
|
4346
|
-
return (jsxs("button", { className: style('border-none bg-transparent 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(), label ? (jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), icon ? jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null] }));
|
|
4446
|
+
return (jsxs("button", { className: style('border-none bg-transparent flex justify-between items-center w-full group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, children: [jsxs("div", { className: "flex items-center text-start group-hover/button:text-primary-main gap-s", children: [renderRoundedIcon(), label ? (jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), icon ? jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null] }));
|
|
4347
4447
|
};
|
|
4348
4448
|
|
|
4349
4449
|
const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = '', setSelected, label }) => {
|
|
@@ -4543,110 +4643,30 @@
|
|
|
4543
4643
|
exclude: ['SwipeListControlBlock'],
|
|
4544
4644
|
};
|
|
4545
4645
|
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
const SCROLLABLE_ACTIVE_LINK_CLASSES = 'bg-white text-primary-main';
|
|
4553
|
-
const WIDESCREEN_ACTIVE_LINK_CLASSES = 'bg-primary-main text-white';
|
|
4554
|
-
const TEXT_CLASSES = 'font-sans text-m text-center';
|
|
4555
|
-
const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
4556
|
-
const INACTIVE_TEXT_CLASSES = 'text-secondary-text sm:group-hover/btn:text-primary-main';
|
|
4557
|
-
const TAB_CLASSES = {
|
|
4558
|
-
block: {
|
|
4559
|
-
scrollable: {
|
|
4560
|
-
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
4561
|
-
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
4562
|
-
},
|
|
4563
|
-
centered: {
|
|
4564
|
-
active: `px-4 rounded-md ${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4565
|
-
default: `px-4 rounded-md ${LINK_CLASSES} group/btn bg-transparent whitespace-nowrap`,
|
|
4566
|
-
},
|
|
4567
|
-
wideScreen: {
|
|
4568
|
-
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4569
|
-
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
4570
|
-
},
|
|
4571
|
-
},
|
|
4572
|
-
text: {
|
|
4573
|
-
scrollable: {
|
|
4574
|
-
active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2`,
|
|
4575
|
-
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
4576
|
-
},
|
|
4577
|
-
centered: {
|
|
4578
|
-
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
|
|
4579
|
-
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
4580
|
-
},
|
|
4581
|
-
wideScreen: {
|
|
4582
|
-
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES} text-black px-2.5 bg-white sm:bg-primary-main sm:text-white`,
|
|
4583
|
-
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES} px-2.5 bg-white`,
|
|
4584
|
-
},
|
|
4585
|
-
},
|
|
4586
|
-
};
|
|
4587
|
-
const getTabClassName = (type, active, tabsMode) => {
|
|
4588
|
-
const styleActive = active ? 'active' : 'default';
|
|
4589
|
-
const mode = tabsMode || 'wideScreen';
|
|
4590
|
-
return TAB_CLASSES[type][mode][styleActive];
|
|
4591
|
-
};
|
|
4592
|
-
|
|
4593
|
-
const LinkTab = JSX((props) => {
|
|
4594
|
-
const { tab, currentTab, onClick, tabsMode } = props;
|
|
4595
|
-
const active = currentTab?.type === 'link' && currentTab.href === tab.href;
|
|
4596
|
-
const link = useLink();
|
|
4597
|
-
const adjustedProps = link(tab);
|
|
4598
|
-
const handleClick = (ev) => {
|
|
4599
|
-
adjustedProps.onClick(ev);
|
|
4600
|
-
onClick(tab);
|
|
4601
|
-
};
|
|
4602
|
-
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 }) }) }));
|
|
4646
|
+
const scrollButtonStyle = 'hidden sm:flex absolute z-40 top-0';
|
|
4647
|
+
const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType }) => {
|
|
4648
|
+
const [containerRef, scroll] = useSwipeListScroll({
|
|
4649
|
+
itemCount: items?.length || 0,
|
|
4650
|
+
});
|
|
4651
|
+
return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), role: "tablist", children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle), onClick: scroll.scrollRight })) : null] }));
|
|
4603
4652
|
});
|
|
4604
4653
|
|
|
4605
|
-
const
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
return (jsx("div", { className: getTabClassName('block', active, tabsMode), role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: style('flex flex-1 items-center justify-center h-full', getTabClassName('text', active, tabsMode)), children: [jsx("span", { children: tab.title }), showCounter && count ? renderCount(tabsMode, count, active) : null] }) }, `group-${String(i)}`));
|
|
4614
|
-
};
|
|
4615
|
-
const renderCount = (tabsMode, count, active) => {
|
|
4616
|
-
return (jsx("div", { className: style(BADGE_CLASSES, active && tabsMode !== 'scrollable' ? LIGHT_BADGE_CLASSES : DARK_BADGE_CLASSES), children: count }));
|
|
4617
|
-
};
|
|
4618
|
-
|
|
4619
|
-
const renderTab = ({ page, showCounter, ...rest }) => (tab, i) => {
|
|
4620
|
-
const type = tab.type;
|
|
4621
|
-
if (!(type === 'group' || type === 'link')) {
|
|
4622
|
-
return null;
|
|
4623
|
-
}
|
|
4624
|
-
switch (type) {
|
|
4625
|
-
case 'group':
|
|
4626
|
-
return renderGroupTab({ page, showCounter, ...rest })(tab, i);
|
|
4627
|
-
case 'link': {
|
|
4628
|
-
return jsx(LinkTab, { tab: tab, ...rest }, String(i));
|
|
4629
|
-
}
|
|
4654
|
+
const renderTabs = ({ tabsMode, ...props }) => {
|
|
4655
|
+
switch (tabsMode) {
|
|
4656
|
+
case 'wideScreen':
|
|
4657
|
+
return jsx(TabsControl, { ...props });
|
|
4658
|
+
case 'centered':
|
|
4659
|
+
return (jsx("div", { className: "flex", children: jsx(TabsControl, { className: "m-auto p-xs rounded-md bg-main-gray", tabsType: "rounded", ...props }) }));
|
|
4660
|
+
case 'scrollable':
|
|
4661
|
+
return (jsx("div", { className: "flex", children: jsx(ScrollableTabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
|
|
4630
4662
|
default:
|
|
4631
|
-
|
|
4663
|
+
return null;
|
|
4632
4664
|
}
|
|
4633
|
-
return null;
|
|
4634
4665
|
};
|
|
4635
4666
|
|
|
4636
|
-
const
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
const ScrollableTabs = JSX((props) => {
|
|
4640
|
-
const { tabs, ...rest } = props;
|
|
4641
|
-
const [containerRef, scroll] = useSwipeListScroll({
|
|
4642
|
-
itemCount: tabs?.length || 0,
|
|
4643
|
-
});
|
|
4644
|
-
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] }));
|
|
4645
|
-
});
|
|
4646
|
-
|
|
4647
|
-
const Tabs = JSX((props) => {
|
|
4648
|
-
const { className = '', isSticky, tabs, ...rest } = props;
|
|
4649
|
-
const [currentTab, setCurrentTab] = useState(tabs ? tabs[0] : undefined);
|
|
4667
|
+
const Tabs = JSX(({ className = '', isSticky, tabs = [], tabsMode, ...rest }) => {
|
|
4668
|
+
const normalizedTabs = useMemo(() => tabs.map(normalizeTab), [tabs]);
|
|
4669
|
+
const [activeTabIndex, setActiveTabIndex] = useState(0);
|
|
4650
4670
|
useEffect(() => {
|
|
4651
4671
|
if (!tabs || !tabs[0]) {
|
|
4652
4672
|
return;
|
|
@@ -4654,27 +4674,23 @@
|
|
|
4654
4674
|
fireTabEvent(tabs[0]);
|
|
4655
4675
|
}, []);
|
|
4656
4676
|
useEffect(() => {
|
|
4657
|
-
|
|
4658
|
-
|
|
4677
|
+
const activeTab = tabs[activeTabIndex];
|
|
4678
|
+
if (activeTab?.type === 'group') {
|
|
4679
|
+
defaultEventBus.subject('tab', { type: activeTab.type, label: activeTab.ref });
|
|
4659
4680
|
}
|
|
4660
|
-
}, [
|
|
4661
|
-
const
|
|
4662
|
-
|
|
4663
|
-
|
|
4681
|
+
}, [tabs, activeTabIndex]);
|
|
4682
|
+
const handleChange = useCallback((_) => {
|
|
4683
|
+
const index = normalizedTabs.indexOf(_);
|
|
4684
|
+
setActiveTabIndex(index);
|
|
4685
|
+
fireTabEvent(tabs[index]);
|
|
4664
4686
|
}, []);
|
|
4665
|
-
return (jsx(BlockWrapper, { className: style(
|
|
4687
|
+
return (jsx(BlockWrapper, { className: style(isSticky ? 'sticky top-1 z-20' : '', className), defaultPadding: "p-0", ...rest, children: renderTabs({
|
|
4688
|
+
items: normalizedTabs,
|
|
4689
|
+
onChange: handleChange,
|
|
4690
|
+
value: normalizedTabs[activeTabIndex],
|
|
4691
|
+
tabsMode,
|
|
4692
|
+
}) }));
|
|
4666
4693
|
});
|
|
4667
|
-
const renderTabs = ({ tabsMode, tabs, ...rest }) => {
|
|
4668
|
-
switch (tabsMode) {
|
|
4669
|
-
case 'wideScreen':
|
|
4670
|
-
return tabs?.map(renderTab({ tabsMode, ...rest }));
|
|
4671
|
-
case 'centered':
|
|
4672
|
-
return jsx(CenteredTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
|
|
4673
|
-
case 'scrollable':
|
|
4674
|
-
return jsx(ScrollableTabs, { tabs: tabs, tabsMode: tabsMode, ...rest });
|
|
4675
|
-
}
|
|
4676
|
-
return null;
|
|
4677
|
-
};
|
|
4678
4694
|
const fireTabEvent = (tab) => {
|
|
4679
4695
|
if (tab.type === 'group') {
|
|
4680
4696
|
defaultEventBus.fire('tab', { type: tab.type, label: tab.ref });
|
|
@@ -4683,6 +4699,7 @@
|
|
|
4683
4699
|
defaultEventBus.fire('tab', { type: tab.type, label: tab.href });
|
|
4684
4700
|
}
|
|
4685
4701
|
};
|
|
4702
|
+
const normalizeTab = (_) => (_?.type === 'group' ? { text: _.title } : _);
|
|
4686
4703
|
|
|
4687
4704
|
const DIVIDER_CLASSES = 'border-main-divider border border-t-0 border-x-0';
|
|
4688
4705
|
const FIRST_CELL_CLASSES = 'w-[354px] flex-shrink-0';
|
|
@@ -5030,6 +5047,10 @@
|
|
|
5030
5047
|
return [list, { setList, push, pop, remove, clear }];
|
|
5031
5048
|
}
|
|
5032
5049
|
|
|
5050
|
+
function assertUnreachable(x) {
|
|
5051
|
+
throw new Error(x);
|
|
5052
|
+
}
|
|
5053
|
+
|
|
5033
5054
|
const DialogManager = JSX(() => {
|
|
5034
5055
|
const [dialogs, { push, pop, clear }] = useList();
|
|
5035
5056
|
const closeAll = useCallback(() => {
|
|
@@ -5141,7 +5162,7 @@
|
|
|
5141
5162
|
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" }) }));
|
|
5142
5163
|
}
|
|
5143
5164
|
|
|
5144
|
-
const packageVersion = "0.
|
|
5165
|
+
const packageVersion = "0.13.0";
|
|
5145
5166
|
|
|
5146
5167
|
exports.Blocks = Blocks;
|
|
5147
5168
|
exports.ContentPage = ContentPage;
|