@redneckz/wildless-cms-uni-blocks 0.14.93 → 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 (183) hide show
  1. package/bundle/bundle.umd.js +27 -32
  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/components/ExchangeRateTile/renderInput.js +1 -1
  25. package/dist/ui-kit/Select/Select.js +1 -1
  26. package/dist/ui-kit/Select/Select.js.map +1 -1
  27. package/dist/utils/toLocalNumberFormat.d.ts +3 -1
  28. package/dist/utils/toLocalNumberFormat.js +2 -2
  29. package/dist/utils/toLocalNumberFormat.js.map +1 -1
  30. package/lib/common.css +1 -1
  31. package/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  32. package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  33. package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  34. package/lib/components/Calculator/Rate.d.ts +2 -2
  35. package/lib/components/Calculator/Rate.js +2 -1
  36. package/lib/components/Calculator/Rate.js.map +1 -1
  37. package/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  38. package/lib/components/Calculator/getDefaultValues.js +1 -6
  39. package/lib/components/Calculator/getDefaultValues.js.map +1 -1
  40. package/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  41. package/lib/components/Calculator/rangeHelpers.js +0 -2
  42. package/lib/components/Calculator/rangeHelpers.js.map +1 -1
  43. package/lib/components/Calculator/renderRate.d.ts +4 -9
  44. package/lib/components/Calculator/renderRate.js +1 -8
  45. package/lib/components/Calculator/renderRate.js.map +1 -1
  46. package/lib/components/ExchangeRateTile/renderInput.js +1 -1
  47. package/lib/ui-kit/Select/Select.js +1 -1
  48. package/lib/ui-kit/Select/Select.js.map +1 -1
  49. package/lib/utils/toLocalNumberFormat.d.ts +3 -1
  50. package/lib/utils/toLocalNumberFormat.js +2 -2
  51. package/lib/utils/toLocalNumberFormat.js.map +1 -1
  52. package/mobile/bundle/bundle.umd.js +27 -32
  53. package/mobile/bundle/bundle.umd.min.js +1 -1
  54. package/mobile/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  55. package/mobile/bundle/components/Calculator/Rate.d.ts +2 -2
  56. package/mobile/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
  57. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
  58. package/mobile/bundle/components/Calculator/renderRate.d.ts +4 -9
  59. package/mobile/bundle/utils/toLocalNumberFormat.d.ts +3 -1
  60. package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  61. package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
  62. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  63. package/mobile/dist/components/Calculator/Rate.d.ts +2 -2
  64. package/mobile/dist/components/Calculator/Rate.js +2 -1
  65. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  66. package/mobile/dist/components/Calculator/getDefaultValues.d.ts +0 -1
  67. package/mobile/dist/components/Calculator/getDefaultValues.js +1 -7
  68. package/mobile/dist/components/Calculator/getDefaultValues.js.map +1 -1
  69. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +0 -1
  70. package/mobile/dist/components/Calculator/rangeHelpers.js +1 -4
  71. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
  72. package/mobile/dist/components/Calculator/renderRate.d.ts +4 -9
  73. package/mobile/dist/components/Calculator/renderRate.js +1 -8
  74. package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
  75. package/mobile/dist/components/ExchangeRateTile/renderInput.js +1 -1
  76. package/mobile/dist/ui-kit/Select/Select.js +1 -1
  77. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  78. package/mobile/dist/utils/toLocalNumberFormat.d.ts +3 -1
  79. package/mobile/dist/utils/toLocalNumberFormat.js +2 -2
  80. package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -1
  81. package/mobile/lib/common.css +1 -1
  82. package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
  83. package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
  84. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  85. package/mobile/lib/components/Calculator/Rate.d.ts +2 -2
  86. package/mobile/lib/components/Calculator/Rate.js +2 -1
  87. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  88. package/mobile/lib/components/Calculator/getDefaultValues.d.ts +0 -1
  89. package/mobile/lib/components/Calculator/getDefaultValues.js +1 -6
  90. package/mobile/lib/components/Calculator/getDefaultValues.js.map +1 -1
  91. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +0 -1
  92. package/mobile/lib/components/Calculator/rangeHelpers.js +0 -2
  93. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
  94. package/mobile/lib/components/Calculator/renderRate.d.ts +4 -9
  95. package/mobile/lib/components/Calculator/renderRate.js +1 -8
  96. package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
  97. package/mobile/lib/components/ExchangeRateTile/renderInput.js +1 -1
  98. package/mobile/lib/ui-kit/Select/Select.js +1 -1
  99. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  100. package/mobile/lib/utils/toLocalNumberFormat.d.ts +3 -1
  101. package/mobile/lib/utils/toLocalNumberFormat.js +2 -2
  102. package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -1
  103. package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  104. package/mobile/src/components/Calculator/Rate.tsx +5 -4
  105. package/mobile/src/components/Calculator/getDefaultValues.ts +0 -9
  106. package/mobile/src/components/Calculator/rangeHelpers.ts +0 -10
  107. package/mobile/src/components/Calculator/renderRate.tsx +23 -44
  108. package/mobile/src/components/ExchangeRateTile/renderInput.tsx +1 -1
  109. package/mobile/src/ui-kit/Select/Select.tsx +1 -1
  110. package/mobile/src/utils/toLocalNumberFormat.ts +2 -2
  111. package/package.json +1 -1
  112. package/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
  113. package/src/components/Calculator/Rate.tsx +5 -4
  114. package/src/components/Calculator/getDefaultValues.ts +0 -9
  115. package/src/components/Calculator/rangeHelpers.ts +0 -10
  116. package/src/components/Calculator/renderRate.tsx +23 -44
  117. package/src/components/ExchangeRateTile/renderInput.tsx +1 -1
  118. package/src/ui-kit/Select/Select.tsx +1 -1
  119. package/src/utils/toLocalNumberFormat.ts +2 -2
  120. package/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  121. package/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  122. package/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  123. package/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  124. package/dist/components/Calculator/getCreditRate.d.ts +0 -7
  125. package/dist/components/Calculator/getCreditRate.js +0 -14
  126. package/dist/components/Calculator/getCreditRate.js.map +0 -1
  127. package/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  128. package/dist/components/Calculator/getDefaultMonths.js +0 -5
  129. package/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  130. package/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  131. package/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  132. package/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  133. package/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  134. package/dist/components/Calculator/renderRealEstateValue.js +0 -16
  135. package/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  136. package/lib/components/Calculator/getCreditRate.d.ts +0 -7
  137. package/lib/components/Calculator/getCreditRate.js +0 -11
  138. package/lib/components/Calculator/getCreditRate.js.map +0 -1
  139. package/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  140. package/lib/components/Calculator/getDefaultMonths.js +0 -2
  141. package/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  142. package/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  143. package/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  144. package/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  145. package/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  146. package/lib/components/Calculator/renderRealEstateValue.js +0 -13
  147. package/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  148. package/mobile/bundle/components/Calculator/getCreditRate.d.ts +0 -7
  149. package/mobile/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
  150. package/mobile/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  151. package/mobile/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
  152. package/mobile/dist/components/Calculator/getCreditRate.d.ts +0 -7
  153. package/mobile/dist/components/Calculator/getCreditRate.js +0 -14
  154. package/mobile/dist/components/Calculator/getCreditRate.js.map +0 -1
  155. package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
  156. package/mobile/dist/components/Calculator/getDefaultMonths.js +0 -5
  157. package/mobile/dist/components/Calculator/getDefaultMonths.js.map +0 -1
  158. package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  159. package/mobile/dist/components/Calculator/renderInitialFeeInput.js +0 -19
  160. package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
  161. package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
  162. package/mobile/dist/components/Calculator/renderRealEstateValue.js +0 -16
  163. package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
  164. package/mobile/lib/components/Calculator/getCreditRate.d.ts +0 -7
  165. package/mobile/lib/components/Calculator/getCreditRate.js +0 -11
  166. package/mobile/lib/components/Calculator/getCreditRate.js.map +0 -1
  167. package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
  168. package/mobile/lib/components/Calculator/getDefaultMonths.js +0 -2
  169. package/mobile/lib/components/Calculator/getDefaultMonths.js.map +0 -1
  170. package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
  171. package/mobile/lib/components/Calculator/renderInitialFeeInput.js +0 -16
  172. package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
  173. package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
  174. package/mobile/lib/components/Calculator/renderRealEstateValue.js +0 -13
  175. package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
  176. package/mobile/src/components/Calculator/getCreditRate.ts +0 -20
  177. package/mobile/src/components/Calculator/getDefaultMonths.ts +0 -2
  178. package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  179. package/mobile/src/components/Calculator/renderRealEstateValue.tsx +0 -33
  180. package/src/components/Calculator/getCreditRate.ts +0 -20
  181. package/src/components/Calculator/getDefaultMonths.ts +0 -2
  182. package/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
  183. package/src/components/Calculator/renderRealEstateValue.tsx +0 -33
