@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.
Files changed (201) hide show
  1. package/bundle/bundle.umd.js +83 -40
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  4. package/bundle/components/Calculator/constants.d.ts +2 -2
  5. package/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
  6. package/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
  7. package/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
  8. package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  9. package/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  10. package/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  11. package/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  12. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  13. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  14. package/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  15. package/dist/components/Calculator/CreditCalculatorForm.js +7 -15
  16. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  17. package/dist/components/Calculator/DepositCalculatorForm.js +13 -1
  18. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  19. package/dist/components/Calculator/constants.d.ts +2 -2
  20. package/dist/components/Calculator/constants.js +6 -7
  21. package/dist/components/Calculator/constants.js.map +1 -1
  22. package/dist/components/Calculator/rangeHelpers.js +1 -1
  23. package/dist/components/Calculator/rangeHelpers.js.map +1 -1
  24. package/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
  25. package/dist/components/Calculator/renderInterestPayment.js +2 -2
  26. package/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  27. package/dist/components/Calculator/renderPaymentType.d.ts +12 -0
  28. package/dist/components/Calculator/renderPaymentType.js +22 -0
  29. package/dist/components/Calculator/renderPaymentType.js.map +1 -0
  30. package/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
  31. package/dist/components/Calculator/renderRegistrationType.js +22 -0
  32. package/dist/components/Calculator/renderRegistrationType.js.map +1 -0
  33. package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  34. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  35. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  36. package/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  37. package/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
  38. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  39. package/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  40. package/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
  41. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  42. package/dist/components/Footer/Contacts.js +1 -1
  43. package/dist/components/Footer/Contacts.js.map +1 -1
  44. package/dist/components/Footer/Sitemap.js +7 -5
  45. package/dist/components/Footer/Sitemap.js.map +1 -1
  46. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  47. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  48. package/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  49. package/lib/common.css +1 -1
  50. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  51. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  52. package/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  53. package/lib/components/Calculator/CreditCalculatorForm.js +6 -14
  54. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  55. package/lib/components/Calculator/DepositCalculatorForm.js +13 -1
  56. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  57. package/lib/components/Calculator/constants.d.ts +2 -2
  58. package/lib/components/Calculator/constants.js +6 -7
  59. package/lib/components/Calculator/constants.js.map +1 -1
  60. package/lib/components/Calculator/rangeHelpers.js +1 -1
  61. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  62. package/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
  63. package/lib/components/Calculator/renderInterestPayment.js +2 -2
  64. package/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  65. package/lib/components/Calculator/renderPaymentType.d.ts +12 -0
  66. package/lib/components/Calculator/renderPaymentType.js +19 -0
  67. package/lib/components/Calculator/renderPaymentType.js.map +1 -0
  68. package/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
  69. package/lib/components/Calculator/renderRegistrationType.js +19 -0
  70. package/lib/components/Calculator/renderRegistrationType.js.map +1 -0
  71. package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  72. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  73. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  74. package/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  75. package/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
  76. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  77. package/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  78. package/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
  79. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  80. package/lib/components/Footer/Contacts.js +1 -1
  81. package/lib/components/Footer/Contacts.js.map +1 -1
  82. package/lib/components/Footer/Sitemap.js +7 -5
  83. package/lib/components/Footer/Sitemap.js.map +1 -1
  84. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  85. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  86. package/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  87. package/mobile/bundle/bundle.umd.js +2 -2
  88. package/mobile/bundle/bundle.umd.min.js +1 -1
  89. package/mobile/bundle/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  90. package/mobile/bundle/components/Calculator/constants.d.ts +2 -2
  91. package/mobile/bundle/components/Calculator/renderInterestPayment.d.ts +9 -1
  92. package/mobile/bundle/components/Calculator/renderPaymentType.d.ts +12 -0
  93. package/mobile/bundle/components/Calculator/renderRegistrationType.d.ts +10 -0
  94. package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  95. package/mobile/bundle/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  96. package/mobile/bundle/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  97. package/mobile/bundle/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  98. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  99. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  100. package/mobile/dist/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  101. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +7 -15
  102. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  103. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +13 -1
  104. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  105. package/mobile/dist/components/Calculator/constants.d.ts +2 -2
  106. package/mobile/dist/components/Calculator/constants.js +6 -7
  107. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  108. package/mobile/dist/components/Calculator/rangeHelpers.js +1 -1
  109. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  110. package/mobile/dist/components/Calculator/renderInterestPayment.d.ts +9 -1
  111. package/mobile/dist/components/Calculator/renderInterestPayment.js +2 -2
  112. package/mobile/dist/components/Calculator/renderInterestPayment.js.map +1 -1
  113. package/mobile/dist/components/Calculator/renderPaymentType.d.ts +12 -0
  114. package/mobile/dist/components/Calculator/renderPaymentType.js +22 -0
  115. package/mobile/dist/components/Calculator/renderPaymentType.js.map +1 -0
  116. package/mobile/dist/components/Calculator/renderRegistrationType.d.ts +10 -0
  117. package/mobile/dist/components/Calculator/renderRegistrationType.js +22 -0
  118. package/mobile/dist/components/Calculator/renderRegistrationType.js.map +1 -0
  119. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  120. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  121. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  122. package/mobile/dist/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  123. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +2 -4
  124. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  125. package/mobile/dist/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  126. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +2 -1
  127. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  128. package/mobile/dist/components/Footer/Contacts.js +1 -1
  129. package/mobile/dist/components/Footer/Contacts.js.map +1 -1
  130. package/mobile/dist/components/Footer/Sitemap.js +7 -5
  131. package/mobile/dist/components/Footer/Sitemap.js.map +1 -1
  132. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  133. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  134. package/mobile/dist/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  135. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +7 -2
  136. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  137. package/mobile/lib/components/Calculator/CreditCalculatorForm.d.ts +0 -2
  138. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +6 -14
  139. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  140. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +13 -1
  141. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  142. package/mobile/lib/components/Calculator/constants.d.ts +2 -2
  143. package/mobile/lib/components/Calculator/constants.js +6 -7
  144. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  145. package/mobile/lib/components/Calculator/rangeHelpers.js +1 -1
  146. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  147. package/mobile/lib/components/Calculator/renderInterestPayment.d.ts +9 -1
  148. package/mobile/lib/components/Calculator/renderInterestPayment.js +2 -2
  149. package/mobile/lib/components/Calculator/renderInterestPayment.js.map +1 -1
  150. package/mobile/lib/components/Calculator/renderPaymentType.d.ts +12 -0
  151. package/mobile/lib/components/Calculator/renderPaymentType.js +19 -0
  152. package/mobile/lib/components/Calculator/renderPaymentType.js.map +1 -0
  153. package/mobile/lib/components/Calculator/renderRegistrationType.d.ts +10 -0
  154. package/mobile/lib/components/Calculator/renderRegistrationType.js +19 -0
  155. package/mobile/lib/components/Calculator/renderRegistrationType.js.map +1 -0
  156. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +3 -2
  157. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  158. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  159. package/mobile/lib/components/Calculator/useCreditCalculatorParams.d.ts +1 -4
  160. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +2 -4
  161. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  162. package/mobile/lib/components/Calculator/useDepositCalculatorParams.d.ts +1 -0
  163. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +2 -1
  164. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  165. package/mobile/lib/components/Footer/Contacts.js +1 -1
  166. package/mobile/lib/components/Footer/Contacts.js.map +1 -1
  167. package/mobile/lib/components/Footer/Sitemap.js +7 -5
  168. package/mobile/lib/components/Footer/Sitemap.js.map +1 -1
  169. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.d.ts +2 -0
  170. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js +5 -1
  171. package/mobile/lib/ui-kit/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  172. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
  173. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
  174. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
  175. package/mobile/src/components/Calculator/constants.ts +6 -7
  176. package/mobile/src/components/Calculator/rangeHelpers.ts +1 -1
  177. package/mobile/src/components/Calculator/renderInterestPayment.tsx +21 -9
  178. package/mobile/src/components/Calculator/renderPaymentType.tsx +49 -0
  179. package/mobile/src/components/Calculator/renderRegistrationType.tsx +51 -0
  180. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
  181. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
  182. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
  183. package/mobile/src/components/Footer/Contacts.tsx +1 -1
  184. package/mobile/src/components/Footer/Sitemap.tsx +10 -5
  185. package/mobile/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
  186. package/package.json +1 -1
  187. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +9 -8
  188. package/src/components/Calculator/CreditCalculatorForm.tsx +8 -22
  189. package/src/components/Calculator/DepositCalculatorForm.tsx +22 -8
  190. package/src/components/Calculator/constants.ts +6 -7
  191. package/src/components/Calculator/rangeHelpers.ts +1 -1
  192. package/src/components/Calculator/renderInterestPayment.tsx +21 -9
  193. package/src/components/Calculator/renderPaymentType.tsx +49 -0
  194. package/src/components/Calculator/renderRegistrationType.tsx +51 -0
  195. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +4 -3
  196. package/src/components/Calculator/useCreditCalculatorParams.ts +3 -8
  197. package/src/components/Calculator/useDepositCalculatorParams.ts +4 -2
  198. package/src/components/Footer/Contacts.tsx +1 -1
  199. package/src/components/Footer/Sitemap.tsx +10 -5
  200. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.fixture.tsx +22 -5
  201. package/src/ui-kit/RadioButtonGroup/RadioButtonGroup.tsx +9 -2
