@redneckz/wildless-cms-uni-blocks 0.14.430 → 0.14.431

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 (123) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +93 -33
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  5. package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  6. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  7. package/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  8. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  9. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  10. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  11. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  12. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  13. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  14. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  15. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  16. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  17. package/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  18. package/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  19. package/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  20. package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  21. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  22. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  23. package/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  24. package/dist/ui-kit/Calculator/renderRate.js +1 -1
  25. package/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  26. package/lib/common.css +1 -1
  27. package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
  28. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  29. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  30. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  31. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  32. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  33. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  34. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +4 -0
  35. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  36. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  37. package/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  38. package/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  39. package/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  40. package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  41. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  42. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  43. package/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  44. package/lib/ui-kit/Calculator/renderRate.js +1 -1
  45. package/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  46. package/mobile/bundle/bundle.umd.js +93 -33
  47. package/mobile/bundle/bundle.umd.min.js +1 -1
  48. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  49. package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  50. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  51. package/mobile/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  52. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  53. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  54. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  55. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  56. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  57. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  58. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  59. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  60. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  61. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  62. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  63. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  64. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  65. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  66. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  67. package/mobile/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  68. package/mobile/dist/ui-kit/Calculator/renderRate.js +1 -1
  69. package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  70. package/mobile/lib/common.css +1 -1
  71. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  72. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  73. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  74. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  75. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  76. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  77. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  78. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  79. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  80. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  81. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  82. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  83. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  84. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  85. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  86. package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  87. package/mobile/lib/ui-kit/Calculator/renderRate.js +1 -1
  88. package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  89. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  90. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  91. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  92. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  93. package/mobile/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  94. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  95. package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  96. package/mobile/src/ui-kit/Calculator/renderRate.tsx +5 -1
  97. package/package.json +1 -1
  98. package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +20 -0
  99. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  100. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  101. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  102. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  103. package/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  104. package/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  105. package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  106. package/src/ui-kit/Calculator/renderRate.tsx +5 -1
  107. package/tailwind.config.cjs +1 -1
  108. package/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  109. package/dist/ui-kit/Breadcrumb.d.ts +0 -6
  110. package/dist/ui-kit/Breadcrumb.js +0 -11
  111. package/dist/ui-kit/Breadcrumb.js.map +0 -1
  112. package/lib/ui-kit/Breadcrumb.d.ts +0 -6
  113. package/lib/ui-kit/Breadcrumb.js +0 -9
  114. package/lib/ui-kit/Breadcrumb.js.map +0 -1
  115. package/mobile/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  116. package/mobile/dist/ui-kit/Breadcrumb.d.ts +0 -6
  117. package/mobile/dist/ui-kit/Breadcrumb.js +0 -11
  118. package/mobile/dist/ui-kit/Breadcrumb.js.map +0 -1
  119. package/mobile/lib/ui-kit/Breadcrumb.d.ts +0 -6
  120. package/mobile/lib/ui-kit/Breadcrumb.js +0 -9
  121. package/mobile/lib/ui-kit/Breadcrumb.js.map +0 -1
  122. package/mobile/src/ui-kit/Breadcrumb.tsx +0 -21
  123. package/src/ui-kit/Breadcrumb.tsx +0 -21
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { CalculatorValueBlock } from './CalculatorValueBlock.js';
3
3
  import { Rate } from './Rate.js';
4
4
  import { UnknownRate } from './UnknownRate.js';
