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

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 (156) hide show
  1. package/bin/migration-scripts/0.13.9.js +59 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +60 -57
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  6. package/bundle/components/Calculator/renderRate.d.ts +2 -1
  7. package/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  8. package/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  9. package/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  10. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  11. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  12. package/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  13. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  14. package/dist/components/Calculator/UnknownRate.d.ts +1 -0
  15. package/dist/components/Calculator/UnknownRate.js +1 -1
  16. package/dist/components/Calculator/UnknownRate.js.map +1 -1
  17. package/dist/components/Calculator/constants.js +2 -2
  18. package/dist/components/Calculator/constants.js.map +1 -1
  19. package/dist/components/Calculator/renderRate.d.ts +2 -1
  20. package/dist/components/Calculator/renderRate.js +5 -5
  21. package/dist/components/Calculator/renderRate.js.map +1 -1
  22. package/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  23. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  24. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  25. package/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  26. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  27. package/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  28. package/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  29. package/dist/components/Carousel/CarouselContent.d.ts +2 -2
  30. package/dist/components/Carousel/renderCarouselCards.js +1 -0
  31. package/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  32. package/dist/components/DepositFiltration/DepositFiltration.js +14 -8
  33. package/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  34. package/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  35. package/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  36. package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  37. package/lib/common.css +1 -1
  38. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  39. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  40. package/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  41. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  42. package/lib/components/Calculator/UnknownRate.d.ts +1 -0
  43. package/lib/components/Calculator/UnknownRate.js +1 -1
  44. package/lib/components/Calculator/UnknownRate.js.map +1 -1
  45. package/lib/components/Calculator/constants.js +2 -2
  46. package/lib/components/Calculator/constants.js.map +1 -1
  47. package/lib/components/Calculator/renderRate.d.ts +2 -1
  48. package/lib/components/Calculator/renderRate.js +5 -5
  49. package/lib/components/Calculator/renderRate.js.map +1 -1
  50. package/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  51. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  52. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  53. package/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  54. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  55. package/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  56. package/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  57. package/lib/components/Carousel/CarouselContent.d.ts +2 -2
  58. package/lib/components/Carousel/renderCarouselCards.js +1 -0
  59. package/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  60. package/lib/components/DepositFiltration/DepositFiltration.js +14 -8
  61. package/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  62. package/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  63. package/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  64. package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  65. package/mobile/bundle/bundle.umd.js +46 -49
  66. package/mobile/bundle/bundle.umd.min.js +1 -1
  67. package/mobile/bundle/components/Calculator/UnknownRate.d.ts +1 -0
  68. package/mobile/bundle/components/Calculator/renderRate.d.ts +2 -1
  69. package/mobile/bundle/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  70. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +2 -2
  71. package/mobile/bundle/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  72. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  73. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  74. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +6 -3
  75. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  76. package/mobile/dist/components/Calculator/UnknownRate.d.ts +1 -0
  77. package/mobile/dist/components/Calculator/UnknownRate.js +1 -1
  78. package/mobile/dist/components/Calculator/UnknownRate.js.map +1 -1
  79. package/mobile/dist/components/Calculator/constants.js +2 -2
  80. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  81. package/mobile/dist/components/Calculator/renderRate.d.ts +2 -1
  82. package/mobile/dist/components/Calculator/renderRate.js +5 -5
  83. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  84. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  85. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  86. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  87. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +1 -4
  88. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  89. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  90. package/mobile/dist/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  91. package/mobile/dist/components/Carousel/CarouselContent.d.ts +2 -2
  92. package/mobile/dist/components/Carousel/renderCarouselCards.js +1 -0
  93. package/mobile/dist/components/Carousel/renderCarouselCards.js.map +1 -1
  94. package/mobile/dist/components/DepositFiltration/DepositFiltration.js +14 -8
  95. package/mobile/dist/components/DepositFiltration/DepositFiltration.js.map +1 -1
  96. package/mobile/dist/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  97. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  98. package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  99. package/mobile/lib/common.css +1 -1
  100. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +9 -9
  101. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  102. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +6 -3
  103. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  104. package/mobile/lib/components/Calculator/UnknownRate.d.ts +1 -0
  105. package/mobile/lib/components/Calculator/UnknownRate.js +1 -1
  106. package/mobile/lib/components/Calculator/UnknownRate.js.map +1 -1
  107. package/mobile/lib/components/Calculator/constants.js +2 -2
  108. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  109. package/mobile/lib/components/Calculator/renderRate.d.ts +2 -1
  110. package/mobile/lib/components/Calculator/renderRate.js +5 -5
  111. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  112. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +1 -1
  113. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +1 -1
  114. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  115. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +1 -4
  116. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  117. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js +4 -11
  118. package/mobile/lib/components/Calculator/useRefinancingCalculatorParams.js.map +1 -1
  119. package/mobile/lib/components/Carousel/CarouselContent.d.ts +2 -2
  120. package/mobile/lib/components/Carousel/renderCarouselCards.js +1 -0
  121. package/mobile/lib/components/Carousel/renderCarouselCards.js.map +1 -1
  122. package/mobile/lib/components/DepositFiltration/DepositFiltration.js +14 -8
  123. package/mobile/lib/components/DepositFiltration/DepositFiltration.js.map +1 -1
  124. package/mobile/lib/components/DepositFiltration/DepositFiltrationContent.d.ts +2 -2
  125. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -1
  126. package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
  127. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  128. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  129. package/mobile/src/components/Calculator/UnknownRate.tsx +24 -14
  130. package/mobile/src/components/Calculator/constants.ts +2 -2
  131. package/mobile/src/components/Calculator/renderRate.tsx +13 -6
  132. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  133. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  134. package/mobile/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  135. package/mobile/src/components/Carousel/CarouselContent.ts +2 -2
  136. package/mobile/src/components/Carousel/renderCarouselCards.tsx +1 -0
  137. package/mobile/src/components/DepositFiltration/DepositFiltration.example.json +11 -1
  138. package/mobile/src/components/DepositFiltration/DepositFiltration.tsx +18 -12
  139. package/mobile/src/components/DepositFiltration/DepositFiltrationContent.ts +1 -2
  140. package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
  141. package/package.json +1 -1
  142. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +11 -11
  143. package/src/components/Calculator/RefinancingCalculatorForm.tsx +6 -9
  144. package/src/components/Calculator/UnknownRate.tsx +24 -14
  145. package/src/components/Calculator/constants.ts +2 -2
  146. package/src/components/Calculator/renderRate.tsx +13 -6
  147. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +2 -2
  148. package/src/components/Calculator/useCreditCalculatorParams.ts +1 -5
  149. package/src/components/Calculator/useRefinancingCalculatorParams.ts +5 -23
  150. package/src/components/Carousel/CarouselContent.ts +2 -2
  151. package/src/components/Carousel/renderCarouselCards.tsx +1 -0
  152. package/src/components/DepositFiltration/DepositFiltration.example.json +11 -1
  153. package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +21 -8
  154. package/src/components/DepositFiltration/DepositFiltration.tsx +18 -12
  155. package/src/components/DepositFiltration/DepositFiltrationContent.ts +1 -2
  156. package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -1