@@ -1,7 +1,7 @@
1
1
  export const toLocalNumberFormat =
2
- (fractionDigits = 0) =>
2
+ (fractionDigits = 0, { fixed }: { fixed?: boolean } = {}) =>
3
3
  (_: string | number | undefined = 0): string =>
4
4
  new Intl.NumberFormat('ru-RU', {
5
- minimumFractionDigits: 0,
5
+ minimumFractionDigits: fixed ? fractionDigits : 0,
6
6
  maximumFractionDigits: fractionDigits,
7
7
  }).format(Number(_) || 0);
@@ -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 +0,0 @@
1
- export declare const getDefaultMonths: (minMonths: number, maxMonths: number) => number;
@@ -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,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,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,14 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getCreditRate = void 0;
3
- const DEFAULT_RATE = 10.2;
4
- const getCreditRate = (params) => {
5
- const { calculatorParams, isInsurance } = params;
6
- if (!calculatorParams) {
7
- return DEFAULT_RATE;
8
- }
9
- return isInsurance
10
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
11
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
12
- };
13
- exports.getCreditRate = getCreditRate;
14
- //# 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;AAOnB,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;AAVW,QAAA,aAAa,iBAUxB"}
@@ -1 +0,0 @@
1
- export declare const getDefaultMonths: (minMonths: number, maxMonths: number) => number;
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getDefaultMonths = void 0;
3
- const getDefaultMonths = (minMonths, maxMonths) => Math.round((maxMonths - minMonths) / 2);
4
- exports.getDefaultMonths = getDefaultMonths;
5
- //# sourceMappingURL=getDefaultMonths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultMonths.ts"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAE,EAAE,CACvE,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAD7B,QAAA,gBAAgB,oBACa"}
@@ -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,19 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderInitialFeeInput = 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 renderInitialFeeInput(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: [
14
- `От ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(0)(minSum)} рублей`,
15
- `До ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(0)(maxSum)} рублей`,
16
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
17
- }
18
- exports.renderInitialFeeInput = renderInitialFeeInput;
19
- //# 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,mEAAgE;AAChE,yEAAsE;AACtE,2CAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AAMxB,SAAgB,qBAAqB,CACnC,KAAiC,EACjC,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;YACL,MAAM,IAAA,yCAAmB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS;YAC7C,MAAM,IAAA,yCAAmB,EAAC,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;AAxBD,sDAwBC"}
@@ -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,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 +0,0 @@
1
- export declare const getDefaultMonths: (minMonths: number, maxMonths: number) => number;
@@ -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,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,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,14 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getCreditRate = void 0;
3
- const DEFAULT_RATE = 10.2;
4
- const getCreditRate = (params) => {
5
- const { calculatorParams, isInsurance } = params;
6
- if (!calculatorParams) {
7
- return DEFAULT_RATE;
8
- }
9
- return isInsurance
10
- ? calculatorParams?.rateWithInsurance || DEFAULT_RATE
11
- : calculatorParams?.rateWithoutInsurance || DEFAULT_RATE;
12
- };
13
- exports.getCreditRate = getCreditRate;
14
- //# 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;AAOnB,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;AAVW,QAAA,aAAa,iBAUxB"}
@@ -1 +0,0 @@
1
- export declare const getDefaultMonths: (minMonths: number, maxMonths: number) => number;
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getDefaultMonths = void 0;
3
- const getDefaultMonths = (minMonths, maxMonths) => Math.round((maxMonths - minMonths) / 2);
4
- exports.getDefaultMonths = getDefaultMonths;
5
- //# sourceMappingURL=getDefaultMonths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultMonths.js","sourceRoot":"","sources":["../../../src/components/Calculator/getDefaultMonths.ts"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAE,EAAE,CACvE,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AAD7B,QAAA,gBAAgB,oBACa"}
@@ -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,19 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderInitialFeeInput = 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 renderInitialFeeInput(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: [
14
- `От ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(0)(minSum)} рублей`,
15
- `До ${(0, toLocalNumberFormat_1.toLocalNumberFormat)(0)(maxSum)} рублей`,
16
- ], min: minSum, max: maxSum, step: STEP_MONEY, value: moneyValue, onChange: callback }));
17
- }
18
- exports.renderInitialFeeInput = renderInitialFeeInput;
19
- //# 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,mEAAgE;AAChE,yEAAsE;AACtE,2CAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AAMxB,SAAgB,qBAAqB,CACnC,KAAiC,EACjC,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;YACL,MAAM,IAAA,yCAAmB,EAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS;YAC7C,MAAM,IAAA,yCAAmB,EAAC,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;AAxBD,sDAwBC"}
@@ -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);