5
- export const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, color = 'text-secondary-text', ...rest }) => isUnknownRateShown && rate === 0 ? (_jsx(UnknownRate, { title: title, ...rest })) : (_jsxs("div", { children: [_jsx("div", { className: "hidden @xl:block", children: _jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), _jsx("div", { className: "@xl:hidden", children: _jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }) })] }));
5
+ export const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, color = 'text-secondary-text', children, ...rest }) => isUnknownRateShown && rate === 0 ? (_jsx(UnknownRate, { title: title, ...rest })) : (_jsxs("div", { children: [_jsx("div", { className: "hidden @xl:block min-w-96", children: _jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), _jsx("div", { className: "@xl:hidden", children: _jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }) }), children] }));
6
6
  //# sourceMappingURL=renderRate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderRate.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderRate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAMnE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,GAAG,QAAQ,EAChB,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,GAAG,EACV,cAAc,GAAG,CAAC,EAClB,kBAAkB,GAAG,IAAI,EACzB,KAAK,GAAG,qBAAqB,EAC7B,GAAG,IAAI,EACS,EAAE,EAAE,CACpB,kBAAkB,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CACjC,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI,CACxC,CAAC,CAAC,CAAC,CACF,0BACE,cAAK,SAAS,EAAC,kBAAkB,YAC/B,KAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,KACR,IAAI,GACR,GACE,EACN,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,KAAK,KACR,IAAI,GACR,GACE,IACF,CACP,CAAC"}
1
+ {"version":3,"file":"renderRate.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderRate.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAkB,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAOnE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,KAAK,GAAG,QAAQ,EAChB,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,GAAG,EACV,cAAc,GAAG,CAAC,EAClB,kBAAkB,GAAG,IAAI,EACzB,KAAK,GAAG,qBAAqB,EAC7B,QAAQ,EACR,GAAG,IAAI,EACS,EAAE,EAAE,CACpB,kBAAkB,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CACjC,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,KAAM,IAAI,GAAI,CACxC,CAAC,CAAC,CAAC,CACF,0BACE,cAAK,SAAS,EAAC,2BAA2B,YACxC,KAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,KAAK,KACR,IAAI,GACR,GACE,EACN,cAAK,SAAS,EAAC,YAAY,YACzB,KAAC,oBAAoB,IACnB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,IAAI,EACb,cAAc,EAAE,cAAc,EAC9B,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,KAAK,KACR,IAAI,GACR,GACE,EACL,QAAQ,IACL,CACP,CAAC"}
@@ -2487,9 +2487,9 @@
2487
2487
  const CalculatorLayout = JSX(({ className, title, children, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-xl', className), defaultPadding: "p-4xl", ...rest, children: [title ? jsx(Heading, { className: "text-center", title: title }) : null, children] })));
2488
2488
 
2489
2489
  const CalculatorStyle = {
2490
- wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-m gap-y-7 @xl:gap-y-4xl',
2491
- input: 'flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0',
2492
- result: 'flex flex-col gap-y-xl @xl:w-96',
2490
+ wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-s gap-y-7 @xl:gap-y-4xl',
2491
+ input: 'flex flex-col lg:max-w-80 gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0',
2492
+ result: 'flex flex-col gap-y-xl',
2493
2493
  };
2494
2494
 
2495
2495
  const calculatorValueBlockStyle = 'flex justify-between @xl:flex-col';
@@ -2503,7 +2503,7 @@
2503
2503
 
2504
2504
  const UnknownRate = JSX(({ title = 'Ставка', isUnavailableByTerm = false }) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-10 @5xl:h-auto @5xl:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", 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" })) })] })));
2505
2505
 
2506
- const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, color = 'text-secondary-text', ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }) })] }));
2506
+ const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, isUnknownRateShown = true, color = 'text-secondary-text', children, ...rest }) => isUnknownRateShown && rate === 0 ? (jsx(UnknownRate, { title: title, ...rest })) : (jsxs("div", { children: [jsx("div", { className: "hidden @xl:block min-w-96", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), jsx("div", { className: "@xl:hidden", children: jsx(CalculatorValueBlock, { title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }) }), children] }));
2507
2507
 
2508
2508
  const DEFAULT_MONEY_STEP = 1000;
2509
2509
  function renderWantedSumInput({ isShowItems = true, step = DEFAULT_MONEY_STEP, ...rest }) {
@@ -2616,7 +2616,7 @@
2616
2616
  };
2617
2617
  const RadioButtonGroup = JSX(({ items, checkedItem, className, onChange: onChangeCheckedItem, orientation = 'horizontal', }) => (jsx("div", { className: style(`flex ${orientationStyleMap[orientation]}`, className), role: "radiogroup", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: checkedItem === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id) }, String(id)))) })));