@@ -7,22 +7,28 @@ import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
7
7
  import { CurrencyInput } from '../../ui-kit/CurrencyInput/CurrencyInput.js';
8
8
  import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
9
9
  import { style } from '../../utils/style.js';
10
+ const DEFAULT_MIN_MONTHS = 3;
11
+ const DEFAULT_MAX_MONTHS = 60;
12
+ const DEFAULT_MIN_SUM = 500;
13
+ const DEFAULT_MAX_SUM = 1000000000;
10
14
  const initialFiltrationState = {
11
- sum: 500,
15
+ sum: {
16
+ min: 10000,
17
+ max: DEFAULT_MAX_SUM,
18
+ },
12
19
  period: {
13
20
  min: 3,
14
21
  max: 36,
15
22
  },
16
23
  };
17
- const DEFAULT_MIN_MONTHS = 3;
18
- const DEFAULT_MAX_MONTHS = 36;
19
- const DEFAULT_MIN_SUM = 500;
20
- const DEFAULT_MAX_SUM = 1000000000;
21
24
  export const DepositFiltration = JSX(({ className, filtrationSchema = {}, resetButton, sumInput, periodInput, ...rest }) => {
22
25
  const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
23
- const maxValue = periodInput?.max || DEFAULT_MAX_MONTHS;
24
- const Inputs = (_jsxs("div", { children: [_jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', { parse: Number, format: String }) }), _jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 3 лет'], min: periodInput?.min || DEFAULT_MIN_MONTHS, max: maxValue, ...field('period', {
25
- parse: (min) => ({ min, max: maxValue }),
26
+ const maxPeriodValue = periodInput?.max || DEFAULT_MAX_MONTHS;
27
+ const Inputs = (_jsxs("div", { children: [_jsx(CurrencyInput, { label: sumInput?.title, min: DEFAULT_MIN_SUM, max: DEFAULT_MAX_SUM, ...field('sum', {
28
+ parse: (min) => ({ min: Number(min), max: DEFAULT_MAX_SUM }),
29
+ format: ({ min }) => String(min),
30
+ }) }), _jsx(InputRange, { title: periodInput?.title, items: ['От 3 мес', 'До 5 лет'], min: periodInput?.min || DEFAULT_MIN_MONTHS, max: maxPeriodValue, ...field('period', {
31
+ parse: (min) => ({ min, max: maxPeriodValue }),
26
32
  format: ({ min }) => min,
27
33
  }) })] }));
28
34
  return (_jsxs(BlockWrapper, { className: style('space-y-2xs', className), defaultPadding: "p-0", version: "transparent", ...rest, children: [renderFiltrationForm({ field, reset, filtrationSchema, resetButton, children: Inputs }), _jsx(BaseFiltrationInner, { filtrationState: filtrationState, ...rest })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"DepositFiltration.js","sourceRoot":"","sources":["../../../src/components/DepositFiltration/DepositFiltration.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CA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AQ,KACT,KAAK,CAAC,QAAQ,EAAE;oBAClB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;oBACxC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG;iBACzB,CAAC,GACF,IACE,CACP,CAAC;IAEF,OAAO,CACL,MAAC,YAAY,IACX,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,EAC1C,cAAc,EAAC,KAAK,EACpB,OAAO,EAAC,aAAa,KACjB,IAAI,aAEP,oBAAoB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EACxF,KAAC,mBAAmB,IAAC,eAAe,EAAE,eAAe,KAAM,IAAI,GAAI,IACtD,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC;AAClD,iBAAiB,CAAC,WAAW,GAAG,CAAC,OAAkC,EAAE,EAAE,CACrE,OAAO,EAAE,gBAAgB,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"DepositFiltration.js","sourceRoot":"","sources":["../../../src/components/DepositFiltration/DepositFiltration.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,KAAK,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,IAAI,kBAAkB,EAC3C,GAAG,EAAE,cAAc,KACf,KAAK,CAAC,QAAQ,EAAE;oBAClB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;oBAC9C,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG;iBACzB,CAAC,GACF,IACE,CACP,CAAC;IAEF,OAAO,CACL,MAAC,YAAY,IACX,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,EAC1C,cAAc,EAAC,KAAK,EACpB,OAAO,EAAC,aAAa,KACjB,IAAI,aAEP,oBAAoB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EACxF,KAAC,mBAAmB,IAAC,eAAe,EAAE,eAAe,KAAM,IAAI,GAAI,IACtD,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAiB,CAAC,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC;AAClD,iBAAiB,CAAC,WAAW,GAAG,CAAC,OAAkC,EAAE,EAAE,CACrE,OAAO,EAAE,gBAAgB,IAAI,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { BaseFiltrationInnerContent, NumberRange, NumberValue, StringArray } from '../../ui-kit/BaseFiltration/BaseFiltrationContent';
1
+ import type { BaseFiltrationInnerContent, NumberRange, StringArray } from '../../ui-kit/BaseFiltration/BaseFiltrationContent';
2
2
  export declare type DepositFiltrationSchema = {
3
3
  /** @title Валюта */
4
4
  currency?: StringArray;
@@ -7,7 +7,7 @@ export declare type DepositFiltrationSchema = {
7
7
  /** @title Выплата процентов */
8
8
  percents?: StringArray;
9
9
  /** @hidden */
10
- sum?: NumberValue;
10
+ sum?: NumberRange;
11
11
  /** @hidden */
12
12
  period?: NumberRange;
13
13
  };
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { parseDecimal } from './parseDecimal.js';
3
3
  export function renderRangeWithTicks({ list = [], min, max, step, value = list[0] || min, disabled, onChange, }) {
4
4
  const rangeValue = list.length ? list.indexOf(value) : value;
5
+ const rangeValueShift = rangeValue > min ? rangeValue - min : 0;
5
6
  const inputStyle = {
6
- backgroundSize: `${(((rangeValue - min) * 100) / (max - min)).toFixed(2)}% 100%`,
7
+ backgroundSize: `${((rangeValueShift * 100) / (max - min)).toFixed(2)}% 100%`,
7
8
  };
8
9
  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) => {
9
10
  const rawValue = parseDecimal(e.target?.value);
@@ -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,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7D,MAAM,UAAU,GAAG;QACjB,cAAc,EAAE,GAAG,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,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.9";
4123
4120
 
4124
4121
  exports.Blocks = Blocks;
4125
4122
  exports.ContentPage = ContentPage;