@redneckz/wildless-cms-uni-blocks 0.13.7 → 0.13.8

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 (134) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +46 -49
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  5. package/bundle/components/Calculator/renderRate.d.ts +2 -1
  6. package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  7. package/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  8. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  9. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  10. package/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  11. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  12. package/dist/components/Calculator/UnknownRate.d.ts +1 -0
  13. package/dist/components/Calculator/UnknownRate.js +1 -1
  14. package/dist/components/Calculator/UnknownRate.js.map +1 -1
  15. package/dist/components/Calculator/constants.js +2 -2
  16. package/dist/components/Calculator/constants.js.map +1 -1
  17. package/dist/components/Calculator/renderRate.d.ts +2 -1
  18. package/dist/components/Calculator/renderRate.js +5 -5
  19. package/dist/components/Calculator/renderRate.js.map +1 -1
  20. package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  21. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  22. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  23. package/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  24. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  25. package/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  26. package/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  27. package/dist/components/Carousel/CarouselContent.d.ts +2 -2
  28. package/dist/components/Carousel/renderCarouselCards.js +1 -0
  29. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  30. package/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  31. package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  32. package/lib/common.css +1 -1
  33. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  34. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  35. package/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  36. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  37. package/lib/components/Calculator/UnknownRate.d.ts +1 -0
  38. package/lib/components/Calculator/UnknownRate.js +1 -1
  39. package/lib/components/Calculator/UnknownRate.js.map +1 -1
  40. package/lib/components/Calculator/constants.js +2 -2
  41. package/lib/components/Calculator/constants.js.map +1 -1
  42. package/lib/components/Calculator/renderRate.d.ts +2 -1
  43. package/lib/components/Calculator/renderRate.js +5 -5
  44. package/lib/components/Calculator/renderRate.js.map +1 -1
  45. package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  46. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  47. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  48. package/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  49. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  50. package/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  51. package/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  52. package/lib/components/Carousel/CarouselContent.d.ts +2 -2
  53. package/lib/components/Carousel/renderCarouselCards.js +1 -0
  54. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  55. package/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  56. package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  57. package/mobile/bundle/bundle.umd.js +46 -49
  58. package/mobile/bundle/bundle.umd.min.js +1 -1
  59. package/mobile/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  60. package/mobile/bundle/components/Calculator/renderRate.d.ts +2 -1
  61. package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  62. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  63. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  64. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  65. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  66. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  67. package/mobile/dist/components/Calculator/UnknownRate.d.ts +1 -0
  68. package/mobile/dist/components/Calculator/UnknownRate.js +1 -1
  69. package/mobile/dist/components/Calculator/UnknownRate.js.map +1 -1
  70. package/mobile/dist/components/Calculator/constants.js +2 -2
  71. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  72. package/mobile/dist/components/Calculator/renderRate.d.ts +2 -1
  73. package/mobile/dist/components/Calculator/renderRate.js +5 -5
  74. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  75. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  76. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  77. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  78. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  79. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  80. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  81. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  82. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -2
  83. package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -0
  84. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  85. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  86. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  87. package/mobile/lib/common.css +1 -1
  88. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  89. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  90. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  91. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  92. package/mobile/lib/components/Calculator/UnknownRate.d.ts +1 -0
  93. package/mobile/lib/components/Calculator/UnknownRate.js +1 -1
  94. package/mobile/lib/components/Calculator/UnknownRate.js.map +1 -1
  95. package/mobile/lib/components/Calculator/constants.js +2 -2
  96. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  97. package/mobile/lib/components/Calculator/renderRate.d.ts +2 -1
  98. package/mobile/lib/components/Calculator/renderRate.js +5 -5
  99. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  100. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  101. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  102. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  103. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  104. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  105. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  106. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  107. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -2
  108. package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -0
  109. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  110. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  111. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  112. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  113. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  114. package/mobile/src/components/Calculator/UnknownRate.tsx +24 -14
  115. package/mobile/src/components/Calculator/constants.ts +2 -2
  116. package/mobile/src/components/Calculator/renderRate.tsx +13 -6
  117. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  118. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  119. package/mobile/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  120. package/mobile/src/components/Carousel/CarouselContent.ts +2 -2
  121. package/mobile/src/components/Carousel/renderCarouselCards.tsx +1 -0
  122. package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
  123. package/package.json +1 -1
  124. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  125. package/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  126. package/src/components/Calculator/UnknownRate.tsx +24 -14
  127. package/src/components/Calculator/constants.ts +2 -2
  128. package/src/components/Calculator/renderRate.tsx +13 -6
  129. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  130. package/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  131. package/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  132. package/src/components/Carousel/CarouselContent.ts +2 -2
  133. package/src/components/Carousel/renderCarouselCards.tsx +1 -0
  134. package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"renderRangeWithTicks.js","sourceRoot":"","sources":["../../../src/ui-kit/InputRange/renderRangeWithTicks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAY9C,MAAM,UAAU,oBAAoB,CAAC,EACnC,IAAI,GAAG,EAAE,EACT,GAAG,EACH,GAAG,EACH,IAAI,EACJ,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,EACtB,QAAQ,EACR,QAAQ,GACY;IACpB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,C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Z,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EACL,CAAC,CAAC,CAAkC,EAAE,EAAE;wBACtC,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;wBAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;wBACzD,QAAQ,IAAI,QAAQ,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;oBACtC,CAAC,CAAQ,GAEX,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1039,8 +1039,9 @@
1039
1039
 
1040
1040
  function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
1041
1041
  const rangeValue = list.length ? list.indexOf(value) : value;
1042
+ const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
1042
1043
  const inputStyle = {
1043
- backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
1044
+ backgroundSize: `${((rangeValueShift * 100) / (max - min)).toFixed(2)}% 100%`,
1044
1045
  };
1045
1046
  return (jsxs("div", { children: [list.length ? (jsx("div", { className: "absolute w-full flex justify-between -bottom-[3px] px-m", children: list.map((_, i) => (jsx("div", { className: `w-2 h-2 rounded-full ${rangeValue <= i || disabled ? 'bg-gray' : 'bg-primary-main'}` }, String(i)))) })) : null, jsx("div", { className: "absolute inset-x-0 -bottom-1 px-m leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider relative z-10", style: inputStyle, type: "range", min: min, max: max, step: step, value: rangeValue, disabled: disabled, onInput: ((e) => {
1046
1047
  const rawValue = parseDecimal(e.target?.value);
@@ -1646,7 +1647,7 @@
1646
1647
  maxSum: DEFAULT_MAX_SUM,
1647
1648
  minMonths: DEFAULT_MIN_MONTHS,
1648
1649
  maxMonths: DEFAULT_MAX_MONTHS,
1649
- rate: 12.5,
1650
+ rate: 0,
1650
1651
  isSalaryClient: false,
1651
1652
  isPensionClient: false,
1652
1653
  isStateEmployee: false,
@@ -1661,7 +1662,7 @@
1661
1662
  maxSumExtra: REFINANCING_EXTRA_MAX_SUM,
1662
1663
  minMonths: DEFAULT_REFINANCING_MIN_MONTHS,
1663
1664
  maxMonths: DEFAULT_MAX_MONTHS,
1664
- rate: 7.5,
1665
+ rate: 0,
1665
1666
  isExtraMoney: false,
1666
1667
  isSalaryClient: false,
1667
1668
  isInsurance: true,
@@ -1773,6 +1774,37 @@
1773
1774
  })] }), monthBonus >= 0 ? (jsx(Rate, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u043C\u0435\u0441\u044F\u0446", rate: monthBonus, rateBlockClassName: "tracking-[-14px]", fractionDigits: 0 })) : null, jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [yearBonus >= 0 ? jsx(CalculatorValueBlock, { title: "\u0411\u0430\u043B\u043B\u043E\u0432 \u0437\u0430 \u0433\u043E\u0434", value: yearBonus }) : null, renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
1774
1775
  });
1775
1776
 
1777
+ const STEP_DAYS = 1;
1778
+ const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1779
+ const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1780
+
1781
+ const orientationStyleMap = {
1782
+ horizontal: 'gap-5xl',
1783
+ vertical: 'flex-col gap-s',
1784
+ };
1785
+ const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1786
+
1787
+ const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1788
+
1789
+ const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1790
+ ...props,
1791
+ items: [
1792
+ { id: 'everyMonth', text: 'Ежемесячно' },
1793
+ { id: 'atEndTerm', text: 'В конце срока' },
1794
+ ],
1795
+ });
1796
+
1797
+ const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: isUnavailableByTerm ? (jsxs(Paragraph, { size: "text-xl", font: "font-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"] })) : (jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u0441\u0443\u043C\u043C\u0443 \u0438\u043B\u0438 \u0441\u0440\u043E\u043A" })) })] })));
1798
+
1799
+ const renderDesktopRate = ({ rate, depositeName, fractionDigits, isShowDepositeName, }) => (jsx(Rate, { rate: rate, depositeName: depositeName, fractionDigits: fractionDigits, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1800
+ const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
1801
+ const renderRate = (props) => {
1802
+ if (props.rate === 0) {
1803
+ return jsx(UnknownRate, { isUnavailableByTerm: props.isUnavailableByTerm });
1804
+ }
1805
+ return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
1806
+ };
1807
+
1776
1808
  const mergeIntervals = (intervals) => {
1777
1809
  const result = [...intervals];
1778
1810
  result.sort(([a], [c]) => a - c);
@@ -1816,7 +1848,7 @@
1816
1848
  ...DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
1817
1849
  ...userInputParams,
1818
1850
  isDisabledOperatingDeposit,
1819
- isShowUnknownRate: true,
1851
+ isUnavailableByTerm: true,
1820
1852
  };
1821
1853
  }
1822
1854
  const businessDepositCalculatorSourceBookParams = data?.rateRows?.find((_) => {
@@ -1856,37 +1888,6 @@
1856
1888
  }
1857
1889
  };
1858
1890
 
1859
- const STEP_DAYS = 1;
1860
- const renderDaysInput = (props) => (jsx(InputRange, { items: [`От ${daysText(props.min || 0)}`, `До ${daysText(props.max || 0)}`], step: STEP_DAYS, ...props }));
1861
- const daysText = (days) => `${days} ${Number(days) % 10 === 1 ? 'дня' : 'дней'}`;
1862
-
1863
- const orientationStyleMap = {
1864
- horizontal: 'gap-5xl',
1865
- vertical: 'flex-col gap-s',
1866
- };
1867
- const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
1868
-
1869
- const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: style('flex-col sm:flex-row', radioGroupClassName), onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
1870
-
1871
- const renderInterestPayment = (props) => renderBinaryRadioButtonGroup({
1872
- ...props,
1873
- items: [
1874
- { id: 'everyMonth', text: 'Ежемесячно' },
1875
- { id: 'atEndTerm', text: 'В конце срока' },
1876
- ],
1877
- });
1878
-
1879
- const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx("div", { className: "mt-2xs pt-2xs pl-lg pb-xs", children: jsx(Icon, { name: "PercentIcon", width: "90", height: "85" }) }), jsx("div", { className: "w-64 mt-m", children: jsxs(Paragraph, { size: "text-xl", font: "font-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"] }) })] })));
1880
-
1881
- const renderDesktopRate = ({ rate, depositeName, isShowDepositeName }) => (jsx(Rate, { rate: rate, depositeName: depositeName, isShowDepositeName: isShowDepositeName, rateBlockClassName: "tracking-[-25px]", unit: "%" }));
1882
- const renderMobileRate = ({ rate }) => (jsx(CalculatorValueBlock, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", value: rate, postfix: "%" }));
1883
- const renderRate = (props) => {
1884
- if (props.isShowUnknownRate) {
1885
- return jsx(UnknownRate, {});
1886
- }
1887
- return (jsxs("div", { children: [jsx("div", { className: "hidden md:block", children: renderDesktopRate(props) }), jsx("div", { className: "md:hidden", children: renderMobileRate(props) })] }));
1888
- };
1889
-
1890
1891
  const BusinessDepositCalculatorForm = JSX(({ className = '', sourceBookDir, buttons, footnote, bottomFootnote, isShowDepositeName }) => {
1891
1892
  const [userInputParams, { field }] = useForm({
1892
1893
  moneyValue: BUSINESS_DEFAULT_SUM,
@@ -1897,7 +1898,7 @@
1897
1898
  isMonthlyInterestPayment: false,
1898
1899
  });
1899
1900
  const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, sourceBookDir);
1900
- const { income, finalSum, rate, isShowUnknownRate, depositeName } = calculatorParams;
1901
+ const { income, finalSum, rate, isUnavailableByTerm, depositeName } = calculatorParams;
1901
1902
  return (jsxs("section", { className: style('flex flex-col justify-between sm:flex-row gap-m', className), children: [jsxs("div", { className: "flex flex-col gap-y-m sm:w-2/5 gap-2xl", children: [renderWantedSumInput({
1902
1903
  title: 'Сумма, ₽',
1903
1904
  min: calculatorParams.minSum,
@@ -1919,7 +1920,7 @@
1919
1920
  rate,
1920
1921
  depositeName,
1921
1922
  isShowDepositeName,
1922
- isShowUnknownRate,
1923
+ isUnavailableByTerm,
1923
1924
  }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [renderDepositResults(finalSum, income), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote), renderFootnote(bottomFootnote)] })] }));
1924
1925
  });
1925
1926
  const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { className: "flex flex-col gap-y-xl sm:gap-y-s", children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal }), jsx(Checkbox, { text: "\u0418\u041F / \u043C\u0430\u043B\u043E\u0435 \u043F\u0440\u0435\u0434\u043F\u0440\u0438\u044F\u0442\u0438\u0435", ...field('isSmallBusiness'), value: calculatorParams.isSmallBusiness })] }));
