@redneckz/wildless-cms-uni-blocks 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/bundle/BlockRenderer/renderBlock.d.ts +5 -1
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +89 -52
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
- package/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/bundle/ui-kit/BlockWrapper.d.ts +0 -1
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/dist/BlockRenderer/renderBlock.d.ts +5 -1
- package/dist/BlockRenderer/renderBlock.js +2 -2
- package/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +15 -1
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +19 -4
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/dist/components/Calculator/constants.js +1 -0
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +11 -13
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/VerticalLayout/VerticalLayout.js +6 -2
- package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/dist/content-page-repository/transformImg.js +1 -1
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/ui-kit/BlockWrapper.d.ts +0 -1
- package/dist/ui-kit/BlockWrapper.js +2 -2
- package/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/lib/BlockRenderer/renderBlock.d.ts +5 -1
- package/lib/BlockRenderer/renderBlock.js +2 -2
- package/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +15 -1
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/lib/components/Calculator/CreditCalculatorForm.js +19 -4
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/lib/components/Calculator/constants.js +1 -0
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Carousel/Carousel.js +11 -13
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.js +6 -2
- package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/lib/content-page-repository/transformImg.js +1 -1
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/ui-kit/BlockWrapper.d.ts +0 -1
- package/lib/ui-kit/BlockWrapper.js +2 -2
- package/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/bundle/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/bundle/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/bundle/bundle.umd.js +10 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/bundle/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/bundle/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/dist/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/dist/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/dist/BlockRenderer/renderBlock.js +2 -2
- package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +19 -4
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/dist/components/Calculator/constants.js +1 -0
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +11 -13
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js +6 -2
- package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/dist/content-page-repository/transformImg.js +1 -1
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/dist/ui-kit/BlockWrapper.js +2 -2
- package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +12 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/lib/BlockRenderer/BlockRendererOptions.d.ts +0 -2
- package/mobile/lib/BlockRenderer/renderBlock.d.ts +5 -1
- package/mobile/lib/BlockRenderer/renderBlock.js +2 -2
- package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +15 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +2 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +19 -4
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.d.ts +2 -2
- package/mobile/lib/components/Calculator/constants.js +1 -0
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +3 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +34 -8
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +11 -13
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +4 -7
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.d.ts +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +6 -9
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -5
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -7
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js +6 -2
- package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
- package/mobile/lib/content-page-repository/transformImg.js +1 -1
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/ui-kit/BlockWrapper.d.ts +0 -1
- package/mobile/lib/ui-kit/BlockWrapper.js +2 -2
- package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +8 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +10 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -0
- package/mobile/src/BlockRenderer/BlockRendererOptions.ts +0 -2
- package/mobile/src/BlockRenderer/renderBlock.tsx +7 -3
- package/mobile/src/components/Calculator/Calculator.example.json +6 -0
- package/mobile/src/components/Calculator/CalculatorContent.ts +16 -1
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
- package/mobile/src/components/Calculator/constants.ts +1 -0
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
- package/mobile/src/components/Carousel/Carousel.tsx +9 -11
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
- package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
- package/mobile/src/content-page-repository/transformImg.ts +1 -1
- package/mobile/src/ui-kit/BlockWrapper.tsx +3 -6
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
- package/package.json +1 -1
- package/src/BlockRenderer/BlockRendererOptions.ts +0 -2
- package/src/BlockRenderer/renderBlock.tsx +7 -3
- package/src/components/Calculator/Calculator.example.json +6 -0
- package/src/components/Calculator/Calculator.fixture.tsx +6 -0
- package/src/components/Calculator/CalculatorContent.ts +16 -1
- package/src/components/Calculator/CreditCalculatorForm.tsx +89 -29
- package/src/components/Calculator/DepositCalculatorForm.tsx +2 -2
- package/src/components/Calculator/constants.ts +1 -0
- package/src/components/Calculator/useCreditCalculatorParams.ts +46 -8
- package/src/components/Carousel/Carousel.tsx +9 -11
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -1
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +19 -26
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +16 -18
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +15 -20
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +28 -28
- package/src/components/VerticalLayout/VerticalLayout.tsx +6 -2
- package/src/content-page-repository/transformImg.ts +1 -1
- package/src/ui-kit/BlockWrapper.tsx +3 -6
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +21 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"BlockWrapper.js","sourceRoot":"","sources":["../../src/ui-kit/BlockWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAOvC,MAAM,CAAC,MAAM,WAAW,GAAiC;IACvD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,kCAAkC;IAC/C,EAAE,EAAE,EAAE;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,IAAI,EACd,KAAK,EACL,GAAG,GAAG,SAAS,EACf,IAAI,EACJ,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,GAAG,GAAQ,GAAG,CAAC;IAErB,MAAM,GAAG,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,SAAS,CACP,GAAG,EAAE,CACH,eAAe,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;QACzC,SAAS,CACP,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CACrF,CAAC;IACJ,CAAC,CAAC,EACJ,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CACd,UAAU,CAAC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,EACvC,WAAW,CAAC,OAAO,CAAC,EACpB,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EACxB,SAAS,CACV,KACG,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACnD,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACpD,IAAI,EAAE,IAAI,YAET,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { useLink } from '../../hooks/useLink.js';
|
|
4
|
+
export const LinkWrapper = JSX(({ className = '', href, target, children }) => {
|
|
5
|
+
const link = useLink();
|
|
6
|
+
const linkProps = link({ href, target });
|
|
7
|
+
const Tag = href ? 'a' : 'div';
|
|
8
|
+
return (_jsx(Tag, { className: className, ...(href ? linkProps : {}), children: children }));
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=LinkWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkWrapper.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkWrapper/LinkWrapper.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAS9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9F,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAE/B,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,SAAS,KAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,YACnD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -8,14 +8,18 @@ const DEFAULT_ANCESTORS: BlockAncestors = [];
|
|
|
8
8
|
|
|
9
9
|
const defaultStyle = 'col-span-12';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
type ExtraProps = Partial<Record<string, any> & { className: string }>;
|
|
12
|
+
|
|
13
|
+
export function renderBlock(
|
|
14
|
+
block: BlockDef,
|
|
15
|
+
options: BlockRendererOptions,
|
|
16
|
+
{ className, ...extraProps }: ExtraProps = {},
|
|
17
|
+
) {
|
|
12
18
|
const {
|
|
13
19
|
key,
|
|
14
20
|
blockDecorator = defaultBlockDecorator,
|
|
15
21
|
blocksRegistry = {},
|
|
16
22
|
ancestors = DEFAULT_ANCESTORS,
|
|
17
|
-
className = '',
|
|
18
|
-
extraProps = {},
|
|
19
23
|
} = options;
|
|
20
24
|
const { type } = block;
|
|
21
25
|
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"version": "primary"
|
|
17
17
|
}
|
|
18
18
|
],
|
|
19
|
+
"paramsViewSettings": {
|
|
20
|
+
"isShowSalaryClient": true,
|
|
21
|
+
"isShowStateEmployee": true,
|
|
22
|
+
"isShowPensionClient": true,
|
|
23
|
+
"isShowInsurance": true
|
|
24
|
+
},
|
|
19
25
|
"footnote": "Расчёт является предварительным. Точные условия будут предоставлены в отделении Банка. "
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -10,6 +10,21 @@ export type CommonCalculatorProps = Footnote &
|
|
|
10
10
|
sourceBookDir?: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
export interface CreditCalculatorParamsViewSettings {
|
|
14
|
+
/** @title Получаю зарплату на счёт в Россельхозбанке */
|
|
15
|
+
isShowSalaryClient?: boolean;
|
|
16
|
+
/** @title Работаю в бюджетной организации */
|
|
17
|
+
isShowStateEmployee?: boolean;
|
|
18
|
+
/** @title Получаю пенсию на карту Россельхозбанка */
|
|
19
|
+
isShowPensionClient?: boolean;
|
|
20
|
+
/** @title Комплексная страховая защита */
|
|
21
|
+
isShowInsurance?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface CreditCalculatorProps extends CommonCalculatorProps {
|
|
24
|
+
/** @title Настройка отображения чекбоксов */
|
|
25
|
+
paramsViewSettings?: CreditCalculatorParamsViewSettings;
|
|
26
|
+
}
|
|
27
|
+
|
|
13
28
|
export interface BusinessDepositCalculatorProps extends CommonCalculatorProps {
|
|
14
29
|
/** @title Сноска снизу блока */
|
|
15
30
|
bottomFootnote?: string;
|
|
@@ -53,7 +68,7 @@ export interface CalculatorParams {
|
|
|
53
68
|
* @default {"calcType": "CreditCalculatorForm"}
|
|
54
69
|
*/
|
|
55
70
|
export type CreditCalculatorParamsDef = TitleProps &
|
|
56
|
-
|
|
71
|
+
CreditCalculatorProps & {
|
|
57
72
|
calcType: 'CreditCalculatorForm';
|
|
58
73
|
};
|
|
59
74
|
|
|
@@ -3,7 +3,10 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
3
3
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
4
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
5
|
import { style } from '../../utils/style';
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
CreditCalculatorParamsViewSettings,
|
|
8
|
+
CreditCalculatorProps,
|
|
9
|
+
} from './CalculatorContent';
|
|
7
10
|
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
8
11
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
|
|
9
12
|
import { Rate } from './Rate';
|
|
@@ -11,18 +14,23 @@ import { renderFootnote } from './renderFootnote';
|
|
|
11
14
|
import { renderMonthsInput } from './renderMonthsInput';
|
|
12
15
|
import { renderPaymentType } from './renderPaymentType';
|
|
13
16
|
import { renderWantedSumInput } from './renderWantedSumInput';
|
|
14
|
-
import { useCreditCalculatorParams } from './useCreditCalculatorParams';
|
|
17
|
+
import { CreditCalculatorParams, useCreditCalculatorParams } from './useCreditCalculatorParams';
|
|
15
18
|
|
|
16
|
-
export interface CreditCalculatorProp extends
|
|
19
|
+
export interface CreditCalculatorProp extends CreditCalculatorProps {
|
|
17
20
|
className?: string;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
21
|
-
({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
24
|
+
({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
22
25
|
const [isAnnuity, toggleIsAnnuity] = useState(false);
|
|
23
|
-
const [isInsurance, toggleIsInsurance] = useState(true);
|
|
24
26
|
const [isSalaryClient, toggleIsSalaryClient] = useState(false);
|
|
27
|
+
const handleIsSalaryClient = useCallback((_: boolean) => toggleIsSalaryClient(_), []);
|
|
25
28
|
const [isStateEmployee, toggleIsStateEmployee] = useState(false);
|
|
29
|
+
const handleIsStateEmployee = useCallback((_: boolean) => toggleIsStateEmployee(_), []);
|
|
30
|
+
const [isPensionClient, toggleIsPensionClient] = useState(false);
|
|
31
|
+
const handleIsPensionClient = useCallback((_: boolean) => toggleIsPensionClient(_), []);
|
|
32
|
+
const [isInsurance, toggleIsInsurance] = useState(true);
|
|
33
|
+
const handleIsInsurance = useCallback((_: boolean) => toggleIsInsurance(_), []);
|
|
26
34
|
const [moneyValue, setMoneyValue] = useState(DEFAULT_SUM);
|
|
27
35
|
const handleMoneyValue = useCallback((_: number) => setMoneyValue(_), []);
|
|
28
36
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
@@ -31,11 +39,16 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
|
31
39
|
isAnnuity,
|
|
32
40
|
isInsurance,
|
|
33
41
|
isSalaryClient,
|
|
42
|
+
isPensionClient,
|
|
34
43
|
isStateEmployee,
|
|
35
44
|
moneyValue,
|
|
36
45
|
monthsValue,
|
|
37
46
|
};
|
|
38
|
-
const calculatorParams = useCreditCalculatorParams(
|
|
47
|
+
const calculatorParams = useCreditCalculatorParams(
|
|
48
|
+
userInputParams,
|
|
49
|
+
sourceBookDir,
|
|
50
|
+
paramsViewSettings,
|
|
51
|
+
);
|
|
39
52
|
|
|
40
53
|
return (
|
|
41
54
|
<section className={style('flex justify-between', className)}>
|
|
@@ -47,31 +60,17 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
|
47
60
|
)}
|
|
48
61
|
{renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue)}
|
|
49
62
|
<div className="mt-7">
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
checked={isStateEmployee}
|
|
59
|
-
onChange={toggleIsStateEmployee}
|
|
60
|
-
/>
|
|
61
|
-
<Checkbox
|
|
62
|
-
className="mt-3"
|
|
63
|
-
text="Комплексная страховая защита"
|
|
64
|
-
checked={isInsurance}
|
|
65
|
-
onChange={toggleIsInsurance}
|
|
66
|
-
/>
|
|
63
|
+
{renderCreditParamsForm({
|
|
64
|
+
...calculatorParams,
|
|
65
|
+
...paramsViewSettings,
|
|
66
|
+
handleIsSalaryClient,
|
|
67
|
+
handleIsStateEmployee,
|
|
68
|
+
handleIsPensionClient,
|
|
69
|
+
handleIsInsurance,
|
|
70
|
+
})}
|
|
67
71
|
</div>
|
|
68
72
|
</div>
|
|
69
|
-
|
|
70
|
-
title="Ставка"
|
|
71
|
-
rate={calculatorParams.rate}
|
|
72
|
-
rateBlockClassName="tracking-[-25px]"
|
|
73
|
-
unit="%"
|
|
74
|
-
/>
|
|
73
|
+
{renderRate(calculatorParams.rate)}
|
|
75
74
|
<div className="w-full max-w-[350px]">
|
|
76
75
|
<CalculatorValueBlock
|
|
77
76
|
title={'Ежемесячный платеж'}
|
|
@@ -90,3 +89,64 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
|
|
|
90
89
|
);
|
|
91
90
|
},
|
|
92
91
|
);
|
|
92
|
+
|
|
93
|
+
const renderRate = (rate: number) => (
|
|
94
|
+
<Rate title="Ставка" rate={rate} rateBlockClassName="tracking-[-25px]" unit="%" />
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
type CreditParamsFormProps = CreditCalculatorParams &
|
|
98
|
+
CreditCalculatorParamsViewSettings & {
|
|
99
|
+
handleIsSalaryClient?: (value: boolean) => void;
|
|
100
|
+
handleIsStateEmployee?: (value: boolean) => void;
|
|
101
|
+
handleIsPensionClient?: (value: boolean) => void;
|
|
102
|
+
handleIsInsurance?: (value: boolean) => void;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const renderCreditParamsForm = ({
|
|
106
|
+
isSalaryClient,
|
|
107
|
+
isStateEmployee,
|
|
108
|
+
isPensionClient,
|
|
109
|
+
isInsurance,
|
|
110
|
+
isShowSalaryClient,
|
|
111
|
+
isShowStateEmployee,
|
|
112
|
+
isShowPensionClient,
|
|
113
|
+
isShowInsurance,
|
|
114
|
+
handleIsSalaryClient,
|
|
115
|
+
handleIsStateEmployee,
|
|
116
|
+
handleIsPensionClient,
|
|
117
|
+
handleIsInsurance,
|
|
118
|
+
}: CreditParamsFormProps) => (
|
|
119
|
+
<div>
|
|
120
|
+
{isShowSalaryClient ? (
|
|
121
|
+
<Checkbox
|
|
122
|
+
text="Получаю зарплату на счёт в Россельхозбанке"
|
|
123
|
+
checked={isSalaryClient}
|
|
124
|
+
onChange={handleIsSalaryClient}
|
|
125
|
+
/>
|
|
126
|
+
) : null}
|
|
127
|
+
{isShowStateEmployee ? (
|
|
128
|
+
<Checkbox
|
|
129
|
+
className="mt-3"
|
|
130
|
+
text="Работаю в бюджетной организации"
|
|
131
|
+
checked={isStateEmployee}
|
|
132
|
+
onChange={handleIsStateEmployee}
|
|
133
|
+
/>
|
|
134
|
+
) : null}
|
|
135
|
+
{isShowPensionClient ? (
|
|
136
|
+
<Checkbox
|
|
137
|
+
className="mt-3"
|
|
138
|
+
text="Получаю пенсию на карту Россельхозбанка"
|
|
139
|
+
checked={isPensionClient}
|
|
140
|
+
onChange={handleIsPensionClient}
|
|
141
|
+
/>
|
|
142
|
+
) : null}
|
|
143
|
+
{isShowInsurance ? (
|
|
144
|
+
<Checkbox
|
|
145
|
+
className="mt-3"
|
|
146
|
+
text="Комплексная страховая защита"
|
|
147
|
+
checked={isInsurance}
|
|
148
|
+
onChange={handleIsInsurance}
|
|
149
|
+
/>
|
|
150
|
+
) : null}
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
@@ -4,7 +4,7 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
4
4
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
5
5
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
6
6
|
import { style } from '../../utils/style';
|
|
7
|
-
import { CommonCalculatorProps
|
|
7
|
+
import { CommonCalculatorProps } from './CalculatorContent';
|
|
8
8
|
import { CalculatorValueBlock } from './CalculatorValueBlock';
|
|
9
9
|
import { DEFAULT_MONTHS, DEFAULT_SUM } from './constants';
|
|
10
10
|
import { Rate } from './Rate';
|
|
@@ -15,7 +15,7 @@ import { renderRegistrationType } from './renderRegistrationType';
|
|
|
15
15
|
import { renderWantedSumInput } from './renderWantedSumInput';
|
|
16
16
|
import { useDepositCalculatorParams } from './useDepositCalculatorParams';
|
|
17
17
|
|
|
18
|
-
export interface DepositCalculatorProp extends
|
|
18
|
+
export interface DepositCalculatorProp extends CommonCalculatorProps {
|
|
19
19
|
className?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CreditCalculatorParamsViewSettings } from './CalculatorContent';
|
|
1
2
|
import { CREDIT_CALC_DEFAULT_DIR, DEFAULT_CREDIT_CALCULATOR_PARAMS } from './constants';
|
|
2
3
|
import { getMonthlyPayment } from './getMonthlyPayment';
|
|
3
4
|
import { checkRangeByKeys, getRangeByKeys } from './rangeHelpers';
|
|
@@ -6,6 +7,7 @@ import { useCalculatorParams } from './useCalculatorParams';
|
|
|
6
7
|
export interface CommonCreditParams {
|
|
7
8
|
isInsurance: boolean;
|
|
8
9
|
isSalaryClient: boolean;
|
|
10
|
+
isPensionClient: boolean;
|
|
9
11
|
isStateEmployee: boolean;
|
|
10
12
|
}
|
|
11
13
|
export interface CreditCalculatorSourceBookParams extends CommonCreditParams {
|
|
@@ -35,18 +37,44 @@ export type CreditCalculatorData = {
|
|
|
35
37
|
export const useCreditCalculatorParams = (
|
|
36
38
|
userInputParams: CreditCalculatorUserInputParams,
|
|
37
39
|
sourceBookDir?: string,
|
|
40
|
+
paramsViewSettings?: CreditCalculatorParamsViewSettings,
|
|
38
41
|
): CreditCalculatorParams => {
|
|
39
|
-
const {
|
|
40
|
-
|
|
42
|
+
const { moneyValue, monthsValue } = userInputParams;
|
|
41
43
|
const data = useCalculatorParams<CreditCalculatorData>(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
|
|
42
44
|
const creditCalculatorSourceBookParams =
|
|
43
|
-
data?.rows?.find((
|
|
45
|
+
data?.rows?.find((row) => {
|
|
46
|
+
const isExcludeSalaryClient = !paramsViewSettings?.isShowSalaryClient;
|
|
47
|
+
const isExcludeStateEmployee = !paramsViewSettings?.isShowStateEmployee;
|
|
48
|
+
const isExcludePensionClient = !paramsViewSettings?.isShowPensionClient;
|
|
49
|
+
const isExcludeInsurance = !paramsViewSettings?.isShowInsurance;
|
|
50
|
+
|
|
44
51
|
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
checkRowByParam({
|
|
53
|
+
row,
|
|
54
|
+
userInputParams,
|
|
55
|
+
paramKey: 'isSalaryClient',
|
|
56
|
+
isExclude: isExcludeSalaryClient,
|
|
57
|
+
}) &&
|
|
58
|
+
checkRowByParam({
|
|
59
|
+
row,
|
|
60
|
+
userInputParams,
|
|
61
|
+
paramKey: 'isStateEmployee',
|
|
62
|
+
isExclude: isExcludeStateEmployee,
|
|
63
|
+
}) &&
|
|
64
|
+
checkRowByParam({
|
|
65
|
+
row,
|
|
66
|
+
userInputParams,
|
|
67
|
+
paramKey: 'isPensionClient',
|
|
68
|
+
isExclude: isExcludePensionClient,
|
|
69
|
+
}) &&
|
|
70
|
+
checkRowByParam({
|
|
71
|
+
row,
|
|
72
|
+
userInputParams,
|
|
73
|
+
paramKey: 'isInsurance',
|
|
74
|
+
isExclude: isExcludeInsurance,
|
|
75
|
+
}) &&
|
|
76
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
77
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)
|
|
50
78
|
);
|
|
51
79
|
}) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
52
80
|
|
|
@@ -62,3 +90,13 @@ export const useCreditCalculatorParams = (
|
|
|
62
90
|
monthlyPayment,
|
|
63
91
|
};
|
|
64
92
|
};
|
|
93
|
+
|
|
94
|
+
interface CheckRowByParamProps {
|
|
95
|
+
row: CreditCalculatorSourceBookParams;
|
|
96
|
+
userInputParams: CreditCalculatorUserInputParams;
|
|
97
|
+
paramKey: string;
|
|
98
|
+
isExclude: boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }: CheckRowByParamProps) =>
|
|
102
|
+
isExclude || userInputParams[paramKey] === row[paramKey];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
+
import { renderBlock } from '../../BlockRenderer/renderBlock';
|
|
3
4
|
import { renderChildren } from '../../BlockRenderer/renderChildren';
|
|
4
5
|
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
5
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -24,7 +25,6 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
|
24
25
|
isCyclic = false,
|
|
25
26
|
arrowsPadded = true,
|
|
26
27
|
isPadding = true,
|
|
27
|
-
options,
|
|
28
28
|
...rest
|
|
29
29
|
}) => {
|
|
30
30
|
const { blocks: childBlocks } = rest.block || {};
|
|
@@ -59,18 +59,16 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
|
|
|
59
59
|
gap={ITEMS_GAP}
|
|
60
60
|
onVisibleIndicesChange={scroll.handleVisibleIndicesChange}
|
|
61
61
|
>
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
extraProps: {
|
|
62
|
+
{renderChildren({
|
|
63
|
+
...rest,
|
|
64
|
+
renderProps: isBankHistoryCarousel
|
|
65
|
+
? (block, options) =>
|
|
66
|
+
renderBlock(block, options, {
|
|
68
67
|
blocksLength: childBlocks?.length,
|
|
69
68
|
activeIndex: activeIndex,
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
: renderChildren({ ...rest, options })}
|
|
69
|
+
})
|
|
70
|
+
: renderBlock,
|
|
71
|
+
})}
|
|
74
72
|
</SwipeListContainer>
|
|
75
73
|
<CarouselScrollButtons
|
|
76
74
|
scroll={scroll}
|
|
@@ -52,7 +52,8 @@ export const CarouselCatalogCard = JSX<CarouselCatalogCardProps>(
|
|
|
52
52
|
);
|
|
53
53
|
|
|
54
54
|
const renderColorOption = (color: ProductColorVersion, i: number) => (
|
|
55
|
-
<
|
|
55
|
+
<div
|
|
56
|
+
role="figure"
|
|
56
57
|
key={String(i)}
|
|
57
58
|
className={`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${cardStyleMap[color]}`}
|
|
58
59
|
/>
|
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
3
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
3
|
-
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
4
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
|
-
import {
|
|
6
|
+
import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
|
|
7
7
|
import { Text } from '../../ui-kit/Text/Text';
|
|
8
|
-
import {
|
|
8
|
+
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
9
|
+
import { style } from '../../utils/style';
|
|
9
10
|
import type { CarouselEventCardContent } from './CarouselEventCardContent';
|
|
10
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
11
11
|
|
|
12
12
|
export interface CarouselEventCardProps extends CarouselEventCardContent, UniBlockProps {}
|
|
13
13
|
|
|
14
14
|
export const CarouselEventCard = JSX<CarouselEventCardProps>(
|
|
15
15
|
({ className = '', icon, title, description, href, target, ...rest }) => {
|
|
16
|
-
const link = useLink();
|
|
17
|
-
const adjustedProps = link({ href, target });
|
|
18
|
-
const tagName = href ? 'a' : 'section';
|
|
19
|
-
|
|
20
16
|
return (
|
|
21
|
-
<BlockWrapper
|
|
22
|
-
className=
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</Text>
|
|
37
|
-
</div>
|
|
38
|
-
) : null}
|
|
17
|
+
<BlockWrapper className={style('w-[365px]', className)} {...rest}>
|
|
18
|
+
<LinkWrapper className="flex flex-col" href={href} target={target}>
|
|
19
|
+
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
20
|
+
{icon?.src ? <Img image={icon} /> : null}
|
|
21
|
+
{title ? (
|
|
22
|
+
<Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
|
|
23
|
+
) : null}
|
|
24
|
+
{description ? (
|
|
25
|
+
<div className="mb-4">
|
|
26
|
+
<Text font="font-light" size="text-s" color="text-secondary-text">
|
|
27
|
+
{description}
|
|
28
|
+
</Text>
|
|
29
|
+
</div>
|
|
30
|
+
) : null}
|
|
31
|
+
</LinkWrapper>
|
|
39
32
|
</BlockWrapper>
|
|
40
33
|
);
|
|
41
34
|
},
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
2
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
3
|
-
import {
|
|
6
|
+
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
4
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
+
import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
|
|
5
9
|
import { List } from '../../ui-kit/List/List';
|
|
6
10
|
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
7
|
-
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
8
|
-
import { style } from '../../utils/style';
|
|
9
11
|
import { Text } from '../../ui-kit/Text/Text';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
+
import { style } from '../../utils/style';
|
|
13
|
+
import { HEADLINE_SMALL_VERSION } from '../Headline/headlineVersionStyles';
|
|
12
14
|
import type { CarouselProductCardContent, ListProps } from './CarouselProductCardContent';
|
|
13
|
-
import type { Picture } from '../../model/Picture';
|
|
14
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
15
15
|
|
|
16
16
|
export interface CarouselProductCardProps extends CarouselProductCardContent, UniBlockProps {}
|
|
17
17
|
|
|
@@ -32,31 +32,25 @@ export const CarouselProductCard = JSX<CarouselProductCardProps>(
|
|
|
32
32
|
version = 'primary',
|
|
33
33
|
...rest
|
|
34
34
|
}) => {
|
|
35
|
-
const link = useLink();
|
|
36
|
-
const adjustedProps = link({ href, target });
|
|
37
|
-
const tagName = href ? 'a' : 'section';
|
|
38
|
-
|
|
39
35
|
return (
|
|
40
36
|
<BlockWrapper
|
|
41
37
|
className={style(
|
|
42
|
-
'
|
|
38
|
+
'justify-between min-w-[260px]',
|
|
43
39
|
'box-border border-solid border border-gray',
|
|
44
40
|
align,
|
|
45
41
|
className,
|
|
46
42
|
)}
|
|
47
|
-
extraProps={adjustedProps}
|
|
48
|
-
tag={tagName}
|
|
49
43
|
version={version}
|
|
50
44
|
{...rest}
|
|
51
45
|
>
|
|
52
|
-
<
|
|
46
|
+
<LinkWrapper className="p-6" href={href} target={target}>
|
|
53
47
|
{renderImage(icon)}
|
|
54
48
|
{renderCardTitle(headlineSmallVersion, title)}
|
|
55
49
|
{renderDescription(description, title)}
|
|
56
50
|
{renderItems(items, isDotted, version)}
|
|
57
51
|
{renderAdditionalDescription(additionalDescription)}
|
|
58
|
-
</
|
|
59
|
-
{renderButtonsSection([button], {
|
|
52
|
+
</LinkWrapper>
|
|
53
|
+
{renderButtonsSection([button], { className: 'p-6 pt-0', isVertical: true })}
|
|
60
54
|
</BlockWrapper>
|
|
61
55
|
);
|
|
62
56
|
},
|
|
@@ -72,7 +66,11 @@ const renderImage = (image?: Picture) => (
|
|
|
72
66
|
);
|
|
73
67
|
|
|
74
68
|
const renderCardTitle = (headlineSmallVersion: string, title?: string) =>
|
|
75
|
-
title ?
|
|
69
|
+
title ? (
|
|
70
|
+
<div>
|
|
71
|
+
<Text size={HEADLINE_SMALL_VERSION[headlineSmallVersion]}>{title}</Text>
|
|
72
|
+
</div>
|
|
73
|
+
) : null;
|
|
76
74
|
|
|
77
75
|
const renderDescription = (description?: string, title?: string) =>
|
|
78
76
|
description ? (
|
|
@@ -4,34 +4,29 @@ import type { UniBlockProps } from '../../model/JSXBlock';
|
|
|
4
4
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
7
|
+
import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
|
|
7
8
|
import { getIconWithVersion } from '../../utils/getIconWithVersion';
|
|
8
|
-
import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
|
|
9
|
-
import { useLink } from '../../hooks/useLink';
|
|
10
9
|
import { style } from '../../utils/style';
|
|
10
|
+
import type { CarouselProgramsCardContent } from './CarouselProgramsCardContent';
|
|
11
11
|
|
|
12
12
|
export interface CarouselTariffsCardProps extends CarouselProgramsCardContent, UniBlockProps {}
|
|
13
13
|
|
|
14
14
|
export const CarouselProgramsCard = JSX<CarouselTariffsCardProps>(
|
|
15
15
|
({ className = '', title, icon, list = [], href, target, ...rest }) => {
|
|
16
|
-
const link = useLink();
|
|
17
|
-
const adjustedProps = link({ href, target });
|
|
18
|
-
const tagName = href ? 'a' : 'section';
|
|
19
|
-
|
|
20
16
|
return (
|
|
21
|
-
<BlockWrapper
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</div>
|
|
17
|
+
<BlockWrapper className={style('border border-gray min-w-[536px]', className)} {...rest}>
|
|
18
|
+
<LinkWrapper className="flex" href={href} target={target}>
|
|
19
|
+
<div className="w-[200px] min-w-[200px] self-center">
|
|
20
|
+
{icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
|
|
21
|
+
{icon?.src ? <Img image={icon} /> : null}
|
|
22
|
+
</div>
|
|
23
|
+
<div className="p-8 pl-3 w-full">
|
|
24
|
+
{title ? <Heading className=" mb-3.5" headingType="h5" title={title} /> : null}
|
|
25
|
+
{list.length ? (
|
|
26
|
+
<div className="flex flex-col gap-3">{list?.map(renderList)}</div>
|
|
27
|
+
) : null}
|
|
28
|
+
</div>
|
|
29
|
+
</LinkWrapper>
|
|
35
30
|
</BlockWrapper>
|
|
36
31
|
);
|
|
37
32
|
},
|