@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
|
@@ -9,6 +9,7 @@ import { style } from '../../utils/style';
|
|
|
9
9
|
export interface BinaryRadioButtonGroupProps {
|
|
10
10
|
items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
|
|
11
11
|
title?: string;
|
|
12
|
+
mobileTitle?: string;
|
|
12
13
|
orientation?: ListOrientation;
|
|
13
14
|
value?: boolean;
|
|
14
15
|
radioGroupClassName?: string;
|
|
@@ -18,6 +19,7 @@ export interface BinaryRadioButtonGroupProps {
|
|
|
18
19
|
export const renderBinaryRadioButtonGroup = ({
|
|
19
20
|
items,
|
|
20
21
|
title,
|
|
22
|
+
mobileTitle = title,
|
|
21
23
|
orientation = 'horizontal',
|
|
22
24
|
value,
|
|
23
25
|
radioGroupClassName,
|
|
@@ -25,12 +27,20 @@ export const renderBinaryRadioButtonGroup = ({
|
|
|
25
27
|
}: BinaryRadioButtonGroupProps) => (
|
|
26
28
|
<div className="space-y-s">
|
|
27
29
|
{title ? (
|
|
28
|
-
<div>
|
|
30
|
+
<div className="hidden @5xl:block">
|
|
29
31
|
<Text color="text-secondary-text" font="font-light">
|
|
30
32
|
{title}
|
|
31
33
|
</Text>
|
|
32
34
|
</div>
|
|
33
35
|
) : null}
|
|
36
|
+
{mobileTitle ? (
|
|
37
|
+
<div className="@5xl:hidden">
|
|
38
|
+
<Text color="text-secondary-text" font="font-light">
|
|
39
|
+
{mobileTitle}
|
|
40
|
+
</Text>
|
|
41
|
+
</div>
|
|
42
|
+
) : null}
|
|
43
|
+
|
|
34
44
|
<RadioButtonGroup
|
|
35
45
|
orientation={orientation}
|
|
36
46
|
items={items}
|
|
@@ -26,7 +26,7 @@ export const CarouselCard = JSX<CarouselCardProps>(
|
|
|
26
26
|
<div
|
|
27
27
|
className={style(
|
|
28
28
|
layerBaseStyle,
|
|
29
|
-
'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light',
|
|
29
|
+
'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light',
|
|
30
30
|
)}
|
|
31
31
|
>
|
|
32
32
|
<Headline
|
|
@@ -5,6 +5,7 @@ import { type JSXBlock, type UniBlockProps } from '../../model/JSXBlock';
|
|
|
5
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
6
6
|
import { NotFound } from '../../ui-kit/NotFound/NotFound';
|
|
7
7
|
import { Pagination } from '../../ui-kit/Pagination/Pagination';
|
|
8
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
8
9
|
import { style } from '../../utils/style';
|
|
9
10
|
import { type DepositoryContent } from './DepositoryContent';
|
|
10
11
|
import { DepositoryFilter } from './DepositoryFilter';
|
|
@@ -33,32 +34,48 @@ export const Depository: JSXBlock<DepositoryProps> = JSX<DepositoryProps>(
|
|
|
33
34
|
const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
34
35
|
const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
|
|
35
36
|
|
|
36
|
-
const { totalPages = 0, items } = useDepository({
|
|
37
|
+
const { totalPages = 0, items = [] } = useDepository({
|
|
37
38
|
size: itemCount,
|
|
38
39
|
page: currentPage,
|
|
39
40
|
...filtrationState,
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
const handleChangePage = useCallback((page: number) => setCurrentPage(page - 1), []);
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
const handleItemCountChange = useCallback((count: number) => {
|
|
46
|
+
if (itemCount !== count) {
|
|
47
|
+
setItemCount(count);
|
|
48
|
+
setCurrentPage(0);
|
|
49
|
+
} else {
|
|
50
|
+
setItemCount(count);
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
44
53
|
|
|
45
54
|
return (
|
|
46
|
-
<BlockWrapper className={style(className, 'container p-
|
|
55
|
+
<BlockWrapper className={style(className, 'container p-6xl')} {...rest}>
|
|
47
56
|
<DepositoryFilter filtrationState={filtrationState} field={field} onClearFilter={reset} />
|
|
48
57
|
<div className="flex flex-col">
|
|
49
58
|
<div className="grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b">
|
|
50
|
-
<
|
|
51
|
-
|
|
59
|
+
<div className="col-span-2">
|
|
60
|
+
<Text size="text-m" color="text-secondary-text">
|
|
61
|
+
Дата
|
|
62
|
+
</Text>
|
|
63
|
+
</div>
|
|
64
|
+
<span className="col-span-10">
|
|
65
|
+
<Text size="text-m" color="text-secondary-text">
|
|
66
|
+
Тема
|
|
67
|
+
</Text>
|
|
68
|
+
</span>
|
|
52
69
|
</div>
|
|
53
|
-
{items
|
|
54
|
-
items
|
|
70
|
+
{items.length ? (
|
|
71
|
+
items.map((params) => <DepositoryItem key={String(params.publicId)} {...params} />)
|
|
55
72
|
) : (
|
|
56
73
|
<NotFound title="Ничего не найдено" description="Попробуйте очистить фильтры" />
|
|
57
74
|
)}
|
|
58
75
|
<Pagination
|
|
59
76
|
currentPage={currentPage + 1}
|
|
60
77
|
onPageChange={handleChangePage}
|
|
61
|
-
totalPages={totalPages
|
|
78
|
+
totalPages={totalPages}
|
|
62
79
|
itemCount={itemCount}
|
|
63
80
|
onItemCountChange={handleItemCountChange}
|
|
64
81
|
/>
|
|
@@ -28,7 +28,7 @@ export const DepositoryFilter = JSX<DepositoryFilterProps>(
|
|
|
28
28
|
/>
|
|
29
29
|
<div className="col-span-2 mt-auto">
|
|
30
30
|
<button
|
|
31
|
-
className="px-m py-s rounded-md bg-main-gray text-green cursor-pointer w-full"
|
|
31
|
+
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"
|
|
32
32
|
onClick={onClearFilter}
|
|
33
33
|
>
|
|
34
34
|
Очистить фильтр
|
|
@@ -9,8 +9,12 @@ export const DepositoryItem = ({ title, timestamp, publicId }: DepositoryDataIte
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<div className="grid grid-cols-12 py-lg border-gray border-opacity-50 border-b" key={publicId}>
|
|
12
|
-
<div className="col-span-2
|
|
13
|
-
{timestamp ?
|
|
12
|
+
<div className="col-span-2">
|
|
13
|
+
{timestamp ? (
|
|
14
|
+
<Text size="text-m" font-weight="font-light">
|
|
15
|
+
{formatDate(timestamp)}
|
|
16
|
+
</Text>
|
|
17
|
+
) : null}
|
|
14
18
|
</div>
|
|
15
19
|
<div className="col-span-10 text-h6 hover:text-primary-active">
|
|
16
20
|
<a href={href} download aria-label="Скачать">
|
|
@@ -19,14 +19,23 @@ interface UseDepositoryParams extends DepositoryFiltrationState {
|
|
|
19
19
|
size: number;
|
|
20
20
|
page: number;
|
|
21
21
|
}
|
|
22
|
+
const DEPOSITARY_URL = '/api/v1/depository';
|
|
22
23
|
|
|
23
24
|
export const useDepository = ({ size, page, query, startDate, endDate }: UseDepositoryParams) => {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
25
|
+
const formatStartDate = startDate ? formatDate(startDate, true) : '';
|
|
26
|
+
const formatEndDate = endDate ? formatDate(endDate, true) : '';
|
|
27
|
+
|
|
28
|
+
const searchParams = new URLSearchParams(DEPOSITARY_URL);
|
|
29
|
+
|
|
30
|
+
searchParams.set('page', String(page));
|
|
31
|
+
searchParams.set('size', String(size));
|
|
32
|
+
searchParams.set('query', query);
|
|
33
|
+
searchParams.set('startDate', formatStartDate);
|
|
34
|
+
searchParams.set('endDate', formatEndDate);
|
|
35
|
+
|
|
36
|
+
const queryString = `?${searchParams.toString()}`;
|
|
37
|
+
|
|
38
|
+
const { data } = useAsyncData<DepositoryData>(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
|
|
30
39
|
|
|
31
40
|
return { items: data?.content, totalPages: data?.totalPages };
|
|
32
41
|
};
|
|
@@ -5,9 +5,9 @@ import { style } from '../../utils/style';
|
|
|
5
5
|
|
|
6
6
|
const colorStyle: Record<string, { border: string; text: TextColor }> = {
|
|
7
7
|
yellow: { border: 'border-yellow-light', text: 'text-yellow' },
|
|
8
|
-
green: { border: 'border-green-light', text: 'text-green-dark' },
|
|
8
|
+
green: { border: 'border-green-more-light', text: 'text-green-dark' },
|
|
9
9
|
gray: { border: 'border-gray', text: 'text-secondary-text' },
|
|
10
|
-
red: { border: 'border-error', text: 'text-error' },
|
|
10
|
+
red: { border: 'border-error/30', text: 'text-error' },
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export interface BadgeProps {
|
|
@@ -1,40 +1,52 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
-
import { type TextColor } from '../../ui-kit/Text/TextProps';
|
|
3
|
+
import { type TextColor, type TextSize } from '../../ui-kit/Text/TextProps';
|
|
4
4
|
import { style } from '../../utils/style';
|
|
5
5
|
|
|
6
6
|
export interface CardCellProps {
|
|
7
7
|
className?: string;
|
|
8
8
|
label?: string;
|
|
9
|
-
|
|
9
|
+
labelSize?: TextSize;
|
|
10
|
+
value?: string | string[];
|
|
10
11
|
subText?: string;
|
|
11
12
|
subColor?: TextColor;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const CardCell = JSX<CardCellProps>(({
|
|
15
|
-
const textItems = value?.split(',') ?? [];
|
|
15
|
+
export const CardCell = JSX<CardCellProps>(({ value, subText, children, ...props }) => {
|
|
16
|
+
const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
|
|
16
17
|
|
|
17
|
-
if (
|
|
18
|
+
if ([textItems.length, children, subText].every((_) => !_)) {
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
return (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
return renderCardCell({ textItems, subText, children, ...props });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const renderCardCell = ({
|
|
26
|
+
label,
|
|
27
|
+
labelSize = 'text-m',
|
|
28
|
+
textItems,
|
|
29
|
+
subColor,
|
|
30
|
+
subText,
|
|
31
|
+
className,
|
|
32
|
+
children,
|
|
33
|
+
}: CardCellProps & { textItems: string[]; children: any }) => (
|
|
34
|
+
<div className={style('flex gap-2xs flex-col h-full max-w-[300px]', className)}>
|
|
35
|
+
{label ? (
|
|
36
|
+
<Text color="text-secondary-text" font="font-light" size={labelSize}>
|
|
37
|
+
{label}
|
|
38
|
+
</Text>
|
|
39
|
+
) : null}
|
|
40
|
+
{children ||
|
|
41
|
+
textItems.filter(Boolean).map((text, i) => (
|
|
29
42
|
<Text key={String(i)} size="text-l">
|
|
30
43
|
{text.trim()}
|
|
31
44
|
</Text>
|
|
32
45
|
))}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
46
|
+
{subText ? (
|
|
47
|
+
<Text color={subColor} size="text-m">
|
|
48
|
+
{subText}
|
|
49
|
+
</Text>
|
|
50
|
+
) : null}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
@@ -16,7 +16,9 @@ export interface ExchangeRate {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export type WorkScheduleWeek = {
|
|
19
|
+
key?: string;
|
|
19
20
|
title?: string;
|
|
21
|
+
short?: string;
|
|
20
22
|
status?: boolean;
|
|
21
23
|
workTime?: string;
|
|
22
24
|
lunchHour?: string;
|
|
@@ -42,6 +44,9 @@ export type WorkSchedule = {
|
|
|
42
44
|
workingFriday?: boolean;
|
|
43
45
|
workingSaturday?: boolean;
|
|
44
46
|
workingSunday?: boolean;
|
|
47
|
+
isMatchesPattern?: boolean;
|
|
48
|
+
businessScheduleVisibleTag?: boolean;
|
|
49
|
+
businessScheduleDescription?: string;
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
export type SafeBoxCaseTariff = {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CardCell } from './CardCell';
|
|
2
|
+
import type { WorkScheduleWeek } from './OfficesAtmsMapProps';
|
|
3
|
+
|
|
4
|
+
export const getScheduleDescription = (workScheduleWeek: WorkScheduleWeek[]) => {
|
|
5
|
+
const workingWeekday = workScheduleWeek.find(
|
|
6
|
+
(_) => _.key !== 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime),
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const workingSaturday = workScheduleWeek.find(
|
|
10
|
+
(_) => _.key === 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime),
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const daysOff = workScheduleWeek
|
|
14
|
+
.filter((_) => !_.status)
|
|
15
|
+
.map((_) => _.short?.toLowerCase())
|
|
16
|
+
.join(', ');
|
|
17
|
+
|
|
18
|
+
const rows = [
|
|
19
|
+
buildScheduleText({
|
|
20
|
+
workTime: workingWeekday?.workTime,
|
|
21
|
+
lunchHour: workingWeekday?.lunchHour,
|
|
22
|
+
daysOff: workingSaturday ? '' : daysOff,
|
|
23
|
+
}),
|
|
24
|
+
buildScheduleText(
|
|
25
|
+
{ workTime: workingSaturday?.workTime, lunchHour: workingSaturday?.lunchHour, daysOff },
|
|
26
|
+
true,
|
|
27
|
+
),
|
|
28
|
+
].filter(Boolean);
|
|
29
|
+
|
|
30
|
+
return <CardCell label="Режим работы" value={rows} className="max-w-none" />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const buildScheduleText = (
|
|
34
|
+
{ workTime = '', lunchHour = '', daysOff = '' }: Record<string, string | undefined>,
|
|
35
|
+
isSaturday = false,
|
|
36
|
+
) => {
|
|
37
|
+
if (!workTime) {
|
|
38
|
+
return '';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return [
|
|
42
|
+
`${isSaturday ? 'Суббота' : 'Будние дни'}: ${workTime}`,
|
|
43
|
+
lunchHour ? `перерыв: ${lunchHour}` : '',
|
|
44
|
+
daysOff ? `не работает: ${daysOff}` : '',
|
|
45
|
+
]
|
|
46
|
+
.filter(Boolean)
|
|
47
|
+
.join('; ');
|
|
48
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WorkSchedule, WorkScheduleWeek } from './OfficesAtmsMapProps';
|
|
2
|
+
|
|
3
|
+
export const WEEKDAY_MAP = [
|
|
4
|
+
['workingMonday', 'Пн', 'Понедельник'],
|
|
5
|
+
['workingTuesday', 'Вт', 'Вторник'],
|
|
6
|
+
['workingWednesday', 'Ср', 'Среда'],
|
|
7
|
+
['workingThursday', 'Чт', 'Четверг'],
|
|
8
|
+
['workingFriday', 'Пт', 'Пятница'],
|
|
9
|
+
['workingSaturday', 'Сб', 'Суббота'],
|
|
10
|
+
['workingSunday', 'Вс', 'Воскресенье'],
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const getWorkScheduleWeek = (workSchedule?: WorkSchedule): WorkScheduleWeek[] =>
|
|
14
|
+
WEEKDAY_MAP.map(([key, short, title]) => ({
|
|
15
|
+
key,
|
|
16
|
+
title,
|
|
17
|
+
short,
|
|
18
|
+
status: Boolean(workSchedule?.[key]),
|
|
19
|
+
get workTime() {
|
|
20
|
+
return key === 'workingSaturday' ? workSchedule?.workTimeSaturday : workSchedule?.workTime;
|
|
21
|
+
},
|
|
22
|
+
get lunchHour() {
|
|
23
|
+
return key === 'workingSaturday' ? workSchedule?.lunchHourSaturday : workSchedule?.lunchHour;
|
|
24
|
+
},
|
|
25
|
+
get hasLunch() {
|
|
26
|
+
return /\d+/.test(this.lunchHour ?? '');
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
2
|
+
import { style } from '../../utils/style';
|
|
3
|
+
import { CardCell } from './CardCell';
|
|
4
|
+
import { CardRow } from './CardRow';
|
|
5
|
+
import { WEEKDAY_MAP } from './getWorkScheduleWeek';
|
|
6
|
+
import type { WorkScheduleWeek } from './OfficesAtmsMapProps';
|
|
7
|
+
|
|
8
|
+
export const renderBusinessSchedule = (scheduleDescription?: string) => {
|
|
9
|
+
if (!scheduleDescription) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const businessSchedule = getBusinessSchedule(scheduleDescription);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<CardRow className="border-none">
|
|
17
|
+
<CardCell label="Для юридических лиц" labelSize="text-l">
|
|
18
|
+
<div className="flex gap-1">{businessSchedule.map(renderAlternativeDay)}</div>
|
|
19
|
+
</CardCell>
|
|
20
|
+
<CardCell label="Режим работы" className="max-w-none">
|
|
21
|
+
<Text>{scheduleDescription}</Text>
|
|
22
|
+
</CardCell>
|
|
23
|
+
</CardRow>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const getBusinessSchedule = (scheduleDescription: string) => {
|
|
28
|
+
const weekDayMap = WEEKDAY_MAP.map(([, short]) => ({ short, status: true }));
|
|
29
|
+
|
|
30
|
+
const splittedScheduleDescription = scheduleDescription.split('/') ?? [];
|
|
31
|
+
const lastPartScheduleDescription =
|
|
32
|
+
splittedScheduleDescription[splittedScheduleDescription.length - 1]?.toLowerCase();
|
|
33
|
+
|
|
34
|
+
if (!lastPartScheduleDescription?.includes('выходной')) {
|
|
35
|
+
return weekDayMap;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return weekDayMap.map((_) => ({
|
|
39
|
+
..._,
|
|
40
|
+
status: !lastPartScheduleDescription?.includes(_.short.toLowerCase()),
|
|
41
|
+
}));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const renderAlternativeDay = ({ short, status }: WorkScheduleWeek, index: number) => (
|
|
45
|
+
<div
|
|
46
|
+
key={String(index)}
|
|
47
|
+
className={style(
|
|
48
|
+
'w-9 h-9 rounded-md flex items-center justify-center',
|
|
49
|
+
status ? 'bg-green-more-light text-green-dark' : 'bg-error/30 text-error',
|
|
50
|
+
)}
|
|
51
|
+
>
|
|
52
|
+
<Text size="text-xs">{short}</Text>
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
@@ -3,22 +3,10 @@ import { Text } from '../../ui-kit/Text/Text';
|
|
|
3
3
|
import { Badge } from './Badge';
|
|
4
4
|
import { CardCell } from './CardCell';
|
|
5
5
|
import { CardRow } from './CardRow';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type WorkScheduleWeek,
|
|
11
|
-
} from './OfficesAtmsMapProps';
|
|
12
|
-
|
|
13
|
-
const WEEKDAY_MAP = [
|
|
14
|
-
['Понедельник', 'workingMonday'],
|
|
15
|
-
['Вторник', 'workingTuesday'],
|
|
16
|
-
['Среда', 'workingWednesday'],
|
|
17
|
-
['Четверг', 'workingThursday'],
|
|
18
|
-
['Пятница', 'workingFriday'],
|
|
19
|
-
['Суббота', 'workingSaturday'],
|
|
20
|
-
['Воскресенье', 'workingSunday'],
|
|
21
|
-
];
|
|
6
|
+
import { getScheduleDescription } from './getScheduleDescription';
|
|
7
|
+
import { getWorkScheduleWeek } from './getWorkScheduleWeek';
|
|
8
|
+
import { type Branch, type Currency, type WorkScheduleWeek } from './OfficesAtmsMapProps';
|
|
9
|
+
import { renderAlternativeDay, renderBusinessSchedule } from './renderBusinessSchedule';
|
|
22
10
|
|
|
23
11
|
const currentWeekDayIdx = new Date().getDay();
|
|
24
12
|
|
|
@@ -37,14 +25,20 @@ export const renderOfficeCard = (
|
|
|
37
25
|
}: Branch,
|
|
38
26
|
index: number,
|
|
39
27
|
) => {
|
|
40
|
-
|
|
41
|
-
|
|
28
|
+
if (!workSchedule) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const workScheduleWeek = getWorkScheduleWeek(workSchedule);
|
|
33
|
+
const labelSchedule = workSchedule?.businessScheduleVisibleTag
|
|
34
|
+
? 'Для физических лиц'
|
|
35
|
+
: 'Для физических и юридических лиц';
|
|
42
36
|
|
|
43
37
|
return (
|
|
44
38
|
<div key={String(index)} className="bg-white col-span-12 p-3xl border-green border">
|
|
45
39
|
<div className="flex justify-between">
|
|
46
40
|
<Text size="text-h4">{name}</Text>
|
|
47
|
-
{renderCurrentDaySchedule(
|
|
41
|
+
{renderCurrentDaySchedule(workScheduleWeek)}
|
|
48
42
|
</div>
|
|
49
43
|
{address ? (
|
|
50
44
|
<div className="flex pb-xl pt-xs gap-2xs">
|
|
@@ -60,7 +54,23 @@ export const renderOfficeCard = (
|
|
|
60
54
|
<CardCell label="Для консультаций по валютному контролю" value={phoneCurrencyControl} />
|
|
61
55
|
<CardCell label="Контакт-центр" value={phoneCallCentre} />
|
|
62
56
|
</CardRow>
|
|
63
|
-
{
|
|
57
|
+
{workSchedule.isMatchesPattern ? (
|
|
58
|
+
<CardRow>
|
|
59
|
+
<CardCell label={labelSchedule} labelSize="text-l" className="w-full max-w-none">
|
|
60
|
+
<div className="flex justify-between pt-xs">{workScheduleWeek?.map(renderDay)}</div>
|
|
61
|
+
</CardCell>
|
|
62
|
+
</CardRow>
|
|
63
|
+
) : (
|
|
64
|
+
<CardRow>
|
|
65
|
+
<CardCell label={labelSchedule} labelSize="text-l">
|
|
66
|
+
<div className="flex gap-1">{workScheduleWeek?.map(renderAlternativeDay)}</div>
|
|
67
|
+
</CardCell>
|
|
68
|
+
{getScheduleDescription(workScheduleWeek)}
|
|
69
|
+
</CardRow>
|
|
70
|
+
)}
|
|
71
|
+
{workSchedule?.businessScheduleVisibleTag
|
|
72
|
+
? renderBusinessSchedule(workSchedule?.businessScheduleDescription)
|
|
73
|
+
: null}
|
|
64
74
|
{exchangeRate?.currencies?.length ? (
|
|
65
75
|
<CardRow className="flex-wrap">{exchangeRate?.currencies?.map(renderCurrency)}</CardRow>
|
|
66
76
|
) : null}
|
|
@@ -68,21 +78,6 @@ export const renderOfficeCard = (
|
|
|
68
78
|
);
|
|
69
79
|
};
|
|
70
80
|
|
|
71
|
-
const getWorkScheduleWeek = (workSchedule?: WorkSchedule): WorkScheduleWeek[] =>
|
|
72
|
-
WEEKDAY_MAP.map(([title, key]) => {
|
|
73
|
-
const dayOff = ['workingSaturday', 'workingSunday'].includes(key);
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
title,
|
|
77
|
-
status: Boolean(workSchedule?.[key]),
|
|
78
|
-
workTime: dayOff ? workSchedule?.workTimeSaturday : workSchedule?.workTime,
|
|
79
|
-
lunchHour: dayOff ? workSchedule?.lunchHourSaturday : workSchedule?.lunchHour,
|
|
80
|
-
get hasLunch() {
|
|
81
|
-
return /\d+/.test(this.lunchHour ?? '');
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
|
|
86
81
|
export const renderCurrency = (
|
|
87
82
|
{ currency, buyExchangeRate, saleExchangeRate }: Currency,
|
|
88
83
|
i: number,
|
|
@@ -95,17 +90,19 @@ export const renderCurrency = (
|
|
|
95
90
|
);
|
|
96
91
|
|
|
97
92
|
//TODO: Add logic time https://github.com/redneckz/wildless-cms-uni-blocks/pull/1549
|
|
98
|
-
export const renderCurrentDaySchedule = (workScheduleWeek?: WorkScheduleWeek) => {
|
|
99
|
-
|
|
93
|
+
export const renderCurrentDaySchedule = (workScheduleWeek?: WorkScheduleWeek[]) => {
|
|
94
|
+
const [currentWeekDay] = workScheduleWeek?.slice(currentWeekDayIdx - 1) ?? [];
|
|
95
|
+
|
|
96
|
+
if (!currentWeekDay) {
|
|
100
97
|
return null;
|
|
101
98
|
}
|
|
102
99
|
|
|
103
|
-
const { lunchHour, status, workTime, hasLunch } =
|
|
100
|
+
const { lunchHour, status, workTime, hasLunch } = currentWeekDay;
|
|
104
101
|
|
|
105
102
|
return status ? (
|
|
106
|
-
<div className="flex gap-s">
|
|
103
|
+
<div className="flex gap-s items-start whitespace-nowrap">
|
|
107
104
|
{workTime ? <Badge color="green">{workTime}</Badge> : null}
|
|
108
|
-
{lunchHour && hasLunch ? <Badge color="yellow">{lunchHour}</Badge> : null}
|
|
105
|
+
{lunchHour && hasLunch ? <Badge color="yellow">{`перерыв: ${lunchHour}`}</Badge> : null}
|
|
109
106
|
</div>
|
|
110
107
|
) : (
|
|
111
108
|
<Badge color="red">Выходной</Badge>
|
|
@@ -120,7 +117,15 @@ export const renderDay = (
|
|
|
120
117
|
key={String(index)}
|
|
121
118
|
label={title}
|
|
122
119
|
value={status && workTime ? workTime : ''}
|
|
123
|
-
subText={
|
|
120
|
+
subText={getSubTextLunch(lunchHour, hasLunch, status)}
|
|
124
121
|
subColor={!status || hasLunch ? 'text-error' : 'text-green-dark'}
|
|
125
122
|
/>
|
|
126
123
|
);
|
|
124
|
+
|
|
125
|
+
const getSubTextLunch = (lunchHour?: string, hasLunch = false, status = false) => {
|
|
126
|
+
if (!status) {
|
|
127
|
+
return 'Не работает';
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return lunchHour && hasLunch ? `Перерыв ${lunchHour}` : lunchHour;
|
|
131
|
+
};
|
|
@@ -89,6 +89,48 @@ export default {
|
|
|
89
89
|
<ProductBlock className="col-span-12" {...props} benefits={benefits} label={label} />
|
|
90
90
|
</div>
|
|
91
91
|
),
|
|
92
|
+
'primary with insurance': (
|
|
93
|
+
<div className="container grid grid-cols-12">
|
|
94
|
+
<ProductBlock
|
|
95
|
+
className="col-span-12"
|
|
96
|
+
isFullWidthTitle={true}
|
|
97
|
+
align="text-center"
|
|
98
|
+
headlineVersion="M"
|
|
99
|
+
title="Страховые риски и продукты"
|
|
100
|
+
description="Покрываемые риски программы «Защита вас и ваших близких»"
|
|
101
|
+
image={image}
|
|
102
|
+
benefits={[
|
|
103
|
+
{
|
|
104
|
+
type: 'default',
|
|
105
|
+
label: 'Телесное повреждение',
|
|
106
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'default',
|
|
110
|
+
label: 'Госпитализация застрахованного',
|
|
111
|
+
description: 'Описание',
|
|
112
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'default',
|
|
116
|
+
label:
|
|
117
|
+
'Сокращение численности работников организации и другой текст для теста длинны текста',
|
|
118
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'default',
|
|
122
|
+
label: 'Смерть застрахованного',
|
|
123
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
124
|
+
},
|
|
125
|
+
]}
|
|
126
|
+
priceList={[
|
|
127
|
+
{ label: 'Страховая сумма', amount: 500000 },
|
|
128
|
+
{ label: 'Ежемесячный лимит', amount: 25000 },
|
|
129
|
+
]}
|
|
130
|
+
imageOptions={{ directionRight: false }}
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
),
|
|
92
134
|
secondary: (
|
|
93
135
|
<div className="container grid grid-cols-12">
|
|
94
136
|
<ProductBlock className="col-span-12" {...props} benefits={benefits} version="secondary" />
|
|
@@ -146,6 +146,48 @@ export default {
|
|
|
146
146
|
/>
|
|
147
147
|
</div>
|
|
148
148
|
),
|
|
149
|
+
'primary with insurance': (
|
|
150
|
+
<div className="container grid grid-cols-12">
|
|
151
|
+
<ProductBlock
|
|
152
|
+
className="col-span-12"
|
|
153
|
+
isFullWidthTitle={true}
|
|
154
|
+
align="text-center"
|
|
155
|
+
headlineVersion="M"
|
|
156
|
+
title="Страховые риски и продукты"
|
|
157
|
+
description="Покрываемые риски программы «Защита вас и ваших близких»"
|
|
158
|
+
image={image}
|
|
159
|
+
benefits={[
|
|
160
|
+
{
|
|
161
|
+
type: 'default',
|
|
162
|
+
label: 'Телесное повреждение',
|
|
163
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'default',
|
|
167
|
+
label: 'Госпитализация застрахованного',
|
|
168
|
+
description: 'Описание',
|
|
169
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: 'default',
|
|
173
|
+
label:
|
|
174
|
+
'Сокращение численности работников организации и другой текст для теста длинны текста',
|
|
175
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: 'default',
|
|
179
|
+
label: 'Смерть застрахованного',
|
|
180
|
+
icon: { icon: 'ShieldTickIcon' },
|
|
181
|
+
},
|
|
182
|
+
]}
|
|
183
|
+
priceList={[
|
|
184
|
+
{ label: 'Страховая сумма', amount: 500000 },
|
|
185
|
+
{ label: 'Ежемесячный лимит', amount: 25000 },
|
|
186
|
+
]}
|
|
187
|
+
imageOptions={{ directionRight: false }}
|
|
188
|
+
/>
|
|
189
|
+
</div>
|
|
190
|
+
),
|
|
149
191
|
'secondary with back button': (
|
|
150
192
|
<div className="container grid grid-cols-12">
|
|
151
193
|
<ProductBlock
|