@@ -1992,7 +1993,7 @@
1992
1993
  };
1993
1994
 
1994
1995
  const useCreditCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
1995
- let { moneyValue, monthsValue } = userInputParams;
1996
+ const { moneyValue, monthsValue } = userInputParams;
1996
1997
  const data = useCalculatorParams(sourceBookDir || CREDIT_CALC_DEFAULT_DIR);
1997
1998
  const rateRows = data?.rateRows || [DEFAULT_CREDIT_CALCULATOR_PARAMS];
1998
1999
  const limitRows = data?.limitRows || [];
@@ -2003,8 +2004,6 @@
2003
2004
  });
2004
2005
  const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], creditCalculatorSourceBookLimitParams, rateRows);
2005
2006
  const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], creditCalculatorSourceBookLimitParams, rateRows);
2006
- moneyValue = clamp(moneyValue, minSum, maxSum);
2007
- monthsValue = clamp(monthsValue, minMonths, maxMonths);
2008
2007
  const creditCalculatorRateParams = getCreditCalculatorRateParams({
2009
2008
  rateRows,
2010
2009
  userInputParams,
@@ -2214,7 +2213,7 @@
2214
2213
  checkRangeByKeys(monthsValue, ['minMonths', 'maxMonths'], row)) || DEFAULT_REFINANCING_CALCULATOR_PARAMS;
2215
2214
 
2216
2215
  const useRefinancingCalculatorParams = (userInputParams, sourceBookDir, paramsViewSettings) => {
2217
- let { moneyValue, monthsValue, oldMonthlyPayment, moneyExtra } = userInputParams;
2216
+ const { moneyValue, monthsValue, oldMonthlyPayment, moneyExtra } = userInputParams;
2218
2217
  const data = useCalculatorParams(sourceBookDir || REFINANCING_CALC_DEFAULT_DIR);
2219
2218
  const rateRows = data?.rateRows || [DEFAULT_REFINANCING_CALCULATOR_PARAMS];
2220
2219
  const limitRows = data?.limitRows || [];
@@ -2224,13 +2223,7 @@
2224
2223
  paramsViewSettings,
2225
2224
  });
