@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkCanRenderIcon.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/checkCanRenderIcon.ts"],"names":[],"mappings":";;AAEO,MAAM,kBAAkB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;AAA1E,QAAA,kBAAkB,sBAAwD"}
|
|
@@ -2,10 +2,10 @@ import type { BlockVersion } from '../../model/BlockVersion';
|
|
|
2
2
|
import type { VNode } from '../../model/VNode';
|
|
3
3
|
import type { Step } from './StepsBlockContent';
|
|
4
4
|
import type { StyleType } from './StepsBlockStyleMaps';
|
|
5
|
-
|
|
5
|
+
interface RenderStepProps {
|
|
6
6
|
styleMap: StyleType;
|
|
7
7
|
isMainButton: boolean;
|
|
8
|
-
version?: BlockVersion
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
version?: BlockVersion;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderStep: (props: RenderStepProps) => (step: Step, i: number, arr: Step[]) => VNode;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderStep = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const Button_1 = require("../../ui-kit/Button/Button");
|
|
5
|
+
const List_1 = require("../../ui-kit/List/List");
|
|
6
|
+
const RichText_1 = require("../../ui-kit/RichText/RichText");
|
|
7
|
+
const Text_1 = require("../../ui-kit/Text/Text");
|
|
8
|
+
const assertUnreachable_1 = require("../../utils/assertUnreachable");
|
|
9
|
+
const style_1 = require("../../utils/style");
|
|
10
|
+
// TODO: Create universal function for this case
|
|
11
|
+
const renderStep = (props) =>
|
|
12
|
+
// Linter doesn't understand that switch processes all cases
|
|
13
|
+
// eslint-disable-next-line consistent-return
|
|
14
|
+
(step, i, arr) => {
|
|
15
|
+
const { type } = step;
|
|
16
|
+
if (!(type === 'default' || type === 'rte')) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'default':
|
|
21
|
+
return renderDefaultStep(props)(step, i, arr);
|
|
22
|
+
case 'rte':
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: step.__html });
|
|
24
|
+
default:
|
|
25
|
+
(0, assertUnreachable_1.assertUnreachable)(step);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.renderStep = renderStep;
|
|
29
|
+
const renderDefaultStep = ({ styleMap, isMainButton, version }) => (step, i, arr) => {
|
|
30
|
+
const { label, description, button, items, isDotted } = step;
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden', getContainerWidth(arr.length)), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(button?.text ? 'mb-8' : '', 'text-center'), children: [label ? ((0, jsx_runtime_1.jsx)("div", { className: "mb-2", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: label }) })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center", children: [description ? (0, jsx_runtime_1.jsx)("div", { className: styleMap.description, children: description }) : null, (0, jsx_runtime_1.jsx)(List_1.List, { className: (0, style_1.style)(description ? `${styleMap.description} mt-0.5` : 'text-h6'), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
|
|
32
|
+
};
|
|
33
|
+
const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
|
|
34
|
+
//# sourceMappingURL=renderStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderStep.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStep.tsx"],"names":[],"mappings":";;;AAGA,uDAAoD;AACpD,iDAA8C;AAC9C,6DAA0D;AAC1D,iDAA8C;AAC9C,qEAAkE;AAClE,6CAA0C;AAU1C,gDAAgD;AACzC,MAAM,UAAU,GACrB,CAAC,KAAsB,EAAE,EAAE;AAC3B,4DAA4D;AAC5D,6CAA6C;AAC7C,CAAC,IAAU,EAAE,CAAS,EAAE,GAAW,EAAS,EAAE;IAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEtB,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,SAAS;YACZ,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;QAChD,KAAK,KAAK;YACR,OAAO,uBAAC,mBAAQ,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAI,CAAC;QAC3C;YACE,IAAA,qCAAiB,EAAC,IAAI,CAAC,CAAC;KAC3B;AACH,CAAC,CAAC;AAnBS,QAAA,UAAU,cAmBnB;AAEJ,MAAM,iBAAiB,GACrB,CAAC,EAAE,QAAQ,EAAE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AAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -7,13 +7,13 @@ const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection
|
|
|
7
7
|
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
8
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
9
|
const List_1 = require("../../ui-kit/List/List");
|
|
10
|
-
const
|
|
10
|
+
const RichText_1 = require("../../ui-kit/RichText/RichText");
|
|
11
11
|
const Tags_1 = require("../../ui-kit/Tags/Tags");
|
|
12
12
|
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
13
13
|
const getTileMinHeight_1 = require("../BaseTile/getTileMinHeight");
|
|
14
14
|
const getTileRightPadding_1 = require("../BaseTile/getTileRightPadding");
|
|
15
|
-
exports.Tile = (0, uni_jsx_1.JSX)(({ title, headingType = 'h3',
|
|
15
|
+
exports.Tile = (0, uni_jsx_1.JSX)(({ title, headingType = 'h3', __html, items, buttons, image, isDotted = true, listItemSize = 'M', className = '', tags, children, ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `overflow-hidden p-9 pr-3 box-border ${(0, getTileRightPadding_1.getTileRightPadding)(className)} ${(0, getTileMinHeight_1.getTileMinHeight)(className)} ${className}`, ...rest, children: (0, jsx_runtime_1.jsxs)(BaseTile_1.BaseTile, { title: title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, buttons: (0, renderButtonsSection_1.renderButtonsSection)(buttons, {
|
|
16
16
|
className: 'mt-8',
|
|
17
17
|
buttonClassName: 'min-w-[158px]',
|
|
18
|
-
}), image: image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-auto ml-7", image: image }) : null, children: [
|
|
18
|
+
}), image: image?.src ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "mt-auto ml-7", image: image }) : null, children: [__html ? ((0, jsx_runtime_1.jsx)("div", { className: "max-w-[600px] mt-2.5", children: (0, jsx_runtime_1.jsx)(RichText_1.RichText, { __html: __html }) })) : null, children, (0, jsx_runtime_1.jsx)(List_1.List, { className: "mt-2.5", itemClassName: "mb-1.5", items: items, isDotted: isDotted, listItemSize: listItemSize }), tags?.length ? (0, jsx_runtime_1.jsx)(Tags_1.Tags, { tags: tags, className: "mt-5" }) : null] }) })));
|
|
19
19
|
//# sourceMappingURL=Tile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,6DAA0D;AAC1D,iDAA8C;AAC9C,mDAAgD;AAChD,mEAAgE;AAChE,yEAAsE;AAKzD,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,EACC,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,MAAM,EACN,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,GAAG,IAAI,EACf,YAAY,GAAG,GAAG,EAClB,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE,CAAC,CACJ,uBAAC,2BAAY,IACX,SAAS,EAAE,uCAAuC,IAAA,yCAAmB,EACnE,SAAS,CACV,IAAI,IAAA,mCAAgB,EAAC,SAAS,CAAC,IAAI,SAAS,EAAE,KAC3C,IAAI,YAER,wBAAC,mBAAQ,IACP,KAAK,EACH,KAAK,CAAC,CAAC,CAAC,CACN,uBAAC,iBAAO,IACN,WAAW,EAAE,WAAW,EACxB,EAAE,EAAC,IAAI,EACP,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,mCAAmC,GAC9C,CACH,CAAC,CAAC,CAAC,IAAI,EAEV,OAAO,EAAE,IAAA,2CAAoB,EAAC,OAAO,EAAE;YACrC,SAAS,EAAE,MAAM;YACjB,eAAe,EAAE,eAAe;SACjC,CAAC,EACF,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,uBAAC,SAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,aAExE,MAAM,CAAC,CAAC,CAAC,CACR,gCAAK,SAAS,EAAC,sBAAsB,YACnC,uBAAC,mBAAQ,IAAC,MAAM,EAAE,MAAM,GAAI,GACxB,CACP,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EACT,uBAAC,WAAI,IACH,SAAS,EAAC,QAAQ,EAClB,aAAa,EAAC,QAAQ,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B,EACD,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,IACnD,GACE,CAChB,CACF,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
-
import type { DescriptionProps } from '../../model/HeadlineType';
|
|
3
2
|
import type { Picture } from '../../model/Picture';
|
|
4
3
|
import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
|
|
5
4
|
import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
|
|
6
5
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
6
|
import type { ListItemSize } from '../../ui-kit/List/ListProps';
|
|
7
|
+
import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
|
|
8
8
|
import type { TagsContent } from '../../ui-kit/Tags/TagsContent';
|
|
9
9
|
/**
|
|
10
10
|
* @title Плитка
|
|
11
11
|
*/
|
|
12
|
-
export declare type TileContent = HeadingCommonProps &
|
|
12
|
+
export declare type TileContent = HeadingCommonProps & RichTextProps & ListContent & ButtonContent & TagsContent & {
|
|
13
13
|
/**
|
|
14
14
|
* @default {
|
|
15
15
|
* "format": "webp",
|
package/dist/hooks/useLink.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useLink = void 0;
|
|
3
|
-
const
|
|
4
|
-
const BlockRouter_1 = require("../services/BlockRouter/BlockRouter");
|
|
3
|
+
const adjustHref_1 = require("../utils/adjustHref");
|
|
5
4
|
const url_1 = require("../utils/url");
|
|
6
5
|
const handlerDecorator_1 = require("./handlerDecorator");
|
|
7
6
|
const useRouter_1 = require("./useRouter");
|
|
@@ -9,31 +8,20 @@ function useLink(isRemote) {
|
|
|
9
8
|
const router = (0, useRouter_1.useRouter)();
|
|
10
9
|
return (props) => ({
|
|
11
10
|
...props,
|
|
12
|
-
href: adjustHref(props.href),
|
|
11
|
+
href: isRemote ? props.href : (0, adjustHref_1.adjustHref)(router)(props.href),
|
|
13
12
|
'aria-label': props.text,
|
|
14
13
|
onClick: (0, handlerDecorator_1.handlerDecorator)(handleHref(props), props),
|
|
15
14
|
});
|
|
16
|
-
function adjustHref(href) {
|
|
17
|
-
const isRelativeToBase = !isRemote && href?.startsWith('/');
|
|
18
|
-
return ProjectSettings_1.projectSettings.BASE_PATH && href && isRelativeToBase
|
|
19
|
-
? (0, url_1.joinPath)(ProjectSettings_1.projectSettings.BASE_PATH, href)
|
|
20
|
-
: href;
|
|
21
|
-
}
|
|
22
15
|
function handleHref({ href, target, onClick }) {
|
|
23
16
|
return (ev) => {
|
|
24
17
|
onClick && onClick(ev);
|
|
25
|
-
if (isRemote || !(0, url_1.isLocalURL)(href, target)) {
|
|
18
|
+
if (!href || isRemote || !(0, url_1.isLocalURL)(href, target)) {
|
|
26
19
|
// Default routing
|
|
27
20
|
return;
|
|
28
21
|
}
|
|
29
22
|
// Client routing
|
|
30
23
|
ev?.preventDefault();
|
|
31
|
-
|
|
32
|
-
(0, BlockRouter_1.gotoBlock)(router, href);
|
|
33
|
-
}
|
|
34
|
-
else if (href) {
|
|
35
|
-
router.push(href);
|
|
36
|
-
}
|
|
24
|
+
router.push(href);
|
|
37
25
|
};
|
|
38
26
|
}
|
|
39
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"useLink.js","sourceRoot":"","sources":["../../src/hooks/useLink.ts"],"names":[],"mappings":";;AACA,oDAAiD;AACjD,sCAA0C;AAC1C,yDAAsD;AACtD,2CAAwC;AAUxC,SAAgB,OAAO,CAAC,QAAkB;IACxC,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,OAAO,CAA2C,KAAQ,EAAiB,EAAE,CAAC,CAAC;QAC7E,GAAG,KAAK;QACR,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,uBAAU,EAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5D,YAAY,EAAE,KAAK,CAAC,IAAI;QACxB,OAAO,EAAE,IAAA,mCAAgB,EAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;KACpD,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAkC;QAC3E,OAAO,CAAC,EAAqB,EAAE,EAAE;YAC/B,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;YAEvB,IAAI,CAAC,IAAI,IAAI,QAAQ,IAAI,CAAC,IAAA,gBAAU,EAAC,IAAI,EAAE,MAAM,CAAC,EAAE;gBAClD,kBAAkB;gBAClB,OAAO;aACR;YAED,iBAAiB;YACjB,EAAE,EAAE,cAAc,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC;AACH,CAAC;AAxBD,0BAwBC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { Router } from '../../hooks/useRouter';
|
|
2
1
|
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function trackBlock(router: Router, block?: BlockDef): void;
|
|
2
|
+
export declare function trackBlock(block?: BlockDef): void;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.trackBlock =
|
|
2
|
+
exports.trackBlock = void 0;
|
|
3
3
|
const normalizeAnchor = (anchor) => anchor?.replace('#', '') || '';
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
exports.gotoBlock = gotoBlock;
|
|
8
|
-
function trackBlock(router, block) {
|
|
9
|
-
router.replace(`#${normalizeAnchor(block?.anchor)}`, undefined, {
|
|
10
|
-
scroll: false,
|
|
11
|
-
});
|
|
4
|
+
function trackBlock(block) {
|
|
5
|
+
globalThis.history?.replaceState(globalThis.history?.state, '', `#${normalizeAnchor(block?.anchor)}`);
|
|
12
6
|
}
|
|
13
7
|
exports.trackBlock = trackBlock;
|
|
14
8
|
//# sourceMappingURL=BlockRouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockRouter.js","sourceRoot":"","sources":["../../../src/services/BlockRouter/BlockRouter.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"BlockRouter.js","sourceRoot":"","sources":["../../../src/services/BlockRouter/BlockRouter.ts"],"names":[],"mappings":";;AAEA,MAAM,eAAe,GAAG,CAAC,MAAe,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAE5E,SAAgB,UAAU,CAAC,KAAgB;IACzC,UAAU,CAAC,OAAO,EAAE,YAAY,CAC9B,UAAU,CAAC,OAAO,EAAE,KAAK,EACzB,EAAE,EACF,IAAI,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CACrC,CAAC;AACJ,CAAC;AAND,gCAMC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.useBlockRouterProvider = void 0;
|
|
3
3
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
4
|
-
const useRouter_1 = require("../../hooks/useRouter");
|
|
5
4
|
const debounce_1 = require("../../utils/debounce");
|
|
6
5
|
const BlockRouter_1 = require("./BlockRouter");
|
|
7
6
|
const blockRouterEventBus_1 = require("./blockRouterEventBus");
|
|
8
7
|
const findActiveBlock_1 = require("./findActiveBlock");
|
|
9
8
|
const isScrolledEnough = () => globalThis.scrollY > (globalThis.innerHeight * 3) / 4;
|
|
10
9
|
function useBlockRouterProvider(scrollTarget = globalThis) {
|
|
11
|
-
const router = (0, useRouter_1.useRouter)();
|
|
12
10
|
const intersectionsMapRef = (0, hooks_1.useRef)(new Map());
|
|
13
11
|
(0, hooks_1.useEffect)(() => blockRouterEventBus_1.blockRouterEventBus.subscribe('intersection', ({ block, intersection }) => {
|
|
14
12
|
if (intersectionsMapRef.current) {
|
|
@@ -17,20 +15,14 @@ function useBlockRouterProvider(scrollTarget = globalThis) {
|
|
|
17
15
|
}), []);
|
|
18
16
|
(0, hooks_1.useEffect)(() => {
|
|
19
17
|
const handleScroll = (0, debounce_1.debounce)(() => {
|
|
20
|
-
|
|
21
|
-
const activeBlock = (0, findActiveBlock_1.findActiveBlock)([...(intersectionsMapRef.current || [])]);
|
|
22
|
-
(0, BlockRouter_1.trackBlock)(router, activeBlock);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
(0, BlockRouter_1.trackBlock)(router);
|
|
26
|
-
}
|
|
18
|
+
(0, BlockRouter_1.trackBlock)(isScrolledEnough() ? (0, findActiveBlock_1.findActiveBlock)([...(intersectionsMapRef.current || [])]) : undefined);
|
|
27
19
|
}, 100);
|
|
28
20
|
scrollTarget.addEventListener('scroll', handleScroll);
|
|
29
21
|
return () => {
|
|
30
22
|
handleScroll.dispose();
|
|
31
23
|
scrollTarget.removeEventListener('scroll', handleScroll);
|
|
32
24
|
};
|
|
33
|
-
}, [
|
|
25
|
+
}, [scrollTarget]);
|
|
34
26
|
}
|
|
35
27
|
exports.useBlockRouterProvider = useBlockRouterProvider;
|
|
36
28
|
//# sourceMappingURL=useBlockRouterProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockRouterProvider.js","sourceRoot":"","sources":["../../../src/services/BlockRouter/useBlockRouterProvider.ts"],"names":[],"mappings":";;AAAA,uDAAgE;
|
|
1
|
+
{"version":3,"file":"useBlockRouterProvider.js","sourceRoot":"","sources":["../../../src/services/BlockRouter/useBlockRouterProvider.ts"],"names":[],"mappings":";;AAAA,uDAAgE;AAEhE,mDAAgD;AAChD,+CAA2C;AAC3C,+DAA4D;AAC5D,uDAAoD;AAEpD,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,UAAU,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAErF,SAAgB,sBAAsB,CAAC,eAA4B,UAAU;IAC3E,MAAM,mBAAmB,GAAG,IAAA,cAAM,EAA2C,IAAI,GAAG,EAAE,CAAC,CAAC;IAExF,IAAA,iBAAS,EACP,GAAG,EAAE,CACH,yCAAmB,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE;QACxE,IAAI,mBAAmB,CAAC,OAAO,EAAE;YAC/B,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;SACtD;IACH,CAAC,CAAC,EACJ,EAAE,CACH,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,IAAA,mBAAQ,EAAC,GAAG,EAAE;YACjC,IAAA,wBAAU,EACR,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAA,iCAAe,EAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC3F,CAAC;QACJ,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAEtD,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,OAAO,EAAE,CAAC;YACvB,YAAY,CAAC,mBAAmB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAC3D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;AACrB,CAAC;AA3BD,wDA2BC"}
|
package/dist/setup-fixture.js
CHANGED
|
@@ -7,10 +7,11 @@ const react_1 = require("react");
|
|
|
7
7
|
const handlerDecorator_1 = require("./hooks/handlerDecorator");
|
|
8
8
|
const useRouter_1 = require("./hooks/useRouter");
|
|
9
9
|
const ProjectSettings_1 = require("./ProjectSettings");
|
|
10
|
+
const url_1 = require("./utils/url");
|
|
10
11
|
const wlc_json_1 = __importDefault(require("./wlc.json"));
|
|
11
12
|
ProjectSettings_1.projectSettings.setup(wlc_json_1.default);
|
|
12
13
|
useRouter_1.useRouter.setup(() => {
|
|
13
|
-
const [href, setHref] = (0, react_1.useState)(
|
|
14
|
+
const [href, setHref] = (0, react_1.useState)((0, url_1.joinPath)(globalThis.location.origin, ProjectSettings_1.projectSettings.BASE_PATH, 'cards-credit'));
|
|
14
15
|
(0, react_1.useEffect)(() => {
|
|
15
16
|
const handleHistoryChange = () => {
|
|
16
17
|
setHref(globalThis.location.href);
|
|
@@ -22,9 +23,7 @@ useRouter_1.useRouter.setup(() => {
|
|
|
22
23
|
}, []);
|
|
23
24
|
return {
|
|
24
25
|
href,
|
|
25
|
-
pathname: ProjectSettings_1.projectSettings.BASE_PATH
|
|
26
|
-
? new URL(href).pathname.substring(ProjectSettings_1.projectSettings.BASE_PATH.length - 1)
|
|
27
|
-
: '',
|
|
26
|
+
pathname: new URL(href).pathname.substring(ProjectSettings_1.projectSettings.BASE_PATH ? ProjectSettings_1.projectSettings.BASE_PATH.length - 1 : 0),
|
|
28
27
|
query: {},
|
|
29
28
|
push: (url) => {
|
|
30
29
|
globalThis.history.pushState(null, '', url);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-fixture.js","sourceRoot":"","sources":["../src/setup-fixture.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAC3C,iCAA4C;AAC5C,+DAA4D;AAC5D,iDAA8C;AAC9C,uDAAoD;AACpD,0DAA6B;AAE7B,iCAAe,CAAC,KAAK,CAAC,kBAAG,CAAC,CAAC;AAE3B,qBAAS,CAAC,KAAK,CAAC,GAAG,EAAE;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAC9B,
|
|
1
|
+
{"version":3,"file":"setup-fixture.js","sourceRoot":"","sources":["../src/setup-fixture.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAC3C,iCAA4C;AAC5C,+DAA4D;AAC5D,iDAA8C;AAC9C,uDAAoD;AACpD,qCAAuC;AACvC,0DAA6B;AAE7B,iCAAe,CAAC,KAAK,CAAC,kBAAG,CAAC,CAAC;AAE3B,qBAAS,CAAC,KAAK,CAAC,GAAG,EAAE;IACnB,MAAM,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C;AACd,CAAC,CAAC,CAAC"}
|
package/dist/ui-kit/Icon/Icon.js
CHANGED
|
@@ -2,8 +2,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
exports.Icon = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const useRouter_1 = require("../../hooks/useRouter");
|
|
5
6
|
const ProjectSettings_1 = require("../../ProjectSettings");
|
|
7
|
+
const adjustHref_1 = require("../../utils/adjustHref");
|
|
6
8
|
const style_1 = require("../../utils/style");
|
|
9
|
+
const url_1 = require("../../utils/url");
|
|
7
10
|
const svgUseStyleMap = {
|
|
8
11
|
normal: '',
|
|
9
12
|
color: 'text-primary-main',
|
|
@@ -11,7 +14,8 @@ const svgUseStyleMap = {
|
|
|
11
14
|
white: 'text-black',
|
|
12
15
|
};
|
|
13
16
|
exports.Icon = (0, uni_jsx_1.JSX)(({ className = '', imageClassName = '', name = '', alt = `Иконка ${name}`, title = alt, iconVersion = 'color', asSVG, ...imgProps }) => {
|
|
14
|
-
const
|
|
17
|
+
const router = (0, useRouter_1.useRouter)();
|
|
18
|
+
const href = (0, adjustHref_1.adjustHref)(router)((0, url_1.joinPath)(ProjectSettings_1.projectSettings.CDN, '/icons', `${name}.svg`));
|
|
15
19
|
if (asSVG && iconVersion !== 'normal') {
|
|
16
20
|
return ((0, jsx_runtime_1.jsx)(Background, { className: className, children: (0, jsx_runtime_1.jsxs)("svg", { className: (0, style_1.style)(getSvgSize(imgProps.width), svgUseStyleMap[iconVersion], iconVersion === 'white' ? 'invert' : '', imageClassName), ...imgProps, "aria-hidden": "true", children: [title ? (0, jsx_runtime_1.jsx)("title", { children: title }) : null, alt ? (0, jsx_runtime_1.jsx)("desc", { children: alt }) : null, (0, jsx_runtime_1.jsx)("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }) }));
|
|
17
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/ui-kit/Icon/Icon.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../src/ui-kit/Icon/Icon.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qDAAkD;AAElD,2DAAwD;AACxD,uDAAoD;AACpD,6CAA0C;AAC1C,yCAA2C;AAG3C,MAAM,cAAc,GAAgC;IAClD,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,mBAAmB;IAC1B,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,YAAY;CACpB,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,aAAG,EACrB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,EAAE,EACnB,IAAI,GAAG,EAAE,EACT,GAAG,GAAG,UAAU,IAAI,EAAE,EACtB,KAAK,GAAG,GAAG,EACX,WAAW,GAAG,OAAO,EACrB,KAAK,EACL,GAAG,QAAQ,EACZ,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,IAAA,uBAAU,EAAC,MAAM,CAAC,CAAC,IAAA,cAAQ,EAAC,iCAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC;IAExF,IAAI,KAAK,IAAI,WAAW,KAAK,QAAQ,EAAE;QACrC,OAAO,CACL,uBAAC,UAAU,IAAC,SAAS,EAAE,SAAS,YAC9B,iCACE,SAAS,EAAE,IAAA,aAAK,EACd,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC1B,cAAc,CAAC,WAAW,CAAC,EAC3B,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACvC,cAAc,CACf,KACG,QAAQ,iBACA,MAAM,aAEjB,KAAK,CAAC,CAAC,CAAC,4CAAQ,KAAK,GAAS,CAAC,CAAC,CAAC,IAAI,EACrC,GAAG,CAAC,CAAC,CAAC,2CAAO,GAAG,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChC,gCAAK,IAAI,EAAE,GAAG,IAAI,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,OAAO,GAAI,IACpD,GACK,CACd,CAAC;KACH;IAED,OAAO,CACL,gCACE,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,KACR,QAAQ,iBACA,MAAM,GAClB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;AAEtE,MAAM,UAAU,GAAG,IAAA,aAAG,EAAyB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CACzE,SAAS,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,SAAS,YAAG,QAAQ,GAAO,CAAC,CAAC,CAAC,QAAQ,CACnE,CAAC"}
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { ImgSource } from '../../model/Picture';
|
|
2
1
|
import type { ImageProps } from './ImgProps';
|
|
3
2
|
export declare const ImgAsPicture: import("@redneckz/uni-jsx").UNIComponent<ImageProps, any, any>;
|
|
4
|
-
export declare function formatToMimeType(format: ImgSource['format']): string | undefined;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.
|
|
2
|
+
exports.ImgAsPicture = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return 0;
|
|
10
|
-
};
|
|
5
|
+
const useRouter_1 = require("../../hooks/useRouter");
|
|
6
|
+
const adjustHref_1 = require("../../utils/adjustHref");
|
|
7
|
+
const url_1 = require("../../utils/url");
|
|
8
|
+
const sourcesComparator = (a, b) => a?.media && b?.media ? a.media - b.media : 0;
|
|
11
9
|
exports.ImgAsPicture = (0, uni_jsx_1.JSX)(({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
|
|
12
|
-
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
10
|
+
const router = (0, useRouter_1.useRouter)();
|
|
15
11
|
const pictureStyles = isMobile ? 'flex' : 'flex-none';
|
|
16
12
|
return ((0, jsx_runtime_1.jsxs)("picture", { className: `${pictureStyles} ${className}`, children: [image?.sources?.length
|
|
17
13
|
? image.sources
|
|
14
|
+
.filter((_) => _?.src)
|
|
18
15
|
.sort(sourcesComparator)
|
|
19
|
-
.map(({ src, format, media }, index) => ((0, jsx_runtime_1.jsx)("source", { srcSet:
|
|
20
|
-
: null,
|
|
16
|
+
.map(({ src, format, media }, index) => ((0, jsx_runtime_1.jsx)("source", { srcSet: adjustSrcset(router, pathPrefix)(src), type: formatToMimeType(format), media: media ? `(max-width: ${media}px)` : '', ...image.size }, `${index}_${src}`)))
|
|
17
|
+
: null, image?.src
|
|
18
|
+
? renderImg({ ...image, src: adjustSrcset(router, pathPrefix)(image.src) }, imageClassName, isMobile)
|
|
19
|
+
: null] }));
|
|
21
20
|
});
|
|
22
21
|
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
23
22
|
const style = {
|
|
@@ -29,14 +28,12 @@ const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
|
29
28
|
const imgStyle = isMobile ? 'm-auto' : 'm-0';
|
|
30
29
|
return ((0, jsx_runtime_1.jsx)("img", { src: image.src, className: `${imgStyle} ${imageClassName}`, alt: alt, title: title, style: style, ...image.size }));
|
|
31
30
|
};
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.map((src) =>
|
|
31
|
+
const adjustSrcset = (router, pathPrefix) => (srcset) => srcset
|
|
32
|
+
?.split(/\s*,\s*/)
|
|
33
|
+
.map((src) => src.trim())
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.map((src) => ((0, url_1.isURL)(src) ? src : (0, url_1.joinPath)(pathPrefix, src)))
|
|
36
|
+
.map((0, adjustHref_1.adjustHref)(router))
|
|
37
37
|
.join(', ');
|
|
38
|
-
|
|
39
|
-
return format ? `image/${String(format)}` : undefined;
|
|
40
|
-
}
|
|
41
|
-
exports.formatToMimeType = formatToMimeType;
|
|
38
|
+
const formatToMimeType = (format) => format ? `image/${String(format)}` : undefined;
|
|
42
39
|
//# sourceMappingURL=ImgAsPicture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImgAsPicture.js","sourceRoot":"","sources":["../../../src/ui-kit/Img/ImgAsPicture.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"ImgAsPicture.js","sourceRoot":"","sources":["../../../src/ui-kit/Img/ImgAsPicture.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qDAA0D;AAE1D,uDAAoD;AACpD,yCAAkD;AAGlD,MAAM,iBAAiB,GAAG,CAAC,CAAU,EAAE,CAAU,EAAE,EAAE,CACnD,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAElC,QAAA,YAAY,GAAG,IAAA,aAAG,EAC7B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,cAAc,GAAG,EAAE,EAAE,QAAQ,GAAG,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;IAC/E,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAE3B,MAAM,aA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AAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.adjustHref = void 0;
|
|
3
|
+
const ProjectSettings_1 = require("../ProjectSettings");
|
|
4
|
+
const dirname_1 = require("./dirname");
|
|
5
|
+
const url_1 = require("./url");
|
|
6
|
+
const adjustHref = (router) => (href) => {
|
|
7
|
+
if (!href || (0, url_1.isURL)(href) || (ProjectSettings_1.projectSettings.CDN && href.startsWith(ProjectSettings_1.projectSettings.CDN))) {
|
|
8
|
+
return href;
|
|
9
|
+
}
|
|
10
|
+
const isRelativeToBase = href.startsWith('/');
|
|
11
|
+
return (0, url_1.joinPath)(ProjectSettings_1.projectSettings.BASE_PATH, isRelativeToBase ? '/' : (0, dirname_1.dirname)(router.pathname), href);
|
|
12
|
+
};
|
|
13
|
+
exports.adjustHref = adjustHref;
|
|
14
|
+
//# sourceMappingURL=adjustHref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adjustHref.js","sourceRoot":"","sources":["../../src/utils/adjustHref.ts"],"names":[],"mappings":";;AAAA,wDAAqD;AACrD,uCAAoC;AACpC,+BAAwC;AAEjC,MAAM,UAAU,GAAG,CAAC,MAA4B,EAAE,EAAE,CAAC,CAAC,IAAwB,EAAE,EAAE;IACvF,IAAI,CAAC,IAAI,IAAI,IAAA,WAAK,EAAC,IAAI,CAAC,IAAI,CAAC,iCAAe,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,iCAAe,CAAC,GAAG,CAAC,CAAC,EAAE;QACzF,OAAO,IAAI,CAAC;KACb;IAED,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAE9C,OAAO,IAAA,cAAQ,EACb,iCAAe,CAAC,SAAS,EACzB,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAA,iBAAO,EAAC,MAAM,CAAC,QAAQ,CAAC,EACjD,IAAI,CACL,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dirname: (path: string | undefined) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dirname.js","sourceRoot":"","sources":["../../src/utils/dirname.ts"],"names":[],"mappings":";;AAAO,MAAM,OAAO,GAAG,CAAC,IAAwB,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAAhF,QAAA,OAAO,WAAyE"}
|
package/dist/utils/url.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Target } from '../model/LinkProps';
|
|
2
|
-
export declare const isURL: (href?: string) => href is `${string}
|
|
2
|
+
export declare const isURL: (href?: string) => href is `${string}:${string}`;
|
|
3
3
|
export declare const isLocalURL: (href: string | undefined, target?: Target) => boolean;
|
|
4
4
|
export declare const isHash: (href?: string) => href is `#${string}`;
|
|
5
5
|
export declare const withoutQuery: (href?: string) => string;
|
|
6
|
-
export declare const joinPath: (...path: string[]) => string;
|
|
6
|
+
export declare const joinPath: (...path: (string | undefined)[]) => string;
|
package/dist/utils/url.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.joinPath = exports.withoutQuery = exports.isHash = exports.isLocalURL = exports.isURL = void 0;
|
|
3
|
-
const isURL = (href) => Boolean(href?.includes('
|
|
3
|
+
const isURL = (href) => Boolean(href?.includes(':'));
|
|
4
4
|
exports.isURL = isURL;
|
|
5
5
|
const isLocalURL = (href, target) => Boolean(href && !(0, exports.isURL)(href) && (!target || target === '_self'));
|
|
6
6
|
exports.isLocalURL = isLocalURL;
|
package/dist/utils/url.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,CAAC,IAAa,
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,CAAC,IAAa,EAAiC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAAvF,QAAA,KAAK,SAAkF;AAE7F,MAAM,UAAU,GAAG,CAAC,IAAwB,EAAE,MAAe,EAAE,EAAE,CACtE,OAAO,CAAC,IAAI,IAAI,CAAC,IAAA,aAAK,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC;AADtD,QAAA,UAAU,cAC4C;AAE5D,MAAM,MAAM,GAAG,CAAC,IAAa,EAAwB,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAAjF,QAAA,MAAM,UAA2E;AAEvF,MAAM,YAAY,GAAG,CAAC,IAAa,EAAU,EAAE,CACpD,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AADzC,QAAA,YAAY,gBAC6B;AAE/C,MAAM,QAAQ,GAAG,CAAC,GAAG,IAA4B,EAAU,EAAE,CAClE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AADzC,QAAA,QAAQ,YACiC"}
|
package/dist/wlc.json
CHANGED
package/lib/ProjectSettings.js
CHANGED
|
@@ -26,12 +26,10 @@ export const projectSettings = new (class {
|
|
|
26
26
|
return this._.FOOTER;
|
|
27
27
|
}
|
|
28
28
|
get CDN() {
|
|
29
|
-
return this._.CDN;
|
|
29
|
+
return appendSlash(this._.CDN);
|
|
30
30
|
}
|
|
31
31
|
get BASE_PATH() {
|
|
32
|
-
return this._.BASE_PATH
|
|
33
|
-
? `${this._.BASE_PATH}/`
|
|
34
|
-
: this._.BASE_PATH;
|
|
32
|
+
return appendSlash(this._.BASE_PATH);
|
|
35
33
|
}
|
|
36
34
|
get YANDEX_MAP_API_KEY() {
|
|
37
35
|
return this._.YANDEX_MAP_API_KEY;
|
|
@@ -40,4 +38,5 @@ export const projectSettings = new (class {
|
|
|
40
38
|
return this._.YANDEX_METRIKA_ID;
|
|
41
39
|
}
|
|
42
40
|
})();
|
|
41
|
+
const appendSlash = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
43
42
|
//# sourceMappingURL=ProjectSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectSettings.js","sourceRoot":"","sources":["../src/ProjectSettings.ts"],"names":[],"mappings":"AAcA,MAAM,wBAAwB,GAAoB,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAE5E,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;IAClC,CAAC,GAAoB,wBAAwB,CAAC;IAE9C,KAAK,CAAC,CAAkB;QACtB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;IAC5B,CAAC;IACD,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1B,CAAC;IACD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,IAAI,wBAAwB,CAAC,WAAW,CAAC;IACpE,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAA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AC,GAAG,CAAC,CAAC;IACjC,CAAC;IACD,IAAI,SAAS;QACX,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,kBAAkB;QACpB,OAAO,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC;IACnC,CAAC;IACD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAClC,CAAC;CACF,CAAC,EAAE,CAAC;AAEL,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
4
|
import { style } from '../../utils/style.js';
|
|
5
|
-
export 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] })] })));
|
|
5
|
+
export 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] })] })));
|
|
6
6
|
//# sourceMappingURL=Rate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC1F,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,eAAK,SAAS,EAAC,UAAU,aACvB,eAAK,SAAS,EAAC,oBAAoB,aACjC,eACE,SAAS,EAAE,KAAK,CACd,kEAAkE,EAClE,kBAAkB,CACnB,YAEA,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/components/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAW1C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAC1F,0BACE,KAAC,IAAI,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,qBAAqB,YAClD,KAAK,GACD,EACP,eAAK,SAAS,EAAC,UAAU,aACvB,eAAK,SAAS,EAAC,oBAAoB,aACjC,eACE,SAAS,EAAE,KAAK,CACd,kEAAkE,EAClE,kBAAkB,CACnB,YAEA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,GACrC,EACN,IAAI,CAAC,CAAC,CAAC,CACN,eAAM,SAAS,EAAC,gDAAgD,YAAE,IAAI,GAAQ,CAC/E,CAAC,CAAC,CAAC,CACF,EAAE,CACH,IACG,EACL,YAAY,IAAI,kBAAkB,CAAC,CAAC,CAAC,CACpC,cAAK,SAAS,EAAC,wDAAwD,YACpE,YAAY,GACT,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
|
|
@@ -44,7 +44,7 @@ export const DEFAULT_DEPOSIT_CALCULATOR_PARAMS = {
|
|
|
44
44
|
maxSum: 5000000,
|
|
45
45
|
minMonths: 2,
|
|
46
46
|
maxMonths: 120,
|
|
47
|
-
rate:
|
|
47
|
+
rate: 7,
|
|
48
48
|
isMonthlyInterestPayment: true,
|
|
49
49
|
};
|
|
50
50
|
export const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
@@ -52,7 +52,7 @@ export const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
|
52
52
|
maxSum: 500000,
|
|
53
53
|
minDays: BUSINESS_MIN_DAYS,
|
|
54
54
|
maxDays: BUSINESS_MAX_DAYS,
|
|
55
|
-
rate:
|
|
55
|
+
rate: 6.6,
|
|
56
56
|
isMonthlyInterestPayment: true,
|
|
57
57
|
isReplenished: false,
|
|
58
58
|
isPartialWithdrawal: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Calculator/constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,CAAC,wDAAwD;AAClG,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC9C,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,cAAc,GAAG,GAAG,CAAC;AAE1D,MAAM,CAAC,MAAM,gCAAgC,GAAqC;IAChF,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,eA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AAiC,GAAsC;IAClF,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,CAAC;IACP,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GACrD;IACE,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,GAAG;IACT,wBAAwB,EAAE,IAAI;IAC9B,aAAa,EAAE,KAAK;IACpB,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,YAAY,EAAE,sBAAsB;CACrC,CAAC;AAEJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAC9D,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAyB,CAAC;AAClE,MAAM,CAAC,MAAM,iCAAiC,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>([minKey, maxKey]: [MinKey, MaxKey], rows?: T[]) => {
|
|
2
|
+
[x: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
export declare const checkRangeByKeys: <MinKey extends string, MaxKey extends string, T extends Record<MinKey | MaxKey, number>>(value: number, [minKey, maxKey]: [MinKey, MaxKey], sourceBookRow: T) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { maxBy } from '../../utils/maxBy.js';
|
|
2
|
+
import { minBy } from '../../utils/minBy.js';
|
|
3
|
+
export const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
|
|
4
|
+
[minKey]: rows.length ? minBy()(rows.map((row) => row[minKey])) : 0,
|
|
5
|
+
[maxKey]: rows.length ? maxBy()(rows.map((row) => row[maxKey])) : 0,
|
|
6
|
+
});
|
|
7
|
+
export const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value < sourceBookRow[maxKey];
|
|
8
|
+
//# sourceMappingURL=rangeHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeHelpers.js","sourceRoot":"","sources":["../../../src/components/Calculator/rangeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAK5B,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,OAAY,EAAE,EACd,EAAE,CAAC,CAAC;IACJ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAK9B,KAAa,EACb,CAAC,MAAM,EAAE,MAAM,CAAmB,EAClC,aAAgB,EACP,EAAE,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC"}
|