@redneckz/wildless-cms-uni-blocks 0.14.94 → 0.14.95

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 (165) hide show
  1. package/bundle/bundle.umd.js +25 -30
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  4. package/bundle/components/Calculator/Rate.d.ts +2 -2
  5. package/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
  6. package/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
  7. package/bundle/components/Calculator/renderRate.d.ts +4 -9
  8. package/bundle/utils/toLocalNumberFormat.d.ts +3 -1
  9. package/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  10. package/dist/components/Calculator/CalculatorValueBlock.js +3 -1
  11. package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  12. package/dist/components/Calculator/Rate.d.ts +2 -2
  13. package/dist/components/Calculator/Rate.js +2 -1
  14. package/dist/components/Calculator/Rate.js.map +1 -1
  15. package/dist/components/Calculator/getDefaultValues.d.ts +0 -1
  16. package/dist/components/Calculator/getDefaultValues.js +1 -7
  17. package/dist/components/Calculator/getDefaultValues.js.map +1 -1
  18. package/dist/components/Calculator/rangeHelpers.d.ts +0 -1
  19. package/dist/components/Calculator/rangeHelpers.js +1 -4
  20. package/dist/components/Calculator/rangeHelpers.js.map +1 -1
  21. package/dist/components/Calculator/renderRate.d.ts +4 -9
  22. package/dist/components/Calculator/renderRate.js +1 -8
  23. package/dist/components/Calculator/renderRate.js.map +1 -1
  24. package/dist/utils/toLocalNumberFormat.d.ts +3 -1
  25. package/dist/utils/toLocalNumberFormat.js +2 -2
  26. package/dist/utils/toLocalNumberFormat.js.map +1 -1
  27. package/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  28. package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  29. package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  30. package/lib/components/Calculator/Rate.d.ts +2 -2
  31. package/lib/components/Calculator/Rate.js +2 -1
  32. package/lib/components/Calculator/Rate.js.map +1 -1
  33. package/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  34. package/lib/components/Calculator/getDefaultValues.js +1 -6
  35. package/lib/components/Calculator/getDefaultValues.js.map +1 -1
  36. package/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  37. package/lib/components/Calculator/rangeHelpers.js +0 -2
  38. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  39. package/lib/components/Calculator/renderRate.d.ts +4 -9
  40. package/lib/components/Calculator/renderRate.js +1 -8
  41. package/lib/components/Calculator/renderRate.js.map +1 -1
  42. package/lib/utils/toLocalNumberFormat.d.ts +3 -1
  43. package/lib/utils/toLocalNumberFormat.js +2 -2
  44. package/lib/utils/toLocalNumberFormat.js.map +1 -1
  45. package/mobile/bundle/bundle.umd.js +25 -30
  46. package/mobile/bundle/bundle.umd.min.js +1 -1
  47. package/mobile/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  48. package/mobile/bundle/components/Calculator/Rate.d.ts +2 -2
  49. package/mobile/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
  50. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
  51. package/mobile/bundle/components/Calculator/renderRate.d.ts +4 -9
  52. package/mobile/bundle/utils/toLocalNumberFormat.d.ts +3 -1
  53. package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  54. package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
  55. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  56. package/mobile/dist/components/Calculator/Rate.d.ts +2 -2
  57. package/mobile/dist/components/Calculator/Rate.js +2 -1
  58. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  59. package/mobile/dist/components/Calculator/getDefaultValues.d.ts +0 -1
  60. package/mobile/dist/components/Calculator/getDefaultValues.js +1 -7
  61. package/mobile/dist/components/Calculator/getDefaultValues.js.map +1 -1
  62. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +0 -1
  63. package/mobile/dist/components/Calculator/rangeHelpers.js +1 -4
  64. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  65. package/mobile/dist/components/Calculator/renderRate.d.ts +4 -9
  66. package/mobile/dist/components/Calculator/renderRate.js +1 -8
  67. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  68. package/mobile/dist/utils/toLocalNumberFormat.d.ts +3 -1
  69. package/mobile/dist/utils/toLocalNumberFormat.js +2 -2
  70. package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -1
  71. package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  72. package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  73. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  74. package/mobile/lib/components/Calculator/Rate.d.ts +2 -2
  75. package/mobile/lib/components/Calculator/Rate.js +2 -1
  76. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  77. package/mobile/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  78. package/mobile/lib/components/Calculator/getDefaultValues.js +1 -6
  79. package/mobile/lib/components/Calculator/getDefaultValues.js.map +1 -1
  80. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  81. package/mobile/lib/components/Calculator/rangeHelpers.js +0 -2
  82. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  83. package/mobile/lib/components/Calculator/renderRate.d.ts +4 -9
  84. package/mobile/lib/components/Calculator/renderRate.js +1 -8
  85. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  86. package/mobile/lib/utils/toLocalNumberFormat.d.ts +3 -1
  87. package/mobile/lib/utils/toLocalNumberFormat.js +2 -2
  88. package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -1
  89. package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  90. package/mobile/src/components/Calculator/Rate.tsx +5 -4
  91. package/mobile/src/components/Calculator/getDefaultValues.ts +0 -9
  92. package/mobile/src/components/Calculator/rangeHelpers.ts +0 -10
  93. package/mobile/src/components/Calculator/renderRate.tsx +23 -44
  94. package/mobile/src/utils/toLocalNumberFormat.ts +2 -2
  95. package/package.json +1 -1
  96. package/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  97. package/src/components/Calculator/Rate.tsx +5 -4
  98. package/src/components/Calculator/getDefaultValues.ts +0 -9
  99. package/src/components/Calculator/rangeHelpers.ts +0 -10
  100. package/src/components/Calculator/renderRate.tsx +23 -44
  101. package/src/utils/toLocalNumberFormat.ts +2 -2
  102. package/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  103. package/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  104. package/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  105. package/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  106. package/dist/components/Calculator/getCreditRate.d.ts +0 -7
  107. package/dist/components/Calculator/getCreditRate.js +0 -14
  108. package/dist/components/Calculator/getCreditRate.js.map +0 -1
  109. package/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  110. package/dist/components/Calculator/getDefaultMonths.js +0 -5
  111. package/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  112. package/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  113. package/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  114. package/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  115. package/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  116. package/dist/components/Calculator/renderRealEstateValue.js +0 -16
  117. package/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  118. package/lib/components/Calculator/getCreditRate.d.ts +0 -7
  119. package/lib/components/Calculator/getCreditRate.js +0 -11
  120. package/lib/components/Calculator/getCreditRate.js.map +0 -1
  121. package/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  122. package/lib/components/Calculator/getDefaultMonths.js +0 -2
  123. package/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  124. package/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  125. package/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  126. package/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  127. package/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  128. package/lib/components/Calculator/renderRealEstateValue.js +0 -13
  129. package/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  130. package/mobile/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  131. package/mobile/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  132. package/mobile/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  133. package/mobile/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  134. package/mobile/dist/components/Calculator/getCreditRate.d.ts +0 -7
  135. package/mobile/dist/components/Calculator/getCreditRate.js +0 -14
  136. package/mobile/dist/components/Calculator/getCreditRate.js.map +0 -1
  137. package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  138. package/mobile/dist/components/Calculator/getDefaultMonths.js +0 -5
  139. package/mobile/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  140. package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  141. package/mobile/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  142. package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  143. package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  144. package/mobile/dist/components/Calculator/renderRealEstateValue.js +0 -16
  145. package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  146. package/mobile/lib/components/Calculator/getCreditRate.d.ts +0 -7
  147. package/mobile/lib/components/Calculator/getCreditRate.js +0 -11
  148. package/mobile/lib/components/Calculator/getCreditRate.js.map +0 -1
  149. package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  150. package/mobile/lib/components/Calculator/getDefaultMonths.js +0 -2
  151. package/mobile/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  152. package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  153. package/mobile/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  154. package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  155. package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  156. package/mobile/lib/components/Calculator/renderRealEstateValue.js +0 -13
  157. package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  158. package/mobile/src/components/Calculator/getCreditRate.ts +0 -20
  159. package/mobile/src/components/Calculator/getDefaultMonths.ts +0 -2
  160. package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  161. package/mobile/src/components/Calculator/renderRealEstateValue.tsx +0 -33
  162. package/src/components/Calculator/getCreditRate.ts +0 -20
  163. package/src/components/Calculator/getDefaultMonths.ts +0 -2
  164. package/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  165. package/src/components/Calculator/renderRealEstateValue.tsx +0 -33
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface RenderRealEstateValueInputProps {
3
- moneyValue: number;
4
- }
5
- export declare function renderRealEstateValue(props: RenderRealEstateValueInputProps, title?: string, callback?: (value: number) => void): JSX.Element;
6
- export {};
@@ -1,16 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderRealEstateValue = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- // TEMP
5
- const InputRange_1 = require("../../ui-kit/InputRange/InputRange");
6
- const toLocalNumberFormat_1 = require("../../utils/toLocalNumberFormat");
7
- const constants_1 = require("./constants");
8
- const STEP_MONEY = 1000;
9
- function renderRealEstateValue(props, title, callback) {
10
- const { moneyValue } = props;
11
- const minSum = constants_1.DEFAULT_MIN_SUM;
12
- const maxSum = constants_1.DEFAULT_MAX_SUM;
13
- return ((0, jsx_runtime_1.jsx)(InputRange_1.InputRange, { title: title, items: [`От ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(2)(minSum)} ₽`, `До ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(2)(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
14
- }
15
- exports.renderRealEstateValue = renderRealEstateValue;
16
- //# sourceMappingURL=renderRealEstateValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderRealEstateValue.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderRealEstateValue.tsx"],"names":[],"mappings":";;;AAAA,OAAO;AACP,mEAAgE;AAChE,yEAAsE;AACtE,2CAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AAMxB,SAAgB,qBAAqB,CACnC,KAAsC,EACtC,KAAc,EACd,QAAkC;IAElC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,MAAM,MAAM,GAAG,2BAAe,CAAC;IAC/B,MAAM,MAAM,GAAG,2BAAe,CAAC;IAE/B,OAAO,CACL,uBAAC,uBAAU,IACT,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,MAAM,IAAA,yCAAmB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,IAAA,yCAAmB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAC3F,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC;AArBD,sDAqBC"}
@@ -1,7 +0,0 @@
1
- import { type CalculatorParams } from './CalculatorContent';
2
- interface GetCreditRateParams {
3
- calculatorParams?: CalculatorParams;
4
- isInsurance: boolean;
5
- }
6
- export declare const getCreditRate: (params: GetCreditRateParams) => number;
7
- export {};
@@ -1,11 +0,0 @@
1
- const DEFAULT_RATE = 10.2;
2
- export const getCreditRate = (params) => {
3
- const { calculatorParams, isInsurance } = params;
4
- if (!calculatorParams) {
5
- return DEFAULT_RATE;
6
- }
7
- return isInsurance
8
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
9
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
10
- };
11
- //# sourceMappingURL=getCreditRate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCreditRate.js","sourceRoot":"","sources":["../../../src/components/Calculator/getCreditRate.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG,IAAI,CAAC;AAO1B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAA2B,EAAE,EAAE;IAC3D,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAEjD,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO,YAAY,CAAC;KACrB;IAED,OAAO,WAAW;QAChB,CAAC,CAAC,gBAAgB,EAAE,iBAAiB,IAAI,YAAY;QACrD,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,IAAI,YAAY,CAAC;AAC7D,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const getDefaultMonths: (minMonths: number, maxMonths: number) => number;
@@ -1,2 +0,0 @@
1
- export const getDefaultMonths = (minMonths, maxMonths) => Math.round((maxMonths - minMonths) / 2);
2
- //# sourceMappingURL=getDefaultMonths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultMonths.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAE,EAAE,CACvE,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface RenderWantedSumInputParams {
3
- moneyValue: number;
4
- }
5
- export declare function renderInitialFeeInput(props: RenderWantedSumInputParams, title?: string, callback?: (value: number) => void): JSX.Element;
6
- export {};
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- // TEMP
3
- import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
4
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
5
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants.js';
6
- const STEP_MONEY = 1000;
7
- export function renderInitialFeeInput(props, title, callback) {
8
- const { moneyValue } = props;
9
- const minSum = DEFAULT_MIN_SUM;
10
- const maxSum = DEFAULT_MAX_SUM;
11
- return (_jsx(InputRange, { title: title, items: [
12
- `От ${toLocalNumberFormat(0)(minSum)} рублей`,
13
- `До ${toLocalNumberFormat(0)(maxSum)} рублей`,
14
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
15
- }
16
- //# sourceMappingURL=renderInitialFeeInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderInitialFeeInput.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderInitialFeeInput.tsx"],"names":[],"mappings":";AAAA,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AAMxB,MAAM,UAAU,qBAAqB,CACnC,KAAiC,EACjC,KAAc,EACd,QAAkC;IAElC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,MAAM,MAAM,GAAG,eAAe,CAAC;IAC/B,MAAM,MAAM,GAAG,eAAe,CAAC;IAE/B,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE;YACL,MAAM,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS;YAC7C,MAAM,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS;SAC9C,EACD,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface RenderRealEstateValueInputProps {
3
- moneyValue: number;
4
- }
5
- export declare function renderRealEstateValue(props: RenderRealEstateValueInputProps, title?: string, callback?: (value: number) => void): JSX.Element;
6
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
- // TEMP
3
- import { InputRange } from '../../ui-kit/InputRange/InputRange.js';
4
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
5
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants.js';
6
- const STEP_MONEY = 1000;
7
- export function renderRealEstateValue(props, title, callback) {
8
- const { moneyValue } = props;
9
- const minSum = DEFAULT_MIN_SUM;
10
- const maxSum = DEFAULT_MAX_SUM;
11
- return (_jsx(InputRange, { title: title, items: [`От ${toLocalNumberFormat(2)(minSum)} ₽`, `До ${toLocalNumberFormat(2)(maxSum)} ₽`], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
12
- }
13
- //# sourceMappingURL=renderRealEstateValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderRealEstateValue.js","sourceRoot":"","sources":["../../../src/components/Calculator/renderRealEstateValue.tsx"],"names":[],"mappings":";AAAA,OAAO;AACP,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AAMxB,MAAM,UAAU,qBAAqB,CACnC,KAAsC,EACtC,KAAc,EACd,QAAkC;IAElC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE7B,MAAM,MAAM,GAAG,eAAe,CAAC;IAC/B,MAAM,MAAM,GAAG,eAAe,CAAC;IAE/B,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,CAAC,MAAM,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAC3F,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- import { type CalculatorParams } from './CalculatorContent';
2
-
3
- const DEFAULT_RATE = 10.2;
4
-
5
- interface GetCreditRateParams {
6
- calculatorParams?: CalculatorParams;
7
- isInsurance: boolean;
8
- }
9
-
10
- export const getCreditRate = (params: GetCreditRateParams) => {
11
- const { calculatorParams, isInsurance } = params;
12
-
13
- if (!calculatorParams) {
14
- return DEFAULT_RATE;
15
- }
16
-
17
- return isInsurance
18
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
19
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
20
- };
@@ -1,2 +0,0 @@
1
- export const getDefaultMonths = (minMonths: number, maxMonths: number) =>
2
- Math.round((maxMonths - minMonths) / 2);
@@ -1,36 +0,0 @@
1
- // TEMP
2
- import { InputRange } from '../../ui-kit/InputRange/InputRange';
3
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
4
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
5
-
6
- const STEP_MONEY = 1000;
7
-
8
- interface RenderWantedSumInputParams {
9
- moneyValue: number;
10
- }
11
-
12
- export function renderInitialFeeInput(
13
- props: RenderWantedSumInputParams,
14
- title?: string,
15
- callback?: (value: number) => void,
16
- ) {
17
- const { moneyValue } = props;
18
-
19
- const minSum = DEFAULT_MIN_SUM;
20
- const maxSum = DEFAULT_MAX_SUM;
21
-
22
- return (
23
- <InputRange
24
- title={title}
25
- items={[
26
- `От ${toLocalNumberFormat(0)(minSum)} рублей`,
27
- `До ${toLocalNumberFormat(0)(maxSum)} рублей`,
28
- ]}
29
- min={minSum}
30
- max={maxSum}
31
- step={STEP_MONEY}
32
- value={moneyValue}
33
- onChange={callback}
34
- />
35
- );
36
- }
@@ -1,33 +0,0 @@
1
- // TEMP
2
- import { InputRange } from '../../ui-kit/InputRange/InputRange';
3
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
4
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
5
-
6
- const STEP_MONEY = 1000;
7
-
8
- interface RenderRealEstateValueInputProps {
9
- moneyValue: number;
10
- }
11
-
12
- export function renderRealEstateValue(
13
- props: RenderRealEstateValueInputProps,
14
- title?: string,
15
- callback?: (value: number) => void,
16
- ) {
17
- const { moneyValue } = props;
18
-
19
- const minSum = DEFAULT_MIN_SUM;
20
- const maxSum = DEFAULT_MAX_SUM;
21
-
22
- return (
23
- <InputRange
24
- title={title}
25
- items={[`От ${toLocalNumberFormat(2)(minSum)} ₽`, `До ${toLocalNumberFormat(2)(maxSum)} ₽`]}
26
- min={minSum}
27
- max={maxSum}
28
- step={STEP_MONEY}
29
- value={moneyValue}
30
- onChange={callback}
31
- />
32
- );
33
- }
@@ -1,20 +0,0 @@
1
- import { type CalculatorParams } from './CalculatorContent';
2
-
3
- const DEFAULT_RATE = 10.2;
4
-
5
- interface GetCreditRateParams {
6
- calculatorParams?: CalculatorParams;
7
- isInsurance: boolean;
8
- }
9
-
10
- export const getCreditRate = (params: GetCreditRateParams) => {
11
- const { calculatorParams, isInsurance } = params;
12
-
13
- if (!calculatorParams) {
14
- return DEFAULT_RATE;
15
- }
16
-
17
- return isInsurance
18
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
19
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
20
- };
@@ -1,2 +0,0 @@
1
- export const getDefaultMonths = (minMonths: number, maxMonths: number) =>
2
- Math.round((maxMonths - minMonths) / 2);
@@ -1,36 +0,0 @@
1
- // TEMP
2
- import { InputRange } from '../../ui-kit/InputRange/InputRange';
3
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
4
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
5
-
6
- const STEP_MONEY = 1000;
7
-
8
- interface RenderWantedSumInputParams {
9
- moneyValue: number;
10
- }
11
-
12
- export function renderInitialFeeInput(
13
- props: RenderWantedSumInputParams,
14
- title?: string,
15
- callback?: (value: number) => void,
16
- ) {
17
- const { moneyValue } = props;
18
-
19
- const minSum = DEFAULT_MIN_SUM;
20
- const maxSum = DEFAULT_MAX_SUM;
21
-
22
- return (
23
- <InputRange
24
- title={title}
25
- items={[
26
- `От ${toLocalNumberFormat(0)(minSum)} рублей`,
27
- `До ${toLocalNumberFormat(0)(maxSum)} рублей`,
28
- ]}
29
- min={minSum}
30
- max={maxSum}
31
- step={STEP_MONEY}
32
- value={moneyValue}
33
- onChange={callback}
34
- />
35
- );
36
- }
@@ -1,33 +0,0 @@
1
- // TEMP
2
- import { InputRange } from '../../ui-kit/InputRange/InputRange';
3
- import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat';
4
- import { DEFAULT_MAX_SUM, DEFAULT_MIN_SUM } from './constants';
5
-
6
- const STEP_MONEY = 1000;
7
-
8
- interface RenderRealEstateValueInputProps {
9
- moneyValue: number;
10
- }
11
-
12
- export function renderRealEstateValue(
13
- props: RenderRealEstateValueInputProps,
14
- title?: string,
15
- callback?: (value: number) => void,
16
- ) {
17
- const { moneyValue } = props;
18
-
19
- const minSum = DEFAULT_MIN_SUM;
20
- const maxSum = DEFAULT_MAX_SUM;
21
-
22
- return (
23
- <InputRange
24
- title={title}
25
- items={[`От ${toLocalNumberFormat(2)(minSum)} ₽`, `До ${toLocalNumberFormat(2)(maxSum)} ₽`]}
26
- min={minSum}
27
- max={maxSum}
28
- step={STEP_MONEY}
29
- value={moneyValue}
30
- onChange={callback}
31
- />
32
- );
33
- }