@redneckz/wildless-cms-uni-blocks 0.8.20 → 0.8.21
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 +83 -40
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/bundle/components/Calculator/constants.d.ts +2 -2
- package/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
- package/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/dist/components/Calculator/CreditCalculatorForm.js +7 -15
- package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/DepositCalculatorForm.js +13 -1
- package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/constants.d.ts +2 -2
- package/dist/components/Calculator/constants.js +6 -7
- package/dist/components/Calculator/constants.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.js +1 -1
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/dist/components/Calculator/renderInterestPayment.js +2 -2
- package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
- package/dist/components/Calculator/renderPaymentType.d.ts +12 -0
- package/dist/components/Calculator/renderPaymentType.js +22 -0
- package/dist/components/Calculator/renderPaymentType.js.map +1 -0
- package/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/dist/components/Calculator/renderRegistrationType.js +22 -0
- package/dist/components/Calculator/renderRegistrationType.js.map +1 -0
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
- package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
- package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/dist/components/Footer/Contacts.js +1 -1
- package/dist/components/Footer/Contacts.js.map +1 -1
- package/dist/components/Footer/Sitemap.js +7 -5
- package/dist/components/Footer/Sitemap.js.map +1 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
- package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/lib/components/Calculator/CreditCalculatorForm.js +6 -14
- package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/DepositCalculatorForm.js +13 -1
- package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/constants.d.ts +2 -2
- package/lib/components/Calculator/constants.js +6 -7
- package/lib/components/Calculator/constants.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.js +1 -1
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/lib/components/Calculator/renderInterestPayment.js +2 -2
- package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
- package/lib/components/Calculator/renderPaymentType.d.ts +12 -0
- package/lib/components/Calculator/renderPaymentType.js +19 -0
- package/lib/components/Calculator/renderPaymentType.js.map +1 -0
- package/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/lib/components/Calculator/renderRegistrationType.js +19 -0
- package/lib/components/Calculator/renderRegistrationType.js.map +1 -0
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
- package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
- package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/lib/components/Footer/Contacts.js +1 -1
- package/lib/components/Footer/Contacts.js.map +1 -1
- package/lib/components/Footer/Sitemap.js +7 -5
- package/lib/components/Footer/Sitemap.js.map +1 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
- package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +2 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/mobile/bundle/components/Calculator/constants.d.ts +2 -2
- package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
- package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js +7 -15
- package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -1
- package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/constants.d.ts +2 -2
- package/mobile/dist/components/Calculator/constants.js +6 -7
- package/mobile/dist/components/Calculator/constants.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.js +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/mobile/dist/components/Calculator/renderInterestPayment.js +2 -2
- package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
- package/mobile/dist/components/Calculator/renderPaymentType.d.ts +12 -0
- package/mobile/dist/components/Calculator/renderPaymentType.js +22 -0
- package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -0
- package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/mobile/dist/components/Calculator/renderRegistrationType.js +22 -0
- package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -0
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
- package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
- package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/Footer/Contacts.js +1 -1
- package/mobile/dist/components/Footer/Contacts.js.map +1 -1
- package/mobile/dist/components/Footer/Sitemap.js +7 -5
- package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
- package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js +6 -14
- package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js +13 -1
- package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/constants.d.ts +2 -2
- package/mobile/lib/components/Calculator/constants.js +6 -7
- package/mobile/lib/components/Calculator/constants.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.js +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
- package/mobile/lib/components/Calculator/renderInterestPayment.js +2 -2
- package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
- package/mobile/lib/components/Calculator/renderPaymentType.d.ts +12 -0
- package/mobile/lib/components/Calculator/renderPaymentType.js +19 -0
- package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -0
- package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
- package/mobile/lib/components/Calculator/renderRegistrationType.js +19 -0
- package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -0
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
- package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
- package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/Footer/Contacts.js +1 -1
- package/mobile/lib/components/Footer/Contacts.js.map +1 -1
- package/mobile/lib/components/Footer/Sitemap.js +7 -5
- package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
- package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
- package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
- package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
- package/mobile/src/components/Calculator/constants.ts +6 -7
- package/mobile/src/components/Calculator/rangeHelpers.ts +1 -1
- package/mobile/src/components/Calculator/renderInterestPayment.tsx +21 -9
- package/mobile/src/components/Calculator/renderPaymentType.tsx +49 -0
- package/mobile/src/components/Calculator/renderRegistrationType.tsx +51 -0
- package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
- package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
- package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
- package/mobile/src/components/Footer/Contacts.tsx +1 -1
- package/mobile/src/components/Footer/Sitemap.tsx +10 -5
- package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
- package/package.json +1 -1
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
- package/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
- package/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
- package/src/components/Calculator/constants.ts +6 -7
- package/src/components/Calculator/rangeHelpers.ts +1 -1
- package/src/components/Calculator/renderInterestPayment.tsx +21 -9
- package/src/components/Calculator/renderPaymentType.tsx +49 -0
- package/src/components/Calculator/renderRegistrationType.tsx +51 -0
- package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
- package/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
- package/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
- package/src/components/Footer/Contacts.tsx +1 -1
- package/src/components/Footer/Sitemap.tsx +10 -5
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +22 -5
- package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -1317,8 +1317,8 @@
|
|
|
1317
1317
|
|
|
1318
1318
|
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: "-" }) }))] })));
|
|
1319
1319
|
|
|
1320
|
-
const DEFAULT_MIN_SUM =
|
|
1321
|
-
const DEFAULT_MAX_SUM =
|
|
1320
|
+
const DEFAULT_MIN_SUM = 30000;
|
|
1321
|
+
const DEFAULT_MAX_SUM = 5000000;
|
|
1322
1322
|
const DEFAULT_SUM = (DEFAULT_MAX_SUM - DEFAULT_MIN_SUM) / 2;
|
|
1323
1323
|
const DEFAULT_MIN_MONTHS = 13;
|
|
1324
1324
|
const DEFAULT_MAX_MONTHS = 60;
|
|
@@ -1337,12 +1337,10 @@
|
|
|
1337
1337
|
maxSum: DEFAULT_MAX_SUM,
|
|
1338
1338
|
minMonths: DEFAULT_MIN_MONTHS,
|
|
1339
1339
|
maxMonths: DEFAULT_MAX_MONTHS,
|
|
1340
|
-
|
|
1341
|
-
rateTopRange: 7,
|
|
1340
|
+
rate: 0,
|
|
1342
1341
|
isSalaryClient: true,
|
|
1343
1342
|
isStateEmployee: true,
|
|
1344
1343
|
isInsurance: true,
|
|
1345
|
-
sumBorder: 999999,
|
|
1346
1344
|
};
|
|
1347
1345
|
const DEFAULT_TRAVEL_MIN_SUM = 6000;
|
|
1348
1346
|
const DEFAULT_REST_MIN_SUM = 6000;
|
|
@@ -1363,15 +1361,16 @@
|
|
|
1363
1361
|
maxSum: 5000000,
|
|
1364
1362
|
minMonths: 2,
|
|
1365
1363
|
maxMonths: 120,
|
|
1366
|
-
rate:
|
|
1364
|
+
rate: 0,
|
|
1367
1365
|
isMonthlyInterestPayment: true,
|
|
1366
|
+
isRemoteRegistration: true,
|
|
1368
1367
|
};
|
|
1369
1368
|
const DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS = {
|
|
1370
1369
|
minSum: 1000,
|
|
1371
1370
|
maxSum: 500000,
|
|
1372
1371
|
minDays: BUSINESS_MIN_DAYS,
|
|
1373
1372
|
maxDays: BUSINESS_MAX_DAYS,
|
|
1374
|
-
rate:
|
|
1373
|
+
rate: 0,
|
|
1375
1374
|
isMonthlyInterestPayment: true,
|
|
1376
1375
|
isReplenished: false,
|
|
1377
1376
|
isPartialWithdrawal: false,
|
|
@@ -1463,7 +1462,11 @@
|
|
|
1463
1462
|
return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${daysText(minDays)}`, `До ${daysText(maxDays)}`], min: minDays, max: maxDays, step: STEP_DAYS, value: clamp(daysValue, minDays, maxDays), onChange: callback }));
|
|
1464
1463
|
}
|
|
1465
1464
|
|
|
1466
|
-
const
|
|
1465
|
+
const orientationStyleMap = {
|
|
1466
|
+
horizontal: 'gap-10',
|
|
1467
|
+
vertical: 'flex-col gap-3',
|
|
1468
|
+
};
|
|
1469
|
+
const RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem, orientation = 'horizontal' }) => (jsx("div", { className: `flex ${orientationStyleMap[orientation]}`, children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
|
|
1467
1470
|
|
|
1468
1471
|
const EVERY_MONTH = 'everyMonth';
|
|
1469
1472
|
const AT_END_TERM = 'atEndTerm';
|
|
@@ -1477,8 +1480,8 @@
|
|
|
1477
1480
|
text: 'В конце срока',
|
|
1478
1481
|
},
|
|
1479
1482
|
];
|
|
1480
|
-
function renderInterestPayment(isMonthlyInterestPayment, callback, title) {
|
|
1481
|
-
return (jsxs("div", { children: [title ? (jsx(Text, { color: "text-secondary-text", font: "font-light", children: title })) : null, jsx("div", {
|
|
1483
|
+
function renderInterestPayment({ isMonthlyInterestPayment, callback, title, orientation = 'horizontal', }) {
|
|
1484
|
+
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => callback && callback(text === EVERY_MONTH) }) })] }));
|
|
1482
1485
|
}
|
|
1483
1486
|
|
|
1484
1487
|
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-1 pt-1 pl-5 pb-1.5", children: jsx(ImgInner, { image: { icon: 'PercentIcon' }, width: "90", height: "85", asSVG: true }) }), jsx("div", { className: "w-[250px] mt-3.5", children: jsxs(Paragraph, { size: "text-xl-light", color: "text-primary-text", children: ["\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043B\u044F \u0441\u0440\u043E\u043A\u0430 ", jsx("strong", { children: "1-30 \u0434\u043D\u0435\u0439" }), " \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0438 \u0432 \u0411\u0430\u043D\u043A"] }) })] })));
|
|
@@ -1492,7 +1495,7 @@
|
|
|
1492
1495
|
[minKey]: rows.length ? minBy()(rows.map((row) => row[minKey])) : 0,
|
|
1493
1496
|
[maxKey]: rows.length ? maxBy()(rows.map((row) => row[maxKey])) : 0,
|
|
1494
1497
|
});
|
|
1495
|
-
const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value
|
|
1498
|
+
const checkRangeByKeys = (value, [minKey, maxKey], sourceBookRow) => value >= sourceBookRow[minKey] && value <= sourceBookRow[maxKey];
|
|
1496
1499
|
|
|
1497
1500
|
const useBusinessDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1498
1501
|
const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isSmallBusiness, isMonthlyInterestPayment, } = userInputParams;
|
|
@@ -1504,7 +1507,7 @@
|
|
|
1504
1507
|
...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
|
|
1505
1508
|
...userInputParams,
|
|
1506
1509
|
isDisabledOperatingDeposit,
|
|
1507
|
-
|
|
1510
|
+
isShowUnknownRate: true,
|
|
1508
1511
|
};
|
|
1509
1512
|
}
|
|
1510
1513
|
const businessDepositCalculatorSourceBookParams = data?.rows?.find((_) => {
|
|
@@ -1566,13 +1569,18 @@
|
|
|
1566
1569
|
isMonthlyInterestPayment,
|
|
1567
1570
|
};
|
|
1568
1571
|
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
1569
|
-
const { income, finalSum, rate, depositeName } = calculatorParams;
|
|
1572
|
+
const { income, finalSum, rate, depositeName, isShowUnknownRate } = calculatorParams;
|
|
1570
1573
|
return (jsxs("section", { className: className, children: [jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "w-[486px]", children: [renderWantedSumInput('Сумма вклада, ₽', calculatorParams, handleMoneyValue), renderDaysInput('Срок вклада, дни', calculatorParams, handleDaysValue), jsxs("div", { className: "mt-7 flex justify-between", children: [renderBusinessDepositParamsForm({
|
|
1571
1574
|
...calculatorParams,
|
|
1572
1575
|
handleIsReplenished,
|
|
1573
1576
|
handleIsPartialWithdrawal,
|
|
1574
1577
|
handleIsSmallBusiness,
|
|
1575
|
-
}), renderInterestPayment(
|
|
1578
|
+
}), renderInterestPayment({
|
|
1579
|
+
isMonthlyInterestPayment,
|
|
1580
|
+
callback: handleIsMonthlyInterestPayment,
|
|
1581
|
+
title: 'Выплата процентов',
|
|
1582
|
+
orientation: 'vertical',
|
|
1583
|
+
})] })] }), isShowUnknownRate ? (jsx(UnknownRate, {})) : (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), jsx("div", { className: "mt-7", children: renderFootnote(footnote) })] })] }), jsx("div", { className: "mt-5", children: renderFootnote(bottomFootnote) })] }));
|
|
1576
1584
|
});
|
|
1577
1585
|
const renderBusinessDepositParamsForm = ({ isDisabledOperatingDeposit, isReplenished, isPartialWithdrawal, isSmallBusiness, handleIsReplenished, handleIsPartialWithdrawal, handleIsSmallBusiness, }) => (jsxs("div", { children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: isDisabledOperatingDeposit, checked: isReplenished, onChange: handleIsReplenished }), jsx(Checkbox, { className: "mt-3", disabled: isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", checked: isPartialWithdrawal, onChange: handleIsPartialWithdrawal }), jsx(Checkbox, { className: "mt-3", text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043C\u0430\u043B\u044B\u043C \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435\u043C", checked: isSmallBusiness, onChange: handleIsSmallBusiness })] }));
|
|
1578
1586
|
|
|
@@ -1586,6 +1594,22 @@
|
|
|
1586
1594
|
return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
|
|
1587
1595
|
}
|
|
1588
1596
|
|
|
1597
|
+
const ANNUITY = 'annuity';
|
|
1598
|
+
const DIFFERENTIAL = 'differential';
|
|
1599
|
+
const paymentTypeItems = [
|
|
1600
|
+
{
|
|
1601
|
+
id: ANNUITY,
|
|
1602
|
+
text: 'Аннуитетный',
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
id: DIFFERENTIAL,
|
|
1606
|
+
text: 'Дифференцированный',
|
|
1607
|
+
},
|
|
1608
|
+
];
|
|
1609
|
+
function renderPaymentType({ isAnnuity, callback, title, orientation = 'horizontal', }) {
|
|
1610
|
+
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => callback && callback(text === ANNUITY) })] }));
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1589
1613
|
/**
|
|
1590
1614
|
* Формулы расчёта аннуитетных и дифференцированных платежей:
|
|
1591
1615
|
* https://finuslugi.ru/potrebitelskie_kredity/stat_annuitetnye_i_differentsirovannye_platezhi
|
|
@@ -1611,32 +1635,18 @@
|
|
|
1611
1635
|
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
1612
1636
|
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _));
|
|
1613
1637
|
}) || DEFAULT_CREDIT_CALCULATOR_PARAMS;
|
|
1614
|
-
const {
|
|
1615
|
-
const
|
|
1616
|
-
const monthlyPayment = getMonthlyPayment(finalRate, userInputParams);
|
|
1638
|
+
const { rate } = creditCalculatorSourceBookParams;
|
|
1639
|
+
const monthlyPayment = getMonthlyPayment(rate, userInputParams);
|
|
1617
1640
|
const sourceBookRows = data?.rows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
|
|
1618
1641
|
return {
|
|
1619
1642
|
...creditCalculatorSourceBookParams,
|
|
1620
1643
|
...getRangeByKeys(['minSum', 'maxSum'], sourceBookRows),
|
|
1621
1644
|
...getRangeByKeys(['minMonths', 'maxMonths'], sourceBookRows),
|
|
1622
1645
|
...userInputParams,
|
|
1623
|
-
finalRate,
|
|
1624
1646
|
monthlyPayment,
|
|
1625
1647
|
};
|
|
1626
1648
|
};
|
|
1627
1649
|
|
|
1628
|
-
const ANNUITY = 'annuity';
|
|
1629
|
-
const DIFFERENTIAL = 'differential';
|
|
1630
|
-
const paymentTypeItems = [
|
|
1631
|
-
{
|
|
1632
|
-
id: ANNUITY,
|
|
1633
|
-
text: 'Аннуитетный',
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
id: DIFFERENTIAL,
|
|
1637
|
-
text: 'Дифференцированный',
|
|
1638
|
-
},
|
|
1639
|
-
];
|
|
1640
1650
|
const CreditCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote }) => {
|
|
1641
1651
|
const [isAnnuity, toggleIsAnnuity] = useState(false);
|
|
1642
1652
|
const [isInsurance, toggleIsInsurance] = useState(true);
|
|
@@ -1655,13 +1665,34 @@
|
|
|
1655
1665
|
monthsValue,
|
|
1656
1666
|
};
|
|
1657
1667
|
const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
|
|
1658
|
-
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.
|
|
1668
|
+
return (jsxs("section", { className: style('flex justify-between', className), children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, handleMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, handleMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentType({
|
|
1669
|
+
isAnnuity,
|
|
1670
|
+
orientation: 'vertical',
|
|
1671
|
+
callback: toggleIsAnnuity,
|
|
1672
|
+
}), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1659
1673
|
});
|
|
1660
1674
|
|
|
1675
|
+
const REMOTE_REGISTRATION = 'remote';
|
|
1676
|
+
const OFFICE_REGISTRATION = 'office';
|
|
1677
|
+
const registrationTypeItems = [
|
|
1678
|
+
{
|
|
1679
|
+
id: OFFICE_REGISTRATION,
|
|
1680
|
+
text: 'Офис Банка',
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
id: REMOTE_REGISTRATION,
|
|
1684
|
+
text: 'Дистанционно',
|
|
1685
|
+
},
|
|
1686
|
+
];
|
|
1687
|
+
function renderRegistrationType({ isRemoteRegistration, callback, title, orientation = 'horizontal', }) {
|
|
1688
|
+
return (jsxs("div", { children: [title ? (jsx("div", { className: "mb-3", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx("div", { children: jsx(RadioButtonGroup, { orientation: orientation, items: registrationTypeItems, checkedItem: isRemoteRegistration ? REMOTE_REGISTRATION : OFFICE_REGISTRATION, onChange: (text) => callback && callback(text === REMOTE_REGISTRATION) }) })] }));
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1661
1691
|
const useDepositCalculatorParams = (userInputParams, sourceBookDir) => {
|
|
1662
|
-
const { isMonthlyInterestPayment, moneyValue, monthsValue } = userInputParams;
|
|
1692
|
+
const { isMonthlyInterestPayment, isRemoteRegistration, moneyValue, monthsValue } = userInputParams;
|
|
1663
1693
|
const data = useCalculatorParams(sourceBookDir || DEPOSIT_CALC_DEFAULT_DIR);
|
|
1664
1694
|
const depositCalculatorSourceBookParams = data?.rows?.find((_) => isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
1695
|
+
isRemoteRegistration === _.isRemoteRegistration &&
|
|
1665
1696
|
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
1666
1697
|
checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], _)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
1667
1698
|
const { rate } = depositCalculatorSourceBookParams;
|
|
@@ -1696,10 +1727,13 @@
|
|
|
1696
1727
|
const [monthsValue, setMonthsValue] = useState(DEFAULT_MONTHS);
|
|
1697
1728
|
const [isMonthlyInterestPayment, toggleIsMonthlyInterestPayment] = useState(false);
|
|
1698
1729
|
const handleIsMonthlyInterestPayment = useCallback((_) => toggleIsMonthlyInterestPayment(_), []);
|
|
1730
|
+
const [isRemoteRegistration, toggleIsRemoteRegistration] = useState(false);
|
|
1731
|
+
const handleIsRemoteRegistration = useCallback((_) => toggleIsRemoteRegistration(_), []);
|
|
1699
1732
|
const userInputParams = {
|
|
1700
1733
|
moneyValue,
|
|
1701
1734
|
monthsValue,
|
|
1702
1735
|
isMonthlyInterestPayment,
|
|
1736
|
+
isRemoteRegistration,
|
|
1703
1737
|
};
|
|
1704
1738
|
const handleMonthsValue = useCallback((_) => setMonthsValue(_), []);
|
|
1705
1739
|
const calculatorParams = useDepositCalculatorParams(userInputParams, sourceBookDir);
|
|
@@ -1708,7 +1742,15 @@
|
|
|
1708
1742
|
...calculatorParams,
|
|
1709
1743
|
}, handleMoneyValue), renderMonthsInput('Срок вклада, месяцев', {
|
|
1710
1744
|
...calculatorParams,
|
|
1711
|
-
}, handleMonthsValue)
|
|
1745
|
+
}, handleMonthsValue), jsxs("div", { className: "mt-7 flex flex-col gap-y-7", children: [renderInterestPayment({
|
|
1746
|
+
isMonthlyInterestPayment,
|
|
1747
|
+
callback: handleIsMonthlyInterestPayment,
|
|
1748
|
+
title: 'Выплата процентов',
|
|
1749
|
+
}), renderRegistrationType({
|
|
1750
|
+
isRemoteRegistration,
|
|
1751
|
+
callback: handleIsRemoteRegistration,
|
|
1752
|
+
title: 'Оформление',
|
|
1753
|
+
})] })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" }), jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
|
|
1712
1754
|
});
|
|
1713
1755
|
|
|
1714
1756
|
const EmbeddableCalcBlocks = {
|
|
@@ -2540,7 +2582,7 @@
|
|
|
2540
2582
|
|
|
2541
2583
|
const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
|
|
2542
2584
|
|
|
2543
|
-
const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
|
|
2585
|
+
const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "https://www.rshb.ru/feedback/question/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
|
|
2544
2586
|
const renderContact = (item, index) => {
|
|
2545
2587
|
const { type, text, description } = item;
|
|
2546
2588
|
return (jsxs("div", { className: "mb-4", children: [jsx("div", { children: renderText(type, text) }), jsx("div", { className: "mt-1 text-s-light text-secondary-text", children: description })] }, String(index)));
|
|
@@ -2568,18 +2610,19 @@
|
|
|
2568
2610
|
});
|
|
2569
2611
|
|
|
2570
2612
|
const Sitemap = JSX(({ className = '', fallback }) => {
|
|
2571
|
-
const link = useLink();
|
|
2613
|
+
const link = useLink(true);
|
|
2572
2614
|
const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
|
|
2573
2615
|
return (jsx("div", { className: `flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${className}`, children: sitemap.topItems?.map((_, i) => renderColumn(link(_), i)) }));
|
|
2574
2616
|
});
|
|
2575
2617
|
const renderColumn = (menuItem, index) => {
|
|
2576
2618
|
const { text, items, href, target, onClick } = menuItem;
|
|
2577
|
-
return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-3.5", children: [jsx("a", { className: "block leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, index: i }, String(i))))] }, String(index)));
|
|
2619
|
+
return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-3.5", children: [jsx("a", { className: "block leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
|
|
2578
2620
|
};
|
|
2579
|
-
const ColumnItem = JSX(({ text, index, ...rest }) => {
|
|
2580
|
-
const
|
|
2621
|
+
const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
|
|
2622
|
+
const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
2623
|
+
const link = useLink(isAnotherPortal);
|
|
2581
2624
|
const { href, target, onClick } = link(rest);
|
|
2582
|
-
return (jsx("a", { className: "block text-l-light text-secondary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
2625
|
+
return (jsx("a", { className: "block text-l-light text-secondary-text hover:text-primary-main no-underline", href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
|
|
2583
2626
|
});
|
|
2584
2627
|
|
|
2585
2628
|
const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
|
|
@@ -4527,7 +4570,7 @@
|
|
|
4527
4570
|
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" }) }));
|
|
4528
4571
|
}
|
|
4529
4572
|
|
|
4530
|
-
const packageVersion = "0.8.
|
|
4573
|
+
const packageVersion = "0.8.21";
|
|
4531
4574
|
|
|
4532
4575
|
exports.Blocks = Blocks;
|
|
4533
4576
|
exports.ContentPage = ContentPage;
|