@@ -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 = 60000;
1321
- const DEFAULT_MAX_SUM = 2000000;
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
- rateBottomRange: 12,
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: 7,
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: 6.6,
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 RadioButtonGroup = JSX(({ items, checkedItem, onChange: onChangeCheckedItem }) => (jsx("div", { className: "flex flex-col gap-3", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, checked: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
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", { className: "mt-3", children: jsx(RadioButtonGroup, { items: depositTypeItems, checkedItem: isMonthlyInterestPayment ? EVERY_MONTH : AT_END_TERM, onChange: (text) => callback && callback(text === EVERY_MONTH) }) })] }));
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 < sourceBookRow[maxKey];
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
- rate: 0,
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(isMonthlyInterestPayment, handleIsMonthlyInterestPayment, 'Выплата процентов')] })] }), rate ? (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" })) : (jsx(UnknownRate, {})), 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) })] }));
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 { rateBottomRange, rateTopRange, sumBorder } = creditCalculatorSourceBookParams;
1615
- const finalRate = moneyValue <= sumBorder ? rateBottomRange : rateTopRange;
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.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), jsx(RadioButtonGroup, { items: paymentTypeItems, checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL, onChange: (text) => toggleIsAnnuity(text === ANNUITY) }), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
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)] }), jsx(Rate, { rate: rate || 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-full max-w-[350px]", children: [income ? (jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u043F\u043E \u0432\u043A\u043B\u0430\u0434\u0443", value: income, postfix: "\u20BD", prefix: "+" })) : null, finalSum ? (jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", value: finalSum, postfix: "\u20BD" })) : null, renderInterestPayment(isMonthlyInterestPayment, handleIsMonthlyInterestPayment), renderButtonsSection(buttons, { className: 'mt-7', isVertical: true }), renderFootnote(footnote)] })] }));
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 link = useLink();
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.20";
4573
+ const packageVersion = "0.8.21";
4531
4574
 
4532
4575
  exports.Blocks = Blocks;
4533
4576
  exports.ContentPage = ContentPage;