@redneckz/wildless-cms-uni-blocks 0.11.0 → 0.11.2
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +84 -53
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/bundle/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/bundle/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/bundle/components/Calculator/rangeHelpers.d.ts +2 -2
- package/bundle/components/Header/Header.mobile.d.ts +2 -2
- package/bundle/components/Header/HeaderContent.d.ts +13 -1
- package/bundle/components/Header/HeaderTop.d.ts +6 -2
- package/bundle/components/ProductGallery/ProductGallery.mobile.d.ts +5 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/Heading/headingTag.d.ts +2 -0
- package/bundle/ui-kit/Heading/headingTag.mobile.d.ts +2 -0
- package/cosmos-static/icons/ChevronLeft.svg +1 -0
- package/dist/components/BaseTile/BaseTile.js +2 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js +28 -0
- package/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.js +10 -0
- package/dist/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.js +14 -0
- package/dist/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/dist/components/Calculator/rangeHelpers.d.ts +2 -2
- package/dist/components/Calculator/rangeHelpers.js +2 -2
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.js +26 -38
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +1 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/Header/Header.mobile.d.ts +2 -2
- package/dist/components/Header/Header.mobile.js +3 -17
- package/dist/components/Header/Header.mobile.js.map +1 -1
- package/dist/components/Header/HeaderContent.d.ts +13 -1
- package/dist/components/Header/HeaderTop.d.ts +6 -2
- package/dist/components/Header/HeaderTop.js +15 -2
- package/dist/components/Header/HeaderTop.js.map +1 -1
- package/dist/components/Headline/headlineVersionStyles.js +6 -6
- package/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductGallery/ProductGallery.mobile.d.ts +5 -0
- package/dist/components/ProductGallery/ProductGallery.mobile.js +13 -0
- package/dist/components/ProductGallery/ProductGallery.mobile.js.map +1 -0
- package/dist/content-page-repository/transformImg.js +1 -1
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Heading/Heading.js +5 -1
- package/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/dist/ui-kit/Heading/headingTag.d.ts +2 -0
- package/dist/ui-kit/Heading/headingTag.js +5 -0
- package/dist/ui-kit/Heading/headingTag.js.map +1 -0
- package/dist/ui-kit/Heading/headingTag.mobile.d.ts +2 -0
- package/dist/ui-kit/Heading/headingTag.mobile.js +13 -0
- package/dist/ui-kit/Heading/headingTag.mobile.js.map +1 -0
- package/dist/ui-kit/Img/ImgAsPicture.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +2 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js +25 -0
- package/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.js +7 -0
- package/lib/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.js +11 -0
- package/lib/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/lib/components/Calculator/rangeHelpers.d.ts +2 -2
- package/lib/components/Calculator/rangeHelpers.js +4 -4
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.js +27 -39
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +1 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/Header/Header.fixture.mobile.d.ts +2 -0
- package/lib/components/Header/Header.mobile.d.ts +2 -2
- package/lib/components/Header/Header.mobile.js +4 -18
- package/lib/components/Header/Header.mobile.js.map +1 -1
- package/lib/components/Header/HeaderContent.d.ts +13 -1
- package/lib/components/Header/HeaderTop.d.ts +6 -2
- package/lib/components/Header/HeaderTop.js +15 -2
- package/lib/components/Header/HeaderTop.js.map +1 -1
- package/lib/components/Headline/headlineVersionStyles.js +6 -6
- package/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductGallery/ProductGallery.fixture.mobile.d.ts +7 -0
- package/lib/components/ProductGallery/ProductGallery.mobile.d.ts +5 -0
- package/lib/components/ProductGallery/ProductGallery.mobile.js +11 -0
- package/lib/components/ProductGallery/ProductGallery.mobile.js.map +1 -0
- package/lib/content-page-repository/transformImg.js +1 -1
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Heading/Heading.js +5 -1
- package/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/lib/ui-kit/Heading/headingTag.d.ts +2 -0
- package/lib/ui-kit/Heading/headingTag.js +2 -0
- package/lib/ui-kit/Heading/headingTag.js.map +1 -0
- package/lib/ui-kit/Heading/headingTag.mobile.d.ts +2 -0
- package/lib/ui-kit/Heading/headingTag.mobile.js +10 -0
- package/lib/ui-kit/Heading/headingTag.mobile.js.map +1 -0
- package/lib/ui-kit/Img/ImgAsPicture.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +123 -410
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/bundle/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/bundle/components/Header/Header.d.ts +2 -2
- package/mobile/bundle/components/Header/HeaderContent.d.ts +13 -1
- package/mobile/bundle/components/Header/HeaderTop.d.ts +6 -2
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/Heading/headingTag.d.ts +2 -0
- package/mobile/dist/components/BaseTile/BaseTile.js +2 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js +28 -0
- package/mobile/dist/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.js +10 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.js +14 -0
- package/mobile/dist/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/dist/components/Calculator/rangeHelpers.js +2 -2
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +26 -38
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +1 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/Header/Header.d.ts +2 -2
- package/mobile/dist/components/Header/Header.js +3 -17
- package/mobile/dist/components/Header/Header.js.map +1 -1
- package/mobile/dist/components/Header/HeaderContent.d.ts +13 -1
- package/mobile/dist/components/Header/HeaderTop.d.ts +6 -2
- package/mobile/dist/components/Header/HeaderTop.js +15 -2
- package/mobile/dist/components/Header/HeaderTop.js.map +1 -1
- package/mobile/dist/components/Headline/headlineVersionStyles.js +6 -6
- package/mobile/dist/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductGallery/ProductGallery.js +4 -17
- package/mobile/dist/components/ProductGallery/ProductGallery.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/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/Heading/Heading.js +12 -11
- package/mobile/dist/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/dist/ui-kit/Heading/headingTag.d.ts +2 -0
- package/mobile/dist/ui-kit/Heading/headingTag.js +13 -0
- package/mobile/dist/ui-kit/Heading/headingTag.js.map +1 -0
- package/mobile/dist/ui-kit/Img/ImgAsPicture.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +2 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js +25 -0
- package/mobile/lib/components/Calculator/checkCreditSourceBookRowCommonParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.d.ts +9 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.js +7 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorLimitParams.js.map +1 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.d.ts +11 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.js +11 -0
- package/mobile/lib/components/Calculator/getCreditCalculatorRateParams.js.map +1 -0
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +2 -2
- package/mobile/lib/components/Calculator/rangeHelpers.js +4 -4
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +27 -39
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +1 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/Header/Header.d.ts +2 -2
- package/mobile/lib/components/Header/Header.js +4 -18
- package/mobile/lib/components/Header/Header.js.map +1 -1
- package/mobile/lib/components/Header/HeaderContent.d.ts +13 -1
- package/mobile/lib/components/Header/HeaderTop.d.ts +6 -2
- package/mobile/lib/components/Header/HeaderTop.js +15 -2
- package/mobile/lib/components/Header/HeaderTop.js.map +1 -1
- package/mobile/lib/components/Headline/headlineVersionStyles.js +6 -6
- package/mobile/lib/components/Headline/headlineVersionStyles.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductGallery/ProductGallery.js +5 -18
- package/mobile/lib/components/ProductGallery/ProductGallery.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/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/Heading/Heading.js +12 -11
- package/mobile/lib/ui-kit/Heading/Heading.js.map +1 -1
- package/mobile/lib/ui-kit/Heading/headingTag.d.ts +2 -0
- package/mobile/lib/ui-kit/Heading/headingTag.js +10 -0
- package/mobile/lib/ui-kit/Heading/headingTag.js.map +1 -0
- package/mobile/lib/ui-kit/Img/ImgAsPicture.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
- package/mobile/src/components/BaseTile/BaseTile.tsx +6 -3
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/Calculator/checkCreditSourceBookRowCommonParams.ts +47 -0
- package/mobile/src/components/Calculator/getCreditCalculatorLimitParams.ts +24 -0
- package/mobile/src/components/Calculator/getCreditCalculatorRateParams.ts +33 -0
- package/mobile/src/components/Calculator/rangeHelpers.ts +4 -4
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +38 -73
- package/mobile/src/components/Footer/TextInformation.tsx +2 -2
- package/mobile/src/components/Header/Header.tsx +19 -50
- package/mobile/src/components/Header/HeaderContent.ts +15 -1
- package/mobile/src/components/Header/HeaderTop.tsx +62 -25
- package/mobile/src/components/Headline/headlineVersionStyles.ts +6 -6
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/mobile/src/components/ProductGallery/ProductGallery.tsx +18 -59
- package/mobile/src/content-page-repository/transformImg.ts +1 -1
- package/mobile/src/icons/ChevronLeft.svg +3 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/ui-kit/Heading/Heading.tsx +17 -16
- package/mobile/src/ui-kit/Heading/headingTag.ts +12 -0
- package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +1 -1
- package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/package.json +1 -1
- package/src/components/BaseTile/BaseTile.tsx +6 -3
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Calculator/checkCreditSourceBookRowCommonParams.ts +47 -0
- package/src/components/Calculator/getCreditCalculatorLimitParams.ts +24 -0
- package/src/components/Calculator/getCreditCalculatorRateParams.ts +33 -0
- package/src/components/Calculator/rangeHelpers.ts +4 -4
- package/src/components/Calculator/useCreditCalculatorParams.ts +38 -73
- package/src/components/Footer/TextInformation.tsx +2 -2
- package/src/components/Header/Header.fixture.mobile.tsx +4 -0
- package/src/components/Header/Header.mobile.tsx +19 -50
- package/src/components/Header/HeaderContent.ts +15 -1
- package/src/components/Header/HeaderTop.tsx +62 -25
- package/src/components/Headline/headlineVersionStyles.ts +6 -6
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/ProductGallery/ProductGallery.fixture.mobile.tsx +142 -0
- package/src/components/ProductGallery/ProductGallery.mobile.tsx +34 -0
- package/src/content-page-repository/transformImg.ts +1 -1
- package/src/icons/ChevronLeft.svg +3 -0
- package/src/icons/IconName.ts +5 -1
- package/src/ui-kit/Heading/Heading.fixture.mobile.tsx +6 -6
- package/src/ui-kit/Heading/Heading.fixture.tsx +6 -6
- package/src/ui-kit/Heading/Heading.tsx +8 -3
- package/src/ui-kit/Heading/headingTag.mobile.ts +12 -0
- package/src/ui-kit/Heading/headingTag.ts +3 -0
- package/src/ui-kit/Img/ImgAsPicture.tsx +1 -1
- package/src/ui-kit/InnerTable/InnerTableButton.tsx +1 -1
- package/tailwind.config.cjs +10 -19
- package/bundle/ui-kit/Heading/Heading.mobile.d.ts +0 -2
- package/dist/ui-kit/Heading/Heading.mobile.d.ts +0 -2
- package/dist/ui-kit/Heading/Heading.mobile.js +0 -18
- package/dist/ui-kit/Heading/Heading.mobile.js.map +0 -1
- package/lib/ui-kit/Heading/Heading.mobile.d.ts +0 -2
- package/lib/ui-kit/Heading/Heading.mobile.js +0 -16
- package/lib/ui-kit/Heading/Heading.mobile.js.map +0 -1
- package/src/ui-kit/Heading/Heading.mobile.tsx +0 -22
package/bundle/bundle.umd.js
CHANGED
|
@@ -348,6 +348,8 @@
|
|
|
348
348
|
});
|
|
349
349
|
const groupStyle = (isGroup) => (isGroup ? 'group' : '');
|
|
350
350
|
|
|
351
|
+
const headingTag = (tag) => tag;
|
|
352
|
+
|
|
351
353
|
const styles$4 = {
|
|
352
354
|
h0: 'text-h0',
|
|
353
355
|
h1: 'text-h1',
|
|
@@ -357,7 +359,10 @@
|
|
|
357
359
|
h5: 'text-h5',
|
|
358
360
|
h6: 'text-h6', // 20
|
|
359
361
|
};
|
|
360
|
-
const Heading = JSX(({ className = '', headingType = 'h3', as
|
|
362
|
+
const Heading = JSX(({ className = '', headingType = 'h3', as = 'h3', title, children }) => {
|
|
363
|
+
const Tag = headingTag(as);
|
|
364
|
+
return (jsx(Tag, { className: `font-sans m-0 ${styles$4[headingType]} ${className}`, children: title || children }));
|
|
365
|
+
});
|
|
361
366
|
|
|
362
367
|
const identity = (_) => _;
|
|
363
368
|
|
|
@@ -1054,7 +1059,7 @@
|
|
|
1054
1059
|
const renderImg = (image, imageClassName = '', isMobile = false) => {
|
|
1055
1060
|
const style = {
|
|
1056
1061
|
width: image.size?.width ? `${image.size?.width}px` : '100%',
|
|
1057
|
-
height: image.size?.height ? `${image.size?.height}px` : '
|
|
1062
|
+
height: image.size?.height ? `${image.size?.height}px` : 'auto',
|
|
1058
1063
|
};
|
|
1059
1064
|
const title = image.title || '';
|
|
1060
1065
|
const alt = image.alt || image.title;
|
|
@@ -1195,32 +1200,32 @@
|
|
|
1195
1200
|
XXL: {
|
|
1196
1201
|
title: { headingType: 'h0', as: 'h1' },
|
|
1197
1202
|
descriptionSize: 'text-h5',
|
|
1198
|
-
descriptionStyle: 'mt-
|
|
1203
|
+
descriptionStyle: 'mt-headline-xxl',
|
|
1199
1204
|
},
|
|
1200
1205
|
XL: {
|
|
1201
1206
|
title: { headingType: 'h1', as: 'h1' },
|
|
1202
1207
|
descriptionSize: 'text-xl-light',
|
|
1203
|
-
descriptionStyle: 'mt-
|
|
1208
|
+
descriptionStyle: 'mt-headline-l',
|
|
1204
1209
|
},
|
|
1205
1210
|
L: {
|
|
1206
1211
|
title: { headingType: 'h2', as: 'h2' },
|
|
1207
1212
|
descriptionSize: 'text-xl-light',
|
|
1208
|
-
descriptionStyle: 'mt-
|
|
1213
|
+
descriptionStyle: 'mt-headline-l',
|
|
1209
1214
|
},
|
|
1210
1215
|
M: {
|
|
1211
1216
|
title: { headingType: 'h3', as: 'h3' },
|
|
1212
1217
|
descriptionSize: 'text-xl-light',
|
|
1213
|
-
descriptionStyle: 'mt-
|
|
1218
|
+
descriptionStyle: 'mt-headline-m',
|
|
1214
1219
|
},
|
|
1215
1220
|
S: {
|
|
1216
1221
|
title: { headingType: 'h4', as: 'h4' },
|
|
1217
1222
|
descriptionSize: 'text-xl-light',
|
|
1218
|
-
descriptionStyle: 'mt-
|
|
1223
|
+
descriptionStyle: 'mt-headline-s',
|
|
1219
1224
|
},
|
|
1220
1225
|
XS: {
|
|
1221
1226
|
title: { headingType: 'h5', as: 'h5' },
|
|
1222
1227
|
descriptionSize: 'text-l-light',
|
|
1223
|
-
descriptionStyle: 'mt-
|
|
1228
|
+
descriptionStyle: 'mt-headline-s',
|
|
1224
1229
|
},
|
|
1225
1230
|
};
|
|
1226
1231
|
// TODO Move to Gallery and rename
|
|
@@ -1506,6 +1511,7 @@
|
|
|
1506
1511
|
};
|
|
1507
1512
|
|
|
1508
1513
|
const minBy = (discriminator = defaultDiscriminator) => maxBy((_) => -discriminator(_));
|
|
1514
|
+
const min = minBy();
|
|
1509
1515
|
|
|
1510
1516
|
const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
|
|
1511
1517
|
? {
|
|
@@ -1514,8 +1520,8 @@
|
|
|
1514
1520
|
}
|
|
1515
1521
|
: getRangeByKeys([minKey, maxKey], rateRows);
|
|
1516
1522
|
const getRangeByKeys = ([minKey, maxKey], rows = []) => ({
|
|
1517
|
-
[minKey]: rows.length ?
|
|
1518
|
-
[maxKey]: rows.length ?
|
|
1523
|
+
[minKey]: rows.length ? min(rows.filter((row) => row[minKey]).map((row) => row[minKey])) : 0,
|
|
1524
|
+
[maxKey]: rows.length ? max(rows.filter((row) => row[maxKey]).map((row) => row[maxKey])) : 0,
|
|
1519
1525
|
});
|
|
1520
1526
|
const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
|
|
1521
1527
|
|
|
@@ -1612,6 +1618,45 @@
|
|
|
1612
1618
|
],
|
|
1613
1619
|
});
|
|
1614
1620
|
|
|
1621
|
+
const checkCreditSourceBookRowCommonParams = (props) => checkRowParam({
|
|
1622
|
+
...props,
|
|
1623
|
+
fieldKey: 'isSalaryClient',
|
|
1624
|
+
viewSettingFieldKey: 'isShowSalaryClient',
|
|
1625
|
+
}) &&
|
|
1626
|
+
checkRowParam({
|
|
1627
|
+
...props,
|
|
1628
|
+
fieldKey: 'isStateEmployee',
|
|
1629
|
+
viewSettingFieldKey: 'isShowStateEmployee',
|
|
1630
|
+
}) &&
|
|
1631
|
+
checkRowParam({
|
|
1632
|
+
...props,
|
|
1633
|
+
fieldKey: 'isPensionClient',
|
|
1634
|
+
viewSettingFieldKey: 'isShowPensionClient',
|
|
1635
|
+
}) &&
|
|
1636
|
+
checkRowParam({
|
|
1637
|
+
...props,
|
|
1638
|
+
fieldKey: 'isInsurance',
|
|
1639
|
+
viewSettingFieldKey: 'isShowInsurance',
|
|
1640
|
+
});
|
|
1641
|
+
const checkRowParam = ({ row, userInputParams, paramsViewSettings, fieldKey, viewSettingFieldKey, }) => {
|
|
1642
|
+
const isExclude = paramsViewSettings ? !paramsViewSettings[viewSettingFieldKey] : false;
|
|
1643
|
+
return isExclude || userInputParams[fieldKey] === row[fieldKey];
|
|
1644
|
+
};
|
|
1645
|
+
|
|
1646
|
+
const getCreditCalculatorLimitParams = ({ limitRows, userInputParams, paramsViewSettings, }) => limitRows?.find((row) => checkCreditSourceBookRowCommonParams({
|
|
1647
|
+
row,
|
|
1648
|
+
userInputParams,
|
|
1649
|
+
paramsViewSettings,
|
|
1650
|
+
}));
|
|
1651
|
+
|
|
1652
|
+
const getCreditCalculatorRateParams = ({ rateRows = [], userInputParams, paramsViewSettings, moneyValue, monthsValue, }) => rateRows?.find((row) => checkCreditSourceBookRowCommonParams({
|
|
1653
|
+
row,
|
|
1654
|
+
userInputParams,
|
|
1655
|
+
paramsViewSettings,
|
|
1656
|
+
}) &&
|
|
1657
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
1658
|
+
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
1659
|
+
|
|
1615
1660
|
/**
|
|
1616
1661
|
* Формулы расчёта аннуитетных и дифференцированных платежей:
|
|
1617
1662
|
* https://finuslugi.ru/potrebitelskie_kredity/stat_annuitetnye_i_differentsirovannye_platezhi
|
|
@@ -1631,55 +1676,40 @@
|
|
|
1631
1676
|
};
|
|
1632
1677
|
|
|
1633
1678
|
const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
|
|
1634
|
-
|
|
1679
|
+
let { moneyValue, monthsValue } = userInputParams;
|
|
1635
1680
|
const data = useCalculatorParams(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1681
|
+
const rateRows = data?.rateRows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
|
|
1682
|
+
const limitRows = data?.limitRows || [];
|
|
1683
|
+
const creditCalculatorSourceBookLimitParams = getCreditCalculatorLimitParams({
|
|
1684
|
+
limitRows,
|
|
1638
1685
|
userInputParams,
|
|
1639
1686
|
paramsViewSettings,
|
|
1640
|
-
})
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1687
|
+
});
|
|
1688
|
+
const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], creditCalculatorSourceBookLimitParams, rateRows);
|
|
1689
|
+
const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows);
|
|
1690
|
+
moneyValue = clamp(moneyValue, minSum, maxSum);
|
|
1691
|
+
monthsValue = clamp(monthsValue, minMonths, maxMonths);
|
|
1692
|
+
const creditCalculatorRateParams = getCreditCalculatorRateParams({
|
|
1693
|
+
rateRows,
|
|
1643
1694
|
userInputParams,
|
|
1644
1695
|
paramsViewSettings,
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
const { rate } =
|
|
1696
|
+
moneyValue,
|
|
1697
|
+
monthsValue,
|
|
1698
|
+
});
|
|
1699
|
+
const { rate } = creditCalculatorRateParams;
|
|
1649
1700
|
const monthlyPayment = getMonthlyPayment(rate, userInputParams);
|
|
1650
|
-
const rateRows = data?.rateRows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
|
|
1651
1701
|
return useMemo(() => ({
|
|
1652
|
-
...
|
|
1653
|
-
...getLimitRangeByKeys(['minSum', 'maxSum'], creditCalculatorSourceBookLimitParams, rateRows),
|
|
1654
|
-
...getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows),
|
|
1702
|
+
...creditCalculatorRateParams,
|
|
1655
1703
|
...userInputParams,
|
|
1704
|
+
minSum,
|
|
1705
|
+
maxSum,
|
|
1706
|
+
minMonths,
|
|
1707
|
+
maxMonths,
|
|
1708
|
+
moneyValue,
|
|
1709
|
+
monthsValue,
|
|
1656
1710
|
monthlyPayment,
|
|
1657
1711
|
}), [userInputParams, data]);
|
|
1658
1712
|
};
|
|
1659
|
-
const checkRowCommonParams = (props) => checkRowParam({
|
|
1660
|
-
...props,
|
|
1661
|
-
fieldKey: 'isSalaryClient',
|
|
1662
|
-
viewSettingFieldKey: 'isShowSalaryClient',
|
|
1663
|
-
}) &&
|
|
1664
|
-
checkRowParam({
|
|
1665
|
-
...props,
|
|
1666
|
-
fieldKey: 'isStateEmployee',
|
|
1667
|
-
viewSettingFieldKey: 'isShowStateEmployee',
|
|
1668
|
-
}) &&
|
|
1669
|
-
checkRowParam({
|
|
1670
|
-
...props,
|
|
1671
|
-
fieldKey: 'isPensionClient',
|
|
1672
|
-
viewSettingFieldKey: 'isShowPensionClient',
|
|
1673
|
-
}) &&
|
|
1674
|
-
checkRowParam({
|
|
1675
|
-
...props,
|
|
1676
|
-
fieldKey: 'isInsurance',
|
|
1677
|
-
viewSettingFieldKey: 'isShowInsurance',
|
|
1678
|
-
});
|
|
1679
|
-
const checkRowParam = ({ row, userInputParams, paramsViewSettings, fieldKey, viewSettingFieldKey, }) => {
|
|
1680
|
-
const isExclude = paramsViewSettings ? !paramsViewSettings[viewSettingFieldKey] : false;
|
|
1681
|
-
return isExclude || userInputParams[fieldKey] === row[fieldKey];
|
|
1682
|
-
};
|
|
1683
1713
|
|
|
1684
1714
|
const CreditCalculatorForm = JSX(({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
1685
1715
|
const [userInputParams, { field }] = useForm({
|
|
@@ -2232,7 +2262,8 @@
|
|
|
2232
2262
|
return (jsx(BlockWrapper, { className: style('w-[365px]', className), ...rest, children: jsxs(LinkWrapper, { className: "flex flex-col", href: href, target: target, children: [icon?.icon ? jsx(ImgInner, { image: icon }) : null, icon?.src ? jsx(ImgInner, { image: icon }) : null, title ? (jsx(Heading, { headingType: "h6", as: "h4", className: "text-left pt-3 mb-2", title: title })) : null, description ? (jsx("div", { className: "mb-4", children: jsx(Text, { font: "font-light", size: "text-m", color: "text-secondary-text", children: description }) })) : null] }) }));
|
|
2233
2263
|
});
|
|
2234
2264
|
|
|
2235
|
-
const BaseTile = JSX(({ className, title = '', insetTitle = '', buttons, leftImage, rightImage, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col font-sans', className), children: [backImage ? jsx("div", { className: "absolute bottom-0 right-0 z-0", children: backImage }) : null, title, jsxs("div", { className: "grow relative flex flex-wrap justify-between items-stretch gap-8", children: [leftImage, jsxs("div", { className: style('flex flex-col gap-8', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), buttons] }), rightImage
|
|
2265
|
+
const BaseTile = JSX(({ className, title = '', insetTitle = '', buttons, leftImage, rightImage, backImage, children, }) => (jsxs("div", { className: style('relative flex flex-col font-sans', className), children: [backImage ? jsx("div", { className: "absolute bottom-0 right-0 z-0", children: backImage }) : null, title, jsxs("div", { className: "grow relative flex flex-wrap sm:flex-nowrap justify-between items-stretch gap-8", children: [renderImageContainer(leftImage), jsxs("div", { className: style('flex flex-col gap-8', leftImage ? '' : 'grow'), children: [insetTitle, jsx("div", { className: "grow", children: children }), buttons] }), renderImageContainer(rightImage, { className: '-order-1 sm:order-1' })] })] })));
|
|
2266
|
+
const renderImageContainer = (image, { className } = {}) => image ? jsx("div", { className: style('flex-none', className), children: image }) : null;
|
|
2236
2267
|
|
|
2237
2268
|
const getItemListFontSize = (colValue) => (colValue === 1 ? 'text-h6' : 'text-l');
|
|
2238
2269
|
const cardColumnsModeStyleMap = {
|
|
@@ -3185,7 +3216,7 @@
|
|
|
3185
3216
|
|
|
3186
3217
|
const textInformationTextSize = 'text-xs-light';
|
|
3187
3218
|
|
|
3188
|
-
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: className, children: [jsx("div", { className: "pt-
|
|
3219
|
+
const TextInformation = JSX(({ className = '', links }) => (jsxs("div", { className: className, children: [jsx("div", { className: "pt-4 xl:pt-5", children: jsx(Text, { size: textInformationTextSize, color: "text-secondary-text", children: `\u00a9\u00A02000-${new Date().getFullYear()}\u00A0АО \u00ABРоссельхозбанк\u00BB Генеральная лицензия Банка России \u2116\u00A03349 от\u00A012.08.2015\u00A0г.` }) }), links?.length ? (jsx("div", { className: "flex justify-start items-start gap-5 pt-4", children: links.map((_, i) => (jsx(TextInformationLink, { index: i, ..._ }, String(i)))) })) : null] })));
|
|
3189
3220
|
|
|
3190
3221
|
const LEFT_COL_WIDTH_FULL_HD = 'w-[204px]';
|
|
3191
3222
|
const Footer = JSX(({ className = '', ...rest }) => {
|
|
@@ -4116,7 +4147,7 @@
|
|
|
4116
4147
|
const ProductBlockInner = JSX(({ className, version = 'primary', headlineVersion = 'L', title, description, benefits, benefitsVersion, items, isDotted = true, __html, buttons, image, directionRight = true, }) => {
|
|
4117
4148
|
const benefitsWithLabel = benefits?.filter((_) => _.label);
|
|
4118
4149
|
const img = image?.src ? jsx(ImgInner, { className: "mt-[-50px]", image: image }) : null;
|
|
4119
|
-
return (jsxs(BaseTile, { className: className, insetTitle: jsx(Headline, { className: "max-w-[600px] xl:max-w-[
|
|
4150
|
+
return (jsxs(BaseTile, { className: className, insetTitle: jsx(Headline, { className: "max-w-[600px] xl:max-w-[728px]", title: title, description: description, headlineVersion: headlineVersion, align: "text-left", isPadding: false }), ...(directionRight ? { rightImage: img } : { leftImage: img }), buttons: renderButtonsSection(buttons), children: [benefitsWithLabel?.length ? (jsx("div", { className: "flex flex-wrap gap-6", children: benefitsWithLabel.map(renderBenefit$1(version, benefitsVersion)) })) : null, __html ? (jsx("div", { className: "mt-5", children: jsx(RichText, { __html: __html }) })) : null, items?.length ? jsx(List, { className: "mt-5", items: items, isDotted: isDotted }) : null] }));
|
|
4120
4151
|
});
|
|
4121
4152
|
|
|
4122
4153
|
function renderBackwardButton({ text, href, target, icon }, version) {
|
|
@@ -4650,7 +4681,7 @@
|
|
|
4650
4681
|
const COLUMN_WIDTH$1 = 4 * 80 + 40; // w-80 + pl-10 = 360px
|
|
4651
4682
|
|
|
4652
4683
|
const TableInnerButton = JSX(({ isOpen, onClick }) => {
|
|
4653
|
-
return (jsxs(Button, { version: "primary", onClick: onClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать
|
|
4684
|
+
return (jsxs(Button, { version: "primary", onClick: onClick, className: "w-full flex items-center justify-center rounded-none py-5", children: [jsx("div", { className: "text-h4", children: isOpen ? 'Скрыть' : 'Показать' }), jsx(Icon, { name: isOpen ? 'ArrowUpIcon' : 'ArrowDownIcon', className: "ml-3", iconVersion: "white", width: "20", height: "20" })] }));
|
|
4654
4685
|
});
|
|
4655
4686
|
|
|
4656
4687
|
const renderButtonsCellData = ({ buttons }) => renderButtonsSection(buttons);
|
|
@@ -5069,7 +5100,7 @@
|
|
|
5069
5100
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
5070
5101
|
}
|
|
5071
5102
|
|
|
5072
|
-
const packageVersion = "0.11.
|
|
5103
|
+
const packageVersion = "0.11.2";
|
|
5073
5104
|
|
|
5074
5105
|
exports.Blocks = Blocks;
|
|
5075
5106
|
exports.ContentPage = ContentPage;
|