2618
2618
 
2619
- const renderBinaryRadioButtonGroup = ({ items, title, mobileTitle = title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "space-y-s", children: [title ? (jsx("div", { className: "hidden @5xl:block", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, mobileTitle ? (jsx("div", { className: "@5xl:hidden", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: mobileTitle }) })) : 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) })] }));
2619
+ const renderBinaryRadioButtonGroup = ({ items, title, mobileTitle = title, orientation = 'horizontal', value, radioGroupClassName, onChange, }) => (jsxs("div", { className: "grid gap-s whitespace-nowrap", children: [title ? (jsx("div", { className: "hidden @5xl:block", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, mobileTitle ? (jsx("div", { className: "@5xl:hidden", children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: mobileTitle }) })) : null, jsx(RadioButtonGroup, { orientation: orientation, items: items, checkedItem: items[value ? 0 : 1].id, className: radioGroupClassName, onChange: (_) => onChange && onChange(_ === items[0].id) })] }));
2620
2620
 
2621
2621
  const renderPayout = (props) => renderBinaryRadioButtonGroup({
2622
2622
  ...props,
@@ -2626,7 +2626,7 @@
2626
2626
  ],
2627
2627
  });
2628
2628
 
2629
- const renderDepositResult = ({ income, finalSum, buttons, footnotes = [], }) => (jsxs("div", { className: CalculatorStyle.result, children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", 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, { isVertical: true }), footnotes?.map(renderFootnote)] }));
2629
+ const renderDepositResult = ({ income, finalSum, buttons = [], footnotes = [], }) => (jsxs("div", { className: CalculatorStyle.result, children: [jsx(CalculatorValueBlock, { title: "\u0414\u043E\u0445\u043E\u0434 \u0432 \u043A\u043E\u043D\u0446\u0435 \u0441\u0440\u043E\u043A\u0430", 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, { isVertical: true }), footnotes?.map(renderFootnote)] }));
2630
2630
 
2631
2631
  const getLimitRangeByKeys = ([minKey, maxKey], limitParams, rateRows = []) => limitParams && limitParams[minKey] && limitParams[maxKey]
2632
2632
  ? {
@@ -3007,6 +3007,9 @@
3007
3007
  rate: 0,
3008
3008
  isMonthlyInterestPayment: true,
3009
3009
  isRemoteRegistration: true,
3010
+ isReplenish: false,
3011
+ isWithdrawn: false,
3012
+ type: '',
3010
3013
  };
3011
3014
  const getDepositCalculatorParams = (userInputParams, calcSource, paramsViewSettings) => {
3012
3015
  const { moneyValue, monthsValue } = userInputParams;
@@ -3015,12 +3018,26 @@
3015
3018
  : 0;
3016
3019
  const isExcludeMonthlyInterestPayment = !paramsViewSettings?.isShowMonthlyInterestPayment;
3017
3020
  const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
3021
+ const isExcludeReplenish = !paramsViewSettings?.isShowReplenish;
3022
+ const isExcludeWithdrawn = !paramsViewSettings?.isShowWithdrawn;
3018
3023
  const depositCalculatorSourceBookParams = calcSource?.rateRows?.find((row) => checkRowByParam({
3019
3024
  row,
3020
3025
  userInputParams,
3021
- paramKey: 'isMonthlyInterestPayment',
3022
- isExclude: isExcludeMonthlyInterestPayment,
3026
+ paramKey: 'isReplenish',
3027
+ isExclude: isExcludeReplenish,
3023
3028
  }) &&
3029
+ checkRowByParam({
3030
+ row,
3031
+ userInputParams,
3032
+ paramKey: 'isWithdrawn',
3033
+ isExclude: isExcludeWithdrawn,
3034
+ }) &&
3035
+ checkRowByParam({
3036
+ row,
3037
+ userInputParams,
3038
+ paramKey: 'isMonthlyInterestPayment',
3039
+ isExclude: isExcludeMonthlyInterestPayment,
3040
+ }) &&
3024
3041
  checkRowByParam({
3025
3042
  row,
3026
3043
  userInputParams,
@@ -3067,22 +3084,64 @@
3067
3084
  ],
3068
3085
  });
3069
3086
 
3087
+ const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "grid gap-lg", children: [jsxs("div", { className: "flex gap-lg", children: [params.isShowReplenish
3088
+ ? renderBinaryRadioButtonGroup({
3089
+ title: 'Пополнение',
3090
+ ...field('isReplenish'),
3091
+ value: params.isReplenish,
3092
+ orientation: 'vertical',
3093
+ items: [
3094
+ { id: 'withReplenish', text: 'С пополнением' },
3095
+ { id: 'withoutReplenish', text: 'Без пополнения' },
3096
+ ],
3097
+ })
3098
+ : null, params.isShowWithdrawn
3099
+ ? renderBinaryRadioButtonGroup({
3100
+ title: 'Снятие',
3101
+ ...field('isWithdrawn'),
3102
+ value: params.isWithdrawn,
3103
+ orientation: 'vertical',
3104
+ items: [
3105
+ { id: 'wthDrawn', text: 'Со снятием' },
3106
+ { id: 'noWithdrawn', text: 'Без снятия' },
3107
+ ],
3108
+ })
3109
+ : null] }), jsx("div", { className: "border-b border-main-divider w-full" }), jsxs("div", { className: "flex gap-lg", children: [params.isShowMonthlyInterestPayment
3110
+ ? renderPayout({
3111
+ title: 'Выплата процентов',
3112
+ ...field('isMonthlyInterestPayment'),
3113
+ value: params.isMonthlyInterestPayment,
3114
+ orientation: 'vertical',
3115
+ })
3116
+ : null, params.isShowRemoteRegistration
3117
+ ? renderRegistrationType({
3118
+ title: 'Оформление',
3119
+ ...field('isRemoteRegistration'),
3120
+ value: params.isRemoteRegistration,
3121
+ orientation: 'vertical',
3122
+ })
3123
+ : null] })] }));
3124
+
3070
3125
  const MAP = {
3071
3126
  isMonthlyInterestPayment: 'isMonthlyInterestPayment',
3072
3127
  isRemoteRegistration: 'isRemoteRegistration',
3128
+ isReplenish: 'isReplenish',
3129
+ isWithdrawn: 'isWithdrawn',
3073
3130
  moneyValue: 'minSum',
3074
3131
  };
3075
3132
  const DEPOSIT_DEFAULT_SUM = 20000;
3076
- const CalculatorDeposit = UniBlock(({ className, title, calcSource, buttons, footnote, paramsViewSettings, defaultParams, ...rest }) => {
3133
+ const CalculatorDeposit = UniBlock(({ className, title, calcSource, buttons = [], footnote = '', paramsViewSettings, defaultParams, ...rest }) => {
3077
3134
  const defParams = getDefaultParamsMax(calcSource?.rateRows);
3078
3135
  const [userInputParams, { field }] = useForm({
3079
3136
  moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
3080
3137
  monthsValue: getMonthsDefaultValue(defaultParams),
3081
3138
  isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
3082
3139
  isRemoteRegistration: Boolean(defaultParams?.isRemoteRegistration),
3140
+ isReplenish: false,
3141
+ isWithdrawn: Boolean(defaultParams?.isWithdrawn ?? false),
3083
3142
  });
3084
3143
  const calcParams = getDepositCalculatorParams(userInputParams, calcSource, paramsViewSettings);
3085
- const { defaultMonth, rate, income, finalSum } = calcParams;
3144
+ const { defaultMonth, rate, income, finalSum, type = '' } = calcParams;
3086
3145
  const { onChange: setMonthsValue } = field('monthsValue');
3087
3146
  const { onChange: setMoneyValue } = field('moneyValue');
3088
3147
  useEffect(() => {
@@ -3092,17 +3151,19 @@
3092
3151
  setMoneyValue &&
3093
3152
  setMoneyValue(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
3094
3153
  }, [calcParams.minSum, calcParams.maxSum]);
3154
+ const handleDefaultParamsCals = () => setDefaultParamsCalc({
3155
+ field,
3156
+ defParams: defParams,
3157
+ calcParams,
3158
+ monthsValue: 'minMonths',
3159
+ map: MAP,
3160
+ });
3095
3161
  useEffect(() => {
3096
3162
  if (!isDefaultParams(defaultParams) && defParams) {
3097
- setDefaultParamsCalc({
3098
- field,
3099
- defParams: defParams,
3100
- calcParams,
3101
- monthsValue: 'minMonths',
3102
- map: MAP,
3103
- });
3163
+ handleDefaultParamsCals();
3104
3164
  }
3105
3165
  }, [calcSource, defaultParams]);
3166
+ const isMaxRate = rate === defParams?.rate;
3106
3167
  return (jsx(CalculatorLayout, { className: className, title: title, ...rest, children: jsxs("section", { className: style(CalculatorStyle.wrapper, className), children: [jsxs("div", { className: CalculatorStyle.input, children: [renderWantedSumInput({
3107
3168
  title: 'Сумма, ₽',
3108
3169
  min: calcParams.minSum,
@@ -3118,21 +3179,20 @@
3118
3179
  value: calcParams.monthsValue,
3119
3180
  }), renderDepositParamsForm({ ...calcParams, ...paramsViewSettings }, field)] }), renderRate({
3120
3181
  rate,
3121
- }), renderDepositResult({ income, finalSum, buttons, footnotes: [footnote] })] }) }));
3122
- });
3123
- const renderDepositParamsForm = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowMonthlyInterestPayment
3124
- ? renderPayout({
3125
- title: 'Выплата процентов',
3126
- ...field('isMonthlyInterestPayment'),
3127
- value: params.isMonthlyInterestPayment,
3128
- })
3129
- : null, params.isShowRemoteRegistration
3130
- ? renderRegistrationType({
3131
- title: 'Оформление',
3132
- ...field('isRemoteRegistration'),
3133
- value: params.isRemoteRegistration,
3134
- })
3135
- : null] }));
3182
+ children: renderMaxRateButton(handleDefaultParamsCals, isMaxRate),
3183
+ }), renderDepositResult({
3184
+ income,
3185
+ finalSum,
3186
+ buttons: [...buttons, getTariffButton(calcSource?.buttons, type)],
3187
+ footnotes: [footnote],
3188
+ })] }) }));
3189
+ });
3190
+ const getTariffButton = (buttons = [], btnType = '') => {
3191
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3192
+ const { type, ...button } = buttons.find((_) => _.type === btnType) ?? {};
3193
+ return button;
3194
+ };
3195
+ const renderMaxRateButton = (handleDefaultParamsCals, isMaxRate = false) => isMaxRate ? null : (jsx(Button, { type: "button", version: "secondary", onClick: handleDefaultParamsCals, children: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0443\u044E \u0441\u0442\u0430\u0432\u043A\u0443" }));
3136
3196
 
3137
3197
  const checkRefinancingSourceBookRowCommonParams = (props) => checkRowParam({
3138
3198
  ...props,
@@ -5962,7 +6022,7 @@
5962
6022
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5963
6023
  });
5964
6024
 
5965
- const packageVersion = "0.14.429";
6025
+ const packageVersion = "0.14.430";
5966
6026
 
5967
6027
  exports.Blocks = Blocks;
5968
6028
  exports.ContentPage = ContentPage;