2226
2225
  const { minSum, maxSum } = getLimitRangeByKeys(['minSum', 'maxSum'], sourceBookLimitParams, rateRows);
2227
- const { minSumOld, maxSumOld } = getLimitRangeByKeys(['minSumOld', 'maxSumOld'], sourceBookLimitParams, rateRows);
2228
- const { minSumExtra, maxSumExtra } = getLimitRangeByKeys(['minSumExtra', 'maxSumExtra'], sourceBookLimitParams, rateRows);
2229
2226
  const { minMonths, maxMonths } = getLimitRangeByKeys(['minMonths', 'maxMonths'], sourceBookLimitParams, rateRows);
2230
- moneyValue = clamp(moneyValue, minSum, maxSum);
2231
- oldMonthlyPayment = clamp(oldMonthlyPayment, minSumOld, maxSumOld);
2232
- moneyExtra = clamp(moneyExtra, minSumExtra, maxSumExtra);
2233
- monthsValue = clamp(monthsValue, minMonths, maxMonths);
2234
2227
  const refinancingCalculatorSourceBookRateParams = getRefinancingCalculatorRateParams({
2235
2228
  rateRows,
2236
2229
  userInputParams,
@@ -2301,7 +2294,10 @@
2301
2294
  ...field('moneyExtra'),
2302
2295
  value: calculatorParams.moneyExtra,
2303
2296
  })
