@redneckz/wildless-cms-uni-blocks 0.8.9 → 0.8.11
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.8.10.js +31 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +154 -138
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
- package/bundle/components/Tile/TileContent.d.ts +2 -2
- package/bundle/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/bundle/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/bundle/utils/adjustHref.d.ts +3 -0
- package/bundle/utils/dirname.d.ts +1 -0
- package/bundle/utils/url.d.ts +2 -2
- package/dist/ProjectSettings.js +3 -4
- package/dist/ProjectSettings.js.map +1 -1
- package/dist/components/Calculator/Rate.js +1 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/constants.js +2 -2
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.d.ts +4 -0
- package/dist/components/Calculator/rangeHelpers.js +12 -0
- package/dist/components/Calculator/rangeHelpers.js.map +1 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +6 -4
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/PictureText/renderBenefit.js +1 -0
- package/dist/components/PictureText/renderBenefit.js.map +1 -1
- package/dist/components/ProductTile/renderBenefit.js +1 -0
- package/dist/components/ProductTile/renderBenefit.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.js +7 -13
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlock.mobile.js +24 -4
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
- package/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/{lib/components/StepsBlock/renderStepContent.d.ts → dist/components/StepsBlock/renderStep.d.ts} +5 -5
- package/dist/components/StepsBlock/renderStep.js +34 -0
- package/dist/components/StepsBlock/renderStep.js.map +1 -0
- package/dist/components/Tile/Tile.js +3 -3
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/components/Tile/TileContent.d.ts +2 -2
- package/dist/hooks/useLink.js +4 -16
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/dist/services/BlockRouter/BlockRouter.js +3 -9
- package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/dist/services/BlockRouter/useBlockRouterProvider.js +2 -10
- package/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/dist/setup-fixture.js +3 -4
- package/dist/setup-fixture.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +5 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/dist/ui-kit/Img/ImgAsPicture.js +18 -21
- package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/dist/utils/adjustHref.d.ts +3 -0
- package/dist/utils/adjustHref.js +14 -0
- package/dist/utils/adjustHref.js.map +1 -0
- package/dist/utils/dirname.d.ts +1 -0
- package/dist/utils/dirname.js +5 -0
- package/dist/utils/dirname.js.map +1 -0
- package/dist/utils/url.d.ts +2 -2
- package/dist/utils/url.js +1 -1
- package/dist/utils/url.js.map +1 -1
- package/dist/wlc.json +0 -1
- package/lib/ProjectSettings.js +3 -4
- package/lib/ProjectSettings.js.map +1 -1
- package/lib/components/Calculator/Rate.js +1 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/constants.js +2 -2
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.d.ts +4 -0
- package/lib/components/Calculator/rangeHelpers.js +8 -0
- package/lib/components/Calculator/rangeHelpers.js.map +1 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +6 -4
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/PictureText/renderBenefit.js +1 -0
- package/lib/components/PictureText/renderBenefit.js.map +1 -1
- package/lib/components/ProductTile/renderBenefit.js +1 -0
- package/lib/components/ProductTile/renderBenefit.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.js +7 -13
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlock.mobile.js +24 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
- package/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/{dist/components/StepsBlock/renderStepContent.d.ts → lib/components/StepsBlock/renderStep.d.ts} +5 -5
- package/lib/components/StepsBlock/renderStep.js +31 -0
- package/lib/components/StepsBlock/renderStep.js.map +1 -0
- package/lib/components/Tile/Tile.js +3 -3
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/components/Tile/TileContent.d.ts +2 -2
- package/lib/hooks/useLink.js +5 -17
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/lib/services/BlockRouter/BlockRouter.js +2 -7
- package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/lib/services/BlockRouter/useBlockRouterProvider.js +2 -10
- package/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/lib/setup-fixture.js +3 -4
- package/lib/setup-fixture.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +5 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/lib/ui-kit/Img/ImgAsPicture.js +17 -19
- package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/lib/utils/adjustHref.d.ts +3 -0
- package/lib/utils/adjustHref.js +11 -0
- package/lib/utils/adjustHref.js.map +1 -0
- package/lib/utils/dirname.d.ts +1 -0
- package/lib/utils/dirname.js +2 -0
- package/lib/utils/dirname.js.map +1 -0
- package/lib/utils/url.d.ts +2 -2
- package/lib/utils/url.js +1 -1
- package/lib/utils/url.js.map +1 -1
- package/lib/wlc.json +0 -1
- package/mobile/bundle/bundle.umd.js +104 -95
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/mobile/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +2 -2
- package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/mobile/bundle/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/mobile/bundle/utils/adjustHref.d.ts +3 -0
- package/mobile/bundle/utils/dirname.d.ts +1 -0
- package/mobile/bundle/utils/url.d.ts +2 -2
- package/mobile/dist/ProjectSettings.js +3 -4
- package/mobile/dist/ProjectSettings.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.js +1 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.js +2 -2
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js +12 -0
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +6 -4
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/PictureText/renderBenefit.js +1 -0
- package/mobile/dist/components/PictureText/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/renderBenefit.js +1 -0
- package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlock.js +24 -4
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
- package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/mobile/dist/components/StepsBlock/renderStep.d.ts +11 -0
- package/mobile/dist/components/StepsBlock/renderStep.js +34 -0
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -0
- package/mobile/dist/components/Tile/Tile.js +3 -3
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +2 -2
- package/mobile/dist/hooks/useLink.js +4 -16
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/mobile/dist/services/BlockRouter/BlockRouter.js +3 -9
- package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +2 -10
- package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/dist/setup-fixture.js +3 -4
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +5 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +18 -21
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/dist/utils/adjustHref.d.ts +3 -0
- package/mobile/dist/utils/adjustHref.js +14 -0
- package/mobile/dist/utils/adjustHref.js.map +1 -0
- package/mobile/dist/utils/dirname.d.ts +1 -0
- package/mobile/dist/utils/dirname.js +5 -0
- package/mobile/dist/utils/dirname.js.map +1 -0
- package/mobile/dist/utils/url.d.ts +2 -2
- package/mobile/dist/utils/url.js +1 -1
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/dist/wlc.json +0 -1
- package/mobile/lib/ProjectSettings.js +3 -4
- package/mobile/lib/ProjectSettings.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.js +1 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.js +2 -2
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +4 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js +8 -0
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +6 -4
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/PictureText/renderBenefit.js +1 -0
- package/mobile/lib/components/PictureText/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/renderBenefit.js +1 -0
- package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlock.js +24 -4
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
- package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
- package/mobile/lib/components/StepsBlock/renderStep.d.ts +11 -0
- package/mobile/lib/components/StepsBlock/renderStep.js +31 -0
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -0
- package/mobile/lib/components/Tile/Tile.js +3 -3
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +2 -2
- package/mobile/lib/hooks/useLink.js +5 -17
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +1 -3
- package/mobile/lib/services/BlockRouter/BlockRouter.js +2 -7
- package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +2 -10
- package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
- package/mobile/lib/setup-fixture.js +3 -4
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +5 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +0 -2
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +17 -19
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
- package/mobile/lib/utils/adjustHref.d.ts +3 -0
- package/mobile/lib/utils/adjustHref.js +11 -0
- package/mobile/lib/utils/adjustHref.js.map +1 -0
- package/mobile/lib/utils/dirname.d.ts +1 -0
- package/mobile/lib/utils/dirname.js +2 -0
- package/mobile/lib/utils/dirname.js.map +1 -0
- package/mobile/lib/utils/url.d.ts +2 -2
- package/mobile/lib/utils/url.js +1 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/lib/wlc.json +0 -1
- package/mobile/src/ProjectSettings.ts +4 -4
- package/mobile/src/components/Calculator/Rate.tsx +1 -1
- package/mobile/src/components/Calculator/constants.ts +2 -2
- package/mobile/src/components/Calculator/rangeHelpers.ts +24 -0
- package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
- package/mobile/src/components/Carousel/Carousel.tsx +6 -4
- package/mobile/src/components/PictureText/renderBenefit.tsx +1 -0
- package/mobile/src/components/ProductTile/renderBenefit.tsx +1 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +29 -5
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +13 -1
- package/mobile/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
- package/mobile/src/components/StepsBlock/renderStep.tsx +83 -0
- package/mobile/src/components/Tile/Tile.example.json +1 -1
- package/mobile/src/components/Tile/Tile.tsx +4 -4
- package/mobile/src/components/Tile/Tile.ui.json +7 -1
- package/mobile/src/components/Tile/TileContent.ts +2 -2
- package/mobile/src/hooks/useLink.ts +5 -18
- package/mobile/src/services/BlockRouter/BlockRouter.ts +6 -9
- package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +4 -10
- package/mobile/src/setup-fixture.ts +5 -4
- package/mobile/src/ui-kit/Icon/Icon.tsx +5 -1
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +23 -28
- package/mobile/src/utils/adjustHref.ts +17 -0
- package/mobile/src/utils/dirname.ts +1 -0
- package/mobile/src/utils/url.ts +2 -3
- package/mobile/src/wlc.json +0 -1
- package/package.json +1 -1
- package/src/ProjectSettings.ts +4 -4
- package/src/components/Calculator/Rate.tsx +1 -1
- package/src/components/Calculator/constants.ts +2 -2
- package/src/components/Calculator/rangeHelpers.ts +24 -0
- package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
- package/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
- package/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
- package/src/components/Carousel/Carousel.tsx +6 -4
- package/src/components/PictureText/renderBenefit.tsx +1 -0
- package/src/components/ProductTile/renderBenefit.tsx +1 -0
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +19 -1
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +10 -3
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +29 -5
- package/src/components/StepsBlock/StepsBlock.tsx +28 -16
- package/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +13 -1
- package/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
- package/src/components/StepsBlock/renderStep.tsx +83 -0
- package/src/components/Tile/Tile.example.json +1 -1
- package/src/components/Tile/Tile.fixture.tsx +2 -2
- package/src/components/Tile/Tile.tsx +4 -4
- package/src/components/Tile/Tile.ui.json +7 -1
- package/src/components/Tile/TileContent.ts +2 -2
- package/src/hooks/useLink.ts +5 -18
- package/src/services/BlockRouter/BlockRouter.ts +6 -9
- package/src/services/BlockRouter/useBlockRouterProvider.ts +4 -10
- package/src/setup-fixture.ts +5 -4
- package/src/ui-kit/Icon/Icon.tsx +5 -1
- package/src/ui-kit/Img/ImgAsPicture.tsx +23 -28
- package/src/utils/adjustHref.ts +17 -0
- package/src/utils/dirname.ts +1 -0
- package/src/utils/url.ts +2 -3
- package/src/wlc.json +0 -1
- package/bundle/utils/checkIsIconRenderable.d.ts +0 -2
- package/dist/components/StepsBlock/renderStepContent.js +0 -19
- package/dist/components/StepsBlock/renderStepContent.js.map +0 -1
- package/dist/utils/checkIsIconRenderable.d.ts +0 -2
- package/dist/utils/checkIsIconRenderable.js +0 -5
- package/dist/utils/checkIsIconRenderable.js.map +0 -1
- package/lib/components/StepsBlock/renderStepContent.js +0 -16
- package/lib/components/StepsBlock/renderStepContent.js.map +0 -1
- package/lib/utils/checkIsIconRenderable.d.ts +0 -2
- package/lib/utils/checkIsIconRenderable.js +0 -2
- package/lib/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/bundle/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +0 -11
- package/mobile/dist/components/StepsBlock/renderStepContent.js +0 -19
- package/mobile/dist/components/StepsBlock/renderStepContent.js.map +0 -1
- package/mobile/dist/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/dist/utils/checkIsIconRenderable.js +0 -5
- package/mobile/dist/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +0 -11
- package/mobile/lib/components/StepsBlock/renderStepContent.js +0 -16
- package/mobile/lib/components/StepsBlock/renderStepContent.js.map +0 -1
- package/mobile/lib/utils/checkIsIconRenderable.d.ts +0 -2
- package/mobile/lib/utils/checkIsIconRenderable.js +0 -2
- package/mobile/lib/utils/checkIsIconRenderable.js.map +0 -1
- package/mobile/src/components/StepsBlock/renderStepContent.tsx +0 -83
- package/mobile/src/utils/checkIsIconRenderable.tsx +0 -3
- package/src/components/StepsBlock/renderStepContent.tsx +0 -83
- package/src/utils/checkIsIconRenderable.tsx +0 -3
package/bundle/bundle.umd.js
CHANGED
|
@@ -81,12 +81,10 @@
|
|
|
81
81
|
return this._.FOOTER;
|
|
82
82
|
}
|
|
83
83
|
get CDN() {
|
|
84
|
-
return this._.CDN;
|
|
84
|
+
return appendSlash(this._.CDN);
|
|
85
85
|
}
|
|
86
86
|
get BASE_PATH() {
|
|
87
|
-
return this._.BASE_PATH
|
|
88
|
-
? `${this._.BASE_PATH}/`
|
|
89
|
-
: this._.BASE_PATH;
|
|
87
|
+
return appendSlash(this._.BASE_PATH);
|
|
90
88
|
}
|
|
91
89
|
get YANDEX_MAP_API_KEY() {
|
|
92
90
|
return this._.YANDEX_MAP_API_KEY;
|
|
@@ -95,6 +93,7 @@
|
|
|
95
93
|
return this._.YANDEX_METRIKA_ID;
|
|
96
94
|
}
|
|
97
95
|
})();
|
|
96
|
+
const appendSlash = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
98
97
|
|
|
99
98
|
const AUTH_PREFIX = 'guest';
|
|
100
99
|
const STORAGE_KEY = 'likesToken';
|
|
@@ -419,6 +418,49 @@
|
|
|
419
418
|
return (jsx("div", { ref: containerRef, className: `transition-max-h duration-300 overflow-hidden ${containerRef.current || !isUnfolded ? 'max-h-0' : ''} ${className}`, children: children }));
|
|
420
419
|
});
|
|
421
420
|
|
|
421
|
+
function useRouter() {
|
|
422
|
+
return useRouter._impl();
|
|
423
|
+
}
|
|
424
|
+
useRouter._impl = () => ({
|
|
425
|
+
href: globalThis.location?.href || '/',
|
|
426
|
+
pathname: globalThis.location?.pathname || '/',
|
|
427
|
+
query: {},
|
|
428
|
+
push: () => {
|
|
429
|
+
// Do nothing
|
|
430
|
+
},
|
|
431
|
+
replace: () => {
|
|
432
|
+
// Do nothing
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
useRouter.setup = (impl) => {
|
|
436
|
+
useRouter._impl = impl;
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
const dirname = (path) => path?.split('/').slice(0, -1).join('/');
|
|
440
|
+
|
|
441
|
+
const isURL = (href) => Boolean(href?.includes(':'));
|
|
442
|
+
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
443
|
+
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
444
|
+
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
445
|
+
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
446
|
+
|
|
447
|
+
var url = /*#__PURE__*/Object.freeze({
|
|
448
|
+
__proto__: null,
|
|
449
|
+
isURL: isURL,
|
|
450
|
+
isLocalURL: isLocalURL,
|
|
451
|
+
isHash: isHash,
|
|
452
|
+
withoutQuery: withoutQuery,
|
|
453
|
+
joinPath: joinPath
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
const adjustHref = (router) => (href) => {
|
|
457
|
+
if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
|
|
458
|
+
return href;
|
|
459
|
+
}
|
|
460
|
+
const isRelativeToBase = href.startsWith('/');
|
|
461
|
+
return joinPath(projectSettings.BASE_PATH, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
462
|
+
};
|
|
463
|
+
|
|
422
464
|
const svgUseStyleMap = {
|
|
423
465
|
normal: '',
|
|
424
466
|
color: 'text-primary-main',
|
|
@@ -426,7 +468,8 @@
|
|
|
426
468
|
white: 'text-black',
|
|
427
469
|
};
|
|
428
470
|
const Icon = JSX(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
429
|
-
const
|
|
471
|
+
const router = useRouter();
|
|
472
|
+
const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
|
|
430
473
|
if (asSVG && iconVersion !== 'normal') {
|
|
431
474
|
return (jsx(Background, { className: className, children: jsxs("svg", { className: style(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
432
475
|
}
|
|
@@ -435,22 +478,18 @@
|
|
|
435
478
|
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
436
479
|
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
437
480
|
|
|
438
|
-
const sourcesComparator = (a, b) =>
|
|
439
|
-
if (a.media && b.media) {
|
|
440
|
-
return a.media - b.media;
|
|
441
|
-
}
|
|
442
|
-
return 0;
|
|
443
|
-
};
|
|
481
|
+
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
444
482
|
const ImgAsPicture = JSX(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
445
|
-
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
483
|
+
const router = useRouter();
|
|
448
484
|
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
449
485
|
return (jsxs("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
450
486
|
? image.sources
|
|
487
|
+
.filter((_) => _?.src)
|
|
451
488
|
.sort(sourcesComparator)
|
|
452
|
-
.map(({ src, format, media }, index) => (jsx("source", { srcSet:
|
|
453
|
-
: null,
|
|
489
|
+
.map(({ src, format, media }, index) => (jsx("source", { srcSet: adjustSrcset(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
490
|
+
: null, image?.src
|
|
491
|
+
? renderImg({ ...image, src: adjustSrcset(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
492
|
+
: null] }));
|
|
454
493
|
});
|
|
455
494
|
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
456
495
|
const style = {
|
|
@@ -462,15 +501,14 @@
|
|
|
462
501
|
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
463
502
|
return (jsx("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
464
503
|
};
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
.map((src) =>
|
|
504
|
+
const adjustSrcset = (router, pathPrefix) => (srcset) => srcset
|
|
505
|
+
?.split(/\s*,\s*/)
|
|
506
|
+
.map((src) => src.trim())
|
|
507
|
+
.filter(Boolean)
|
|
508
|
+
.map((src) => (isURL(src) ? src : joinPath(pathPrefix, src)))
|
|
509
|
+
.map(adjustHref(router))
|
|
470
510
|
.join(', ');
|
|
471
|
-
|
|
472
|
-
return format ? `image/${String(format)}` : undefined;
|
|
473
|
-
}
|
|
511
|
+
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
474
512
|
|
|
475
513
|
const ImgInner = JSX(({ className = '', image, imageClassName = '', isMobile, pathPrefix, ...iconProps }) => {
|
|
476
514
|
if (!image?.src && !image?.icon) {
|
|
@@ -614,31 +652,6 @@
|
|
|
614
652
|
},
|
|
615
653
|
];
|
|
616
654
|
|
|
617
|
-
const normalizeAnchor = (anchor) => anchor?.replace('#', '') || '';
|
|
618
|
-
function gotoBlock(router, anchor) {
|
|
619
|
-
router.replace(`#${normalizeAnchor(anchor)}`);
|
|
620
|
-
}
|
|
621
|
-
function trackBlock(router, block) {
|
|
622
|
-
router.replace(`#${normalizeAnchor(block?.anchor)}`, undefined, {
|
|
623
|
-
scroll: false,
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
const isURL = (href) => Boolean(href?.includes('//'));
|
|
628
|
-
const isLocalURL = (href, target) => Boolean(href && !isURL(href) && (!target || target === '_self'));
|
|
629
|
-
const isHash = (href) => Boolean(href?.startsWith('#'));
|
|
630
|
-
const withoutQuery = (href) => (href || '').replace(/\?.*/, '').replace(/\/$/, '');
|
|
631
|
-
const joinPath = (...path) => path.filter(Boolean).join('/').replace(/\/+/g, '/');
|
|
632
|
-
|
|
633
|
-
var url = /*#__PURE__*/Object.freeze({
|
|
634
|
-
__proto__: null,
|
|
635
|
-
isURL: isURL,
|
|
636
|
-
isLocalURL: isLocalURL,
|
|
637
|
-
isHash: isHash,
|
|
638
|
-
withoutQuery: withoutQuery,
|
|
639
|
-
joinPath: joinPath
|
|
640
|
-
});
|
|
641
|
-
|
|
642
655
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
643
656
|
const handlerDecorator = (handler, targetContent) => {
|
|
644
657
|
return handlerDecorator._impl(handler, targetContent);
|
|
@@ -648,53 +661,24 @@
|
|
|
648
661
|
handlerDecorator._impl = impl;
|
|
649
662
|
};
|
|
650
663
|
|
|
651
|
-
function useRouter() {
|
|
652
|
-
return useRouter._impl();
|
|
653
|
-
}
|
|
654
|
-
useRouter._impl = () => ({
|
|
655
|
-
href: globalThis.location?.href || '/',
|
|
656
|
-
pathname: globalThis.location?.pathname || '/',
|
|
657
|
-
query: {},
|
|
658
|
-
push: () => {
|
|
659
|
-
// Do nothing
|
|
660
|
-
},
|
|
661
|
-
replace: () => {
|
|
662
|
-
// Do nothing
|
|
663
|
-
},
|
|
664
|
-
});
|
|
665
|
-
useRouter.setup = (impl) => {
|
|
666
|
-
useRouter._impl = impl;
|
|
667
|
-
};
|
|
668
|
-
|
|
669
664
|
function useLink(isRemote) {
|
|
670
665
|
const router = useRouter();
|
|
671
666
|
return (props) => ({
|
|
672
667
|
...props,
|
|
673
|
-
href: adjustHref(props.href),
|
|
668
|
+
href: isRemote ? props.href : adjustHref(router)(props.href),
|
|
674
669
|
'aria-label': props.text,
|
|
675
670
|
onClick: handlerDecorator(handleHref(props), props),
|
|
676
671
|
});
|
|
677
|
-
function adjustHref(href) {
|
|
678
|
-
const isRelativeToBase = !isRemote && href?.startsWith('/');
|
|
679
|
-
return projectSettings.BASE_PATH && href && isRelativeToBase
|
|
680
|
-
? joinPath(projectSettings.BASE_PATH, href)
|
|
681
|
-
: href;
|
|
682
|
-
}
|
|
683
672
|
function handleHref({ href, target, onClick }) {
|
|
684
673
|
return (ev) => {
|
|
685
674
|
onClick && onClick(ev);
|
|
686
|
-
if (isRemote || !isLocalURL(href, target)) {
|
|
675
|
+
if (!href || isRemote || !isLocalURL(href, target)) {
|
|
687
676
|
// Default routing
|
|
688
677
|
return;
|
|
689
678
|
}
|
|
690
679
|
// Client routing
|
|
691
680
|
ev?.preventDefault();
|
|
692
|
-
|
|
693
|
-
gotoBlock(router, href);
|
|
694
|
-
}
|
|
695
|
-
else if (href) {
|
|
696
|
-
router.push(href);
|
|
697
|
-
}
|
|
681
|
+
router.push(href);
|
|
698
682
|
};
|
|
699
683
|
}
|
|
700
684
|
}
|
|
@@ -1111,8 +1095,8 @@
|
|
|
1111
1095
|
return (jsx(BlockWrapper, { className: `font-sans bg-white p-[50px] pb-9 ${className}`, ...rest, children: jsxs("div", { className: "container max-w-[978px]", children: [title ? jsx(Heading, { headingType: "h3", title: title, className: "text-center mb-8" }) : null, COMPONENTS_MAP[typeForm]({ button, link, handleSubmit }), responceType ? jsx(ResponseNotification, { responceType: responceType }) : null] }) }));
|
|
1112
1096
|
});
|
|
1113
1097
|
|
|
1114
|
-
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep) })) : null] })));
|
|
1115
|
-
const renderStep = (benefit, i) => {
|
|
1098
|
+
const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 flex flex-col items-center ${className}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "max-w-[47rem] text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep$1) })) : null] })));
|
|
1099
|
+
const renderStep$1 = (benefit, i) => {
|
|
1116
1100
|
const description = benefit.description;
|
|
1117
1101
|
return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: "w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black", image: benefit.icon, asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? jsx(Heading, { headingType: "h6", children: benefit.label }) : null, renderDescription$5(description)] })] }, String(i)));
|
|
1118
1102
|
};
|
|
@@ -1320,7 +1304,7 @@
|
|
|
1320
1304
|
maxSum: 5000000,
|
|
1321
1305
|
minMonths: 2,
|
|
1322
1306
|
maxMonths: 120,
|
|
1323
|
-
rate:
|
|
1307
|
+
rate: 7,
|
|
1324
1308
|
isMonthlyInterestPayment: true,
|
|
1325
1309
|
};
|
|
1326
1310
|
const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
@@ -1328,7 +1312,7 @@
|
|
|
1328
1312
|
maxSum: 500000,
|
|
1329
1313
|
minDays: BUSINESS_MIN_DAYS,
|
|
1330
1314
|
maxDays: BUSINESS_MAX_DAYS,
|
|
1331
|
-
rate:
|
|
1315
|
+
rate: 6.6,
|
|
1332
1316
|
isMonthlyInterestPayment: true,
|
|
1333
1317
|
isReplenished: false,
|
|
1334
1318
|
isPartialWithdrawal: false,
|
|
@@ -1340,7 +1324,7 @@
|
|
|
1340
1324
|
const DEPOSIT_CALC_DEFAULT_DIR = 'deposit-calculator-data';
|
|
1341
1325
|
const BUSINESS_DEPOSIT_CALC_DEFAULT_DIR = 'business-calculator-data';
|
|
1342
1326
|
|
|
1343
|
-
const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: style('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate).replace('.', ',') }), unit ? (jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
1327
|
+
const Rate = JSX(({ rate, title = 'Ставка', unit, depositeName, isShowDepositeName, rateBlockClassName }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: style('block gradient-color-text font-mohave text-title-huge pr-6 -mt-4', rateBlockClassName), children: String(rate.toFixed(2)).replace('.', ',') }), unit ? (jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit })) : ('')] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-7 w-full text-center whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
1344
1328
|
|
|
1345
1329
|
const renderFootnote = (text) => text ? (jsx(Paragraph, { size: "text-s-light", color: "text-secondary-text", children: text })) : null;
|
|
1346
1330
|
|
|
@@ -1440,6 +1424,17 @@
|
|
|
1440
1424
|
|
|
1441
1425
|
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-1 pt-1 pl-5 pb-1.5", children: jsx(ImgInner, { image: { icon: 'PercentIcon' }, width: "90", height: "85", asSVG: true }) }), jsx("div", { className: "w-[250px] mt-3.5", children: jsxs(Paragraph, { size: "text-xl-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
1442
1426
|
|
|
1427
|
+
const defaultDiscriminator = (_) => _;
|
|
1428
|
+
const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1429
|
+
|
|
1430
|
+
const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
|
|
1431
|
+
|
|
1432
|
+
const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
|
|
1433
|
+
[minKey]: rows.length ? minBy()(rows.map((row) => row[minKey])) : 0,
|
|
1434
|
+
[maxKey]: rows.length ? maxBy()(rows.map((row) => row[maxKey])) : 0,
|
|
1435
|
+
});
|
|
1436
|
+
const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value < sourceBookRow[maxKey];
|
|
1437
|
+
|
|
1443
1438
|
const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1444
1439
|
const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isSmallBusiness, isMonthlyInterestPayment, } = userInputParams;
|
|
1445
1440
|
const data = useCalculatorParams(sourceBookDir || BUSINESS_DEPOSIT_CALC_DEFAULT_DIR);
|
|
@@ -1456,21 +1451,27 @@
|
|
|
1456
1451
|
const businessDepositCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
1457
1452
|
return (isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
1458
1453
|
isSmallBusiness === _.isSmallBusiness &&
|
|
1459
|
-
(isOperatingDeposit
|
|
1460
|
-
|
|
1461
|
-
|
|
1454
|
+
checkIsOperatingDeposit(isOperatingDeposit, _) &&
|
|
1455
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
1456
|
+
checkRangeByKeys(daysValue, ['minDays', 'maxDays'], _));
|
|
1462
1457
|
}) || DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS;
|
|
1463
1458
|
const { rate } = businessDepositCalculatorSourceBookParams;
|
|
1464
1459
|
const income = getDepositIncome$1(rate, userInputParams);
|
|
1465
1460
|
const finalSum = moneyValue + income;
|
|
1461
|
+
const sourceBookRows = data?.rows || [DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS];
|
|
1466
1462
|
return {
|
|
1467
1463
|
...businessDepositCalculatorSourceBookParams,
|
|
1464
|
+
...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
|
|
1465
|
+
...getRangeByKeys(['minDays', 'maxDays'], sourceBookRows),
|
|
1468
1466
|
...userInputParams,
|
|
1469
1467
|
isDisabledOperatingDeposit,
|
|
1470
1468
|
income,
|
|
1471
1469
|
finalSum,
|
|
1472
1470
|
};
|
|
1473
1471
|
};
|
|
1472
|
+
const checkIsOperatingDeposit = (isOperatingDeposit, sourceBookRow) => isOperatingDeposit
|
|
1473
|
+
? sourceBookRow.isReplenished && sourceBookRow.isPartialWithdrawal
|
|
1474
|
+
: !sourceBookRow.isReplenished && !sourceBookRow.isPartialWithdrawal;
|
|
1474
1475
|
const getDepositIncome$1 = (rate, userInputParams) => {
|
|
1475
1476
|
const { isMonthlyInterestPayment, moneyValue, daysValue } = userInputParams;
|
|
1476
1477
|
/*
|
|
@@ -1542,18 +1543,23 @@
|
|
|
1542
1543
|
};
|
|
1543
1544
|
|
|
1544
1545
|
const useCreditCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1545
|
-
const { isInsurance, isSalaryClient, isStateEmployee, moneyValue } = userInputParams;
|
|
1546
|
+
const { isInsurance, isSalaryClient, isStateEmployee, moneyValue, monthsValue } = userInputParams;
|
|
1546
1547
|
const data = useCalculatorParams(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
|
|
1547
1548
|
const creditCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
1548
1549
|
return (isInsurance === _.isInsurance &&
|
|
1549
1550
|
isSalaryClient === _.isSalaryClient &&
|
|
1550
|
-
isStateEmployee === _.isStateEmployee
|
|
1551
|
+
isStateEmployee === _.isStateEmployee &&
|
|
1552
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
1553
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _));
|
|
1551
1554
|
}) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
1552
1555
|
const { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
|
|
1553
1556
|
const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
|
|
1554
1557
|
const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
|
|
1558
|
+
const sourceBookRows = data?.rows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
|
|
1555
1559
|
return {
|
|
1556
1560
|
...creditCalculatorSourceBookParams,
|
|
1561
|
+
...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
|
|
1562
|
+
...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
|
|
1557
1563
|
...userInputParams,
|
|
1558
1564
|
finalRate,
|
|
1559
1565
|
monthlyPayment,
|
|
@@ -1594,14 +1600,23 @@
|
|
|
1594
1600
|
});
|
|
1595
1601
|
|
|
1596
1602
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1597
|
-
const { isMonthlyInterestPayment, moneyValue } = userInputParams;
|
|
1603
|
+
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
1598
1604
|
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
1599
|
-
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment
|
|
1600
|
-
|
|
1605
|
+
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
1606
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
1607
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
1601
1608
|
const { rate } = depositCalculatorSourceBookParams;
|
|
1602
1609
|
const income = getDepositIncome(rate, userInputParams);
|
|
1603
1610
|
const finalSum = moneyValue + income;
|
|
1604
|
-
|
|
1611
|
+
const sourceBookRows = data?.rows || [DEFAULT_DEPOSIT_CALCULATOR_PARAMS];
|
|
1612
|
+
return {
|
|
1613
|
+
...depositCalculatorSourceBookParams,
|
|
1614
|
+
...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
|
|
1615
|
+
...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
|
|
1616
|
+
...userInputParams,
|
|
1617
|
+
income,
|
|
1618
|
+
finalSum,
|
|
1619
|
+
};
|
|
1605
1620
|
};
|
|
1606
1621
|
const getDepositIncome = (rate, userInputParams) => {
|
|
1607
1622
|
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
@@ -1811,11 +1826,6 @@
|
|
|
1811
1826
|
|
|
1812
1827
|
const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
|
|
1813
1828
|
|
|
1814
|
-
const defaultDiscriminator = (_) => _;
|
|
1815
|
-
const maxBy = (discriminator = defaultDiscriminator) => (list) => list.reduceRight((a, b) => (discriminator(a) > discriminator(b) ? a : b));
|
|
1816
|
-
|
|
1817
|
-
const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
|
|
1818
|
-
|
|
1819
1829
|
const getItemWidth = (container) => (itemCount) => container.scrollWidth / itemCount;
|
|
1820
1830
|
const scrollBy = (container) => (itemCount, delta) => {
|
|
1821
1831
|
container.scrollBy({ left: delta * getItemWidth(container)(itemCount), behavior: 'smooth' });
|
|
@@ -1916,10 +1926,12 @@
|
|
|
1916
1926
|
isCyclic,
|
|
1917
1927
|
});
|
|
1918
1928
|
const isBankHistoryCarousel = childBlocks && childBlocks[0]?.type === 'CarouselBankHistoryCard';
|
|
1919
|
-
return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), className), ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children:
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1929
|
+
return (jsx(BlockWrapper, { className: style(getPaddingStyle(isPadding), className), ...rest, children: jsxs("div", { className: "relative max-w-full", children: [jsx(SwipeListContainer, { containerRef: containerRef, visibleItemCount: visibleItemCount, snapAlign: "snap-start", gap: ITEMS_GAP, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: isBankHistoryCarousel
|
|
1930
|
+
? renderChildren({
|
|
1931
|
+
...rest,
|
|
1932
|
+
block: { ...rest.block, blocks: buildBlocks(childBlocks, activeIndex) },
|
|
1933
|
+
})
|
|
1934
|
+
: renderChildren(rest) }), jsx(CarouselScrollButtons, { scroll: scroll, isBlur: isBlur, arrowsPadded: arrowsPadded, onScrollLeft: decreaseActiveIndex, onScrollRight: increaseActiveIndex, hasEdgeBlocks: isBankHistoryCarousel, activeIndex: activeIndex, itemCount: count })] }) }));
|
|
1923
1935
|
});
|
|
1924
1936
|
Carousel.childrenTypes = [
|
|
1925
1937
|
'CarouselCard',
|
|
@@ -3504,6 +3516,7 @@
|
|
|
3504
3516
|
throw new Error(x);
|
|
3505
3517
|
}
|
|
3506
3518
|
|
|
3519
|
+
// TODO: Create universal function for this case
|
|
3507
3520
|
const renderBenefit$2 =
|
|
3508
3521
|
// Linter doesn't understand that switch processes all cases
|
|
3509
3522
|
// eslint-disable-next-line consistent-return
|
|
@@ -3640,6 +3653,7 @@
|
|
|
3640
3653
|
return (jsx("div", { className: `mt-2.5 z-10 ${descriptionWidth}`, children: jsx(Paragraph, { size: "text-m", font: "font-light", color: "group-data-primary:text-secondary-text", children: additionalDescription }) }));
|
|
3641
3654
|
}
|
|
3642
3655
|
|
|
3656
|
+
// TODO: Create universal function for this case
|
|
3643
3657
|
const renderBenefit =
|
|
3644
3658
|
// Linter doesn't understand that switch processes all cases
|
|
3645
3659
|
// eslint-disable-next-line consistent-return
|
|
@@ -3842,19 +3856,30 @@
|
|
|
3842
3856
|
});
|
|
3843
3857
|
const normalizeSelectedRegion = (selectedRegion, regions) => !selectedRegion && regions?.length && regions[0]?.code ? regions[0].code : selectedRegion;
|
|
3844
3858
|
|
|
3845
|
-
const
|
|
3859
|
+
const checkCanRenderIcon = (icon) => Boolean(icon?.icon || icon?.src);
|
|
3846
3860
|
|
|
3847
|
-
|
|
3861
|
+
// TODO: Create universal function for this case
|
|
3862
|
+
const renderStep = (props) =>
|
|
3863
|
+
// Linter doesn't understand that switch processes all cases
|
|
3864
|
+
// eslint-disable-next-line consistent-return
|
|
3865
|
+
(step, i, arr) => {
|
|
3866
|
+
const { type } = step;
|
|
3867
|
+
if (!(type === 'default' || type === 'rte')) {
|
|
3868
|
+
return null;
|
|
3869
|
+
}
|
|
3870
|
+
switch (type) {
|
|
3871
|
+
case 'default':
|
|
3872
|
+
return renderDefaultStep(props)(step, i, arr);
|
|
3873
|
+
case 'rte':
|
|
3874
|
+
return jsx(RichText, { __html: step.__html });
|
|
3875
|
+
default:
|
|
3876
|
+
assertUnreachable(step);
|
|
3877
|
+
}
|
|
3878
|
+
};
|
|
3879
|
+
const renderDefaultStep = ({ styleMap, isMainButton, version }) => (step, i, arr) => {
|
|
3848
3880
|
const { label, description, button, items, isDotted } = step;
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
description,
|
|
3852
|
-
className: styleMap.description,
|
|
3853
|
-
}), jsx(List, { className: getItemsClasses({ className: 'text-left', description, styleMap }), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? (jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
|
|
3854
|
-
};
|
|
3855
|
-
const renderStepLabel = (label) => label ? jsx("div", { className: "text-h6", children: label }) : null;
|
|
3856
|
-
const renderStepDescription = ({ description, className = '', }) => (description ? jsx("div", { className: className, children: description }) : null);
|
|
3857
|
-
const getItemsClasses = ({ className, description, styleMap, }) => [description ? styleMap.description : 'text-h6', description ? 'mt-0.5' : '', className].join(' ');
|
|
3881
|
+
return (jsxs("div", { className: style('relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden', getContainerWidth(arr.length)), children: [jsxs("div", { className: style(button?.text ? 'mb-8' : '', 'text-center'), children: [label ? (jsx("div", { className: "mb-2", children: jsx(Text, { size: "text-h6", children: label }) })) : null, jsxs("div", { className: "flex flex-col items-center", children: [description ? jsx("div", { className: styleMap.description, children: description }) : null, jsx(List, { className: style(description ? `${styleMap.description} mt-0.5` : 'text-h6'), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? (jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
|
|
3882
|
+
};
|
|
3858
3883
|
const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
|
|
3859
3884
|
|
|
3860
3885
|
const STEPS_BLOCK_STYLE_MAPS = {
|
|
@@ -3899,21 +3924,14 @@
|
|
|
3899
3924
|
|
|
3900
3925
|
const getLineOpacity = (showLines) => (showLines ? '' : 'opacity-0');
|
|
3901
3926
|
const getPaddingX = (steps) => (steps < 5 ? 'px-[88px]' : 'px-[55px]');
|
|
3902
|
-
const StepsBlock = JSX(({ className = '', showLines = true, steps = [], button, version = 'primary', ...rest }) => {
|
|
3903
|
-
const { title } = rest;
|
|
3904
|
-
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
3927
|
+
const StepsBlock = JSX(({ className = '', showLines = true, steps = [], button, version = 'primary', title, ...rest }) => {
|
|
3905
3928
|
const shortGaps = steps.length > 3;
|
|
3929
|
+
const styleMap = STEPS_BLOCK_STYLE_MAPS[version];
|
|
3906
3930
|
const lineOpacity = getLineOpacity(showLines);
|
|
3907
|
-
const titleMargin = title ? 'mt-9' : '';
|
|
3908
3931
|
const paddingX = getPaddingX(steps.length);
|
|
3909
|
-
return (jsxs(BlockWrapper, { className: [
|
|
3910
|
-
'box-border py-12',
|
|
3911
|
-
shortGaps ? 'px-20' : 'px-[70px]',
|
|
3912
|
-
'flex flex-col items-center overflow-hidden',
|
|
3913
|
-
className,
|
|
3914
|
-
].join(' '), version: version, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center", title: title })) : null, steps?.length ? (jsxs("div", { className: `box-border ${titleMargin}`, children: [jsx("div", { className: `flex items-center ${paddingX}`, children: joinList(jsx("div", { className: `h-0.5 w-full bg-secondary-light ${lineOpacity}` }))(steps.map(renderStepIcon(styleMap, version))) }), jsx("div", { className: `flex justify-between mt-4 ${shortGaps ? 'gap-x-3' : 'gap-x-[101px]'}`, children: steps.map(renderStepContent({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? jsx(Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
|
|
3932
|
+
return (jsxs(BlockWrapper, { className: style('box-border py-12', shortGaps ? 'px-20' : 'px-[70px]', 'flex flex-col items-center overflow-hidden', className), version: version, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", className: "max-w-[752px] text-center mb-9", title: title })) : null, steps?.length ? (jsxs("div", { className: "box-border", children: [jsx("div", { className: style('flex items-center', paddingX), children: joinList(jsx("div", { className: style('h-0.5 w-full bg-secondary-light', lineOpacity) }))(steps.map(renderStepIcon(styleMap, version))) }), jsx("div", { className: style('flex justify-between mt-4', shortGaps ? 'gap-x-3' : 'gap-x-[101px]'), children: steps.map(renderStep({ styleMap, isMainButton: Boolean(button?.text), version })) })] })) : null, button?.text ? jsx(Button, { className: "mt-8 min-w-60", version: "primary", ...button }) : null] }));
|
|
3915
3933
|
});
|
|
3916
|
-
const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${styleMap.iconBackground}`, children:
|
|
3934
|
+
const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center ${styleMap.iconBackground}`, children: checkCanRenderIcon(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, version), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
|
|
3917
3935
|
|
|
3918
3936
|
const containerStyles = {
|
|
3919
3937
|
'horizontal-list': 'mx-auto mt-5 w-fit',
|
|
@@ -4315,10 +4333,10 @@
|
|
|
4315
4333
|
});
|
|
4316
4334
|
const renderTag = (tag, key) => (jsx("span", { className: "text-m-light py-2 px-2.5 border-solid border rounded-md border-gray", children: tag }, String(key)));
|
|
4317
4335
|
|
|
4318
|
-
const Tile = JSX(({ title, headingType = 'h3',
|
|
4336
|
+
const Tile = JSX(({ title, headingType = 'h3', __html, items, buttons, image, isDotted = true, listItemSize = 'M', className = '', tags, children, ...rest }) => (jsx(BlockWrapper, { className: `overflow-hidden p-9 pr-3 box-border ${getTileRightPadding(className)} ${getTileMinHeight(className)} ${className}`, ...rest, children: jsxs(BaseTile, { title: title ? (jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: renderButtonsSection(buttons, {
|
|
4319
4337
|
className: 'mt-8',
|
|
4320
4338
|
buttonClassName: 'min-w-[158px]',
|
|
4321
|
-
}), image: image?.src ? jsx(ImgInner, { className: "mt-auto ml-7", image: image }) : null, children: [
|
|
4339
|
+
}), image: image?.src ? jsx(ImgInner, { className: "mt-auto ml-7", image: image }) : null, children: [__html ? (jsx("div", { className: "max-w-[600px] mt-2.5", children: jsx(RichText, { __html: __html }) })) : null, children, jsx(List, { className: "mt-2.5", itemClassName: "mb-1.5", items: items, isDotted: isDotted, listItemSize: listItemSize }), tags?.length ? jsx(Tags, { tags: tags, className: "mt-5" }) : null] }) })));
|
|
4322
4340
|
|
|
4323
4341
|
const alignStyle = {
|
|
4324
4342
|
left: 'items-start',
|
|
@@ -4415,6 +4433,11 @@
|
|
|
4415
4433
|
return debouncedCallback;
|
|
4416
4434
|
};
|
|
4417
4435
|
|
|
4436
|
+
const normalizeAnchor = (anchor) => anchor?.replace('#', '') || '';
|
|
4437
|
+
function trackBlock(block) {
|
|
4438
|
+
globalThis.history?.replaceState(globalThis.history?.state, '', `#${normalizeAnchor(block?.anchor)}`);
|
|
4439
|
+
}
|
|
4440
|
+
|
|
4418
4441
|
const SPECIAL_BLOCK_TYPES = ['Header', 'Footer'];
|
|
4419
4442
|
const EPS = 0.01;
|
|
4420
4443
|
const topLineDelta = ([, { target }]) => Math.abs(target.getBoundingClientRect().top);
|
|
@@ -4428,7 +4451,6 @@
|
|
|
4428
4451
|
|
|
4429
4452
|
const isScrolledEnough = () => globalThis.scrollY > (globalThis.innerHeight * 3) / 4;
|
|
4430
4453
|
function useBlockRouterProvider(scrollTarget = globalThis) {
|
|
4431
|
-
const router = useRouter();
|
|
4432
4454
|
const intersectionsMapRef = useRef(new Map());
|
|
4433
4455
|
useEffect(() => blockRouterEventBus.subscribe('intersection', ({ block, intersection }) => {
|
|
4434
4456
|
if (intersectionsMapRef.current) {
|
|
@@ -4437,20 +4459,14 @@
|
|
|
4437
4459
|
}), []);
|
|
4438
4460
|
useEffect(() => {
|
|
4439
4461
|
const handleScroll = debounce(() => {
|
|
4440
|
-
|
|
4441
|
-
const activeBlock = findActiveBlock([...(intersectionsMapRef.current || [])]);
|
|
4442
|
-
trackBlock(router, activeBlock);
|
|
4443
|
-
}
|
|
4444
|
-
else {
|
|
4445
|
-
trackBlock(router);
|
|
4446
|
-
}
|
|
4462
|
+
trackBlock(isScrolledEnough() ? findActiveBlock([...(intersectionsMapRef.current || [])]) : undefined);
|
|
4447
4463
|
}, 100);
|
|
4448
4464
|
scrollTarget.addEventListener('scroll', handleScroll);
|
|
4449
4465
|
return () => {
|
|
4450
4466
|
handleScroll.dispose();
|
|
4451
4467
|
scrollTarget.removeEventListener('scroll', handleScroll);
|
|
4452
4468
|
};
|
|
4453
|
-
}, [
|
|
4469
|
+
}, [scrollTarget]);
|
|
4454
4470
|
}
|
|
4455
4471
|
|
|
4456
4472
|
const api = LikeAPI();
|
|
@@ -4521,7 +4537,7 @@
|
|
|
4521
4537
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4522
4538
|
}
|
|
4523
4539
|
|
|
4524
|
-
const packageVersion = "0.8.
|
|
4540
|
+
const packageVersion = "0.8.11";
|
|
4525
4541
|
|
|
4526
4542
|
exports.Blocks = Blocks;
|
|
4527
4543
|
exports.ContentPage = ContentPage;
|