@redneckz/wildless-cms-uni-blocks 0.3.9 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +154 -76
- package/bundle/bundle.umd.min.js +1 -1
- package/cosmos-static/icons/GpsIcon.svg +1 -0
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +46 -0
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
- package/dist/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
- package/dist/components/ComparisonTable/HeaderCell.mobile.js +9 -0
- package/dist/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
- package/dist/components/ComparisonTable/TableCell.d.ts +3 -2
- package/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/dist/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
- package/dist/components/ComparisonTable/TableCell.mobile.js +12 -0
- package/dist/components/ComparisonTable/TableCell.mobile.js.map +1 -0
- package/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
- package/dist/components/ComparisonTable/TableColumn.js +19 -0
- package/dist/components/ComparisonTable/TableColumn.js.map +1 -0
- package/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
- package/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
- package/dist/components/CreditCalculator/CreditCalculator.js +18 -22
- package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
- package/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
- package/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
- package/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
- package/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
- package/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
- package/dist/components/CreditCalculator/getDefaultSum.js +8 -0
- package/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
- package/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
- package/dist/components/CreditCalculator/renderButton.d.ts +1 -0
- package/dist/components/CreditCalculator/renderButton.js +8 -0
- package/dist/components/CreditCalculator/renderButton.js.map +1 -0
- package/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
- package/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
- package/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
- package/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
- package/dist/components/CreditCalculator/renderProposal.js +9 -0
- package/dist/components/CreditCalculator/renderProposal.js.map +1 -0
- package/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
- package/dist/components/CreditCalculator/renderTermsButton.js +9 -0
- package/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
- package/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
- package/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
- package/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
- package/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
- package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/dist/components/Gallery/Gallery.mobile.js +2 -2
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Header/Header.mobile.js +1 -1
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/hooks/useCreditCalculatorData.js +3 -3
- package/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/dist/hooks/useExchangeRates.d.ts +9 -0
- package/dist/hooks/useExchangeRates.js +18 -0
- package/dist/hooks/useExchangeRates.js.map +1 -0
- package/dist/icons/IconName.d.ts +3 -2
- package/dist/icons/IconName.js +1 -0
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/InputTypes.d.ts +1 -0
- package/dist/model/InputTypes.js +2 -0
- package/dist/model/InputTypes.js.map +1 -0
- package/dist/setup-fixture.js +1 -1
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/Input/Input.d.ts +2 -0
- package/dist/ui-kit/Input/Input.js +8 -0
- package/dist/ui-kit/Input/Input.js.map +1 -0
- package/dist/ui-kit/Input/InputProps.d.ts +8 -0
- package/dist/ui-kit/Input/InputProps.js +2 -0
- package/dist/ui-kit/Input/InputProps.js.map +1 -0
- package/dist/ui-kit/Select/Select.d.ts +6 -0
- package/dist/ui-kit/Select/Select.js +8 -0
- package/dist/ui-kit/Select/Select.js.map +1 -0
- package/dist/ui-kit/Select/SelectOption.d.ts +5 -0
- package/dist/ui-kit/Select/SelectOption.js +8 -0
- package/dist/ui-kit/Select/SelectOption.js.map +1 -0
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.fixture.mobile.d.ts +5 -0
- package/lib/components/ComparisonTable/ComparisonTable.mobile.d.ts +5 -0
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +44 -0
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -0
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
- package/lib/components/ComparisonTable/HeaderCell.mobile.d.ts +12 -0
- package/lib/components/ComparisonTable/HeaderCell.mobile.js +7 -0
- package/lib/components/ComparisonTable/HeaderCell.mobile.js.map +1 -0
- package/lib/components/ComparisonTable/TableCell.d.ts +3 -2
- package/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/lib/components/ComparisonTable/TableCell.mobile.d.ts +9 -0
- package/lib/components/ComparisonTable/TableCell.mobile.js +10 -0
- package/lib/components/ComparisonTable/TableCell.mobile.js.map +1 -0
- package/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
- package/lib/components/ComparisonTable/TableColumn.js +17 -0
- package/lib/components/ComparisonTable/TableColumn.js.map +1 -0
- package/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
- package/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
- package/lib/components/CreditCalculator/CreditCalculator.js +19 -23
- package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
- package/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
- package/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
- package/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
- package/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
- package/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
- package/lib/components/CreditCalculator/getDefaultSum.js +5 -0
- package/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
- package/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
- package/lib/components/CreditCalculator/renderButton.d.ts +1 -0
- package/lib/components/CreditCalculator/renderButton.js +5 -0
- package/lib/components/CreditCalculator/renderButton.js.map +1 -0
- package/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
- package/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
- package/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
- package/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
- package/lib/components/CreditCalculator/renderProposal.js +6 -0
- package/lib/components/CreditCalculator/renderProposal.js.map +1 -0
- package/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
- package/lib/components/CreditCalculator/renderTermsButton.js +6 -0
- package/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
- package/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
- package/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
- package/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
- package/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
- package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/lib/components/Gallery/Gallery.mobile.js +2 -2
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Header/Header.mobile.js +1 -1
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/hooks/useCreditCalculatorData.js +3 -3
- package/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/lib/hooks/useExchangeRates.d.ts +9 -0
- package/lib/hooks/useExchangeRates.js +15 -0
- package/lib/hooks/useExchangeRates.js.map +1 -0
- package/lib/icons/IconName.d.ts +3 -2
- package/lib/icons/IconName.js +1 -0
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/InputTypes.d.ts +1 -0
- package/lib/model/InputTypes.js +2 -0
- package/lib/model/InputTypes.js.map +1 -0
- package/lib/setup-fixture.js +1 -1
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/Input/Input.d.ts +2 -0
- package/lib/ui-kit/Input/Input.js +6 -0
- package/lib/ui-kit/Input/Input.js.map +1 -0
- package/lib/ui-kit/Input/InputProps.d.ts +8 -0
- package/lib/ui-kit/Input/InputProps.js +2 -0
- package/lib/ui-kit/Input/InputProps.js.map +1 -0
- package/lib/ui-kit/Select/Select.d.ts +6 -0
- package/lib/ui-kit/Select/Select.js +6 -0
- package/lib/ui-kit/Select/Select.js.map +1 -0
- package/lib/ui-kit/Select/SelectOption.d.ts +5 -0
- package/lib/ui-kit/Select/SelectOption.js +6 -0
- package/lib/ui-kit/Select/SelectOption.js.map +1 -0
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +136 -83
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +38 -28
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
- package/mobile/dist/components/ComparisonTable/HeaderCell.d.ts +2 -0
- package/mobile/dist/components/ComparisonTable/HeaderCell.js +1 -3
- package/mobile/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableCell.d.ts +4 -3
- package/mobile/dist/components/ComparisonTable/TableCell.js +5 -5
- package/mobile/dist/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/TableColumn.d.ts +10 -0
- package/mobile/dist/components/ComparisonTable/TableColumn.js +19 -0
- package/mobile/dist/components/ComparisonTable/TableColumn.js.map +1 -0
- package/mobile/dist/components/ContentPage/ContentPageContext.d.ts +1 -1
- package/mobile/dist/components/CreditCalculator/CreditCalculator.d.ts +2 -2
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js +18 -22
- package/mobile/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/dist/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
- package/mobile/dist/components/CreditCalculator/getCreditRate.d.ts +1 -1
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.js +8 -0
- package/mobile/dist/components/CreditCalculator/getDefaultMonths.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/getDefaultSum.d.ts +2 -0
- package/mobile/dist/components/CreditCalculator/getDefaultSum.js +8 -0
- package/mobile/dist/components/CreditCalculator/getDefaultSum.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
- package/mobile/dist/components/CreditCalculator/renderButton.d.ts +1 -0
- package/mobile/dist/components/CreditCalculator/renderButton.js +8 -0
- package/mobile/dist/components/CreditCalculator/renderButton.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.js +11 -0
- package/mobile/dist/components/CreditCalculator/renderMonthsInput.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/renderProposal.d.ts +1 -0
- package/mobile/dist/components/CreditCalculator/renderProposal.js +9 -0
- package/mobile/dist/components/CreditCalculator/renderProposal.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/renderTermsButton.d.ts +1 -0
- package/mobile/dist/components/CreditCalculator/renderTermsButton.js +9 -0
- package/mobile/dist/components/CreditCalculator/renderTermsButton.js.map +1 -0
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js +18 -0
- package/mobile/dist/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +19 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +7 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +15 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +6 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/mobile/dist/components/Gallery/Gallery.js +2 -2
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Header/Header.js +1 -1
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/hooks/useCreditCalculatorData.js +3 -3
- package/mobile/dist/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/dist/hooks/useExchangeRates.d.ts +9 -0
- package/mobile/dist/hooks/useExchangeRates.js +18 -0
- package/mobile/dist/hooks/useExchangeRates.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +3 -2
- package/mobile/dist/icons/IconName.js +1 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/InputTypes.d.ts +1 -0
- package/mobile/dist/model/InputTypes.js +2 -0
- package/mobile/dist/model/InputTypes.js.map +1 -0
- package/mobile/dist/setup-fixture.js +1 -1
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.d.ts +2 -0
- package/mobile/dist/ui-kit/Input/Input.js +8 -0
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -0
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +8 -0
- package/mobile/dist/ui-kit/Input/InputProps.js +2 -0
- package/mobile/dist/ui-kit/Input/InputProps.js.map +1 -0
- package/mobile/dist/ui-kit/Select/Select.d.ts +6 -0
- package/mobile/dist/ui-kit/Select/Select.js +8 -0
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -0
- package/mobile/dist/ui-kit/Select/SelectOption.d.ts +5 -0
- package/mobile/dist/ui-kit/Select/SelectOption.js +8 -0
- package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -0
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +11 -6
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +38 -28
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +4 -0
- package/mobile/lib/components/ComparisonTable/HeaderCell.d.ts +2 -0
- package/mobile/lib/components/ComparisonTable/HeaderCell.js +1 -3
- package/mobile/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableCell.d.ts +4 -3
- package/mobile/lib/components/ComparisonTable/TableCell.js +6 -6
- package/mobile/lib/components/ComparisonTable/TableCell.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/TableColumn.d.ts +10 -0
- package/mobile/lib/components/ComparisonTable/TableColumn.js +17 -0
- package/mobile/lib/components/ComparisonTable/TableColumn.js.map +1 -0
- package/mobile/lib/components/ContentPage/ContentPageContext.d.ts +1 -1
- package/mobile/lib/components/CreditCalculator/CreditCalculator.d.ts +2 -2
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js +19 -23
- package/mobile/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
- package/mobile/lib/components/CreditCalculator/getCalculatorParams.d.ts +1 -1
- package/mobile/lib/components/CreditCalculator/getCreditRate.d.ts +1 -1
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.d.ts +2 -0
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.js +5 -0
- package/mobile/lib/components/CreditCalculator/getDefaultMonths.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/getDefaultSum.d.ts +2 -0
- package/mobile/lib/components/CreditCalculator/getDefaultSum.js +5 -0
- package/mobile/lib/components/CreditCalculator/getDefaultSum.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/getMonthlyPayment.d.ts +1 -1
- package/mobile/lib/components/CreditCalculator/renderButton.d.ts +1 -0
- package/mobile/lib/components/CreditCalculator/renderButton.js +5 -0
- package/mobile/lib/components/CreditCalculator/renderButton.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.d.ts +10 -0
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.js +8 -0
- package/mobile/lib/components/CreditCalculator/renderMonthsInput.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/renderProposal.d.ts +1 -0
- package/mobile/lib/components/CreditCalculator/renderProposal.js +6 -0
- package/mobile/lib/components/CreditCalculator/renderProposal.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/renderTermsButton.d.ts +1 -0
- package/mobile/lib/components/CreditCalculator/renderTermsButton.js +6 -0
- package/mobile/lib/components/CreditCalculator/renderTermsButton.js.map +1 -0
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.d.ts +10 -0
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js +15 -0
- package/mobile/lib/components/CreditCalculator/renderWantedSumInput.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +17 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +7 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +5 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +7 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +13 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +23 -27
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +10 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +3 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/mobile/lib/components/Gallery/Gallery.js +2 -2
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Header/Header.js +1 -1
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/hooks/useCreditCalculatorData.js +3 -3
- package/mobile/lib/hooks/useCreditCalculatorData.js.map +1 -1
- package/mobile/lib/hooks/useExchangeRates.d.ts +9 -0
- package/mobile/lib/hooks/useExchangeRates.js +15 -0
- package/mobile/lib/hooks/useExchangeRates.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +3 -2
- package/mobile/lib/icons/IconName.js +1 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/InputTypes.d.ts +1 -0
- package/mobile/lib/model/InputTypes.js +2 -0
- package/mobile/lib/model/InputTypes.js.map +1 -0
- package/mobile/lib/setup-fixture.js +1 -1
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.d.ts +2 -0
- package/mobile/lib/ui-kit/Input/Input.js +6 -0
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -0
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +8 -0
- package/mobile/lib/ui-kit/Input/InputProps.js +2 -0
- package/mobile/lib/ui-kit/Input/InputProps.js.map +1 -0
- package/mobile/lib/ui-kit/Select/Select.d.ts +6 -0
- package/mobile/lib/ui-kit/Select/Select.js +6 -0
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -0
- package/mobile/lib/ui-kit/Select/SelectOption.d.ts +5 -0
- package/mobile/lib/ui-kit/Select/SelectOption.js +6 -0
- package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -0
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +12 -7
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +1 -0
- package/mobile/src/common.css +12 -2
- package/mobile/src/components/BaseTile/BaseTile.tsx +1 -1
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +90 -102
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
- package/mobile/src/components/ComparisonTable/HeaderCell.tsx +34 -30
- package/mobile/src/components/ComparisonTable/TableCell.tsx +30 -27
- package/mobile/src/components/ComparisonTable/TableColumn.tsx +66 -0
- package/mobile/src/components/ContentPage/ContentPageContext.tsx +1 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
- package/mobile/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
- package/mobile/src/components/CreditCalculator/getCreditRate.ts +1 -1
- package/mobile/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
- package/mobile/src/components/CreditCalculator/getDefaultSum.ts +7 -0
- package/mobile/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
- package/mobile/src/components/CreditCalculator/renderButton.tsx +13 -0
- package/mobile/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
- package/mobile/src/components/CreditCalculator/renderProposal.tsx +13 -0
- package/mobile/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
- package/mobile/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
- package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
- package/mobile/src/components/Gallery/Gallery.tsx +2 -2
- package/mobile/src/components/Header/Header.tsx +1 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +11 -1
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +5 -5
- package/mobile/src/hooks/useCreditCalculatorData.ts +3 -7
- package/mobile/src/hooks/useExchangeRates.ts +25 -0
- package/mobile/src/icons/GpsIcon.svg +8 -0
- package/mobile/src/icons/IconName.ts +3 -3
- package/mobile/src/model/InputTypes.ts +1 -0
- package/mobile/src/setup-fixture.ts +1 -1
- package/mobile/src/ui-kit/Input/Input.tsx +8 -0
- package/mobile/src/ui-kit/Input/InputProps.ts +9 -0
- package/mobile/src/ui-kit/Select/Select.tsx +15 -0
- package/mobile/src/ui-kit/Select/SelectOption.tsx +14 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
- package/package.json +1 -1
- package/src/common.css +12 -2
- package/src/components/BaseTile/BaseTile.tsx +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +152 -0
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +121 -0
- package/src/components/ComparisonTable/ComparisonTableContent.ts +4 -0
- package/src/components/ComparisonTable/HeaderCell.mobile.tsx +50 -0
- package/src/components/ComparisonTable/TableCell.mobile.tsx +46 -0
- package/src/components/ComparisonTable/TableCell.tsx +3 -2
- package/src/components/ComparisonTable/TableColumn.tsx +66 -0
- package/src/components/ContentPage/ContentPageContext.tsx +1 -1
- package/src/components/CreditCalculator/CreditCalculator.tsx +26 -87
- package/src/components/CreditCalculator/getCalculatorParams.ts +1 -1
- package/src/components/CreditCalculator/getCreditRate.ts +1 -1
- package/src/components/CreditCalculator/getDefaultMonths.ts +7 -0
- package/src/components/CreditCalculator/getDefaultSum.ts +7 -0
- package/src/components/CreditCalculator/getMonthlyPayment.ts +1 -1
- package/src/components/CreditCalculator/renderButton.tsx +13 -0
- package/src/components/CreditCalculator/renderMonthsInput.tsx +29 -0
- package/src/components/CreditCalculator/renderProposal.tsx +13 -0
- package/src/components/CreditCalculator/renderTermsButton.tsx +16 -0
- package/src/components/CreditCalculator/renderWantedSumInput.tsx +36 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +47 -0
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +22 -0
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +47 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +1 -1
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +48 -79
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
- package/src/components/ExchangeRateTile/formatCurrency.ts +3 -0
- package/src/components/Gallery/Gallery.mobile.tsx +2 -2
- package/src/components/Header/Header.mobile.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.example.json +11 -1
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +57 -32
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +57 -104
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +5 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +4 -4
- package/src/hooks/useCreditCalculatorData.ts +3 -7
- package/src/hooks/useExchangeRates.ts +25 -0
- package/src/icons/GpsIcon.svg +8 -0
- package/src/icons/IconName.ts +3 -3
- package/src/model/InputTypes.ts +1 -0
- package/src/setup-fixture.ts +1 -1
- package/src/ui-kit/Button/Button.fixture.tsx +2 -6
- package/src/ui-kit/Input/Input.tsx +8 -0
- package/src/ui-kit/Input/InputProps.ts +9 -0
- package/src/ui-kit/Select/Select.tsx +15 -0
- package/src/ui-kit/Select/SelectOption.tsx +14 -0
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +27 -19
- package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +1 -0
|
@@ -1,63 +1,47 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCreditCalculatorData } from '../../hooks/useCreditCalculatorData';
|
|
3
|
-
import { UniBlockProps } from '../../types';
|
|
4
|
-
import { Button } from '../../ui-kit/Button/Button';
|
|
3
|
+
import type { UniBlockProps } from '../../types';
|
|
5
4
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
6
|
-
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
7
|
-
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
8
5
|
import { clamp } from '../../utils/clamp';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
DEFAULT_MAX_SUM,
|
|
12
|
-
DEFAULT_MIN_MONTHS,
|
|
13
|
-
DEFAULT_MIN_SUM,
|
|
14
|
-
DEFAULT_MONTHS,
|
|
15
|
-
DEFAULT_SUM,
|
|
16
|
-
MONTHS_IN_YEAR,
|
|
17
|
-
} from './constants';
|
|
18
|
-
import { CreditCalculatorContent } from './CreditCalculatorContent';
|
|
6
|
+
import { DEFAULT_MAX_MONTHS, DEFAULT_MIN_MONTHS, MONTHS_IN_YEAR } from './constants';
|
|
7
|
+
import type { CreditCalculatorContent } from './CreditCalculatorContent';
|
|
19
8
|
import { getCalculatorParams } from './getCalculatorParams';
|
|
20
9
|
import { getCreditRate } from './getCreditRate';
|
|
21
10
|
import { getCreditTermYears } from './getCreditTermYears';
|
|
11
|
+
import { getDefaultMonths } from './getDefaultMonths';
|
|
12
|
+
import { getDefaultSum } from './getDefaultSum';
|
|
22
13
|
import { getMonthlyPayment } from './getMonthlyPayment';
|
|
14
|
+
import { renderButton } from './renderButton';
|
|
15
|
+
import { renderMonthsInput } from './renderMonthsInput';
|
|
16
|
+
import { renderProposal } from './renderProposal';
|
|
17
|
+
import { renderTermsButton } from './renderTermsButton';
|
|
18
|
+
import { renderWantedSumInput } from './renderWantedSumInput';
|
|
23
19
|
|
|
24
20
|
export interface CreditCalculatorProps extends CreditCalculatorContent, UniBlockProps {}
|
|
25
21
|
|
|
26
|
-
const STEP_MONEY = 1000;
|
|
27
|
-
const STEP_MONTHS = 1;
|
|
28
22
|
const DEFAULT_PAYMENT_TYPE = 'annuity';
|
|
29
23
|
|
|
30
24
|
const borderStyle = 'border-solid border-[3px] border-primary-main rounded-md';
|
|
31
25
|
|
|
32
26
|
export const CreditCalculator = JSX<CreditCalculatorProps>(
|
|
33
|
-
({ context, className, directoryName }) => {
|
|
27
|
+
({ context, className = '', directoryName }) => {
|
|
34
28
|
const [moneyValue, setMoneyValue] = context.useState<number | undefined>(undefined);
|
|
35
29
|
const [monthsValue, setMonthsValue] = context.useState<number | undefined>(undefined);
|
|
36
30
|
const [isAnnuityChecked, setIsAnnuityChecked] = context.useState(true);
|
|
37
31
|
const [isInsuranceChecked, setIsInsuranceChecked] = context.useState(true);
|
|
38
32
|
|
|
39
33
|
const tableRows = useCreditCalculatorData(context.useAsyncData, directoryName).rows;
|
|
40
|
-
|
|
41
34
|
const calculatorParams = getCalculatorParams({ tableRows, isAnnuity: isAnnuityChecked });
|
|
42
35
|
|
|
43
|
-
const defaultSum =
|
|
44
|
-
|
|
45
|
-
? (calculatorParams.maxSum - calculatorParams.minSum) / 2
|
|
46
|
-
: DEFAULT_SUM;
|
|
47
|
-
|
|
48
|
-
const defaultMonths =
|
|
49
|
-
calculatorParams.maxMonths && calculatorParams.minMonths
|
|
50
|
-
? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
|
|
51
|
-
: DEFAULT_MONTHS;
|
|
36
|
+
const defaultSum = getDefaultSum(calculatorParams);
|
|
37
|
+
const defaultMonths = getDefaultMonths(calculatorParams);
|
|
52
38
|
|
|
53
|
-
const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
|
|
54
|
-
const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
|
|
55
39
|
const minMonths = calculatorParams?.minMonths || DEFAULT_MIN_MONTHS;
|
|
56
40
|
const maxMonths = calculatorParams?.maxMonths || DEFAULT_MAX_MONTHS;
|
|
57
41
|
|
|
58
42
|
const rate = getCreditRate({ calculatorParams, isInsurance: isInsuranceChecked });
|
|
59
43
|
|
|
60
|
-
const
|
|
44
|
+
const monthlyPayment = getMonthlyPayment({
|
|
61
45
|
calculatorParams,
|
|
62
46
|
paymentType: DEFAULT_PAYMENT_TYPE,
|
|
63
47
|
rate,
|
|
@@ -72,32 +56,18 @@ export const CreditCalculator = JSX<CreditCalculatorProps>(
|
|
|
72
56
|
}
|
|
73
57
|
|
|
74
58
|
return (
|
|
75
|
-
<section className={`font-sans text-primary-text p-10 bg-white ${className
|
|
59
|
+
<section className={`font-sans text-primary-text p-10 bg-white ${className}`}>
|
|
76
60
|
<div className={`box-border p-[49px] pr-[56px] mx-auto w-max ${borderStyle}`}>
|
|
77
|
-
<div className="flex justify-between
|
|
61
|
+
<div className="flex justify-between">
|
|
78
62
|
<div className="mr-[42px]">
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
step={STEP_MONEY}
|
|
88
|
-
value={moneyValue || defaultSum}
|
|
89
|
-
onChange={setMoneyValue}
|
|
90
|
-
/>
|
|
91
|
-
<InputRange
|
|
92
|
-
className="mt-[23px]"
|
|
93
|
-
title="Срок кредита, месяцев"
|
|
94
|
-
items={['Или выберите из предложенных вариантов ниже']}
|
|
95
|
-
min={minMonths}
|
|
96
|
-
max={maxMonths}
|
|
97
|
-
step={STEP_MONTHS}
|
|
98
|
-
value={monthsValue || defaultMonths}
|
|
99
|
-
onChange={setMonthsValue}
|
|
100
|
-
/>
|
|
63
|
+
{renderWantedSumInput({ calculatorParams, moneyValue, defaultSum, setMoneyValue })}
|
|
64
|
+
{renderMonthsInput({
|
|
65
|
+
minMonths,
|
|
66
|
+
maxMonths,
|
|
67
|
+
monthsValue,
|
|
68
|
+
defaultMonths,
|
|
69
|
+
setMonthsValue,
|
|
70
|
+
})}
|
|
101
71
|
<div className="flex mb-7">
|
|
102
72
|
{creditTermYears.map((number, i) => renderButton(number, i, handleButtonClick))}
|
|
103
73
|
</div>
|
|
@@ -113,42 +83,11 @@ export const CreditCalculator = JSX<CreditCalculatorProps>(
|
|
|
113
83
|
onChange={setIsInsuranceChecked}
|
|
114
84
|
/>
|
|
115
85
|
</div>
|
|
116
|
-
|
|
117
|
-
<div className="text-base mb-[18px]">Наше предложение</div>
|
|
118
|
-
<div className="text-sm opacity-60">Ежемесячный платёж</div>
|
|
119
|
-
<div className="text-lg mb-3">
|
|
120
|
-
{addSpacesBetweenNumbers(Math.round(montlyPayment))} ₽
|
|
121
|
-
</div>
|
|
122
|
-
<div className="text-sm opacity-60">Ставка</div>
|
|
123
|
-
<div className="text-lg">{rate} %</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<div className="flex items-center">
|
|
127
|
-
<Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
|
|
128
|
-
<div
|
|
129
|
-
className="w-80 text-2xs leading-4 text-secondary-text"
|
|
130
|
-
aria-label="Соглашение на обработку персональных данных"
|
|
131
|
-
>
|
|
132
|
-
Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
|
|
133
|
-
требованиям ФЗ «О персональных данных»
|
|
134
|
-
</div>
|
|
86
|
+
{renderProposal(monthlyPayment, rate)}
|
|
135
87
|
</div>
|
|
88
|
+
{renderTermsButton()}
|
|
136
89
|
</div>
|
|
137
90
|
</section>
|
|
138
91
|
);
|
|
139
92
|
},
|
|
140
93
|
);
|
|
141
|
-
|
|
142
|
-
function renderButton(number: number, i: number, handleClick: (number: number) => void) {
|
|
143
|
-
return (
|
|
144
|
-
<button
|
|
145
|
-
key={String(i)}
|
|
146
|
-
className="bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none"
|
|
147
|
-
onClick={() => handleClick(number)}
|
|
148
|
-
>
|
|
149
|
-
<span className="font-semibold text-sm">
|
|
150
|
-
{number} {number === 1 ? 'год' : number > 4 ? 'лет' : 'года'}
|
|
151
|
-
</span>
|
|
152
|
-
</button>
|
|
153
|
-
);
|
|
154
|
-
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DEFAULT_MONTHS } from './constants';
|
|
2
|
+
import type { CalculatorParams } from './CreditCalculatorContent';
|
|
3
|
+
|
|
4
|
+
export const getDefaultMonths = (calculatorParams: CalculatorParams) =>
|
|
5
|
+
calculatorParams.maxMonths && calculatorParams.minMonths
|
|
6
|
+
? Math.round((calculatorParams.maxMonths - calculatorParams.minMonths) / 2)
|
|
7
|
+
: DEFAULT_MONTHS;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DEFAULT_SUM } from './constants';
|
|
2
|
+
import type { CalculatorParams } from './CreditCalculatorContent';
|
|
3
|
+
|
|
4
|
+
export const getDefaultSum = (calculatorParams: CalculatorParams) =>
|
|
5
|
+
calculatorParams.maxSum && calculatorParams.minSum
|
|
6
|
+
? (calculatorParams.maxSum - calculatorParams.minSum) / 2
|
|
7
|
+
: DEFAULT_SUM;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clamp } from '../../utils/clamp';
|
|
2
2
|
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM, MONTHS_IN_YEAR } from './constants';
|
|
3
|
-
import { CalculatorParams } from './CreditCalculatorContent';
|
|
3
|
+
import type { CalculatorParams } from './CreditCalculatorContent';
|
|
4
4
|
|
|
5
5
|
type PaymentType = 'annuity' | 'differentiated';
|
|
6
6
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function renderButton(number: number, i: number, handleClick: (number: number) => void) {
|
|
2
|
+
return (
|
|
3
|
+
<button
|
|
4
|
+
key={String(i)}
|
|
5
|
+
className="bg-secondary-light rounded-3xl h-10 w-[75px] box-border mr-2 flex items-center justify-center cursor-pointer border-none"
|
|
6
|
+
onClick={() => handleClick(number)}
|
|
7
|
+
>
|
|
8
|
+
<span className="font-semibold text-sm">
|
|
9
|
+
{number} {number === 1 ? 'год' : number > 4 ? 'лет' : 'года'}
|
|
10
|
+
</span>
|
|
11
|
+
</button>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
|
|
4
|
+
const STEP_MONTHS = 1;
|
|
5
|
+
|
|
6
|
+
interface RenderMonthsInputProps {
|
|
7
|
+
minMonths: number;
|
|
8
|
+
maxMonths: number;
|
|
9
|
+
monthsValue: number | undefined;
|
|
10
|
+
defaultMonths: number;
|
|
11
|
+
setMonthsValue: InputRangeProps['onChange'];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function renderMonthsInput(props: RenderMonthsInputProps) {
|
|
15
|
+
const { minMonths, maxMonths, monthsValue, defaultMonths, setMonthsValue } = props;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<InputRange
|
|
19
|
+
className="mt-[23px]"
|
|
20
|
+
title="Срок кредита, месяцев"
|
|
21
|
+
items={['Или выберите из предложенных вариантов ниже']}
|
|
22
|
+
min={minMonths}
|
|
23
|
+
max={maxMonths}
|
|
24
|
+
step={STEP_MONTHS}
|
|
25
|
+
value={monthsValue || defaultMonths}
|
|
26
|
+
onChange={setMonthsValue}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
2
|
+
|
|
3
|
+
export function renderProposal(monthlyPayment: number, rate: number) {
|
|
4
|
+
return (
|
|
5
|
+
<div className="box-border h-fit p-9 bg-primary-main rounded-md text-white">
|
|
6
|
+
<div className="text-base mb-[18px]">Наше предложение</div>
|
|
7
|
+
<div className="text-sm opacity-60">Ежемесячный платёж</div>
|
|
8
|
+
<div className="text-lg mb-3">{addSpacesBetweenNumbers(Math.round(monthlyPayment))} ₽</div>
|
|
9
|
+
<div className="text-sm opacity-60">Ставка</div>
|
|
10
|
+
<div className="text-lg">{rate} %</div>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
2
|
+
|
|
3
|
+
export function renderTermsButton() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex items-center">
|
|
6
|
+
<Button className="mr-3" text="Отправить заявку" version="primary" href="#" />
|
|
7
|
+
<div
|
|
8
|
+
className="w-80 text-2xs leading-4 text-secondary-text"
|
|
9
|
+
aria-label="Соглашение на обработку персональных данных"
|
|
10
|
+
>
|
|
11
|
+
Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
|
|
12
|
+
требованиям ФЗ «О персональных данных»
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
|
+
import type { InputRangeProps } from '../../ui-kit/InputRange/InputRangeProps';
|
|
3
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
4
|
+
import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
|
|
5
|
+
import type { CalculatorParams } from './CreditCalculatorContent';
|
|
6
|
+
|
|
7
|
+
const STEP_MONEY = 1000;
|
|
8
|
+
|
|
9
|
+
interface RenderWantedSumInputProps {
|
|
10
|
+
calculatorParams: CalculatorParams;
|
|
11
|
+
moneyValue: number | undefined;
|
|
12
|
+
defaultSum: number;
|
|
13
|
+
setMoneyValue: InputRangeProps['onChange'];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function renderWantedSumInput(props: RenderWantedSumInputProps) {
|
|
17
|
+
const { calculatorParams, moneyValue, defaultSum, setMoneyValue } = props;
|
|
18
|
+
|
|
19
|
+
const minSum = calculatorParams?.minSum || DEFAULT_MIN_SUM;
|
|
20
|
+
const maxSum = calculatorParams?.maxSum || DEFAULT_MAX_SUM;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<InputRange
|
|
24
|
+
title="Желаемая сумма кредита, ₽"
|
|
25
|
+
items={[
|
|
26
|
+
`От ${addSpacesBetweenNumbers(minSum)} рублей`,
|
|
27
|
+
`До ${addSpacesBetweenNumbers(maxSum)} рублей`,
|
|
28
|
+
]}
|
|
29
|
+
min={minSum}
|
|
30
|
+
max={maxSum}
|
|
31
|
+
step={STEP_MONEY}
|
|
32
|
+
value={moneyValue || defaultSum}
|
|
33
|
+
onChange={setMoneyValue}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
|
+
import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
|
|
4
|
+
import { formatCurrency } from './formatCurrency';
|
|
5
|
+
|
|
6
|
+
const TABLE_HEAD_STYLE = 'text-left font-normal text-sm text-secondary-text';
|
|
7
|
+
|
|
8
|
+
const CURRENCY_ICONS_MAP = {
|
|
9
|
+
USD: 'DollarIcon',
|
|
10
|
+
EUR: 'EuroIcon',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
interface CurrencyTableProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
exchangeCurrencyItems: ExchangeCurrencyItem[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const CurrencyTable = JSX<CurrencyTableProps>(({ className, exchangeCurrencyItems }) => {
|
|
19
|
+
return (
|
|
20
|
+
<table className={`h-fit w-fit ${className}`}>
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th className={TABLE_HEAD_STYLE}>Валюта</th>
|
|
24
|
+
<th className={`${TABLE_HEAD_STYLE} pl-11`}>Купить</th>
|
|
25
|
+
<th className={`${TABLE_HEAD_STYLE} pl-11`}>Продать</th>
|
|
26
|
+
</tr>
|
|
27
|
+
</thead>
|
|
28
|
+
<tbody>{exchangeCurrencyItems.map((item) => renderCurrencyRow(item))}</tbody>
|
|
29
|
+
</table>
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const renderCurrencyRow = (exchangeCurrencyItem: ExchangeCurrencyItem) => {
|
|
34
|
+
const code = exchangeCurrencyItem?.currency?.currency;
|
|
35
|
+
return (
|
|
36
|
+
<tr key={code}>
|
|
37
|
+
<td className="pt-4">
|
|
38
|
+
<div className="flex items-center">
|
|
39
|
+
{code ? <Icon name={CURRENCY_ICONS_MAP[code]} width="24" height="24" /> : null}
|
|
40
|
+
<span className="ml-2">{code}</span>
|
|
41
|
+
</div>
|
|
42
|
+
</td>
|
|
43
|
+
<td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem.buyExchangeRate)}</td>
|
|
44
|
+
<td className="pt-4 pl-11">{formatCurrency(exchangeCurrencyItem.saleExchangeRate)}</td>
|
|
45
|
+
</tr>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
3
|
+
|
|
4
|
+
interface CurrentLocationProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
address?: string;
|
|
7
|
+
distance?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const CurrentLocation = JSX<CurrentLocationProps>(
|
|
11
|
+
({ className = '', address, distance }) => (
|
|
12
|
+
<div className={`flex text-sm ${className}`}>
|
|
13
|
+
<Icon className="min-w-fit" name="GpsIcon" width="24" height="24" asSVG />
|
|
14
|
+
<div className="ml-1.5">
|
|
15
|
+
{address ? <p className="m-0">{address}</p> : null}
|
|
16
|
+
{distance ? (
|
|
17
|
+
<p className="text-secondary-text m-0">Курс указан для ближайшего офиса - {distance}</p>
|
|
18
|
+
) : null}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
),
|
|
22
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
3
|
+
import { Input } from '../../ui-kit/Input/Input';
|
|
4
|
+
import { Select } from '../../ui-kit/Select/Select';
|
|
5
|
+
import { SelectOption } from '../../ui-kit/Select/SelectOption';
|
|
6
|
+
import type { ExchangeCurrencyItem } from './ExchangeRateTileContent';
|
|
7
|
+
|
|
8
|
+
export interface ExchangeCurrencyCalculatorProps {
|
|
9
|
+
exchangeCurrencyItems: ExchangeCurrencyItem[];
|
|
10
|
+
codes: string[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ExchangeCurrencyCalculator = JSX<ExchangeCurrencyCalculatorProps>(
|
|
15
|
+
({ codes, className = '' }) => {
|
|
16
|
+
return (
|
|
17
|
+
<div className={`grid gap-3.5 ${className}`}>
|
|
18
|
+
{renderInput('Хочу продать', codes)}
|
|
19
|
+
{renderInput('Получу', codes)}
|
|
20
|
+
<Button className="box-border mt-3.5 py-3 h-12 w-44" version="primary" href="#">
|
|
21
|
+
Купить валюту
|
|
22
|
+
</Button>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
function renderInput(placeholder: string, codes: string[]) {
|
|
29
|
+
return (
|
|
30
|
+
<div className="flex items-center">
|
|
31
|
+
<Input
|
|
32
|
+
className="h-10 border pl-2.5 rounded-md text-m-sm w-full appearance-none"
|
|
33
|
+
type="number"
|
|
34
|
+
placeholder={`${placeholder}`}
|
|
35
|
+
/>
|
|
36
|
+
{codes.length ? (
|
|
37
|
+
<Select className="h-9 -translate-x-16">
|
|
38
|
+
{codes.map((code, i) => (
|
|
39
|
+
<SelectOption key={String(i)} value={code}>
|
|
40
|
+
{code}
|
|
41
|
+
</SelectOption>
|
|
42
|
+
))}
|
|
43
|
+
</Select>
|
|
44
|
+
) : null}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -5,7 +5,7 @@ import { ExchangeRateTile } from './ExchangeRateTile';
|
|
|
5
5
|
export default {
|
|
6
6
|
default: (
|
|
7
7
|
<div className="container grid grid-cols-12">
|
|
8
|
-
<ExchangeRateTile context={context} className="col-span-
|
|
8
|
+
<ExchangeRateTile context={context} className="col-span-12" />
|
|
9
9
|
</div>
|
|
10
10
|
),
|
|
11
11
|
};
|
|
@@ -1,104 +1,73 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useExchangeRates } from '../../hooks/useExchangeRates';
|
|
2
3
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
4
|
-
import { ButtonSection } from '../../ui-kit/Button/ButtonSection';
|
|
5
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
-
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
7
5
|
import { BaseTile } from '../BaseTile/BaseTile';
|
|
8
6
|
import { getTileHeadingType } from '../BaseTile/getTileHeadingType';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { CurrencyTable } from './CurrencyTable';
|
|
8
|
+
import { CurrentLocation } from './CurrentLocation';
|
|
9
|
+
import { ExchangeCurrencyCalculator } from './ExchangeCurrencyCalculator';
|
|
11
10
|
import type { ExchangeRateTileContent } from './ExchangeRateTileContent';
|
|
12
11
|
|
|
13
|
-
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
|
|
14
|
-
|
|
15
|
-
const CBR_EXCHANGE_RATE_URL = 'https://www.cbr-xml-daily.ru/daily_json.js';
|
|
16
|
-
|
|
17
12
|
const CURRENCY_CODES = ['USD', 'EUR'];
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
EUR: 'EuroIcon',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const buttons: ButtonProps[] = [
|
|
13
|
+
const EXCHANGE_CODES = ['RUB', 'USD', 'EUR'];
|
|
14
|
+
const DEFAULT_CURRENCY_ITEMS = [
|
|
24
15
|
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
buyExchangeRate: 90.6,
|
|
17
|
+
saleExchangeRate: 92.8,
|
|
18
|
+
currency: { id: 2, code: '978', currency: 'EUR', name: 'Евро' },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
buyExchangeRate: 73.75,
|
|
22
|
+
saleExchangeRate: 75.95,
|
|
23
|
+
currency: { id: 1, code: '840', currency: 'USD', name: 'Американский доллар' },
|
|
28
24
|
},
|
|
29
25
|
];
|
|
30
26
|
|
|
27
|
+
const DEFAULT_LOCATION = {
|
|
28
|
+
address: 'Москва, ул.Ленина д.28',
|
|
29
|
+
distance: '6км',
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {}
|
|
33
|
+
|
|
31
34
|
export const ExchangeRateTile = JSX<ExchangeRateTileProps>(
|
|
32
35
|
({ className = '', context, title = 'Курсы обмена валют' }) => {
|
|
33
|
-
const
|
|
36
|
+
const data = useExchangeRates(context.useAsyncData);
|
|
37
|
+
const exchangeCurrencyItems =
|
|
38
|
+
data?.exchangeRate?.currencies?.filter((item) => {
|
|
39
|
+
return CURRENCY_CODES.indexOf(item?.currency?.currency || '') !== -1;
|
|
40
|
+
}) || DEFAULT_CURRENCY_ITEMS;
|
|
41
|
+
|
|
34
42
|
return (
|
|
35
|
-
<section
|
|
36
|
-
className={`bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(
|
|
37
|
-
className,
|
|
38
|
-
)} ${getTileMinHeight(className)} `}
|
|
39
|
-
>
|
|
43
|
+
<section className={`bg-white text-primary-text font-sans p-9 box-border ${className}`}>
|
|
40
44
|
<BaseTile
|
|
41
45
|
context={context}
|
|
42
46
|
title={
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/>
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
buttons={
|
|
52
|
-
buttons?.length ? (
|
|
53
|
-
<ButtonSection context={context} buttons={buttons} className="flex mt-9 gap-3" />
|
|
54
|
-
) : null
|
|
47
|
+
<Heading
|
|
48
|
+
headingType={getTileHeadingType(className)}
|
|
49
|
+
title={title}
|
|
50
|
+
className="whitespace-pre-wrap mb-3"
|
|
51
|
+
/>
|
|
55
52
|
}
|
|
56
53
|
>
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
<div className="flex">
|
|
55
|
+
<div className="mr-20 pt-3">
|
|
56
|
+
{exchangeCurrencyItems ? (
|
|
57
|
+
<CurrencyTable className="mb-7" exchangeCurrencyItems={exchangeCurrencyItems} />
|
|
58
|
+
) : null}
|
|
59
|
+
<CurrentLocation {...DEFAULT_LOCATION} />
|
|
60
|
+
</div>
|
|
61
|
+
{exchangeCurrencyItems?.length ? (
|
|
62
|
+
<ExchangeCurrencyCalculator
|
|
63
|
+
className="grow"
|
|
64
|
+
exchangeCurrencyItems={exchangeCurrencyItems}
|
|
65
|
+
codes={EXCHANGE_CODES}
|
|
66
|
+
/>
|
|
67
|
+
) : null}
|
|
68
|
+
</div>
|
|
66
69
|
</BaseTile>
|
|
67
70
|
</section>
|
|
68
71
|
);
|
|
69
72
|
},
|
|
70
73
|
);
|
|
71
|
-
|
|
72
|
-
const CurrencyTH = JSX<{ className?: string }>(({ className = '', children }) => (
|
|
73
|
-
<th className={`text-left font-normal text-sm text-secondary-text ${className}`}>{children}</th>
|
|
74
|
-
));
|
|
75
|
-
|
|
76
|
-
const CurrencyTD = JSX<{ className?: string }>(({ className = '', children }) => (
|
|
77
|
-
<td className={`text-left font-normal text-base text-primary-text ${className}`}>{children}</td>
|
|
78
|
-
));
|
|
79
|
-
|
|
80
|
-
async function fetchExchangeRate(): Promise<{
|
|
81
|
-
Valute?: Record<string, { CharCode: string; Name?: string; Value: number; Previous?: number }>;
|
|
82
|
-
}> {
|
|
83
|
-
const response = await fetch(CBR_EXCHANGE_RATE_URL);
|
|
84
|
-
return await response.json();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const currencyNumberFormat = new Intl.NumberFormat('ru', { style: 'currency', currency: 'RUB' });
|
|
88
|
-
|
|
89
|
-
const formatCurrency = (value?: number) => (value ? currencyNumberFormat.format(value) : '');
|
|
90
|
-
|
|
91
|
-
const renderCurrencyRow = (data) => (code: string) => {
|
|
92
|
-
const value = (data?.Valute || {})[code]?.Value;
|
|
93
|
-
return (
|
|
94
|
-
<tr key={code}>
|
|
95
|
-
<CurrencyTD className="pt-4">
|
|
96
|
-
<div className="flex items-center">
|
|
97
|
-
<Icon name={CURRENCY_ICONS_MAP[code]} width="24" height="24" />
|
|
98
|
-
<span className="ml-2">{code}</span>
|
|
99
|
-
</div>
|
|
100
|
-
</CurrencyTD>
|
|
101
|
-
<CurrencyTD className="pt-4 pl-11">{formatCurrency(value)}</CurrencyTD>
|
|
102
|
-
</tr>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
@@ -4,3 +4,14 @@ import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
|
4
4
|
* @title Курсы валют
|
|
5
5
|
*/
|
|
6
6
|
export type ExchangeRateTileContent = HeadingContent;
|
|
7
|
+
|
|
8
|
+
export interface ExchangeCurrencyItem {
|
|
9
|
+
buyExchangeRate?: number;
|
|
10
|
+
saleExchangeRate?: number;
|
|
11
|
+
currency?: {
|
|
12
|
+
id?: number;
|
|
13
|
+
code?: string;
|
|
14
|
+
currency?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -2,12 +2,12 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { BlockVersion } from '../../model/BlockVersion';
|
|
3
3
|
import { Button } from '../../ui-kit/Button/Button';
|
|
4
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
|
+
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
5
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
7
|
import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl';
|
|
7
8
|
import type { GalleryCard } from './GalleryContent';
|
|
8
9
|
import { GalleryItem } from './GalleryContent';
|
|
9
10
|
import type { GalleryProps } from './GalleryProps';
|
|
10
|
-
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
11
11
|
|
|
12
12
|
const blockStyle: Record<BlockVersion, string> = {
|
|
13
13
|
primary: 'bg-white',
|
|
@@ -57,7 +57,7 @@ function renderCard(card: GalleryCard, key: number) {
|
|
|
57
57
|
{card.description ? renderDescription(card) : null}
|
|
58
58
|
{card.items?.length ? renderItems(card.items) : null}
|
|
59
59
|
</div>
|
|
60
|
-
{card?.button?.
|
|
60
|
+
{card?.button?.text ? renderButton(card.button) : null}
|
|
61
61
|
</div>
|
|
62
62
|
);
|
|
63
63
|
}
|
|
@@ -35,7 +35,7 @@ export const Header = JSX<HeaderProps>(
|
|
|
35
35
|
<div className="container px-4 py-0 box-border">
|
|
36
36
|
<HeaderTop onClick={toggleBurgerMenu} bgColor={bgColor} />
|
|
37
37
|
<nav className="flex items-center m-0 p-0 overflow-y-hidden w-full h-[50px]">
|
|
38
|
-
<div className="flex">
|
|
38
|
+
<div className="flex no-scrollbar horizontal-list h-full items-center">
|
|
39
39
|
{subItems?.map((_, i) =>
|
|
40
40
|
renderSubItem(
|
|
41
41
|
{
|