@redneckz/wildless-cms-uni-blocks 0.9.10 → 0.9.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 +145 -66
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CalculatorContent.d.ts +18 -17
- package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/bundle/components/Calculator/rangeHelpers.d.ts +1 -0
- package/bundle/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/bundle/components/Filtration/FiltrationContent.d.ts +18 -8
- package/bundle/components/Footer/MediaButton.d.ts +3 -4
- package/bundle/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/bundle/content-page-repository/alignImg.d.ts +9 -0
- package/bundle/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/bundle/content-page-repository/resizeImg.d.ts +3 -0
- package/bundle/content-page-repository/transformContentPage.d.ts +1 -0
- package/bundle/content-page-repository/transformImg.d.ts +6 -5
- package/bundle/content-page-repository/transformPicture.d.ts +1 -1
- package/bundle/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/bundle/utils/arrayByRange.d.ts +1 -0
- package/bundle/utils/isPictureSizeEmpty.d.ts +2 -2
- package/bundle/utils/mergeIntervals.d.ts +1 -0
- package/dist/components/Calculator/CalculatorContent.d.ts +18 -17
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/dist/components/Calculator/DepositCalculatorForm.js +21 -11
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/constants.js +1 -1
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.d.ts +1 -0
- package/dist/components/Calculator/rangeHelpers.js +4 -1
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/dist/components/Calculator/renderMonthsInput.js +3 -2
- package/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +27 -29
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js +22 -6
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/dist/components/Filtration/Filtration.js +1 -1
- package/dist/components/Filtration/Filtration.js.map +1 -1
- package/dist/components/Filtration/FiltrationContent.d.ts +18 -8
- package/dist/components/Filtration/FiltrationInner.js +9 -5
- package/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/dist/components/Filtration/renderFormItem.js +6 -5
- package/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/dist/components/Footer/MediaButton.d.ts +3 -4
- package/dist/components/Footer/MediaButton.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/dist/content-page-repository/ContentPageRepository.js +7 -25
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/content-page-repository/alignImg.d.ts +9 -0
- package/dist/content-page-repository/alignImg.js +23 -0
- package/dist/content-page-repository/alignImg.js.map +1 -0
- package/dist/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/dist/content-page-repository/computeImgOutputPath.js +18 -0
- package/dist/content-page-repository/computeImgOutputPath.js.map +1 -0
- package/dist/content-page-repository/resizeImg.d.ts +3 -0
- package/dist/content-page-repository/resizeImg.js +19 -0
- package/dist/content-page-repository/resizeImg.js.map +1 -0
- package/dist/content-page-repository/transformContentPage.d.ts +1 -0
- package/dist/content-page-repository/transformContentPage.js +25 -19
- package/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/dist/content-page-repository/transformImg.d.ts +6 -5
- package/dist/content-page-repository/transformImg.js +26 -76
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/content-page-repository/transformPicture.d.ts +1 -1
- package/dist/content-page-repository/transformPicture.js +8 -16
- package/dist/content-page-repository/transformPicture.js.map +1 -1
- package/dist/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/dist/ui-kit/InputListRange/InputListRange.js +41 -0
- package/dist/ui-kit/InputListRange/InputListRange.js.map +1 -0
- package/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/dist/ui-kit/InputListRange/InputListRangeProps.js +2 -0
- package/dist/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
- package/dist/ui-kit/Select/Select.js +2 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/utils/arrayByRange.d.ts +1 -0
- package/dist/utils/arrayByRange.js +5 -0
- package/dist/utils/arrayByRange.js.map +1 -0
- package/dist/utils/isPictureSizeEmpty.d.ts +2 -2
- package/dist/utils/isPictureSizeEmpty.js +1 -1
- package/dist/utils/isPictureSizeEmpty.js.map +1 -1
- package/dist/utils/mergeIntervals.d.ts +1 -0
- package/dist/utils/mergeIntervals.js +20 -0
- package/dist/utils/mergeIntervals.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +18 -17
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/lib/components/Calculator/DepositCalculatorForm.js +22 -12
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/constants.js +1 -1
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.d.ts +1 -0
- package/lib/components/Calculator/rangeHelpers.js +2 -0
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/lib/components/Calculator/renderMonthsInput.js +3 -2
- package/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +27 -29
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js +22 -6
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/lib/components/Filtration/Filtration.js +1 -1
- package/lib/components/Filtration/Filtration.js.map +1 -1
- package/lib/components/Filtration/FiltrationContent.d.ts +18 -8
- package/lib/components/Filtration/FiltrationInner.js +9 -5
- package/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/lib/components/Filtration/renderFormItem.js +6 -5
- package/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/lib/components/Footer/MediaButton.d.ts +3 -4
- package/lib/components/Footer/MediaButton.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/lib/content-page-repository/ContentPageRepository.js +8 -26
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/content-page-repository/alignImg.d.ts +9 -0
- package/lib/content-page-repository/alignImg.js +17 -0
- package/lib/content-page-repository/alignImg.js.map +1 -0
- package/lib/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/lib/content-page-repository/computeImgOutputPath.js +12 -0
- package/lib/content-page-repository/computeImgOutputPath.js.map +1 -0
- package/lib/content-page-repository/resizeImg.d.ts +3 -0
- package/lib/content-page-repository/resizeImg.js +13 -0
- package/lib/content-page-repository/resizeImg.js.map +1 -0
- package/lib/content-page-repository/transformContentPage.d.ts +1 -0
- package/lib/content-page-repository/transformContentPage.js +23 -18
- package/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/lib/content-page-repository/transformImg.d.ts +6 -5
- package/lib/content-page-repository/transformImg.js +26 -76
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/content-page-repository/transformPicture.d.ts +1 -1
- package/lib/content-page-repository/transformPicture.js +8 -16
- package/lib/content-page-repository/transformPicture.js.map +1 -1
- package/lib/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/lib/ui-kit/InputListRange/InputListRange.js +39 -0
- package/lib/ui-kit/InputListRange/InputListRange.js.map +1 -0
- package/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/lib/ui-kit/InputListRange/InputListRangeProps.js +2 -0
- package/lib/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
- package/lib/ui-kit/Select/Select.js +2 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/utils/arrayByRange.d.ts +1 -0
- package/lib/utils/arrayByRange.js +2 -0
- package/lib/utils/arrayByRange.js.map +1 -0
- package/lib/utils/isPictureSizeEmpty.d.ts +2 -2
- package/lib/utils/isPictureSizeEmpty.js +1 -1
- package/lib/utils/isPictureSizeEmpty.js.map +1 -1
- package/lib/utils/mergeIntervals.d.ts +1 -0
- package/lib/utils/mergeIntervals.js +17 -0
- package/lib/utils/mergeIntervals.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +18 -17
- package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +1 -0
- package/mobile/bundle/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/mobile/bundle/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/bundle/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/bundle/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/mobile/bundle/content-page-repository/alignImg.d.ts +9 -0
- package/mobile/bundle/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/mobile/bundle/content-page-repository/resizeImg.d.ts +3 -0
- package/mobile/bundle/content-page-repository/transformContentPage.d.ts +1 -0
- package/mobile/bundle/content-page-repository/transformImg.d.ts +6 -5
- package/mobile/bundle/content-page-repository/transformPicture.d.ts +1 -1
- package/mobile/bundle/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/mobile/bundle/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/mobile/bundle/utils/arrayByRange.d.ts +1 -0
- package/mobile/bundle/utils/isPictureSizeEmpty.d.ts +2 -2
- package/mobile/bundle/utils/mergeIntervals.d.ts +1 -0
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +18 -17
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +21 -11
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.js +1 -1
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +1 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js +4 -1
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/mobile/dist/components/Calculator/renderMonthsInput.js +3 -2
- package/mobile/dist/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +27 -29
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +22 -6
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/mobile/dist/components/Filtration/Filtration.js +1 -1
- package/mobile/dist/components/Filtration/Filtration.js.map +1 -1
- package/mobile/dist/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/dist/components/Filtration/FiltrationInner.js +9 -5
- package/mobile/dist/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/dist/components/Filtration/renderFormItem.js +6 -5
- package/mobile/dist/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/dist/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
- package/mobile/dist/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/mobile/dist/content-page-repository/ContentPageRepository.js +7 -25
- package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/dist/content-page-repository/alignImg.d.ts +9 -0
- package/mobile/dist/content-page-repository/alignImg.js +23 -0
- package/mobile/dist/content-page-repository/alignImg.js.map +1 -0
- package/mobile/dist/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/mobile/dist/content-page-repository/computeImgOutputPath.js +18 -0
- package/mobile/dist/content-page-repository/computeImgOutputPath.js.map +1 -0
- package/mobile/dist/content-page-repository/resizeImg.d.ts +3 -0
- package/mobile/dist/content-page-repository/resizeImg.js +19 -0
- package/mobile/dist/content-page-repository/resizeImg.js.map +1 -0
- package/mobile/dist/content-page-repository/transformContentPage.d.ts +1 -0
- package/mobile/dist/content-page-repository/transformContentPage.js +25 -19
- package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/dist/content-page-repository/transformImg.d.ts +6 -5
- package/mobile/dist/content-page-repository/transformImg.js +26 -76
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/content-page-repository/transformPicture.d.ts +1 -1
- package/mobile/dist/content-page-repository/transformPicture.js +8 -16
- package/mobile/dist/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/dist/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/mobile/dist/ui-kit/InputListRange/InputListRange.js +41 -0
- package/mobile/dist/ui-kit/InputListRange/InputListRange.js.map +1 -0
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js +2 -0
- package/mobile/dist/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
- package/mobile/dist/ui-kit/Select/Select.js +2 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/utils/arrayByRange.d.ts +1 -0
- package/mobile/dist/utils/arrayByRange.js +5 -0
- package/mobile/dist/utils/arrayByRange.js.map +1 -0
- package/mobile/dist/utils/isPictureSizeEmpty.d.ts +2 -2
- package/mobile/dist/utils/isPictureSizeEmpty.js +1 -1
- package/mobile/dist/utils/isPictureSizeEmpty.js.map +1 -1
- package/mobile/dist/utils/mergeIntervals.d.ts +1 -0
- package/mobile/dist/utils/mergeIntervals.js +20 -0
- package/mobile/dist/utils/mergeIntervals.js.map +1 -0
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +18 -17
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +22 -12
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.js +1 -1
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +1 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js +2 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/renderMonthsInput.d.ts +1 -0
- package/mobile/lib/components/Calculator/renderMonthsInput.js +3 -2
- package/mobile/lib/components/Calculator/renderMonthsInput.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +27 -29
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +3 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +22 -6
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -6
- package/mobile/lib/components/Filtration/Filtration.js +1 -1
- package/mobile/lib/components/Filtration/Filtration.js.map +1 -1
- package/mobile/lib/components/Filtration/FiltrationContent.d.ts +18 -8
- package/mobile/lib/components/Filtration/FiltrationInner.js +9 -5
- package/mobile/lib/components/Filtration/FiltrationInner.js.map +1 -1
- package/mobile/lib/components/Filtration/renderFormItem.js +6 -5
- package/mobile/lib/components/Filtration/renderFormItem.js.map +1 -1
- package/mobile/lib/components/Footer/MediaButton.d.ts +3 -4
- package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
- package/mobile/lib/content-page-repository/ContentPageRepository.d.ts +1 -5
- package/mobile/lib/content-page-repository/ContentPageRepository.js +8 -26
- package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/lib/content-page-repository/alignImg.d.ts +9 -0
- package/mobile/lib/content-page-repository/alignImg.js +17 -0
- package/mobile/lib/content-page-repository/alignImg.js.map +1 -0
- package/mobile/lib/content-page-repository/computeImgOutputPath.d.ts +3 -0
- package/mobile/lib/content-page-repository/computeImgOutputPath.js +12 -0
- package/mobile/lib/content-page-repository/computeImgOutputPath.js.map +1 -0
- package/mobile/lib/content-page-repository/resizeImg.d.ts +3 -0
- package/mobile/lib/content-page-repository/resizeImg.js +13 -0
- package/mobile/lib/content-page-repository/resizeImg.js.map +1 -0
- package/mobile/lib/content-page-repository/transformContentPage.d.ts +1 -0
- package/mobile/lib/content-page-repository/transformContentPage.js +23 -18
- package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/lib/content-page-repository/transformImg.d.ts +6 -5
- package/mobile/lib/content-page-repository/transformImg.js +26 -76
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/content-page-repository/transformPicture.d.ts +1 -1
- package/mobile/lib/content-page-repository/transformPicture.js +8 -16
- package/mobile/lib/content-page-repository/transformPicture.js.map +1 -1
- package/mobile/lib/ui-kit/InputListRange/InputListRange.d.ts +2 -0
- package/mobile/lib/ui-kit/InputListRange/InputListRange.js +39 -0
- package/mobile/lib/ui-kit/InputListRange/InputListRange.js.map +1 -0
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.d.ts +10 -0
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js +2 -0
- package/mobile/lib/ui-kit/InputListRange/InputListRangeProps.js.map +1 -0
- package/mobile/lib/ui-kit/Select/Select.js +2 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/utils/arrayByRange.d.ts +1 -0
- package/mobile/lib/utils/arrayByRange.js +2 -0
- package/mobile/lib/utils/arrayByRange.js.map +1 -0
- package/mobile/lib/utils/isPictureSizeEmpty.d.ts +2 -2
- package/mobile/lib/utils/isPictureSizeEmpty.js +1 -1
- package/mobile/lib/utils/isPictureSizeEmpty.js.map +1 -1
- package/mobile/lib/utils/mergeIntervals.d.ts +1 -0
- package/mobile/lib/utils/mergeIntervals.js +17 -0
- package/mobile/lib/utils/mergeIntervals.js.map +1 -0
- package/mobile/src/components/Calculator/Calculator.example.json +3 -1
- package/mobile/src/components/Calculator/CalculatorContent.ts +20 -19
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +6 -7
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +48 -15
- package/mobile/src/components/Calculator/constants.ts +1 -1
- package/mobile/src/components/Calculator/rangeHelpers.ts +10 -0
- package/mobile/src/components/Calculator/renderMonthsInput.tsx +13 -2
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -10
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +36 -9
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -8
- package/mobile/src/components/Filtration/Filtration.example.json +39 -19
- package/mobile/src/components/Filtration/Filtration.tsx +3 -8
- package/mobile/src/components/Filtration/FiltrationContent.ts +19 -8
- package/mobile/src/components/Filtration/FiltrationInner.tsx +31 -12
- package/mobile/src/components/Filtration/renderFormItem.tsx +20 -20
- package/mobile/src/components/Footer/MediaButton.tsx +3 -5
- package/mobile/src/components/RichTextBlock/RichTextBlock.example.json +1 -1
- package/mobile/src/content-page-repository/ContentPageRepository.ts +8 -40
- package/mobile/src/content-page-repository/alignImg.ts +32 -0
- package/mobile/src/content-page-repository/computeImgOutputPath.ts +20 -0
- package/mobile/src/content-page-repository/resizeImg.ts +18 -0
- package/mobile/src/content-page-repository/transformContentPage.ts +25 -18
- package/mobile/src/content-page-repository/transformImg.ts +49 -121
- package/mobile/src/content-page-repository/transformPicture.ts +9 -21
- package/mobile/src/ui-kit/InputListRange/InputListRange.tsx +99 -0
- package/mobile/src/ui-kit/InputListRange/InputListRangeProps.ts +11 -0
- package/mobile/src/ui-kit/Select/Select.tsx +8 -1
- package/mobile/src/utils/arrayByRange.ts +4 -0
- package/mobile/src/utils/isPictureSizeEmpty.ts +3 -3
- package/mobile/src/utils/mergeIntervals.ts +19 -0
- package/package.json +1 -1
- package/src/components/Calculator/Calculator.example.json +3 -1
- package/src/components/Calculator/Calculator.fixture.tsx +4 -0
- package/src/components/Calculator/CalculatorContent.ts +20 -19
- package/src/components/Calculator/CreditCalculatorForm.tsx +6 -7
- package/src/components/Calculator/DepositCalculatorForm.tsx +48 -15
- package/src/components/Calculator/constants.ts +1 -1
- package/src/components/Calculator/rangeHelpers.ts +10 -0
- package/src/components/Calculator/renderMonthsInput.tsx +13 -2
- package/src/components/Calculator/useCreditCalculatorParams.ts +8 -10
- package/src/components/Calculator/useDepositCalculatorParams.ts +36 -9
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -2
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +0 -9
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -8
- package/src/components/Filtration/Filtration.example.json +39 -19
- package/src/components/Filtration/Filtration.fixture.tsx +36 -20
- package/src/components/Filtration/Filtration.tsx +3 -8
- package/src/components/Filtration/FiltrationContent.ts +19 -8
- package/src/components/Filtration/FiltrationInner.tsx +31 -12
- package/src/components/Filtration/renderFormItem.tsx +20 -20
- package/src/components/Footer/MediaButton.tsx +3 -5
- package/src/components/RichTextBlock/RichTextBlock.example.json +1 -1
- package/src/content-page-repository/ContentPageRepository.ts +8 -40
- package/src/content-page-repository/alignImg.ts +32 -0
- package/src/content-page-repository/computeImgOutputPath.ts +20 -0
- package/src/content-page-repository/resizeImg.ts +18 -0
- package/src/content-page-repository/transformContentPage.ts +25 -18
- package/src/content-page-repository/transformImg.ts +49 -121
- package/src/content-page-repository/transformPicture.ts +9 -21
- package/src/ui-kit/InputListRange/InputListRange.tsx +99 -0
- package/src/ui-kit/InputListRange/InputListRangeProps.ts +11 -0
- package/src/ui-kit/Select/Select.tsx +8 -1
- package/src/utils/arrayByRange.ts +4 -0
- package/src/utils/isPictureSizeEmpty.ts +3 -3
- package/src/utils/mergeIntervals.ts +19 -0
- package/bundle/content-page-repository/transformImgPath.d.ts +0 -8
- package/dist/content-page-repository/transformImgPath.d.ts +0 -8
- package/dist/content-page-repository/transformImgPath.js +0 -22
- package/dist/content-page-repository/transformImgPath.js.map +0 -1
- package/lib/content-page-repository/transformImgPath.d.ts +0 -8
- package/lib/content-page-repository/transformImgPath.js +0 -16
- package/lib/content-page-repository/transformImgPath.js.map +0 -1
- package/mobile/bundle/content-page-repository/transformImgPath.d.ts +0 -8
- package/mobile/dist/content-page-repository/transformImgPath.d.ts +0 -8
- package/mobile/dist/content-page-repository/transformImgPath.js +0 -22
- package/mobile/dist/content-page-repository/transformImgPath.js.map +0 -1
- package/mobile/lib/content-page-repository/transformImgPath.d.ts +0 -8
- package/mobile/lib/content-page-repository/transformImgPath.js +0 -16
- package/mobile/lib/content-page-repository/transformImgPath.js.map +0 -1
- package/mobile/src/content-page-repository/transformImgPath.ts +0 -30
- package/src/content-page-repository/transformImgPath.ts +0 -30
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InputListRange } from '../../ui-kit/InputListRange/InputListRange';
|
|
1
2
|
import { InputRange } from '../../ui-kit/InputRange/InputRange';
|
|
2
3
|
import { clamp } from '../../utils/clamp';
|
|
3
4
|
|
|
@@ -7,6 +8,7 @@ interface RenderMonthsInputParams {
|
|
|
7
8
|
minMonths: number;
|
|
8
9
|
maxMonths: number;
|
|
9
10
|
monthsValue: number;
|
|
11
|
+
availableMonths?: Array<number>;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export function renderMonthsInput(
|
|
@@ -14,14 +16,23 @@ export function renderMonthsInput(
|
|
|
14
16
|
params: RenderMonthsInputParams,
|
|
15
17
|
callback?: (value: number) => void,
|
|
16
18
|
) {
|
|
17
|
-
const { minMonths, maxMonths, monthsValue } = params;
|
|
19
|
+
const { minMonths, maxMonths, monthsValue, availableMonths } = params;
|
|
18
20
|
const monthText = (month: number) => {
|
|
19
21
|
const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
|
|
20
22
|
|
|
21
23
|
return `${month} ${text}`;
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
return (
|
|
26
|
+
return availableMonths?.length ? (
|
|
27
|
+
<InputListRange
|
|
28
|
+
className="mt-7"
|
|
29
|
+
title={title}
|
|
30
|
+
items={[`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`]}
|
|
31
|
+
list={availableMonths}
|
|
32
|
+
value={clamp(monthsValue, minMonths, maxMonths)}
|
|
33
|
+
onChange={callback}
|
|
34
|
+
/>
|
|
35
|
+
) : (
|
|
25
36
|
<InputRange
|
|
26
37
|
className="mt-7"
|
|
27
38
|
title={title}
|
|
@@ -41,14 +41,13 @@ export const useCreditCalculatorParams = (
|
|
|
41
41
|
): CreditCalculatorParams => {
|
|
42
42
|
const { moneyValue, monthsValue } = userInputParams;
|
|
43
43
|
const data = useCalculatorParams<CreditCalculatorData>(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
|
|
44
|
+
const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
|
|
45
|
+
const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
|
|
46
|
+
const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
|
|
47
|
+
const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
|
|
44
48
|
const creditCalculatorSourceBookParams =
|
|
45
|
-
data?.rows?.find(
|
|
46
|
-
|
|
47
|
-
const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
|
|
48
|
-
const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
|
|
49
|
-
const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
|
|
50
|
-
|
|
51
|
-
return (
|
|
49
|
+
data?.rows?.find(
|
|
50
|
+
(row) =>
|
|
52
51
|
checkRowByParam({
|
|
53
52
|
row,
|
|
54
53
|
userInputParams,
|
|
@@ -74,9 +73,8 @@ export const useCreditCalculatorParams = (
|
|
|
74
73
|
isExclude: isExcludeInsurance,
|
|
75
74
|
}) &&
|
|
76
75
|
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
77
|
-
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)
|
|
78
|
-
|
|
79
|
-
}) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
76
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row),
|
|
77
|
+
) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
80
78
|
|
|
81
79
|
const { rate } = creditCalculatorSourceBookParams;
|
|
82
80
|
const monthlyPayment = getMonthlyPayment(rate, userInputParams);
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { arrayByRange } from '../../utils/arrayByRange';
|
|
2
|
+
import { mergeIntervals } from '../../utils/mergeIntervals';
|
|
3
|
+
import { DepositCalculatorParamsViewSettings } from './CalculatorContent';
|
|
1
4
|
import { DEFAULT_DEPOSIT_CALCULATOR_PARAMS, DEPOSIT_CALC_DEFAULT_DIR } from './constants';
|
|
2
5
|
import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
|
|
3
6
|
import { useCalculatorParams } from './useCalculatorParams';
|
|
@@ -23,6 +26,7 @@ export interface DepositCalculatorUserInputParams extends CommonDepositParams {
|
|
|
23
26
|
export interface DepositCalculatorParams
|
|
24
27
|
extends DepositCalculatorSourceBookParams,
|
|
25
28
|
DepositCalculatorUserInputParams {
|
|
29
|
+
availableMonths: number[];
|
|
26
30
|
income: number;
|
|
27
31
|
finalSum: number;
|
|
28
32
|
}
|
|
@@ -34,21 +38,31 @@ export type DepositCalculatorData = {
|
|
|
34
38
|
export const useDepositCalculatorParams = (
|
|
35
39
|
userInputParams: DepositCalculatorUserInputParams,
|
|
36
40
|
sourceBookDir?: string,
|
|
41
|
+
paramsViewSettings?: DepositCalculatorParamsViewSettings,
|
|
37
42
|
): DepositCalculatorParams => {
|
|
38
|
-
const {
|
|
39
|
-
userInputParams;
|
|
40
|
-
|
|
43
|
+
const { moneyValue, monthsValue } = userInputParams;
|
|
41
44
|
const data = useCalculatorParams<DepositCalculatorData>(
|
|
42
45
|
sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR,
|
|
43
46
|
);
|
|
44
|
-
|
|
47
|
+
const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
|
|
48
|
+
const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
|
|
45
49
|
const depositCalculatorSourceBookParams =
|
|
46
50
|
data?.rows?.find(
|
|
47
|
-
(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
(row) =>
|
|
52
|
+
checkRowByParam({
|
|
53
|
+
row,
|
|
54
|
+
userInputParams,
|
|
55
|
+
paramKey: 'isMonthlyInterestPayment',
|
|
56
|
+
isExclude: isExcludeMonthlyInterestPayment,
|
|
57
|
+
}) &&
|
|
58
|
+
checkRowByParam({
|
|
59
|
+
row,
|
|
60
|
+
userInputParams,
|
|
61
|
+
paramKey: 'isRemoteRegistration',
|
|
62
|
+
isExclude: isExcludeRemoteRegistration,
|
|
63
|
+
}) &&
|
|
64
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
65
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row),
|
|
52
66
|
) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
53
67
|
|
|
54
68
|
const { rate } = depositCalculatorSourceBookParams;
|
|
@@ -60,6 +74,9 @@ export const useDepositCalculatorParams = (
|
|
|
60
74
|
...depositCalculatorSourceBookParams,
|
|
61
75
|
...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
|
|
62
76
|
...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
|
|
77
|
+
availableMonths: mergeIntervals(
|
|
78
|
+
sourceBookRows.map((row) => [row['minMonths'], row['maxMonths']]),
|
|
79
|
+
).flatMap(([start, end]) => arrayByRange(start, end)),
|
|
63
80
|
...userInputParams,
|
|
64
81
|
income,
|
|
65
82
|
finalSum,
|
|
@@ -78,3 +95,13 @@ const getDepositIncome = (rate: number, userInputParams: DepositCalculatorUserIn
|
|
|
78
95
|
return Math.round((moneyValue * rate * 30 * monthsValue) / 365 / 100);
|
|
79
96
|
}
|
|
80
97
|
};
|
|
98
|
+
|
|
99
|
+
interface CheckRowByParamProps {
|
|
100
|
+
row: DepositCalculatorSourceBookParams;
|
|
101
|
+
userInputParams: DepositCalculatorUserInputParams;
|
|
102
|
+
paramKey: string;
|
|
103
|
+
isExclude: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }: CheckRowByParamProps) =>
|
|
107
|
+
isExclude || userInputParams[paramKey] === row[paramKey];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Picture } from '../../model/Picture';
|
|
2
2
|
import '../../setup-fixture';
|
|
3
|
-
import { Icon } from '../../ui-kit/Icon/Icon';
|
|
4
3
|
import { CarouselRecommendationCard } from './CarouselRecommendationCard';
|
|
5
4
|
import type {
|
|
6
5
|
CarouselRecommendationCardContent,
|
|
@@ -17,8 +16,6 @@ const icon: Picture = {
|
|
|
17
16
|
title: 'product-basket',
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
const appendLeft = <Icon name="PlayMarketIcon" iconVersion="color" width="24" height="24" asSVG />;
|
|
21
|
-
|
|
22
19
|
const commonProps: RecommendationSocialMedia = {
|
|
23
20
|
target: '_blank',
|
|
24
21
|
version: 'gray',
|
|
@@ -28,23 +25,17 @@ const commonProps: RecommendationSocialMedia = {
|
|
|
28
25
|
const socialMediaWithText: RecommendationSocialMedia[] = [
|
|
29
26
|
{
|
|
30
27
|
href: 'https://t.me',
|
|
31
|
-
aboveText: 'Доступно в',
|
|
32
28
|
text: 'Telegram',
|
|
33
|
-
appendLeft,
|
|
34
29
|
...commonProps,
|
|
35
30
|
},
|
|
36
31
|
{
|
|
37
32
|
href: 'https://vk.com',
|
|
38
|
-
aboveText: 'Доступно в',
|
|
39
33
|
text: 'Telegram',
|
|
40
|
-
appendLeft,
|
|
41
34
|
...commonProps,
|
|
42
35
|
},
|
|
43
36
|
{
|
|
44
37
|
href: 'https://ok.ru',
|
|
45
|
-
aboveText: 'Доступно в',
|
|
46
38
|
text: 'Telegram',
|
|
47
|
-
appendLeft,
|
|
48
39
|
...commonProps,
|
|
49
40
|
},
|
|
50
41
|
];
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
2
1
|
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
2
|
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
4
3
|
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
5
4
|
import type { IconProps } from '../../model/Picture';
|
|
6
|
-
import type {
|
|
5
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
7
6
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
8
7
|
import type { TextAlign } from '../../ui-kit/Text/TextProps';
|
|
9
8
|
|
|
10
|
-
export type RecommendationSocialMedia = LinkCommonProps &
|
|
11
|
-
IconProps &
|
|
12
|
-
ButtonWithIconProps & {
|
|
13
|
-
version: ButtonVersion;
|
|
14
|
-
rounded?: boolean;
|
|
15
|
-
};
|
|
9
|
+
export type RecommendationSocialMedia = LinkCommonProps & IconProps & ButtonProps;
|
|
16
10
|
|
|
17
11
|
/**
|
|
18
12
|
* @title Карточка рекомендаций
|
|
@@ -3,35 +3,55 @@
|
|
|
3
3
|
"filtrationSchema": {
|
|
4
4
|
"propertyType": {
|
|
5
5
|
"title": "Тип недвижимости",
|
|
6
|
-
"type": "
|
|
7
|
-
"
|
|
8
|
-
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": ["flat", "apartment", "house", "storeRoom", "parkingSpace"],
|
|
10
|
+
"enumNames": ["Квартира", "Апартаменты", "Жилой дом", "Кладовая", "Машино-место"]
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
"stage": {
|
|
11
14
|
"title": "Этап строительства",
|
|
12
|
-
"type": "
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["built", "inProgress"],
|
|
19
|
+
"enumNames": ["Готовое жильё", "Строящиеся"]
|
|
20
|
+
}
|
|
15
21
|
},
|
|
16
22
|
"categories": {
|
|
17
23
|
"title": "Категории",
|
|
18
|
-
"type": "
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["salaryClient", "IT", "youngFamily", "military", "medicalWorker", "scientist"],
|
|
28
|
+
"enumNames": [
|
|
29
|
+
"Зарплатный клиент",
|
|
30
|
+
"IT-специалист",
|
|
31
|
+
"Молодая семья",
|
|
32
|
+
"Военнослужащий",
|
|
33
|
+
"Медицинский работник",
|
|
34
|
+
"Научный сотрудник"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
28
37
|
},
|
|
29
38
|
"extraOptions": {
|
|
30
39
|
"title": "Дополнительно",
|
|
31
|
-
"type": "
|
|
32
|
-
"
|
|
33
|
-
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["preferentialMortgage", "children"],
|
|
44
|
+
"enumNames": ["Льготная ипотека", "Дети"]
|
|
45
|
+
}
|
|
34
46
|
}
|
|
47
|
+
},
|
|
48
|
+
"resetButton": {
|
|
49
|
+
"text": "Очистить фильтры",
|
|
50
|
+
"version": "secondary"
|
|
51
|
+
},
|
|
52
|
+
"notFound": {
|
|
53
|
+
"title": "Нет подходящей ипотечной программы",
|
|
54
|
+
"description": "Попробуйте очистить фильтры"
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
57
|
}
|
|
@@ -49,34 +49,46 @@ const generateBlock = (...presets: any[]) => ({
|
|
|
49
49
|
const SCHEMA: FiltrationContent['filtrationSchema'] = {
|
|
50
50
|
propertyType: {
|
|
51
51
|
title: 'Тип недвижимости',
|
|
52
|
-
type: '
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
type: 'array',
|
|
53
|
+
items: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
enum: ['flat', 'apartment', 'house', 'storeRoom', 'parkingSpace'],
|
|
56
|
+
enumNames: ['Квартира', 'Апартаменты', 'Жилой дом', 'Кладовая', 'Машино-место'],
|
|
57
|
+
},
|
|
55
58
|
},
|
|
56
59
|
stage: {
|
|
57
60
|
title: 'Этап строительства',
|
|
58
|
-
type: '
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
type: 'array',
|
|
62
|
+
items: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: ['built', 'inProgress'],
|
|
65
|
+
enumNames: ['Готовое жильё', 'Строящиеся'],
|
|
66
|
+
},
|
|
61
67
|
},
|
|
62
68
|
categories: {
|
|
63
69
|
title: 'Категории',
|
|
64
|
-
type: '
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
'
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
type: 'array',
|
|
71
|
+
items: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
enum: ['salaryClient', 'IT', 'youngFamily', 'military', 'medicalWorker', 'scientist'],
|
|
74
|
+
enumNames: [
|
|
75
|
+
'Зарплатный клиент',
|
|
76
|
+
'IT-специалист',
|
|
77
|
+
'Молодая семья',
|
|
78
|
+
'Военнослужащий',
|
|
79
|
+
'Медицинский работник',
|
|
80
|
+
'Научный сотрудник',
|
|
81
|
+
],
|
|
82
|
+
},
|
|
74
83
|
},
|
|
75
84
|
extraOptions: {
|
|
76
85
|
title: 'Дополнительно',
|
|
77
|
-
type: '
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
type: 'array',
|
|
87
|
+
items: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
enum: ['preferentialMortgage', 'children'],
|
|
90
|
+
enumNames: ['Льготная ипотека', 'Дети'],
|
|
91
|
+
},
|
|
80
92
|
},
|
|
81
93
|
};
|
|
82
94
|
|
|
@@ -92,7 +104,11 @@ export default {
|
|
|
92
104
|
label="Другие ипотечные программы"
|
|
93
105
|
filtrationSchema={SCHEMA}
|
|
94
106
|
topItemsCount={2}
|
|
95
|
-
resetButton={{ text: 'Очистить фильтры',
|
|
107
|
+
resetButton={{ text: 'Очистить фильтры', version: 'secondary' }}
|
|
108
|
+
notFound={{
|
|
109
|
+
title: 'Нет подходящей ипотечной программы',
|
|
110
|
+
description: 'Попробуйте очистить фильтры',
|
|
111
|
+
}}
|
|
96
112
|
block={{
|
|
97
113
|
type: 'Filtration',
|
|
98
114
|
blocks: [
|
|
@@ -15,19 +15,14 @@ export const Filtration: JSXBlock<FiltrationProps> = JSX<FiltrationProps>(
|
|
|
15
15
|
const { formState, register, resetForm } = useForm();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<BlockWrapper className={style(
|
|
19
|
-
<form className="flex justify-between">
|
|
18
|
+
<BlockWrapper className={style(className)} version="transparent" {...rest}>
|
|
19
|
+
<form className="flex justify-between bg-white p-9 mb-1">
|
|
20
20
|
<div className="flex gap-11">
|
|
21
21
|
{Object.keys(filtrationSchema).map(renderFormItem(filtrationSchema, register))}
|
|
22
22
|
</div>
|
|
23
23
|
{resetButton ? (
|
|
24
24
|
<div>
|
|
25
|
-
<Button
|
|
26
|
-
className="w-72"
|
|
27
|
-
text={resetButton.text}
|
|
28
|
-
version={resetButton.buttonVersion}
|
|
29
|
-
onClick={resetForm}
|
|
30
|
-
/>
|
|
25
|
+
<Button className="w-72" onClick={resetForm} {...resetButton} />
|
|
31
26
|
</div>
|
|
32
27
|
) : null}
|
|
33
28
|
</form>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
2
|
+
import type { DescriptionProps, TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @title Заголовок
|
|
@@ -33,6 +34,7 @@ export type StringArray = {
|
|
|
33
34
|
* @hidden
|
|
34
35
|
*/
|
|
35
36
|
type?: 'array';
|
|
37
|
+
/** @title */
|
|
36
38
|
items?: {
|
|
37
39
|
/**
|
|
38
40
|
* @default string
|
|
@@ -47,13 +49,13 @@ export type StringArray = {
|
|
|
47
49
|
// TODO: Make customizable to implement arbitrary filtration blocks
|
|
48
50
|
export type FiltrationSchema = {
|
|
49
51
|
/** @title Тип недвижимости */
|
|
50
|
-
propertyType?:
|
|
52
|
+
propertyType?: StringArray;
|
|
51
53
|
/** @title Этап строительства */
|
|
52
|
-
stage?:
|
|
54
|
+
stage?: StringArray;
|
|
53
55
|
/** @title Категории */
|
|
54
|
-
categories?:
|
|
56
|
+
categories?: StringArray;
|
|
55
57
|
/** @title Дополнительно */
|
|
56
|
-
extraOptions?:
|
|
58
|
+
extraOptions?: StringArray;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
/**
|
|
@@ -67,14 +69,24 @@ export type ResetButton = {
|
|
|
67
69
|
/**
|
|
68
70
|
* @title Цвет кнопки
|
|
69
71
|
*/
|
|
70
|
-
|
|
72
|
+
version: ButtonVersion;
|
|
71
73
|
};
|
|
72
74
|
|
|
75
|
+
/**
|
|
76
|
+
* @title Плитка "Не найдено"
|
|
77
|
+
*/
|
|
78
|
+
export type NotFound = TitleProps & DescriptionProps;
|
|
79
|
+
|
|
73
80
|
export interface FiltrationInnerContent {
|
|
74
|
-
/** @title Название кнопки */
|
|
81
|
+
/** @title Название сворачивающейся кнопки */
|
|
75
82
|
label?: string;
|
|
76
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* @title Количество отображаемых предметов
|
|
85
|
+
* @minimum 1
|
|
86
|
+
*/
|
|
77
87
|
topItemsCount?: number;
|
|
88
|
+
resetButton?: ResetButton;
|
|
89
|
+
notFound?: NotFound;
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
/**
|
|
@@ -83,5 +95,4 @@ export interface FiltrationInnerContent {
|
|
|
83
95
|
export interface FiltrationContent extends FiltrationInnerContent {
|
|
84
96
|
/** @title Параметры фильтрации */
|
|
85
97
|
filtrationSchema?: FiltrationSchema;
|
|
86
|
-
resetButton?: ResetButton;
|
|
87
98
|
}
|
|
@@ -5,10 +5,11 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
5
5
|
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
6
6
|
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
7
7
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
8
|
+
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
9
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
8
10
|
import { style } from '../../utils/style';
|
|
9
|
-
import { ErrorBlock } from '../ErrorBlock/ErrorBlock';
|
|
10
11
|
import { checkShouldRenderBlock } from './checkShouldRenderBlock';
|
|
11
|
-
import type { FiltrationInnerContent } from './FiltrationContent';
|
|
12
|
+
import type { FiltrationInnerContent, NotFound } from './FiltrationContent';
|
|
12
13
|
|
|
13
14
|
const ICONS: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
14
15
|
|
|
@@ -19,7 +20,7 @@ interface FiltrationInnerProps extends FiltrationInnerContent, UniBlockProps {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
22
|
-
({ label = '', filtrationState = {}, topItemsCount = 0, block, ...rest }) => {
|
|
23
|
+
({ label = '', filtrationState = {}, topItemsCount = 0, block, notFound, ...rest }) => {
|
|
23
24
|
const blocksToRender =
|
|
24
25
|
block?.blocks?.filter((b) => checkShouldRenderBlock(filtrationState, b.content || {})) || [];
|
|
25
26
|
|
|
@@ -30,28 +31,27 @@ export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
|
30
31
|
|
|
31
32
|
return (
|
|
32
33
|
<div>
|
|
33
|
-
<div className={style(blocksToRender.length ? 'hidden' : '')}>
|
|
34
|
-
|
|
35
|
-
error={{ errorContentType: 'Image' }}
|
|
36
|
-
title="Нет подходящей ипотечной программы"
|
|
37
|
-
subtitle="Попробуйте очистить фильтры"
|
|
38
|
-
/>
|
|
34
|
+
<div className={style(blocksToRender.length ? 'hidden' : 'block')}>
|
|
35
|
+
{notFound ? renderNotFound(notFound) : null}
|
|
39
36
|
</div>
|
|
40
37
|
<div className={style(blocksToRender.length ? '' : 'hidden')}>
|
|
41
|
-
<div className={resultsGridStyle}>
|
|
38
|
+
<div className={style('mb-1', resultsGridStyle)}>
|
|
42
39
|
{renderBlocksList(visibleBlocks, { ...rest.options, parent: block })}
|
|
43
40
|
</div>
|
|
44
41
|
<Foldable
|
|
45
42
|
renderFoldableSection={({ isUnfolded }) => {
|
|
46
43
|
return (
|
|
47
|
-
<FoldableSection
|
|
44
|
+
<FoldableSection
|
|
45
|
+
className={style(resultsGridStyle, isUnfolded ? 'mb-1' : '')}
|
|
46
|
+
isUnfolded={isUnfolded}
|
|
47
|
+
>
|
|
48
48
|
{renderBlocksList(hiddenBlocks, { ...rest.options, parent: block })}
|
|
49
49
|
</FoldableSection>
|
|
50
50
|
);
|
|
51
51
|
}}
|
|
52
52
|
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
53
53
|
<DefaultFoldButton
|
|
54
|
-
className={style(
|
|
54
|
+
className={style(topItemsCount < 1 ? 'hidden' : '')}
|
|
55
55
|
disabled={!hiddenBlocks?.length}
|
|
56
56
|
label={label}
|
|
57
57
|
icon={ICONS[Number(isUnfolded)]}
|
|
@@ -65,3 +65,22 @@ export const FiltrationInner = JSX<FiltrationInnerProps>(
|
|
|
65
65
|
);
|
|
66
66
|
},
|
|
67
67
|
);
|
|
68
|
+
|
|
69
|
+
function renderNotFound({ title, description }: NotFound) {
|
|
70
|
+
return (
|
|
71
|
+
<div className="bg-white py-20">
|
|
72
|
+
{title ? (
|
|
73
|
+
<div className="mb-2">
|
|
74
|
+
<Paragraph align="text-center">
|
|
75
|
+
<Text size="text-h4">{title}</Text>
|
|
76
|
+
</Paragraph>
|
|
77
|
+
</div>
|
|
78
|
+
) : null}
|
|
79
|
+
{description ? (
|
|
80
|
+
<Paragraph size="text-xl" font="font-light" align="text-center">
|
|
81
|
+
{description}
|
|
82
|
+
</Paragraph>
|
|
83
|
+
) : null}
|
|
84
|
+
</div>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FormElementRegisterer } from '../../hooks/useForm';
|
|
2
2
|
import { SlideCheckboxGroup } from '../../ui-kit/SlideCheckboxGroup/SlideCheckboxGroup';
|
|
3
3
|
import { Text } from '../../ui-kit/Text/Text';
|
|
4
|
-
import type { FiltrationSchema,
|
|
4
|
+
import type { FiltrationSchema, StringArray } from './FiltrationContent';
|
|
5
5
|
|
|
6
6
|
export const renderFormItem =
|
|
7
7
|
(filtrationSchema: FiltrationSchema, register: FormElementRegisterer) => (key: string) => {
|
|
@@ -9,28 +9,28 @@ export const renderFormItem =
|
|
|
9
9
|
const type = item?.type;
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
|
-
case '
|
|
13
|
-
return
|
|
12
|
+
case 'array':
|
|
13
|
+
return renderCheckboxes(key, register)(item);
|
|
14
14
|
default:
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const renderCheckboxes = (key: string, register: FormElementRegisterer) => (item?: StringArray) => {
|
|
20
|
+
const options =
|
|
21
|
+
item?.items?.enum?.map((e, i) => ({ value: e, title: item?.items?.enumNames?.[i] || '' })) ||
|
|
22
|
+
[];
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
return (
|
|
25
|
+
<div key={key}>
|
|
26
|
+
{item?.title ? (
|
|
27
|
+
<div className="mb-4">
|
|
28
|
+
<Text size="text-m" font="font-light" color="text-secondary-text">
|
|
29
|
+
{item.title}
|
|
30
|
+
</Text>
|
|
31
|
+
</div>
|
|
32
|
+
) : null}
|
|
33
|
+
<SlideCheckboxGroup items={options} multiple {...register(key)} />
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type {
|
|
3
|
-
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { IconProps, Picture } from '../../model/Picture';
|
|
4
3
|
import { Button } from '../../ui-kit/Button/Button';
|
|
5
|
-
import type {
|
|
4
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
6
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
6
|
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
8
7
|
import { style } from '../../utils/style';
|
|
@@ -46,8 +45,7 @@ const ICONS_MAP: Array<{
|
|
|
46
45
|
|
|
47
46
|
export type ButtonSize = 'default' | 'small';
|
|
48
47
|
|
|
49
|
-
interface MediaButtonProps extends
|
|
50
|
-
iconVersion?: IconVersion;
|
|
48
|
+
interface MediaButtonProps extends ButtonProps, IconProps {
|
|
51
49
|
buttonSize?: ButtonSize;
|
|
52
50
|
}
|
|
53
51
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"content": {
|
|
3
|
-
"__html": "<
|
|
3
|
+
"__html": "<h1>Заголовок 1</h1>\n<h2>Заголовок 2</h2>\n<h3>Заголовок 3</h3>\n<h4>Заголовок 4</h4>\n<h5>Заголовок 5</h5>\n<h6>Заголовок 6</h6>\n<p>Параграф, в котором много текста и даже <a href=\"#\">ссылка</a></p>\n<p><strong>Жирный текст</strong>, <em>Наклонный текст</em></p>\n<ul>\n <li>Список с точками</li>\n <li>Список с точками</li>\n</ul>\n<ol>\n <li>Нумерованный список</li>\n <li>Нумерованный список</li>\n</ol>\n"
|
|
4
4
|
}
|
|
5
5
|
}
|