@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.
- package/bundle/bundle.umd.js +25 -30
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/bundle/components/Calculator/Rate.d.ts +2 -2
- package/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
- package/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
- package/bundle/components/Calculator/renderRate.d.ts +4 -9
- package/bundle/utils/toLocalNumberFormat.d.ts +3 -1
- package/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/dist/components/Calculator/Rate.d.ts +2 -2
- package/dist/components/Calculator/Rate.js +2 -1
- package/dist/components/Calculator/Rate.js.map +1 -1
- package/dist/components/Calculator/getDefaultValues.d.ts +0 -1
- package/dist/components/Calculator/getDefaultValues.js +1 -7
- package/dist/components/Calculator/getDefaultValues.js.map +1 -1
- package/dist/components/Calculator/rangeHelpers.d.ts +0 -1
- package/dist/components/Calculator/rangeHelpers.js +1 -4
- package/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/dist/components/Calculator/renderRate.d.ts +4 -9
- package/dist/components/Calculator/renderRate.js +1 -8
- package/dist/components/Calculator/renderRate.js.map +1 -1
- package/dist/utils/toLocalNumberFormat.d.ts +3 -1
- package/dist/utils/toLocalNumberFormat.js +2 -2
- package/dist/utils/toLocalNumberFormat.js.map +1 -1
- package/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/lib/components/Calculator/Rate.d.ts +2 -2
- package/lib/components/Calculator/Rate.js +2 -1
- package/lib/components/Calculator/Rate.js.map +1 -1
- package/lib/components/Calculator/getDefaultValues.d.ts +0 -1
- package/lib/components/Calculator/getDefaultValues.js +1 -6
- package/lib/components/Calculator/getDefaultValues.js.map +1 -1
- package/lib/components/Calculator/rangeHelpers.d.ts +0 -1
- package/lib/components/Calculator/rangeHelpers.js +0 -2
- package/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/lib/components/Calculator/renderRate.d.ts +4 -9
- package/lib/components/Calculator/renderRate.js +1 -8
- package/lib/components/Calculator/renderRate.js.map +1 -1
- package/lib/utils/toLocalNumberFormat.d.ts +3 -1
- package/lib/utils/toLocalNumberFormat.js +2 -2
- package/lib/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +25 -30
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/bundle/components/Calculator/Rate.d.ts +2 -2
- package/mobile/bundle/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/bundle/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/bundle/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/dist/components/Calculator/Rate.d.ts +2 -2
- package/mobile/dist/components/Calculator/Rate.js +2 -1
- package/mobile/dist/components/Calculator/Rate.js.map +1 -1
- package/mobile/dist/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultValues.js +1 -7
- package/mobile/dist/components/Calculator/getDefaultValues.js.map +1 -1
- package/mobile/dist/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/dist/components/Calculator/rangeHelpers.js +1 -4
- package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/dist/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/dist/components/Calculator/renderRate.js +1 -8
- package/mobile/dist/components/Calculator/renderRate.js.map +1 -1
- package/mobile/dist/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/dist/utils/toLocalNumberFormat.js +2 -2
- package/mobile/dist/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.d.ts +4 -2
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js +3 -1
- package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
- package/mobile/lib/components/Calculator/Rate.d.ts +2 -2
- package/mobile/lib/components/Calculator/Rate.js +2 -1
- package/mobile/lib/components/Calculator/Rate.js.map +1 -1
- package/mobile/lib/components/Calculator/getDefaultValues.d.ts +0 -1
- package/mobile/lib/components/Calculator/getDefaultValues.js +1 -6
- package/mobile/lib/components/Calculator/getDefaultValues.js.map +1 -1
- package/mobile/lib/components/Calculator/rangeHelpers.d.ts +0 -1
- package/mobile/lib/components/Calculator/rangeHelpers.js +0 -2
- package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -1
- package/mobile/lib/components/Calculator/renderRate.d.ts +4 -9
- package/mobile/lib/components/Calculator/renderRate.js +1 -8
- package/mobile/lib/components/Calculator/renderRate.js.map +1 -1
- package/mobile/lib/utils/toLocalNumberFormat.d.ts +3 -1
- package/mobile/lib/utils/toLocalNumberFormat.js +2 -2
- package/mobile/lib/utils/toLocalNumberFormat.js.map +1 -1
- package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
- package/mobile/src/components/Calculator/Rate.tsx +5 -4
- package/mobile/src/components/Calculator/getDefaultValues.ts +0 -9
- package/mobile/src/components/Calculator/rangeHelpers.ts +0 -10
- package/mobile/src/components/Calculator/renderRate.tsx +23 -44
- package/mobile/src/utils/toLocalNumberFormat.ts +2 -2
- package/package.json +1 -1
- package/src/components/Calculator/CalculatorValueBlock.tsx +8 -4
- package/src/components/Calculator/Rate.tsx +5 -4
- package/src/components/Calculator/getDefaultValues.ts +0 -9
- package/src/components/Calculator/rangeHelpers.ts +0 -10
- package/src/components/Calculator/renderRate.tsx +23 -44
- package/src/utils/toLocalNumberFormat.ts +2 -2
- package/bundle/components/Calculator/getCreditRate.d.ts +0 -7
- package/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/dist/components/Calculator/getCreditRate.d.ts +0 -7
- package/dist/components/Calculator/getCreditRate.js +0 -14
- package/dist/components/Calculator/getCreditRate.js.map +0 -1
- package/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/dist/components/Calculator/getDefaultMonths.js +0 -5
- package/dist/components/Calculator/getDefaultMonths.js.map +0 -1
- package/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/dist/components/Calculator/renderInitialFeeInput.js +0 -19
- package/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/dist/components/Calculator/renderRealEstateValue.js +0 -16
- package/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/lib/components/Calculator/getCreditRate.d.ts +0 -7
- package/lib/components/Calculator/getCreditRate.js +0 -11
- package/lib/components/Calculator/getCreditRate.js.map +0 -1
- package/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/lib/components/Calculator/getDefaultMonths.js +0 -2
- package/lib/components/Calculator/getDefaultMonths.js.map +0 -1
- package/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/lib/components/Calculator/renderInitialFeeInput.js +0 -16
- package/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/lib/components/Calculator/renderRealEstateValue.js +0 -13
- package/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/bundle/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/bundle/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/bundle/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/bundle/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/dist/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/dist/components/Calculator/getCreditRate.js +0 -14
- package/mobile/dist/components/Calculator/getCreditRate.js.map +0 -1
- package/mobile/dist/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/dist/components/Calculator/getDefaultMonths.js +0 -5
- package/mobile/dist/components/Calculator/getDefaultMonths.js.map +0 -1
- package/mobile/dist/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js +0 -19
- package/mobile/dist/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/mobile/dist/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/dist/components/Calculator/renderRealEstateValue.js +0 -16
- package/mobile/dist/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/lib/components/Calculator/getCreditRate.d.ts +0 -7
- package/mobile/lib/components/Calculator/getCreditRate.js +0 -11
- package/mobile/lib/components/Calculator/getCreditRate.js.map +0 -1
- package/mobile/lib/components/Calculator/getDefaultMonths.d.ts +0 -1
- package/mobile/lib/components/Calculator/getDefaultMonths.js +0 -2
- package/mobile/lib/components/Calculator/getDefaultMonths.js.map +0 -1
- package/mobile/lib/components/Calculator/renderInitialFeeInput.d.ts +0 -6
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js +0 -16
- package/mobile/lib/components/Calculator/renderInitialFeeInput.js.map +0 -1
- package/mobile/lib/components/Calculator/renderRealEstateValue.d.ts +0 -6
- package/mobile/lib/components/Calculator/renderRealEstateValue.js +0 -13
- package/mobile/lib/components/Calculator/renderRealEstateValue.js.map +0 -1
- package/mobile/src/components/Calculator/getCreditRate.ts +0 -20
- package/mobile/src/components/Calculator/getDefaultMonths.ts +0 -2
- package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
- package/mobile/src/components/Calculator/renderRealEstateValue.tsx +0 -33
- package/src/components/Calculator/getCreditRate.ts +0 -20
- package/src/components/Calculator/getDefaultMonths.ts +0 -2
- package/src/components/Calculator/renderInitialFeeInput.tsx +0 -36
- 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,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 +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,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,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,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
|
-
}
|