2304
- : null] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.rate, fractionDigits: 1, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2297
+ : null] }), renderRate({
2298
+ rate: calculatorParams.rate,
2299
+ fractionDigits: 1,
2300
+ }), jsxs("div", { className: "flex flex-col gap-2xl sm:w-96", children: [jsx(CalculatorValueBlock, { title: 'Ежемесячный платеж', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), calculatorParams.benefit > 0 ? (jsx(CalculatorValueBlock, { title: 'Выгода в месяц', value: calculatorParams.benefit, postfix: "\u20BD" })) : null, renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') }), renderButtonsSection(buttons, { isVertical: true }), renderFootnote(footnote)] })] }));
2305
2301
  });
2306
2302
  const renderCreditParamsForm = (params, field) => (jsxs("div", { className: "space-y-s", children: [params.isShowSalaryClient ? (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", ...field('isSalaryClient'), value: params.isSalaryClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { 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", ...field('isInsurance'), value: params.isInsurance })) : null, params.isShowExtraMoney ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0443\u044E \u0441\u0443\u043C\u043C\u0443", ...field('isExtraMoney'), value: params.isExtraMoney })) : null] }));
2307
2303
 
@@ -2482,6 +2478,7 @@
2482
2478
 
2483
2479
  const cardBaseStyle = 'relative h-full';
2484
2480
  const CARD_SIZE_MAP = {
2481
+ small: 'sm:min-w-64',
2485
2482
  normal: 'sm:min-w-96',
2486
2483
  big: 'sm:min-w-[515px]',
2487
2484
  };
@@ -4119,7 +4116,7 @@
4119
4116
 
4120
4117
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
4121
4118
 
4122
- const packageVersion = "0.13.7";
4119
+ const packageVersion = "0.13.8";
4123
4120
 
4124
4121
  exports.Blocks = Blocks;
4125
4122
  exports.ContentPage = ContentPage;