@redneckz/wildless-cms-uni-blocks 0.14.29 → 0.14.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.14.29.js +4 -34
- package/bin/migration-scripts/0.14.30.js +54 -0
- package/bin/utils.js +36 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +201 -89
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/bundle/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/bundle/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/bundle/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/bundle/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/bundle/hooks/useResizeObserver.d.ts +3 -0
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/bundle/ui-kit/List/List.d.ts +2 -0
- package/bundle/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/bundle/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/bundle/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/bundle/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -2
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +3 -2
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/dist/components/Calculator/RefinancingCalculatorForm.js +9 -3
- package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/dist/components/Depository/Depository.js +12 -3
- package/dist/components/Depository/Depository.js.map +1 -1
- package/dist/components/Depository/DepositoryFilter.js +1 -1
- package/dist/components/Depository/DepositoryFilter.js.map +1 -1
- package/dist/components/Depository/DepositoryItem.js +1 -1
- package/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/dist/components/Depository/useDepository.js +11 -1
- package/dist/components/Depository/useDepository.js.map +1 -1
- package/dist/components/OfficesAtmsMap/Badge.js +2 -2
- package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/dist/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/dist/components/OfficesAtmsMap/CardCell.js +6 -4
- package/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/dist/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/dist/components/OfficesAtmsMap/getScheduleDescription.js +36 -0
- package/dist/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
- package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js +28 -0
- package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/dist/components/OfficesAtmsMap/renderBusinessSchedule.js +32 -0
- package/dist/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
- package/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
- package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +3 -2
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/hooks/useResizeObserver.d.ts +3 -0
- package/dist/hooks/useResizeObserver.js +22 -0
- package/dist/hooks/useResizeObserver.js.map +1 -0
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/dist/ui-kit/DatePicker/DatePicker.js +1 -1
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js +5 -4
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/dist/ui-kit/List/List.d.ts +2 -0
- package/dist/ui-kit/List/List.js +3 -3
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/dist/ui-kit/PriceList/PriceList.js +9 -0
- package/dist/ui-kit/PriceList/PriceList.js.map +1 -0
- package/dist/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/dist/{components/PictureText/PictureTextContent.js → ui-kit/PriceList/PriceListProps.js} +1 -1
- package/dist/ui-kit/PriceList/PriceListProps.js.map +1 -0
- package/dist/ui-kit/Select/Select.js +1 -0
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/dist/ui-kit/Select/SelectPopup.js +2 -2
- package/dist/ui-kit/Select/SelectPopup.js.map +1 -1
- package/dist/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/dist/ui-kit/Select/useSelectPopup.js +2 -2
- package/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -2
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +3 -2
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/lib/components/Calculator/RefinancingCalculatorForm.js +10 -4
- package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/lib/components/Depository/Depository.js +12 -3
- package/lib/components/Depository/Depository.js.map +1 -1
- package/lib/components/Depository/DepositoryFilter.js +1 -1
- package/lib/components/Depository/DepositoryFilter.js.map +1 -1
- package/lib/components/Depository/DepositoryItem.js +1 -1
- package/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/lib/components/Depository/useDepository.js +11 -1
- package/lib/components/Depository/useDepository.js.map +1 -1
- package/lib/components/OfficesAtmsMap/Badge.js +2 -2
- package/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/lib/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/lib/components/OfficesAtmsMap/CardCell.js +6 -4
- package/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/lib/components/OfficesAtmsMap/getScheduleDescription.js +32 -0
- package/lib/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
- package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js +25 -0
- package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/lib/components/OfficesAtmsMap/renderBusinessSchedule.js +27 -0
- package/lib/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
- package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
- package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +1 -0
- package/lib/components/StepsBlock/StepsBlock.js +3 -2
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/hooks/useResizeObserver.d.ts +3 -0
- package/lib/hooks/useResizeObserver.js +19 -0
- package/lib/hooks/useResizeObserver.js.map +1 -0
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/lib/ui-kit/DatePicker/DatePicker.js +1 -1
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js +6 -5
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/lib/ui-kit/List/List.d.ts +2 -0
- package/lib/ui-kit/List/List.js +1 -1
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/lib/ui-kit/PriceList/PriceList.fixture.d.ts +6 -0
- package/lib/ui-kit/PriceList/PriceList.js +7 -0
- package/lib/ui-kit/PriceList/PriceList.js.map +1 -0
- package/lib/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/lib/ui-kit/PriceList/PriceListProps.js +2 -0
- package/lib/ui-kit/PriceList/PriceListProps.js.map +1 -0
- package/lib/ui-kit/Select/Select.js +1 -0
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/lib/ui-kit/Select/SelectPopup.js +2 -2
- package/lib/ui-kit/Select/SelectPopup.js.map +1 -1
- package/lib/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/lib/ui-kit/Select/useSelectPopup.js +2 -2
- package/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +70 -47
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/bundle/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/mobile/bundle/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/mobile/bundle/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/mobile/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/mobile/bundle/hooks/useResizeObserver.d.ts +3 -0
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/mobile/bundle/ui-kit/List/List.d.ts +2 -0
- package/mobile/bundle/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/mobile/bundle/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/mobile/bundle/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/mobile/bundle/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Blocks.js +0 -2
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +3 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +9 -3
- package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/dist/components/Depository/Depository.js +12 -3
- package/mobile/dist/components/Depository/Depository.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryFilter.js +1 -1
- package/mobile/dist/components/Depository/DepositoryFilter.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/dist/components/Depository/useDepository.js +11 -1
- package/mobile/dist/components/Depository/useDepository.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/Badge.js +2 -2
- package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/mobile/dist/components/OfficesAtmsMap/CardCell.js +6 -4
- package/mobile/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.js +36 -0
- package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js +28 -0
- package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.js +32 -0
- package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
- package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/dist/hooks/useResizeObserver.d.ts +3 -0
- package/mobile/dist/hooks/useResizeObserver.js +22 -0
- package/mobile/dist/hooks/useResizeObserver.js.map +1 -0
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +1 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +5 -4
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/dist/ui-kit/List/List.d.ts +2 -0
- package/mobile/dist/ui-kit/List/List.js +3 -3
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/mobile/dist/ui-kit/PriceList/PriceList.js +9 -0
- package/mobile/dist/ui-kit/PriceList/PriceList.js.map +1 -0
- package/mobile/dist/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/mobile/dist/{components/PictureText/PictureTextContent.js → ui-kit/PriceList/PriceListProps.js} +1 -1
- package/mobile/dist/ui-kit/PriceList/PriceListProps.js.map +1 -0
- package/mobile/dist/ui-kit/Select/Select.js +1 -0
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/mobile/dist/ui-kit/Select/SelectPopup.js +2 -2
- package/mobile/dist/ui-kit/Select/SelectPopup.js.map +1 -1
- package/mobile/dist/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/mobile/dist/ui-kit/Select/useSelectPopup.js +2 -2
- package/mobile/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Blocks.js +0 -2
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +3 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +10 -4
- package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
- package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
- package/mobile/lib/components/Depository/Depository.js +12 -3
- package/mobile/lib/components/Depository/Depository.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryFilter.js +1 -1
- package/mobile/lib/components/Depository/DepositoryFilter.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/lib/components/Depository/useDepository.js +11 -1
- package/mobile/lib/components/Depository/useDepository.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/Badge.js +2 -2
- package/mobile/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/CardCell.d.ts +3 -2
- package/mobile/lib/components/OfficesAtmsMap/CardCell.js +6 -4
- package/mobile/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
- package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
- package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.js +32 -0
- package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
- package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js +25 -0
- package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
- package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.js +27 -0
- package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
- package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
- package/mobile/lib/hooks/useResizeObserver.d.ts +3 -0
- package/mobile/lib/hooks/useResizeObserver.js +19 -0
- package/mobile/lib/hooks/useResizeObserver.js.map +1 -0
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +1 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +6 -5
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/lib/ui-kit/List/List.d.ts +2 -0
- package/mobile/lib/ui-kit/List/List.js +1 -1
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/PriceList/PriceList.d.ts +2 -0
- package/mobile/lib/ui-kit/PriceList/PriceList.js +7 -0
- package/mobile/lib/ui-kit/PriceList/PriceList.js.map +1 -0
- package/mobile/lib/ui-kit/PriceList/PriceListProps.d.ts +9 -0
- package/mobile/lib/ui-kit/PriceList/PriceListProps.js +2 -0
- package/mobile/lib/ui-kit/PriceList/PriceListProps.js.map +1 -0
- package/mobile/lib/ui-kit/Select/Select.js +1 -0
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/ui-kit/Select/SelectPopup.d.ts +5 -3
- package/mobile/lib/ui-kit/Select/SelectPopup.js +2 -2
- package/mobile/lib/ui-kit/Select/SelectPopup.js.map +1 -1
- package/mobile/lib/ui-kit/Select/useSelectPopup.d.ts +1 -1
- package/mobile/lib/ui-kit/Select/useSelectPopup.js +2 -2
- package/mobile/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
- package/mobile/src/common.css +1 -0
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +9 -6
- package/mobile/src/components/Blocks.ts +0 -2
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +3 -2
- package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +14 -3
- package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +11 -1
- package/mobile/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/mobile/src/components/Depository/Depository.tsx +25 -8
- package/mobile/src/components/Depository/DepositoryFilter.tsx +1 -1
- package/mobile/src/components/Depository/DepositoryItem.tsx +6 -2
- package/mobile/src/components/Depository/useDepository.ts +15 -6
- package/mobile/src/components/OfficesAtmsMap/Badge.tsx +2 -2
- package/mobile/src/components/OfficesAtmsMap/CardCell.tsx +33 -21
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +5 -0
- package/mobile/src/components/OfficesAtmsMap/getScheduleDescription.tsx +48 -0
- package/mobile/src/components/OfficesAtmsMap/getWorkScheduleWeek.tsx +28 -0
- package/mobile/src/components/OfficesAtmsMap/renderBusinessSchedule.tsx +54 -0
- package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +46 -41
- package/mobile/src/hooks/useResizeObserver.ts +28 -0
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +3 -0
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +12 -1
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +3 -1
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +16 -11
- package/mobile/src/ui-kit/List/List.tsx +1 -1
- package/mobile/src/ui-kit/PriceList/PriceList.tsx +25 -0
- package/mobile/src/ui-kit/PriceList/PriceListProps.ts +11 -0
- package/mobile/src/ui-kit/Select/Select.tsx +1 -0
- package/mobile/src/ui-kit/Select/SelectPopup.tsx +41 -34
- package/mobile/src/ui-kit/Select/useSelectPopup.tsx +2 -0
- package/package.json +2 -2
- package/src/common.css +1 -0
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +9 -6
- package/src/components/Blocks.mobile.ts +0 -2
- package/src/components/Blocks.ts +0 -2
- package/src/components/Calculator/Calculator.fixture.mobile.tsx +15 -0
- package/src/components/Calculator/CreditCalculatorForm.tsx +3 -2
- package/src/components/Calculator/RefinancingCalculatorForm.tsx +14 -3
- package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +11 -1
- package/src/components/CarouselCard/CarouselCard.tsx +1 -1
- package/src/components/Depository/Depository.tsx +25 -8
- package/src/components/Depository/DepositoryFilter.tsx +1 -1
- package/src/components/Depository/DepositoryItem.tsx +6 -2
- package/src/components/Depository/useDepository.ts +15 -6
- package/src/components/OfficesAtmsMap/Badge.tsx +2 -2
- package/src/components/OfficesAtmsMap/CardCell.tsx +33 -21
- package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +5 -0
- package/src/components/OfficesAtmsMap/getScheduleDescription.tsx +48 -0
- package/src/components/OfficesAtmsMap/getWorkScheduleWeek.tsx +28 -0
- package/src/components/OfficesAtmsMap/renderBusinessSchedule.tsx +54 -0
- package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +46 -41
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +42 -0
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +42 -0
- package/src/components/StepsBlock/StepsBlock.tsx +7 -4
- package/src/hooks/useResizeObserver.ts +28 -0
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +3 -0
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +12 -1
- package/src/ui-kit/DatePicker/DatePicker.tsx +3 -1
- package/src/ui-kit/Foldable/FoldableSection.tsx +16 -11
- package/src/ui-kit/List/List.tsx +1 -1
- package/src/ui-kit/PriceList/PriceList.fixture.tsx +16 -0
- package/src/ui-kit/PriceList/PriceList.tsx +25 -0
- package/src/ui-kit/PriceList/PriceListProps.ts +11 -0
- package/src/ui-kit/Select/Select.tsx +1 -0
- package/src/ui-kit/Select/SelectPopup.tsx +41 -34
- package/src/ui-kit/Select/useSelectPopup.tsx +2 -0
- package/tailwind.config.cjs +23 -20
- package/bundle/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/bundle/components/PictureText/PictureText.d.ts +0 -5
- package/bundle/components/PictureText/PictureTextContent.d.ts +0 -11
- package/bundle/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
- package/dist/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/dist/components/OfficesAtmsMap/renderLunchHour.js +0 -10
- package/dist/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
- package/dist/components/PictureText/PictureText.d.ts +0 -5
- package/dist/components/PictureText/PictureText.js +0 -9
- package/dist/components/PictureText/PictureText.js.map +0 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +0 -11
- package/dist/components/PictureText/PictureTextContent.js.map +0 -1
- package/dist/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
- package/dist/components/PictureText/renderInsuranceSumMonth.js +0 -9
- package/dist/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
- package/lib/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/lib/components/OfficesAtmsMap/renderLunchHour.js +0 -7
- package/lib/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
- package/lib/components/PictureText/PictureText.d.ts +0 -5
- package/lib/components/PictureText/PictureText.fixture.d.ts +0 -14
- package/lib/components/PictureText/PictureText.fixture.mobile.d.ts +0 -14
- package/lib/components/PictureText/PictureText.js +0 -7
- package/lib/components/PictureText/PictureText.js.map +0 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +0 -11
- package/lib/components/PictureText/PictureTextContent.js +0 -2
- package/lib/components/PictureText/PictureTextContent.js.map +0 -1
- package/lib/components/PictureText/renderInsuranceSumMonth.d.ts +0 -1
- package/lib/components/PictureText/renderInsuranceSumMonth.js +0 -6
- package/lib/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
- package/mobile/bundle/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/mobile/bundle/components/PictureText/PictureText.d.ts +0 -5
- package/mobile/bundle/components/PictureText/PictureTextContent.d.ts +0 -11
- package/mobile/bundle/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
- package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.js +0 -10
- package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
- package/mobile/dist/components/PictureText/PictureText.d.ts +0 -5
- package/mobile/dist/components/PictureText/PictureText.js +0 -9
- package/mobile/dist/components/PictureText/PictureText.js.map +0 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +0 -11
- package/mobile/dist/components/PictureText/PictureTextContent.js.map +0 -1
- package/mobile/dist/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
- package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js +0 -9
- package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
- package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
- package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.js +0 -7
- package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
- package/mobile/lib/components/PictureText/PictureText.d.ts +0 -5
- package/mobile/lib/components/PictureText/PictureText.js +0 -7
- package/mobile/lib/components/PictureText/PictureText.js.map +0 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +0 -11
- package/mobile/lib/components/PictureText/PictureTextContent.js +0 -2
- package/mobile/lib/components/PictureText/PictureTextContent.js.map +0 -1
- package/mobile/lib/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
- package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js +0 -6
- package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
- package/mobile/src/components/OfficesAtmsMap/renderLunchHour.tsx +0 -28
- package/mobile/src/components/PictureText/PictureText.example.json +0 -40
- package/mobile/src/components/PictureText/PictureText.tsx +0 -36
- package/mobile/src/components/PictureText/PictureText.ui.json +0 -23
- package/mobile/src/components/PictureText/PictureTextContent.ts +0 -13
- package/mobile/src/components/PictureText/renderInsuranceSumMonth.tsx +0 -21
- package/src/components/OfficesAtmsMap/renderLunchHour.tsx +0 -28
- package/src/components/PictureText/PictureText.example.json +0 -40
- package/src/components/PictureText/PictureText.fixture.mobile.tsx +0 -116
- package/src/components/PictureText/PictureText.fixture.tsx +0 -130
- package/src/components/PictureText/PictureText.tsx +0 -36
- package/src/components/PictureText/PictureText.ui.json +0 -23
- package/src/components/PictureText/PictureTextContent.ts +0 -13
- package/src/components/PictureText/renderInsuranceSumMonth.tsx +0 -21
package/bundle/bundle.umd.js
CHANGED
|
@@ -838,14 +838,14 @@
|
|
|
838
838
|
return options.filter((_) => _.text?.toLocaleLowerCase().includes(query?.trim().toLocaleLowerCase()));
|
|
839
839
|
};
|
|
840
840
|
|
|
841
|
-
const SelectPopup = JSX(({ popupRef, options, value, query, onChange }) => options?.length ? (jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: (e) => {
|
|
841
|
+
const SelectPopup = JSX(({ popupRef, options, value, query, onChange, iconVersion }) => options?.length ? (jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: (e) => {
|
|
842
842
|
e.stopPropagation();
|
|
843
843
|
if (onChange) {
|
|
844
844
|
onChange(option);
|
|
845
845
|
}
|
|
846
|
-
}, children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
|
|
846
|
+
}, children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", iconVersion: iconVersion, className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
|
|
847
847
|
|
|
848
|
-
function useSelectPopup({ isOpen, options, value, query, onChange, onClose, }) {
|
|
848
|
+
function useSelectPopup({ isOpen, options, value, query, onChange, onClose, iconVersion, }) {
|
|
849
849
|
const popup = usePopupManager();
|
|
850
850
|
const close = useCallback(() => {
|
|
851
851
|
popup.close();
|
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
}
|
|
864
864
|
const inputElement = inputRef.current;
|
|
865
865
|
const { top, left, width, height } = inputElement.getBoundingClientRect();
|
|
866
|
-
popup.update(jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange }), {
|
|
866
|
+
popup.update(jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange, iconVersion: iconVersion }), {
|
|
867
867
|
top: top + window.scrollY + height,
|
|
868
868
|
left,
|
|
869
869
|
width,
|
|
@@ -886,6 +886,7 @@
|
|
|
886
886
|
query,
|
|
887
887
|
onChange,
|
|
888
888
|
onClose: handleClose,
|
|
889
|
+
iconVersion,
|
|
889
890
|
});
|
|
890
891
|
return (jsxs("div", { className: className, children: [renderLabel(label), jsxs("div", { className: style('relative', isOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10', getBorderStyle$1(isBorder, valid)), onClick: isOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap", children: formatOption(value) || placeholder }), renderIcon$1(isOpen, iconVersion)] }), isSearch && isOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
|
|
891
892
|
});
|
|
@@ -1332,7 +1333,7 @@
|
|
|
1332
1333
|
selectedMonth,
|
|
1333
1334
|
showCalendar,
|
|
1334
1335
|
});
|
|
1335
|
-
return (jsxs("div", { className: style(className, 'relative'), ref: ref, children: [jsx(Text, { size: "text-m", children: label }), renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-10 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] }));
|
|
1336
|
+
return (jsxs("div", { className: style(className, 'relative'), ref: ref, children: [jsx(Text, { size: "text-m", "font-weight": "font-light", children: label }), renderDatePickerForm(handleChangeVisibleCalendar, value, valid), showCalendar ? (jsxs("div", { className: "absolute bg-white z-10 select-none", children: [jsxs("div", { className: "flex gap-s", children: [jsx("div", { className: "my-auto", onClick: handlePrevMonth, children: jsx(Icon, { ...ICON_PROPS, className: "-rotate-90 cursor-pointer" }) }), jsx(Select, { onChange: handleSelectMonth, value: { key: months[selectedMonth] }, options: monthsOptions, ...SELECT_PROPS }), jsx(Select, { onChange: handleSelectYear, value: { key: String(selectedYear) }, options: yearsOptions, ...SELECT_PROPS }), jsx("div", { className: "my-auto", onClick: handleNextMonth, children: jsx(Icon, { ...ICON_PROPS, className: "rotate-90 cursor-pointer" }) })] }), jsx(Calendar, { today: value, currentMonth: selectedMonth, currentYear: selectedYear, onDateSelect: onChange, min: minDate, max: maxDate })] })) : null] }));
|
|
1336
1337
|
});
|
|
1337
1338
|
const renderDatePickerForm = (handleChangeVisibleCalendar, value, valid) => (jsxs("div", { onClick: handleChangeVisibleCalendar, className: style(formStyle, valid ? 'border-gray' : 'border-error'), children: [jsx(Paragraph, { children: value && formatDate(value) }), jsx(Icon, { ...ICON_PROPS, name: "CalendarIcon" })] }));
|
|
1338
1339
|
|
|
@@ -1527,6 +1528,28 @@
|
|
|
1527
1528
|
}, className: style('rounded-icon object-fit flex justify-center items-center', iconBgStyles[iconBgVersion], className), children: jsx(Icon, { ...rest, width: "54%", height: "54%", name: icon }) })) : null;
|
|
1528
1529
|
});
|
|
1529
1530
|
|
|
1531
|
+
const DOT_SIZE_MAP = {
|
|
1532
|
+
L: 'w-1.5 h-1.5 mr-m',
|
|
1533
|
+
M: 'w-1.5 h-1.5 mr-s',
|
|
1534
|
+
S: 'w-1 h-1 mr-xs',
|
|
1535
|
+
XS: 'w-1 h-1 mr-xs',
|
|
1536
|
+
};
|
|
1537
|
+
const ListItem = JSX(({ className, isDotted, children, size = 'M' }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white', DOT_SIZE_MAP[size]) }) })) : null, jsx("span", { children: children })] })));
|
|
1538
|
+
|
|
1539
|
+
const TEXT_SIZE_MAP = {
|
|
1540
|
+
XS: 'text-m font-light',
|
|
1541
|
+
S: 'text-l font-light',
|
|
1542
|
+
M: 'text-h6',
|
|
1543
|
+
L: 'text-h5',
|
|
1544
|
+
};
|
|
1545
|
+
const ITEM_INDENT_MAP = {
|
|
1546
|
+
XS: 'ml-2xs',
|
|
1547
|
+
S: 'ml-xs',
|
|
1548
|
+
M: 'ml-s',
|
|
1549
|
+
L: 'ml-m',
|
|
1550
|
+
};
|
|
1551
|
+
const List = JSX(({ className, hasIndent, isDotted = true, items = [], listItemSize = 'M' }) => items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', TEXT_SIZE_MAP[listItemSize], hasIndent ? ITEM_INDENT_MAP[listItemSize] : '', className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
1552
|
+
|
|
1530
1553
|
const defaultIconSize = 44;
|
|
1531
1554
|
|
|
1532
1555
|
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: AlignStyles, title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
|
|
@@ -1540,7 +1563,7 @@
|
|
|
1540
1563
|
const renderTextBenefit = (description) => description?.name ? (jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description.name })) : null;
|
|
1541
1564
|
const renderListBenefit = (description) => {
|
|
1542
1565
|
const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
|
|
1543
|
-
return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, {
|
|
1566
|
+
return description?.items && description.items.length > 0 ? (jsx("ul", { className: style(listStyleType, description.listItemSize ? TEXT_SIZE_MAP[description.listItemSize] : ''), children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, { color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: _ }) }, `benefitListItem-${i}`))) })) : null;
|
|
1544
1567
|
};
|
|
1545
1568
|
|
|
1546
1569
|
const isIcon = (icon) => Boolean(icon?.src || icon?.icon);
|
|
@@ -1884,7 +1907,7 @@
|
|
|
1884
1907
|
};
|
|
1885
1908
|
const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
|
|
1886
1909
|
|
|
1887
|
-
const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
|
|
1910
|
+
const renderBinaryRadioButtonGroup = ({ items, title, mobileTitle = title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { className: "hidden @5xl:block", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, mobileTitle ? (jsx("div", { className: "@5xl:hidden", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: mobileTitle }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
|
|
1888
1911
|
|
|
1889
1912
|
const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
|
|
1890
1913
|
...props,
|
|
@@ -2129,7 +2152,7 @@
|
|
|
2129
2152
|
}), [userInputParams, data]);
|
|
2130
2153
|
};
|
|
2131
2154
|
|
|
2132
|
-
const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings
|
|
2155
|
+
const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
2133
2156
|
const [userInputParams, { field }] = useForm({
|
|
2134
2157
|
isAnnuity: true,
|
|
2135
2158
|
isInsurance: true,
|
|
@@ -2141,7 +2164,8 @@
|
|
|
2141
2164
|
});
|
|
2142
2165
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
2143
2166
|
const paymentTypeElement = renderPaymentType({
|
|
2144
|
-
title:
|
|
2167
|
+
title: '',
|
|
2168
|
+
mobileTitle: 'Тип платежа',
|
|
2145
2169
|
orientation: 'vertical',
|
|
2146
2170
|
...field('isAnnuity'),
|
|
2147
2171
|
});
|
|
@@ -2353,6 +2377,12 @@
|
|
|
2353
2377
|
moneyExtra: REFINANCING_OLD_DEFAULT_SUM,
|
|
2354
2378
|
});
|
|
2355
2379
|
const calculatorParams = useRefinancingCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
2380
|
+
const paymentTypeElement = renderPaymentType({
|
|
2381
|
+
title: '',
|
|
2382
|
+
mobileTitle: 'Тип платежа',
|
|
2383
|
+
orientation: 'vertical',
|
|
2384
|
+
...field('isAnnuity'),
|
|
2385
|
+
});
|
|
2356
2386
|
return (jsxs("section", { className: style('flex flex-col justify-between @5xl:flex-row gap-m', className), children: [jsxs("div", { className: "flex flex-col gap-y-m sm:max-w-md gap-2xl", children: [renderWantedSumInput({
|
|
2357
2387
|
title: 'Остаток долга в других банках, ₽ ',
|
|
2358
2388
|
step: 500,
|
|
@@ -2382,12 +2412,12 @@
|
|
|
2382
2412
|
...field('moneyExtra'),
|
|
2383
2413
|
value: calculatorParams.moneyExtra,
|
|
2384
2414
|
})
|
|
2385
|
-
: null] }), renderRate({
|
|
2415
|
+
: null, jsx("div", { className: "sm:hidden pt-1 pb-4 border-b border-main-divider", children: paymentTypeElement })] }), renderRate({
|
|
2386
2416
|
rate: calculatorParams.rate,
|
|
2387
2417
|
fractionDigits: 1,
|
|
2388
|
-
}), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null,
|
|
2418
|
+
}), jsxs("div", { className: "flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, jsx("div", { className: "hidden sm:block", children: paymentTypeElement }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
|
|
2389
2419
|
});
|
|
2390
|
-
const renderCreditParamsForm = (params, field) => (jsxs("div", { className: "space-y-s", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null, jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })] }));
|
|
2420
|
+
const renderCreditParamsForm = (params, field) => (jsxs("div", { className: "space-y-lg sm:space-y-s", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null, jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })] }));
|
|
2391
2421
|
|
|
2392
2422
|
const EmbeddableCalcBlocks = {
|
|
2393
2423
|
CreditCalculatorForm,
|
|
@@ -2810,7 +2840,7 @@
|
|
|
2810
2840
|
|
|
2811
2841
|
const layerBaseStyle = 'z-10 border border-solid w-full h-full';
|
|
2812
2842
|
const layerStyle = style(layerBaseStyle, 'absolute hidden @xl:block border-transparent');
|
|
2813
|
-
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-6xl sm:pb-4xl @container-normal', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "relative h-full", children: [jsx("div", { className: style(layerStyle, 'top-9 right-12 bg-green-dark') }), jsx("div", { className: style(layerStyle, 'top-6 right-8 bg-green') }), jsx("div", { className: style(layerStyle, 'top-3 right-4 bg-green-light') }), jsxs("div", { className: style(layerBaseStyle, 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isEmbedded: true }), renderButtonsSection([button], {
|
|
2843
|
+
const CarouselCard = JSX(({ className, title, description, button, ...rest }) => (jsx(BlockWrapper, { className: style('sm:pl-6xl sm:pb-4xl @container-normal', className), defaultPadding: "p-0", ...rest, children: jsxs("div", { className: "relative h-full", children: [jsx("div", { className: style(layerStyle, 'top-9 right-12 bg-green-dark') }), jsx("div", { className: style(layerStyle, 'top-6 right-8 bg-green') }), jsx("div", { className: style(layerStyle, 'top-3 right-4 bg-green-light') }), jsxs("div", { className: style(layerBaseStyle, 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light'), children: [jsx(Headline, { title: title, description: description, headlineVersion: titleSize, align: "text-left", isEmbedded: true }), renderButtonsSection([button], {
|
|
2814
2844
|
className: 'mt-m sm:mt-6xl sm:justify-center',
|
|
2815
2845
|
isVertical: true,
|
|
2816
2846
|
})] })] }) })));
|
|
@@ -2904,36 +2934,17 @@
|
|
|
2904
2934
|
|
|
2905
2935
|
const BenefitsList = JSX(({ isTabularBenefits, ...rest }) => isTabularBenefits ? jsx(TabularBenefitsList, { ...rest }) : jsx(DefaultBenefitsList, { ...rest }));
|
|
2906
2936
|
|
|
2907
|
-
const
|
|
2908
|
-
|
|
2909
|
-
M: 'w-1.5 h-1.5 mr-s',
|
|
2910
|
-
S: 'w-1 h-1 mr-xs',
|
|
2911
|
-
XS: 'w-1 h-1 mr-xs',
|
|
2912
|
-
};
|
|
2913
|
-
const ListItem = JSX(({ className, isDotted, children, size = 'M' }) => (jsxs("div", { className: style('font-sans flex', className), role: "listitem", children: [isDotted ? (jsx("div", { className: "shrink-0", children: jsx("div", { className: style('align-middle inline-block rounded-full bg-primary-text group-data-secondary:bg-white', DOT_SIZE_MAP[size]) }) })) : null, jsx("span", { children: children })] })));
|
|
2914
|
-
|
|
2915
|
-
const TEXT_SIZE_MAP = {
|
|
2916
|
-
XS: 'text-m font-light',
|
|
2917
|
-
S: 'text-l font-light',
|
|
2918
|
-
M: 'text-h6',
|
|
2919
|
-
L: 'text-h5',
|
|
2920
|
-
};
|
|
2921
|
-
const ITEM_INDENT_MAP = {
|
|
2922
|
-
XS: 'ml-2xs',
|
|
2923
|
-
S: 'ml-xs',
|
|
2924
|
-
M: 'ml-s',
|
|
2925
|
-
L: 'ml-m',
|
|
2926
|
-
};
|
|
2927
|
-
const List = JSX(({ className, hasIndent, isDotted = true, items = [], listItemSize = 'M' }) => items?.length ? (jsx("section", { className: style('flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text', TEXT_SIZE_MAP[listItemSize], hasIndent ? ITEM_INDENT_MAP[listItemSize] : '', className), role: "list", children: items.map((item, i) => (jsx(ListItem, { isDotted: isDotted, size: listItemSize, children: item }, String(i)))) })) : null);
|
|
2937
|
+
const PriceList = JSX(({ priceList }) => priceList?.length ? (jsx("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: priceList.map(renderPriceListItem) })) : null);
|
|
2938
|
+
const renderPriceListItem = ({ label, amount }) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", color: "text-secondary-text", children: label }), amount ? (jsxs("span", { className: "font-sans text-h6 sm:text-primary-main text-primary-text", children: [toLocalNumberFormat(2)(amount), " \u20BD"] })) : null] }));
|
|
2928
2939
|
|
|
2929
2940
|
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
2930
2941
|
const renderTag = (tag, key) => (jsx("div", { className: "p-xs border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
|
|
2931
2942
|
|
|
2932
|
-
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, children, }) => {
|
|
2943
|
+
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle, items, isDotted = true, priceList = [], listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, children, }) => {
|
|
2933
2944
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2934
2945
|
const headline = renderHeadline({ title, description, headlineVersion, align });
|
|
2935
2946
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2936
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, renderTags(tags)] }) }));
|
|
2947
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), children: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, priceList?.length ? jsx(PriceList, { priceList: priceList }) : null, renderTags(tags)] }) }));
|
|
2937
2948
|
});
|
|
2938
2949
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2939
2950
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
@@ -3025,16 +3036,34 @@
|
|
|
3025
3036
|
return isFoldButtonOnTop ? (jsxs("div", { className: className, children: [buttonNode, sectionNode] })) : (jsxs("div", { className: className, children: [sectionNode, buttonNode] }));
|
|
3026
3037
|
});
|
|
3027
3038
|
|
|
3039
|
+
function useResizeObserver(callback, deps) {
|
|
3040
|
+
const ref = useRef(null);
|
|
3041
|
+
useEffect(() => {
|
|
3042
|
+
const element = ref?.current;
|
|
3043
|
+
if (!element) {
|
|
3044
|
+
return undefined;
|
|
3045
|
+
}
|
|
3046
|
+
const observer = new ResizeObserver((entries) => {
|
|
3047
|
+
callback(element, entries[0]);
|
|
3048
|
+
});
|
|
3049
|
+
observer.observe(element);
|
|
3050
|
+
return () => {
|
|
3051
|
+
observer.disconnect();
|
|
3052
|
+
};
|
|
3053
|
+
}, [callback, ...deps]);
|
|
3054
|
+
return ref;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3028
3057
|
const FoldableSection = JSX(({ className = '', isUnfolded, children }) => {
|
|
3029
3058
|
const containerRef = useRef(null);
|
|
3030
|
-
|
|
3059
|
+
const childrenWrapperRef = useResizeObserver((childrenWrapperEl) => {
|
|
3031
3060
|
if (containerRef.current) {
|
|
3032
3061
|
containerRef.current.style.maxHeight = isUnfolded
|
|
3033
|
-
? `${
|
|
3062
|
+
? `${childrenWrapperEl.scrollHeight}px`
|
|
3034
3063
|
: '';
|
|
3035
3064
|
}
|
|
3036
|
-
}, [isUnfolded
|
|
3037
|
-
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''}
|
|
3065
|
+
}, [isUnfolded]);
|
|
3066
|
+
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} `, children: jsx("div", { className: className, ref: childrenWrapperRef, children: children }) }));
|
|
3038
3067
|
});
|
|
3039
3068
|
|
|
3040
3069
|
const renderCardInfo = (cell, i) => {
|
|
@@ -3343,16 +3372,26 @@
|
|
|
3343
3372
|
return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-m pointer-events-none", children: jsx(Img, { image: { icon: 'LoupeIcon', iconVersion: 'black' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md', 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'), value: value, type: "text", name: "search-bar-input", placeholder: placeholder, autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
|
|
3344
3373
|
});
|
|
3345
3374
|
|
|
3346
|
-
const DepositoryFilter = JSX(({ field, onClearFilter, filtrationState }) => (jsxs("div", { className: "grid grid-cols-12 mb-3xl space-x-xl", children: [jsx(SearchInput, { className: "col-span-4 mt-auto", placeholder: "\u041F\u043E\u0438\u0441\u043A", ...field('query') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u043E\u0442", maxDate: filtrationState.endDate, ...field('startDate') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u0434\u043E", minDate: filtrationState.startDate, ...field('endDate') }), jsx("div", { className: "col-span-2 mt-auto", children: jsx("button", { className: "px-m py-s rounded-md bg-main-gray text-green cursor-pointer w-full", onClick: onClearFilter, children: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440" }) })] })));
|
|
3375
|
+
const DepositoryFilter = JSX(({ field, onClearFilter, filtrationState }) => (jsxs("div", { className: "grid grid-cols-12 mb-3xl space-x-xl", children: [jsx(SearchInput, { className: "col-span-4 mt-auto", placeholder: "\u041F\u043E\u0438\u0441\u043A", ...field('query') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u043E\u0442", maxDate: filtrationState.endDate, ...field('startDate') }), jsx(DatePicker, { className: "col-span-3", label: "\u041F\u0435\u0440\u0438\u043E\u0434 \u0434\u043E", minDate: filtrationState.startDate, ...field('endDate') }), jsx("div", { className: "col-span-2 mt-auto", children: jsx("button", { className: "px-m py-s rounded-md bg-main-gray text-green hover:text-white hover:bg-primary-hover active:bg-primary-active cursor-pointer w-full", onClick: onClearFilter, children: "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440" }) })] })));
|
|
3347
3376
|
|
|
3348
3377
|
const DepositoryItem = ({ title, timestamp, publicId }) => {
|
|
3349
3378
|
const link = useLink({ basePath: '/' });
|
|
3350
3379
|
const { href } = link({ href: `/api/v1/depository/${publicId}/file` });
|
|
3351
|
-
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2
|
|
3380
|
+
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2", children: timestamp ? (jsx(Text, { size: "text-m", "font-weight": "font-light", children: formatDate(timestamp) })) : null }), jsx("div", { className: "col-span-10 text-h6 hover:text-primary-active", children: jsx("a", { href: href, download: true, "aria-label": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: title }) })] }, publicId));
|
|
3352
3381
|
};
|
|
3353
3382
|
|
|
3383
|
+
const DEPOSITARY_URL = '/api/v1/depository';
|
|
3354
3384
|
const useDepository = ({ size, page, query, startDate, endDate }) => {
|
|
3355
|
-
const
|
|
3385
|
+
const formatStartDate = startDate ? formatDate(startDate, true) : '';
|
|
3386
|
+
const formatEndDate = endDate ? formatDate(endDate, true) : '';
|
|
3387
|
+
const searchParams = new URLSearchParams(DEPOSITARY_URL);
|
|
3388
|
+
searchParams.set('page', String(page));
|
|
3389
|
+
searchParams.set('size', String(size));
|
|
3390
|
+
searchParams.set('query', query);
|
|
3391
|
+
searchParams.set('startDate', formatStartDate);
|
|
3392
|
+
searchParams.set('endDate', formatEndDate);
|
|
3393
|
+
const queryString = `?${searchParams.toString()}`;
|
|
3394
|
+
const { data } = useAsyncData(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
|
|
3356
3395
|
return { items: data?.content, totalPages: data?.totalPages };
|
|
3357
3396
|
};
|
|
3358
3397
|
|
|
@@ -3366,14 +3405,22 @@
|
|
|
3366
3405
|
const [currentPage, setCurrentPage] = useState(0);
|
|
3367
3406
|
const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
3368
3407
|
const [filtrationState, { field, reset }] = useForm(initialFiltrationState$1);
|
|
3369
|
-
const { totalPages = 0, items } = useDepository({
|
|
3408
|
+
const { totalPages = 0, items = [] } = useDepository({
|
|
3370
3409
|
size: itemCount,
|
|
3371
3410
|
page: currentPage,
|
|
3372
3411
|
...filtrationState,
|
|
3373
3412
|
});
|
|
3374
3413
|
const handleChangePage = useCallback((page) => setCurrentPage(page - 1), []);
|
|
3375
|
-
const handleItemCountChange = useCallback((count) =>
|
|
3376
|
-
|
|
3414
|
+
const handleItemCountChange = useCallback((count) => {
|
|
3415
|
+
if (itemCount !== count) {
|
|
3416
|
+
setItemCount(count);
|
|
3417
|
+
setCurrentPage(0);
|
|
3418
|
+
}
|
|
3419
|
+
else {
|
|
3420
|
+
setItemCount(count);
|
|
3421
|
+
}
|
|
3422
|
+
}, []);
|
|
3423
|
+
return (jsxs(BlockWrapper, { className: style(className, 'container p-6xl'), ...rest, children: [jsx(DepositoryFilter, { filtrationState: filtrationState, field: field, onClearFilter: reset }), jsxs("div", { className: "flex flex-col", children: [jsxs("div", { className: "grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: "\u0414\u0430\u0442\u0430" }) }), jsx("span", { className: "col-span-10", children: jsx(Text, { size: "text-m", color: "text-secondary-text", children: "\u0422\u0435\u043C\u0430" }) })] }), items.length ? (items.map((params) => jsx(DepositoryItem, { ...params }, String(params.publicId)))) : (jsx(NotFound, { title: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E", description: "\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B" })), jsx(Pagination, { currentPage: currentPage + 1, onPageChange: handleChangePage, totalPages: totalPages, itemCount: itemCount, onItemCountChange: handleItemCountChange })] })] }));
|
|
3377
3424
|
});
|
|
3378
3425
|
|
|
3379
3426
|
const renderErrorContent = (error) => {
|
|
@@ -4225,9 +4272,9 @@
|
|
|
4225
4272
|
const btnClassName = isActive
|
|
4226
4273
|
? 'shadow-dark-blue border-primary-main'
|
|
4227
4274
|
: `ease-in duration-300 border-gray`;
|
|
4228
|
-
return (jsxs("button", { type: "button", onClick: onClick, className: `p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(Img, { className: "p-lg rounded-full bg-secondary-light", image: slide.icon, width: "108", height: "108" })) : null, jsxs("div", { className: "flex gap-s", children: [slide?.sum ? renderValueBlock
|
|
4275
|
+
return (jsxs("button", { type: "button", onClick: onClick, className: `p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative ${btnClassName}`, children: [slide?.icon ? (jsx(Img, { className: "p-lg rounded-full bg-secondary-light", image: slide.icon, width: "108", height: "108" })) : null, jsxs("div", { className: "flex gap-s", children: [slide?.sum ? renderValueBlock('страховая сумма', slide.sum) : null, slide?.fee ? renderValueBlock('страховой взнос', slide.fee) : null] }), renderDoneIcon(isActive)] }, String(i)));
|
|
4229
4276
|
}
|
|
4230
|
-
function renderValueBlock
|
|
4277
|
+
function renderValueBlock(title, sum) {
|
|
4231
4278
|
return (jsxs("div", { className: "flex flex-col text-left whitespace-pre", children: [jsxs("span", { className: "text-h6", children: [toLocalNumberFormat(2)(sum), " \u20BD"] }), jsx("span", { className: "text-secondary-text text-l mt-2xs", children: title })] }));
|
|
4232
4279
|
}
|
|
4233
4280
|
function renderDoneIcon(isActive) {
|
|
@@ -4655,19 +4702,21 @@
|
|
|
4655
4702
|
|
|
4656
4703
|
const colorStyle = {
|
|
4657
4704
|
yellow: { border: 'border-yellow-light', text: 'text-yellow' },
|
|
4658
|
-
green: { border: 'border-green-light', text: 'text-green-dark' },
|
|
4705
|
+
green: { border: 'border-green-more-light', text: 'text-green-dark' },
|
|
4659
4706
|
gray: { border: 'border-gray', text: 'text-secondary-text' },
|
|
4660
|
-
red: { border: 'border-error', text: 'text-error' },
|
|
4707
|
+
red: { border: 'border-error/30', text: 'text-error' },
|
|
4661
4708
|
};
|
|
4662
4709
|
const Badge = JSX(({ className, children, color = 'gray' }) => (jsx("div", { className: style('p-s border border-gray rounded-md flex items-center', colorStyle[color].border, className), children: jsx(Text, { size: "text-m", color: colorStyle[color].text, children: children }) })));
|
|
4663
4710
|
|
|
4664
|
-
const CardCell = JSX(({
|
|
4665
|
-
const textItems = value?.split(',') ?? [];
|
|
4666
|
-
if (
|
|
4711
|
+
const CardCell = JSX(({ value, subText, children, ...props }) => {
|
|
4712
|
+
const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
|
|
4713
|
+
if ([textItems.length, children, subText].every((_) => !_)) {
|
|
4667
4714
|
return null;
|
|
4668
4715
|
}
|
|
4669
|
-
return (
|
|
4716
|
+
return renderCardCell({ textItems, subText, children, ...props });
|
|
4670
4717
|
});
|
|
4718
|
+
const renderCardCell = ({ label, labelSize = 'text-m', textItems, subColor, subText, className, children, }) => (jsxs("div", { className: style('flex gap-2xs flex-col h-full max-w-[300px]', className), children: [label ? (jsx(Text, { color: "text-secondary-text", font: "font-light", size: labelSize, children: label })) : null, children ||
|
|
4719
|
+
textItems.filter(Boolean).map((text, i) => (jsx(Text, { size: "text-l", children: text.trim() }, String(i)))), subText ? (jsx(Text, { color: subColor, size: "text-m", children: subText })) : null] }));
|
|
4671
4720
|
|
|
4672
4721
|
const CardRow = JSX(({ className, children }) => (jsx("div", { className: style('flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl', className), children: children })));
|
|
4673
4722
|
|
|
@@ -4734,43 +4783,112 @@
|
|
|
4734
4783
|
});
|
|
4735
4784
|
};
|
|
4736
4785
|
|
|
4786
|
+
const getScheduleDescription = (workScheduleWeek) => {
|
|
4787
|
+
const workingWeekday = workScheduleWeek.find((_) => _.key !== 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime));
|
|
4788
|
+
const workingSaturday = workScheduleWeek.find((_) => _.key === 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime));
|
|
4789
|
+
const daysOff = workScheduleWeek
|
|
4790
|
+
.filter((_) => !_.status)
|
|
4791
|
+
.map((_) => _.short?.toLowerCase())
|
|
4792
|
+
.join(', ');
|
|
4793
|
+
const rows = [
|
|
4794
|
+
buildScheduleText({
|
|
4795
|
+
workTime: workingWeekday?.workTime,
|
|
4796
|
+
lunchHour: workingWeekday?.lunchHour,
|
|
4797
|
+
daysOff: workingSaturday ? '' : daysOff,
|
|
4798
|
+
}),
|
|
4799
|
+
buildScheduleText({ workTime: workingSaturday?.workTime, lunchHour: workingSaturday?.lunchHour, daysOff }, true),
|
|
4800
|
+
].filter(Boolean);
|
|
4801
|
+
return jsx(CardCell, { label: "\u0420\u0435\u0436\u0438\u043C \u0440\u0430\u0431\u043E\u0442\u044B", value: rows, className: "max-w-none" });
|
|
4802
|
+
};
|
|
4803
|
+
const buildScheduleText = ({ workTime = '', lunchHour = '', daysOff = '' }, isSaturday = false) => {
|
|
4804
|
+
if (!workTime) {
|
|
4805
|
+
return '';
|
|
4806
|
+
}
|
|
4807
|
+
return [
|
|
4808
|
+
`${isSaturday ? 'Суббота' : 'Будние дни'}: ${workTime}`,
|
|
4809
|
+
lunchHour ? `перерыв: ${lunchHour}` : '',
|
|
4810
|
+
daysOff ? `не работает: ${daysOff}` : '',
|
|
4811
|
+
]
|
|
4812
|
+
.filter(Boolean)
|
|
4813
|
+
.join('; ');
|
|
4814
|
+
};
|
|
4815
|
+
|
|
4737
4816
|
const WEEKDAY_MAP = [
|
|
4738
|
-
['
|
|
4739
|
-
['
|
|
4740
|
-
['
|
|
4741
|
-
['
|
|
4742
|
-
['
|
|
4743
|
-
['
|
|
4744
|
-
['
|
|
4817
|
+
['workingMonday', 'Пн', 'Понедельник'],
|
|
4818
|
+
['workingTuesday', 'Вт', 'Вторник'],
|
|
4819
|
+
['workingWednesday', 'Ср', 'Среда'],
|
|
4820
|
+
['workingThursday', 'Чт', 'Четверг'],
|
|
4821
|
+
['workingFriday', 'Пт', 'Пятница'],
|
|
4822
|
+
['workingSaturday', 'Сб', 'Суббота'],
|
|
4823
|
+
['workingSunday', 'Вс', 'Воскресенье'],
|
|
4745
4824
|
];
|
|
4825
|
+
const getWorkScheduleWeek = (workSchedule) => WEEKDAY_MAP.map(([key, short, title]) => ({
|
|
4826
|
+
key,
|
|
4827
|
+
title,
|
|
4828
|
+
short,
|
|
4829
|
+
status: Boolean(workSchedule?.[key]),
|
|
4830
|
+
get workTime() {
|
|
4831
|
+
return key === 'workingSaturday' ? workSchedule?.workTimeSaturday : workSchedule?.workTime;
|
|
4832
|
+
},
|
|
4833
|
+
get lunchHour() {
|
|
4834
|
+
return key === 'workingSaturday' ? workSchedule?.lunchHourSaturday : workSchedule?.lunchHour;
|
|
4835
|
+
},
|
|
4836
|
+
get hasLunch() {
|
|
4837
|
+
return /\d+/.test(this.lunchHour ?? '');
|
|
4838
|
+
},
|
|
4839
|
+
}));
|
|
4840
|
+
|
|
4841
|
+
const renderBusinessSchedule = (scheduleDescription) => {
|
|
4842
|
+
if (!scheduleDescription) {
|
|
4843
|
+
return null;
|
|
4844
|
+
}
|
|
4845
|
+
const businessSchedule = getBusinessSchedule(scheduleDescription);
|
|
4846
|
+
return (jsxs(CardRow, { className: "border-none", children: [jsx(CardCell, { label: "\u0414\u043B\u044F \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", labelSize: "text-l", children: jsx("div", { className: "flex gap-1", children: businessSchedule.map(renderAlternativeDay) }) }), jsx(CardCell, { label: "\u0420\u0435\u0436\u0438\u043C \u0440\u0430\u0431\u043E\u0442\u044B", className: "max-w-none", children: jsx(Text, { children: scheduleDescription }) })] }));
|
|
4847
|
+
};
|
|
4848
|
+
const getBusinessSchedule = (scheduleDescription) => {
|
|
4849
|
+
const weekDayMap = WEEKDAY_MAP.map(([, short]) => ({ short, status: true }));
|
|
4850
|
+
const splittedScheduleDescription = scheduleDescription.split('/') ?? [];
|
|
4851
|
+
const lastPartScheduleDescription = splittedScheduleDescription[splittedScheduleDescription.length - 1]?.toLowerCase();
|
|
4852
|
+
if (!lastPartScheduleDescription?.includes('выходной')) {
|
|
4853
|
+
return weekDayMap;
|
|
4854
|
+
}
|
|
4855
|
+
return weekDayMap.map((_) => ({
|
|
4856
|
+
..._,
|
|
4857
|
+
status: !lastPartScheduleDescription?.includes(_.short.toLowerCase()),
|
|
4858
|
+
}));
|
|
4859
|
+
};
|
|
4860
|
+
const renderAlternativeDay = ({ short, status }, index) => (jsx("div", { className: style('w-9 h-9 rounded-md flex items-center justify-center', status ? 'bg-green-more-light text-green-dark' : 'bg-error/30 text-error'), children: jsx(Text, { size: "text-xs", children: short }) }, String(index)));
|
|
4861
|
+
|
|
4746
4862
|
const currentWeekDayIdx = new Date().getDay();
|
|
4747
4863
|
const renderOfficeCard = ({ name, address, phone, fax, phoneBusiness, phoneNatural, phoneCallCentre, phoneCurrencyControl, workSchedule, exchangeRate, }, index) => {
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4864
|
+
if (!workSchedule) {
|
|
4865
|
+
return null;
|
|
4866
|
+
}
|
|
4867
|
+
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
4868
|
+
const labelSchedule = workSchedule?.businessScheduleVisibleTag
|
|
4869
|
+
? 'Для физических лиц'
|
|
4870
|
+
: 'Для физических и юридических лиц';
|
|
4871
|
+
return (jsxs("div", { className: "bg-white col-span-12 p-3xl border-green border", children: [jsxs("div", { className: "flex justify-between", children: [jsx(Text, { size: "text-h4", children: name }), renderCurrentDaySchedule(workScheduleWeek)] }), address ? (jsxs("div", { className: "flex pb-xl pt-xs gap-2xs", children: [jsx(Icon, { name: "GeolocationIcon", width: "24", height: "24" }), jsx(Text, { size: "text-l", children: address })] })) : null, jsxs(CardRow, { className: "flex-wrap", children: [jsx(CardCell, { label: "\u0424\u0430\u043A\u0441", value: fax }), jsx(CardCell, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u0444\u0438\u043B\u0438\u0430\u043B\u0430", value: phone }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0439 \u044E\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneBusiness }), jsx(CardCell, { label: "\u041E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043B\u0438\u0446", value: phoneNatural }), jsx(CardCell, { label: "\u0414\u043B\u044F \u043A\u043E\u043D\u0441\u0443\u043B\u044C\u0442\u0430\u0446\u0438\u0439 \u043F\u043E \u0432\u0430\u043B\u044E\u0442\u043D\u043E\u043C\u0443 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044E", value: phoneCurrencyControl }), jsx(CardCell, { label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442-\u0446\u0435\u043D\u0442\u0440", value: phoneCallCentre })] }), workSchedule.isMatchesPattern ? (jsx(CardRow, { children: jsx(CardCell, { label: labelSchedule, labelSize: "text-l", className: "w-full max-w-none", children: jsx("div", { className: "flex justify-between pt-xs", children: workScheduleWeek?.map(renderDay) }) }) })) : (jsxs(CardRow, { children: [jsx(CardCell, { label: labelSchedule, labelSize: "text-l", children: jsx("div", { className: "flex gap-1", children: workScheduleWeek?.map(renderAlternativeDay) }) }), getScheduleDescription(workScheduleWeek)] })), workSchedule?.businessScheduleVisibleTag
|
|
4872
|
+
? renderBusinessSchedule(workSchedule?.businessScheduleDescription)
|
|
4873
|
+
: null, exchangeRate?.currencies?.length ? (jsx(CardRow, { className: "flex-wrap", children: exchangeRate?.currencies?.map(renderCurrency) })) : null] }, String(index)));
|
|
4751
4874
|
};
|
|
4752
|
-
const getWorkScheduleWeek = (workSchedule) => WEEKDAY_MAP.map(([title, key]) => {
|
|
4753
|
-
const dayOff = ['workingSaturday', 'workingSunday'].includes(key);
|
|
4754
|
-
return {
|
|
4755
|
-
title,
|
|
4756
|
-
status: Boolean(workSchedule?.[key]),
|
|
4757
|
-
workTime: dayOff ? workSchedule?.workTimeSaturday : workSchedule?.workTime,
|
|
4758
|
-
lunchHour: dayOff ? workSchedule?.lunchHourSaturday : workSchedule?.lunchHour,
|
|
4759
|
-
get hasLunch() {
|
|
4760
|
-
return /\d+/.test(this.lunchHour ?? '');
|
|
4761
|
-
},
|
|
4762
|
-
};
|
|
4763
|
-
});
|
|
4764
4875
|
const renderCurrency = ({ currency, buyExchangeRate, saleExchangeRate }, i) => (jsxs("div", { className: "flex gap-lg h-full", children: [currency?.currency ? jsx(CardCell, { label: "\u0412\u0430\u043B\u044E\u0442\u0430", value: currency.currency }) : null, buyExchangeRate ? jsx(CardCell, { label: "\u041A\u0443\u043F\u0438\u0442\u044C", value: String(buyExchangeRate) }) : null, saleExchangeRate ? jsx(CardCell, { label: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C", value: String(saleExchangeRate) }) : null] }, String(i)));
|
|
4765
4876
|
//TODO: Add logic time https://github.com/redneckz/wildless-cms-uni-blocks/pull/1549
|
|
4766
4877
|
const renderCurrentDaySchedule = (workScheduleWeek) => {
|
|
4767
|
-
|
|
4878
|
+
const [currentWeekDay] = workScheduleWeek?.slice(currentWeekDayIdx - 1) ?? [];
|
|
4879
|
+
if (!currentWeekDay) {
|
|
4768
4880
|
return null;
|
|
4769
4881
|
}
|
|
4770
|
-
const { lunchHour, status, workTime, hasLunch } =
|
|
4771
|
-
return status ? (jsxs("div", { className: "flex gap-s", children: [workTime ? jsx(Badge, { color: "green", children: workTime }) : null, lunchHour && hasLunch ? jsx(Badge, { color: "yellow", children: lunchHour }) : null] })) : (jsx(Badge, { color: "red", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }));
|
|
4882
|
+
const { lunchHour, status, workTime, hasLunch } = currentWeekDay;
|
|
4883
|
+
return status ? (jsxs("div", { className: "flex gap-s items-start whitespace-nowrap", children: [workTime ? jsx(Badge, { color: "green", children: workTime }) : null, lunchHour && hasLunch ? jsx(Badge, { color: "yellow", children: `перерыв: ${lunchHour}` }) : null] })) : (jsx(Badge, { color: "red", children: "\u0412\u044B\u0445\u043E\u0434\u043D\u043E\u0439" }));
|
|
4884
|
+
};
|
|
4885
|
+
const renderDay = ({ title, status, workTime, lunchHour, hasLunch }, index) => (jsx(CardCell, { label: title, value: status && workTime ? workTime : '', subText: getSubTextLunch(lunchHour, hasLunch, status), subColor: !status || hasLunch ? 'text-error' : 'text-green-dark' }, String(index)));
|
|
4886
|
+
const getSubTextLunch = (lunchHour, hasLunch = false, status = false) => {
|
|
4887
|
+
if (!status) {
|
|
4888
|
+
return 'Не работает';
|
|
4889
|
+
}
|
|
4890
|
+
return lunchHour && hasLunch ? `Перерыв ${lunchHour}` : lunchHour;
|
|
4772
4891
|
};
|
|
4773
|
-
const renderDay = ({ title, status, workTime, lunchHour, hasLunch }, index) => (jsx(CardCell, { label: title, value: status && workTime ? workTime : '', subText: !status ? 'Выходной' : lunchHour, subColor: !status || hasLunch ? 'text-error' : 'text-green-dark' }, String(index)));
|
|
4774
4892
|
|
|
4775
4893
|
const EMPTY_VALUE$1 = [];
|
|
4776
4894
|
function useOffices(regionCode) {
|
|
@@ -4808,11 +4926,6 @@
|
|
|
4808
4926
|
|
|
4809
4927
|
const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { defaultPadding: "p-0", ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
|
|
4810
4928
|
|
|
4811
|
-
const renderInsuranceSumMonth = (sum, monthLimit) => sum || monthLimit ? (jsxs("div", { className: "flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl", children: [Number(sum) > 0 ? renderValueBlock('Страховая сумма', sum) : null, Number(monthLimit) > 0 ? renderValueBlock('Ежемесячный лимит', monthLimit) : null] })) : null;
|
|
4812
|
-
const renderValueBlock = (title, value = 0) => (jsxs("div", { className: "basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre", children: [jsx(Text, { font: "font-light", size: "text-l", color: "text-secondary-text", children: title }), jsxs("span", { className: "font-sans text-h6 sm:text-primary-main text-primary-text", children: [toLocalNumberFormat(2)(value), " \u20BD"] })] }));
|
|
4813
|
-
|
|
4814
|
-
const PictureText = JSX(({ className, padding, headlineVersion = 'M', align = 'text-center', sum, monthLimit, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-6xl", padding: padding, headlineVersion: headlineVersion, align: align, isFullWidthTitle: true, imageOptions: { directionRight: false, imageAlign: 'center', ...imageOptions }, ...rest, children: renderInsuranceSumMonth(Number(sum), Number(monthLimit)) }) })));
|
|
4815
|
-
|
|
4816
4929
|
const GOLDEN_RATIO = 1.618;
|
|
4817
4930
|
const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
|
|
4818
4931
|
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
@@ -5069,13 +5182,13 @@
|
|
|
5069
5182
|
|
|
5070
5183
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
5071
5184
|
const getPaddingX = (steps) => (steps < 5 ? 'px-24' : 'px-16');
|
|
5072
|
-
const StepsBlock = JSX(({ className = '', showLines = true,
|
|
5185
|
+
const StepsBlock = JSX(({ align = AlignStyles, buttons, className = '', description, showLines = true, size = 'normal', steps = [], stepVersion = 'gray', title, version = 'primary', ...rest }) => {
|
|
5073
5186
|
const shortGaps = steps.length > 3;
|
|
5074
5187
|
const styleMap = STEPS_BLOCK_STYLE;
|
|
5075
5188
|
const lineOpacity = getLineOpacity(showLines);
|
|
5076
5189
|
const paddingX = getPaddingX(steps.length);
|
|
5077
5190
|
const isMainButton = Boolean(buttons?.every((b) => b?.text));
|
|
5078
|
-
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full" }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
|
|
5191
|
+
return (jsxs(BlockWrapper, { className: style('box-border flex flex-col items-center overflow-hidden gap-y-3xl', className), defaultPadding: "p-6xl", version: version, ...rest, children: [jsx(Headline, { headlineVersion: "S", title: title, description: description, isEmbedded: true, className: "w-full", align: align }), steps?.length ? (jsxs("div", { className: "box-border space-y-lg", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light flex-1', lineOpacity) }))(steps.map(renderStepIcon(styleMap, size, stepVersion))) }), jsx("div", { className: style('flex justify-between', shortGaps ? 'gap-x-s' : 'gap-x-20'), children: steps.map(renderStep({ styleMap, isMainButton, version })) })] })) : null, renderButtonsSection(buttons)] }));
|
|
5079
5192
|
});
|
|
5080
5193
|
const renderStepIcon = (styleMap, size, stepVersion) => ({ icon }, i) => {
|
|
5081
5194
|
const iconVersion = stepVersion === 'secondary' ? 'white' : 'color';
|
|
@@ -5430,7 +5543,6 @@
|
|
|
5430
5543
|
MortgageFiltration,
|
|
5431
5544
|
OfficesAtmsMap,
|
|
5432
5545
|
ParagraphBlock,
|
|
5433
|
-
PictureText,
|
|
5434
5546
|
Placeholder,
|
|
5435
5547
|
ProductBlock,
|
|
5436
5548
|
ProductGallery,
|
|
@@ -5685,7 +5797,7 @@
|
|
|
5685
5797
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5686
5798
|
}
|
|
5687
5799
|
|
|
5688
|
-
const packageVersion = "0.14.
|
|
5800
|
+
const packageVersion = "0.14.30";
|
|
5689
5801
|
|
|
5690
5802
|
exports.Blocks = Blocks;
|
|
5691
5803
|
exports.ContentPage = ContentPage;
|