@redneckz/wildless-cms-uni-blocks 0.9.14 → 0.9.16
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/bundle.umd.js +35 -24
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/constants.d.ts +3 -2
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/bundle/hooks/useLink.d.ts +5 -1
- package/bundle/services/sitemap/SitemapData.d.ts +2 -2
- package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/bundle/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/bundle/utils/adjustHref.d.ts +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +6 -3
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/constants.d.ts +3 -2
- package/dist/components/Calculator/constants.js +7 -6
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js +6 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/dist/components/Footer/TextInformationLink.js +1 -1
- package/dist/components/Footer/TextInformationLink.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js +1 -1
- package/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/dist/components/TariffsTable/TableTileHeader.js +1 -1
- package/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js +1 -1
- package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/dist/hooks/useLink.d.ts +5 -1
- package/dist/hooks/useLink.js +3 -2
- package/dist/hooks/useLink.js.map +1 -1
- package/dist/services/sitemap/SitemapData.d.ts +2 -2
- package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/dist/ui-kit/Sitemap/Sitemap.js +3 -4
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/dist/utils/adjustHref.d.ts +1 -1
- package/dist/utils/adjustHref.js +4 -3
- package/dist/utils/adjustHref.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.js +2 -2
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +8 -5
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/constants.d.ts +3 -2
- package/lib/components/Calculator/constants.js +6 -5
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js +6 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/lib/components/Footer/TextInformationLink.js +1 -1
- package/lib/components/Footer/TextInformationLink.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js +1 -1
- package/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/lib/components/TariffsTable/TableTileHeader.js +1 -1
- package/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js +1 -1
- package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/lib/hooks/useLink.d.ts +5 -1
- package/lib/hooks/useLink.js +3 -2
- package/lib/hooks/useLink.js.map +1 -1
- package/lib/services/sitemap/SitemapData.d.ts +2 -2
- package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/lib/ui-kit/Sitemap/Sitemap.js +3 -4
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/lib/utils/adjustHref.d.ts +1 -1
- package/lib/utils/adjustHref.js +4 -3
- package/lib/utils/adjustHref.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +14 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/constants.d.ts +3 -2
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/mobile/bundle/hooks/useLink.d.ts +5 -1
- package/mobile/bundle/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/mobile/bundle/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/mobile/bundle/utils/adjustHref.d.ts +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +6 -3
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.d.ts +3 -2
- package/mobile/dist/components/Calculator/constants.js +7 -6
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +6 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.js +1 -1
- package/mobile/dist/components/Footer/TextInformationLink.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.js +1 -1
- package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/dist/hooks/useLink.d.ts +5 -1
- package/mobile/dist/hooks/useLink.js +3 -2
- package/mobile/dist/hooks/useLink.js.map +1 -1
- package/mobile/dist/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +3 -4
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/dist/utils/adjustHref.d.ts +1 -1
- package/mobile/dist/utils/adjustHref.js +4 -3
- package/mobile/dist/utils/adjustHref.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +2 -2
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +2 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +8 -5
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.d.ts +3 -2
- package/mobile/lib/components/Calculator/constants.js +6 -5
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +6 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.js +1 -1
- package/mobile/lib/components/Footer/TextInformationLink.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsListItemBase.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.js +1 -1
- package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
- package/mobile/lib/hooks/useLink.d.ts +5 -1
- package/mobile/lib/hooks/useLink.js +3 -2
- package/mobile/lib/hooks/useLink.js.map +1 -1
- package/mobile/lib/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +2 -2
- package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.d.ts +2 -2
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +3 -4
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js +1 -1
- package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
- package/mobile/lib/utils/adjustHref.d.ts +1 -1
- package/mobile/lib/utils/adjustHref.js +4 -3
- package/mobile/lib/utils/adjustHref.js.map +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +2 -2
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +2 -2
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +8 -5
- package/mobile/src/components/Calculator/constants.ts +6 -5
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +9 -1
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +6 -6
- package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +1 -1
- package/mobile/src/components/Footer/TextInformationLink.tsx +1 -1
- package/mobile/src/components/LinkDocs/LinkDocsListItemBase.tsx +2 -2
- package/mobile/src/components/TariffsTable/TableTileHeader.tsx +1 -3
- package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +3 -3
- package/mobile/src/hooks/useLink.ts +9 -2
- package/mobile/src/services/sitemap/SitemapData.ts +2 -2
- package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +5 -5
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +6 -7
- package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/mobile/src/utils/adjustHref.ts +16 -11
- package/package.json +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +2 -2
- package/src/components/Calculator/CreditCalculatorForm.tsx +2 -2
- package/src/components/Calculator/DepositCalculatorForm.tsx +8 -5
- package/src/components/Calculator/constants.ts +6 -5
- package/src/components/Calculator/useDepositCalculatorParams.ts +9 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.example.json +6 -6
- package/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +1 -1
- package/src/components/Footer/TextInformationLink.tsx +1 -1
- package/src/components/LinkDocs/LinkDocsListItemBase.tsx +2 -2
- package/src/components/TariffsTable/TableTileHeader.tsx +1 -3
- package/src/components/TariffsTable/TariffsTableRow.tsx +3 -3
- package/src/hooks/useLink.ts +9 -2
- package/src/services/sitemap/SitemapData.ts +2 -2
- package/src/ui-kit/SearchDialog/SearchDialog.tsx +5 -5
- package/src/ui-kit/Sitemap/Sitemap.tsx +6 -7
- package/src/ui-kit/TopItem/TopItem.tsx +1 -1
- package/src/utils/adjustHref.ts +16 -11
- package/bundle/components/Calculator/getDefaultSum.d.ts +0 -1
- package/dist/components/Calculator/getDefaultSum.d.ts +0 -1
- package/dist/components/Calculator/getDefaultSum.js +0 -6
- package/dist/components/Calculator/getDefaultSum.js.map +0 -1
- package/lib/components/Calculator/getDefaultSum.d.ts +0 -1
- package/lib/components/Calculator/getDefaultSum.js +0 -3
- package/lib/components/Calculator/getDefaultSum.js.map +0 -1
- package/mobile/bundle/components/Calculator/getDefaultSum.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultSum.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultSum.js +0 -6
- package/mobile/dist/components/Calculator/getDefaultSum.js.map +0 -1
- package/mobile/lib/components/Calculator/getDefaultSum.d.ts +0 -1
- package/mobile/lib/components/Calculator/getDefaultSum.js +0 -3
- package/mobile/lib/components/Calculator/getDefaultSum.js.map +0 -1
- package/mobile/src/components/Calculator/getDefaultSum.ts +0 -4
- package/src/components/Calculator/getDefaultSum.ts +0 -4
package/bundle/bundle.umd.js
CHANGED
|
@@ -503,13 +503,14 @@
|
|
|
503
503
|
joinPath: joinPath
|
|
504
504
|
});
|
|
505
505
|
|
|
506
|
-
const adjustHref = (router) => (href) => {
|
|
507
|
-
if (!href || isURL(href) || (
|
|
506
|
+
const adjustHref = (router) => (href, basePath = projectSettings.BASE_PATH) => {
|
|
507
|
+
if (!href || isURL(href) || hasPrefix(href, projectSettings.CDN)) {
|
|
508
508
|
return href;
|
|
509
509
|
}
|
|
510
510
|
const isRelativeToBase = href.startsWith('/');
|
|
511
|
-
return joinPath(
|
|
511
|
+
return joinPath(hasPrefix(href, basePath) ? '' : basePath, isRelativeToBase ? '/' : dirname(router.pathname), href);
|
|
512
512
|
};
|
|
513
|
+
const hasPrefix = (href, prefix) => prefix && href && href.startsWith(prefix);
|
|
513
514
|
|
|
514
515
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
515
516
|
const handlerDecorator = (handler, targetContent) => {
|
|
@@ -538,12 +539,13 @@
|
|
|
538
539
|
useRouter._impl = impl;
|
|
539
540
|
};
|
|
540
541
|
|
|
541
|
-
function useLink(
|
|
542
|
+
function useLink(params = {}) {
|
|
543
|
+
const { isRemote, basePath } = params;
|
|
542
544
|
const router = useRouter();
|
|
543
545
|
const { close } = useDialog();
|
|
544
546
|
return (props) => ({
|
|
545
547
|
...props,
|
|
546
|
-
href: isRemote ? props.href : adjustHref(router)(props.href),
|
|
548
|
+
href: isRemote ? props.href : adjustHref(router)(props.href, basePath),
|
|
547
549
|
'aria-label': props.text,
|
|
548
550
|
onClick: handlerDecorator(handleHref(props), props),
|
|
549
551
|
});
|
|
@@ -1178,7 +1180,7 @@
|
|
|
1178
1180
|
|
|
1179
1181
|
const BonusBenefitsBlock = JSX(({ bonusBenefits, cardTextAlign = 'center', className = '', columnsCount = '4', subtitle, title, ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text bg-white p-12 flex flex-col text-center ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-8", title: title, description: subtitle, headlineVersion: "M" }), bonusBenefits?.length ? (jsx("div", { className: `grid gap-1 ${AlignText[cardTextAlign]} ${getElementsColsValue(columnsCount)}`, children: bonusBenefits.map(renderBonusBenefit) })) : null] })));
|
|
1180
1182
|
const renderBonusBenefit = ({ icon, title, description }, i) => {
|
|
1181
|
-
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180",
|
|
1183
|
+
return (jsxs("div", { className: style('flex flex-col items-center text-h6', !description && !title ? 'justify-center' : ''), children: [title ? jsx("span", { children: title }) : null, icon ? jsx(ImgInner, { image: icon, height: "180", className: "w-auto" }) : null, description ? jsx("span", { children: description }) : null] }, String(i)));
|
|
1182
1184
|
};
|
|
1183
1185
|
const getElementsColsValue = (colValue) => {
|
|
1184
1186
|
switch (colValue) {
|
|
@@ -1242,9 +1244,10 @@
|
|
|
1242
1244
|
|
|
1243
1245
|
const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => (jsxs("div", { className: style('mb-7', className), children: [title ? (jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title })) : null, value ? (jsx("div", { children: jsxs(Text, { size: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] }) })) : (jsx("div", { children: jsx(Text, { size: "text-h3", children: "-" }) }))] })));
|
|
1244
1246
|
|
|
1245
|
-
const DEFAULT_MIN_SUM =
|
|
1247
|
+
const DEFAULT_MIN_SUM = 10000;
|
|
1246
1248
|
const DEFAULT_MAX_SUM = 5000000;
|
|
1247
|
-
const
|
|
1249
|
+
const CREDIT_DEFAULT_SUM = 200000;
|
|
1250
|
+
const DEPOSIT_DEFAULT_SUM = 20000;
|
|
1248
1251
|
const DEFAULT_MIN_MONTHS = 13;
|
|
1249
1252
|
const DEFAULT_MAX_MONTHS = 60;
|
|
1250
1253
|
const DEFAULT_MONTHS = Math.round((DEFAULT_MAX_MONTHS - DEFAULT_MIN_MONTHS) / 2);
|
|
@@ -1262,10 +1265,10 @@
|
|
|
1262
1265
|
maxSum: DEFAULT_MAX_SUM,
|
|
1263
1266
|
minMonths: DEFAULT_MIN_MONTHS,
|
|
1264
1267
|
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1265
|
-
rate:
|
|
1266
|
-
isSalaryClient:
|
|
1268
|
+
rate: 12.5,
|
|
1269
|
+
isSalaryClient: false,
|
|
1267
1270
|
isPensionClient: false,
|
|
1268
|
-
isStateEmployee:
|
|
1271
|
+
isStateEmployee: false,
|
|
1269
1272
|
isInsurance: true,
|
|
1270
1273
|
};
|
|
1271
1274
|
const DEFAULT_TRAVEL_MIN_SUM = 6000;
|
|
@@ -1662,7 +1665,7 @@
|
|
|
1662
1665
|
const handleIsPensionClient = useCallback((_) => toggleIsPensionClient(_), []);
|
|
1663
1666
|
const [isInsurance, toggleIsInsurance] = useState(true);
|
|
1664
1667
|
const handleIsInsurance = useCallback((_) => toggleIsInsurance(_), []);
|
|
1665
|
-
const [moneyValue, setMoneyValue] = useState(
|
|
1668
|
+
const [moneyValue, setMoneyValue] = useState(CREDIT_DEFAULT_SUM);
|
|
1666
1669
|
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
1667
1670
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1668
1671
|
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
@@ -1713,6 +1716,9 @@
|
|
|
1713
1716
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
|
|
1714
1717
|
const { moneyValue, monthsValue } = userInputParams;
|
|
1715
1718
|
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
1719
|
+
const defaultMonth = data?.rows[0]
|
|
1720
|
+
? getMiddleMonth(data.rows[0].minMonths, data.rows[0].maxMonths)
|
|
1721
|
+
: 1;
|
|
1716
1722
|
const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
|
|
1717
1723
|
const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
|
|
1718
1724
|
const depositCalculatorSourceBookParams = data?.rows?.find((row) => checkRowByParam({
|
|
@@ -1728,7 +1734,7 @@
|
|
|
1728
1734
|
isExclude: isExcludeRemoteRegistration,
|
|
1729
1735
|
}) &&
|
|
1730
1736
|
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row) &&
|
|
1731
|
-
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
1737
|
+
checkRangeByKeys(monthsValue || defaultMonth, ['minMonths', 'maxMonths'], row)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
1732
1738
|
const { rate } = depositCalculatorSourceBookParams;
|
|
1733
1739
|
const income = getDepositIncome(rate, userInputParams);
|
|
1734
1740
|
const finalSum = moneyValue + income;
|
|
@@ -1739,6 +1745,7 @@
|
|
|
1739
1745
|
...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
|
|
1740
1746
|
availableMonths: mergeIntervals(sourceBookRows.map((row) => [row['minMonths'], row['maxMonths']])).flatMap(([start, end]) => arrayByRange(start, end)),
|
|
1741
1747
|
...userInputParams,
|
|
1748
|
+
defaultMonth,
|
|
1742
1749
|
income,
|
|
1743
1750
|
finalSum,
|
|
1744
1751
|
};
|
|
@@ -1756,11 +1763,12 @@
|
|
|
1756
1763
|
}
|
|
1757
1764
|
};
|
|
1758
1765
|
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
1766
|
+
const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
|
|
1759
1767
|
|
|
1760
1768
|
const DepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, paramsViewSettings }) => {
|
|
1761
|
-
const [moneyValue, setMoneyValue] = useState(
|
|
1769
|
+
const [moneyValue, setMoneyValue] = useState(DEPOSIT_DEFAULT_SUM);
|
|
1762
1770
|
const handleMoneyValue = useCallback((_) => setMoneyValue(_), []);
|
|
1763
|
-
const [monthsValue, setMonthsValue] = useState(
|
|
1771
|
+
const [monthsValue, setMonthsValue] = useState(0);
|
|
1764
1772
|
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
1765
1773
|
const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
|
|
1766
1774
|
const [isRemoteRegistration, toggleIsRemoteRegistration] = useState(false);
|
|
@@ -1773,7 +1781,10 @@
|
|
|
1773
1781
|
};
|
|
1774
1782
|
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1775
1783
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir, paramsViewSettings);
|
|
1776
|
-
const { income, finalSum, rate } = calculatorParams;
|
|
1784
|
+
const { defaultMonth, income, finalSum, rate } = calculatorParams;
|
|
1785
|
+
useEffect(() => {
|
|
1786
|
+
setMonthsValue(defaultMonth);
|
|
1787
|
+
}, [defaultMonth]);
|
|
1777
1788
|
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма вклада, ₽', {
|
|
1778
1789
|
...calculatorParams,
|
|
1779
1790
|
}, handleMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
@@ -3031,7 +3042,7 @@
|
|
|
3031
3042
|
}
|
|
3032
3043
|
|
|
3033
3044
|
const Sitemap = JSX(({ className, topItems }) => {
|
|
3034
|
-
const link = useLink(true);
|
|
3045
|
+
const link = useLink({ isRemote: true });
|
|
3035
3046
|
return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
|
|
3036
3047
|
});
|
|
3037
3048
|
const renderColumn = (menuItem, index) => {
|
|
@@ -3040,9 +3051,9 @@
|
|
|
3040
3051
|
};
|
|
3041
3052
|
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
3042
3053
|
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
3043
|
-
const link = useLink(isAnotherPortal);
|
|
3054
|
+
const link = useLink({ isRemote: isAnotherPortal });
|
|
3044
3055
|
const { href, target, onClick } = link(rest);
|
|
3045
|
-
return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href:
|
|
3056
|
+
return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
3046
3057
|
});
|
|
3047
3058
|
|
|
3048
3059
|
const SearchInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
|
|
@@ -3126,7 +3137,7 @@
|
|
|
3126
3137
|
});
|
|
3127
3138
|
|
|
3128
3139
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
3129
|
-
const link = useLink();
|
|
3140
|
+
const link = useLink({ isRemote: true });
|
|
3130
3141
|
const { href, target, text, onClick } = link(rest);
|
|
3131
3142
|
return (jsx("a", { className: `text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${className}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` }));
|
|
3132
3143
|
});
|
|
@@ -3263,7 +3274,7 @@
|
|
|
3263
3274
|
});
|
|
3264
3275
|
|
|
3265
3276
|
const TopItem = JSX(({ className = '', active, flat, children, ...rest }) => {
|
|
3266
|
-
const link = useLink(true);
|
|
3277
|
+
const link = useLink({ isRemote: true });
|
|
3267
3278
|
const { href, target, text, onClick } = link(rest);
|
|
3268
3279
|
return (jsx("a", { className: style(getLinkStyle(active, flat), className), href: href, target: target, onClick: onClick, rel: "noopener noreferrer", "aria-label": text, children: jsx("span", { className: getTextStyle$1(active, flat), children: text || children }) }));
|
|
3269
3280
|
});
|
|
@@ -3551,7 +3562,7 @@
|
|
|
3551
3562
|
|
|
3552
3563
|
const LinkDocsListItemBase = JSX(({ className, iconClassName, textClassName, suffixClassName, doc, icon }) => {
|
|
3553
3564
|
const { text, fileSize, ...linkProps } = doc;
|
|
3554
|
-
return (jsxs("a", { className: className, role: "link", ...linkProps, children: [icon ? (jsx(ImgInner, { className: iconClassName, image: getIconWithVersion(icon), width: "
|
|
3565
|
+
return (jsxs("a", { className: className, role: "link", ...linkProps, children: [icon ? (jsx(ImgInner, { className: iconClassName, image: getIconWithVersion(icon), width: "24", height: "24", asSVG: true })) : null, text ? (jsxs("span", { className: textClassName, children: [text, jsx("span", { className: suffixClassName, children: linkProps?.href && formatSuffix(getExtFromHref(linkProps.href), fileSize) })] })) : null] }));
|
|
3555
3566
|
});
|
|
3556
3567
|
const formatSuffix = (ext, fileSize) => {
|
|
3557
3568
|
const prefix = ext || fileSize ? ',' : '';
|
|
@@ -4713,7 +4724,7 @@
|
|
|
4713
4724
|
const [openTableInnerIdx, setOpenTableInnerIdx] = useState(undefined);
|
|
4714
4725
|
const handleOpenTableInnerIdx = useCallback((_) => setOpenTableInnerIdx(_), []);
|
|
4715
4726
|
const onHideContentClick = () => setTableInner(undefined);
|
|
4716
|
-
return (jsxs(TariffsTableRowContainer, { onHideContentClick: onHideContentClick, tableInner: tableInner, ...rest, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(ImgInner, { className: "mr-3.5 max-w-6
|
|
4727
|
+
return (jsxs(TariffsTableRowContainer, { onHideContentClick: onHideContentClick, tableInner: tableInner, ...rest, children: [jsx("div", { className: `text-s py-5 ${FIRST_CELL_CLASSES} ${DIVIDER_CLASSES}`, children: jsxs("div", { className: "flex items-center text-primary-text", role: "cell", children: [header?.icon ? (jsx(ImgInner, { className: "mr-3.5 max-w-6", image: getIconWithVersion(header.icon), width: "24", height: "24", asSVG: true })) : null, header?.title ? jsx("div", { className: "text-m-light", children: header?.title }) : null] }) }), data?.length ? (jsx(TableCarouselContainer, { activeIndex: activeIndex, columnWidth: COLUMN_WIDTH$1, version: "tariff", children: data.map((cells, i) => (jsx(TariffsTableCell, { cells: cells, rowIdx: rowIdx, cellIdx: i, setTableInner: handleSetTableInner, tableInner: tableInner, openTableInnerIdx: openTableInnerIdx, setOpenTableInnerIdx: handleOpenTableInnerIdx, ...rest }, String(i)))) })) : null] }));
|
|
4717
4728
|
});
|
|
4718
4729
|
|
|
4719
4730
|
const TariffsTable = JSX(({ className = '', title, description, rowHeaders, tariffsColumns: columns, hiddenRowsNum = 0, ...rest }) => {
|
|
@@ -4974,7 +4985,7 @@
|
|
|
4974
4985
|
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" }) }));
|
|
4975
4986
|
}
|
|
4976
4987
|
|
|
4977
|
-
const packageVersion = "0.9.
|
|
4988
|
+
const packageVersion = "0.9.16";
|
|
4978
4989
|
|
|
4979
4990
|
exports.Blocks = Blocks;
|
|
4980
4991
|
exports.ContentPage = ContentPage;
|