@redneckz/wildless-cms-uni-blocks 0.14.230 → 0.14.232
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/EventBus/defaultEventBus.d.ts +2 -2
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +51 -40
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/bundle/components/Calculator/CalculatorContent.d.ts +27 -1
- package/bundle/components/Calculator/constants.d.ts +1 -1
- package/bundle/components/Calculator/{getBusinessDepositCalculatorParams.d.ts → useBusinessDepositCalculatorParams.d.ts} +2 -4
- package/bundle/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/bundle/hooks/useLocation.d.ts +2 -7
- package/bundle/hooks/useRegions.d.ts +1 -0
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/dist/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js +3 -3
- package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/dist/components/Calculator/CalculatorContent.d.ts +27 -1
- package/dist/components/Calculator/constants.d.ts +1 -1
- package/dist/components/Calculator/{getBusinessDepositCalculatorParams.d.ts → useBusinessDepositCalculatorParams.d.ts} +2 -4
- package/dist/components/Calculator/{getBusinessDepositCalculatorParams.js → useBusinessDepositCalculatorParams.js} +8 -6
- package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/dist/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/dist/components/Calculator/useBusinessDepositRates.js +15 -0
- package/dist/components/Calculator/useBusinessDepositRates.js.map +1 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/dist/hooks/useLocation.d.ts +2 -7
- package/dist/hooks/useLocation.js.map +1 -1
- package/dist/hooks/useRegions.d.ts +1 -0
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/lib/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js +3 -3
- package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/lib/components/Calculator/CalculatorContent.d.ts +27 -1
- package/lib/components/Calculator/constants.d.ts +1 -1
- package/lib/components/Calculator/{getBusinessDepositCalculatorParams.d.ts → useBusinessDepositCalculatorParams.d.ts} +2 -4
- package/lib/components/Calculator/{getBusinessDepositCalculatorParams.js → useBusinessDepositCalculatorParams.js} +6 -4
- package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/lib/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/lib/components/Calculator/useBusinessDepositRates.js +12 -0
- package/lib/components/Calculator/useBusinessDepositRates.js.map +1 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/lib/hooks/useLocation.d.ts +2 -7
- package/lib/hooks/useLocation.js.map +1 -1
- package/lib/hooks/useRegions.d.ts +1 -0
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/bundle/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +51 -40
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +27 -1
- package/mobile/bundle/components/Calculator/constants.d.ts +1 -1
- package/mobile/bundle/components/Calculator/{getBusinessDepositCalculatorParams.d.ts → useBusinessDepositCalculatorParams.d.ts} +2 -4
- package/mobile/bundle/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/bundle/hooks/useLocation.d.ts +2 -7
- package/mobile/bundle/hooks/useRegions.d.ts +1 -0
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/bundle/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +3 -3
- package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/dist/components/Calculator/CalculatorContent.d.ts +27 -1
- package/mobile/dist/components/Calculator/constants.d.ts +1 -1
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.d.ts +25 -0
- package/mobile/dist/components/Calculator/{getBusinessDepositCalculatorParams.js → useBusinessDepositCalculatorParams.js} +8 -6
- package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/mobile/dist/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/mobile/dist/components/Calculator/useBusinessDepositRates.js +15 -0
- package/mobile/dist/components/Calculator/useBusinessDepositRates.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/dist/hooks/useLocation.d.ts +2 -7
- package/mobile/dist/hooks/useLocation.js.map +1 -1
- package/mobile/dist/hooks/useRegions.d.ts +1 -0
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/dist/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/lib/EventBus/defaultEventBus.d.ts +2 -2
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.d.ts +0 -3
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +3 -3
- package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
- package/mobile/lib/components/Calculator/CalculatorContent.d.ts +27 -1
- package/mobile/lib/components/Calculator/constants.d.ts +1 -1
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.d.ts +25 -0
- package/mobile/lib/components/Calculator/{getBusinessDepositCalculatorParams.js → useBusinessDepositCalculatorParams.js} +6 -4
- package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -0
- package/mobile/lib/components/Calculator/useBusinessDepositRates.d.ts +4 -0
- package/mobile/lib/components/Calculator/useBusinessDepositRates.js +12 -0
- package/mobile/lib/components/Calculator/useBusinessDepositRates.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +2 -2
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/BurgerMenuDialog.js.map +1 -1
- package/mobile/lib/hooks/useLocation.d.ts +2 -7
- package/mobile/lib/hooks/useLocation.js.map +1 -1
- package/mobile/lib/hooks/useRegions.d.ts +1 -0
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -0
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.d.ts +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js +4 -3
- package/mobile/lib/ui-kit/LocationDialog/renderRegion.js.map +1 -1
- package/mobile/src/EventBus/defaultEventBus.ts +2 -2
- package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +7 -10
- package/mobile/src/components/Calculator/CalculatorContent.ts +31 -1
- package/mobile/src/components/Calculator/constants.ts +1 -1
- package/mobile/src/components/Calculator/{getBusinessDepositCalculatorParams.ts → useBusinessDepositCalculatorParams.ts} +8 -9
- package/mobile/src/components/Calculator/useBusinessDepositRates.ts +22 -0
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/mobile/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/mobile/src/hooks/useLocation.ts +6 -13
- package/mobile/src/hooks/useRegions.ts +1 -0
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/mobile/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
- package/package.json +1 -1
- package/src/EventBus/defaultEventBus.ts +2 -2
- package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +7 -10
- package/src/components/Calculator/Calculator.fixture.tsx +2 -2
- package/src/components/Calculator/CalculatorContent.ts +31 -1
- package/src/components/Calculator/constants.ts +1 -1
- package/src/components/Calculator/{getBusinessDepositCalculatorParams.ts → useBusinessDepositCalculatorParams.ts} +8 -9
- package/src/components/Calculator/useBusinessDepositRates.ts +22 -0
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +2 -2
- package/src/components/StickyBottomMenu/BurgerMenuDialog.tsx +3 -2
- package/src/hooks/useLocation.ts +6 -13
- package/src/hooks/useRegions.ts +1 -0
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +3 -2
- package/src/ui-kit/LocationDialog/LocationDialog.tsx +9 -8
- package/src/ui-kit/LocationDialog/renderRegion.tsx +16 -15
- package/dist/components/Calculator/getBusinessDepositCalculatorParams.js.map +0 -1
- package/lib/components/Calculator/getBusinessDepositCalculatorParams.js.map +0 -1
- package/mobile/dist/components/Calculator/getBusinessDepositCalculatorParams.d.ts +0 -27
- package/mobile/dist/components/Calculator/getBusinessDepositCalculatorParams.js.map +0 -1
- package/mobile/lib/components/Calculator/getBusinessDepositCalculatorParams.d.ts +0 -27
- package/mobile/lib/components/Calculator/getBusinessDepositCalculatorParams.js.map +0 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
1
|
import { type BusinessDepositCalculatorProps } from './CalculatorContent';
|
|
3
|
-
import { type BusinessDepositCalculatorData } from './getBusinessDepositCalculatorParams';
|
|
4
2
|
export interface BusinessDepositCalculatorProp extends BusinessDepositCalculatorProps {
|
|
5
3
|
className?: string;
|
|
6
|
-
calcSource?: BusinessDepositCalculatorData & JSONRefObject;
|
|
7
4
|
}
|
|
8
5
|
export declare const BusinessDepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<BusinessDepositCalculatorProp, any, any>;
|
|
@@ -4,6 +4,30 @@ import { type Footnote } from '../../model/Footnote';
|
|
|
4
4
|
import { type HeadlineCommonProps, type TitleProps } from '../../model/HeadlineType';
|
|
5
5
|
import { type IconProps } from '../../model/Picture';
|
|
6
6
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
|
+
/**
|
|
8
|
+
* @title ЮЛ
|
|
9
|
+
* @default {"rateType": "UL"}
|
|
10
|
+
*/
|
|
11
|
+
export declare type ULRateDef = {
|
|
12
|
+
rateType: 'UL';
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @title ИП
|
|
16
|
+
* @default {"rateType": "IP"}
|
|
17
|
+
*/
|
|
18
|
+
export declare type IPRateDef = {
|
|
19
|
+
rateType: 'IP';
|
|
20
|
+
};
|
|
21
|
+
/** @title Не выбрано * */
|
|
22
|
+
export declare type EmptyRateParams = {
|
|
23
|
+
/** @default "" */
|
|
24
|
+
rateType: '';
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @title Назначение ставки
|
|
28
|
+
* @default {"rateType": ""}
|
|
29
|
+
*/
|
|
30
|
+
export declare type RateParamsDef = EmptyRateParams | ULRateDef | IPRateDef;
|
|
7
31
|
export declare type CommonCalculatorProps = Footnote & ButtonsSectionContent & {
|
|
8
32
|
/** @title Данные калькулятора */
|
|
9
33
|
calcSource?: JSONRefObject;
|
|
@@ -80,7 +104,9 @@ export interface BusinessDepositDefaultParams extends CommonDefaultParams {
|
|
|
80
104
|
/** @title Выплата процентов */
|
|
81
105
|
isMonthlyInterestPayment?: boolean;
|
|
82
106
|
}
|
|
83
|
-
export interface BusinessDepositCalculatorProps extends
|
|
107
|
+
export interface BusinessDepositCalculatorProps extends Footnote, ButtonsSectionContent {
|
|
108
|
+
/** @title Ставка для */
|
|
109
|
+
rateParams?: RateParamsDef;
|
|
84
110
|
/** @title Сноска снизу блока */
|
|
85
111
|
bottomFootnote?: string;
|
|
86
112
|
/** @title Показывать название депозита */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type BonusCalculatorData } from './getBonusCalculatorParams';
|
|
2
|
-
import { type BusinessDepositCalculatorSourceBookParams } from './getBusinessDepositCalculatorParams';
|
|
3
2
|
import { type CreditCalculatorSourceBookRateParams } from './getCreditCalculatorParams';
|
|
4
3
|
import { type DepositCalculatorSourceBookParams } from './getDepositCalculatorParams';
|
|
5
4
|
import { type RefinancingCalculatorSourceBookRateParams } from './getRefinancingCalculatorParams';
|
|
5
|
+
import { type BusinessDepositCalculatorSourceBookParams } from './useBusinessDepositCalculatorParams';
|
|
6
6
|
export declare const DEFAULT_MIN_SUM = 10000;
|
|
7
7
|
export declare const DEFAULT_MAX_SUM = 5000000;
|
|
8
8
|
export declare const CREDIT_DEFAULT_SUM = 200000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RateParamsDef } from './CalculatorContent';
|
|
1
2
|
export interface BusinessCommonDepositParams {
|
|
2
3
|
isMonthlyInterestPayment: boolean;
|
|
3
4
|
isReplenished: boolean;
|
|
@@ -21,7 +22,4 @@ export interface BusinessDepositCalculatorParams extends BusinessDepositCalculat
|
|
|
21
22
|
isDisabledOperatingDeposit?: boolean;
|
|
22
23
|
isUnavailableByTerm?: boolean;
|
|
23
24
|
}
|
|
24
|
-
export declare
|
|
25
|
-
rateRows?: BusinessDepositCalculatorSourceBookParams[];
|
|
26
|
-
};
|
|
27
|
-
export declare const getBusinessDepositCalculatorParams: (userInputParams: BusinessDepositCalculatorUserInputParams, calcSource?: BusinessDepositCalculatorData) => BusinessDepositCalculatorParams;
|
|
25
|
+
export declare const useBusinessDepositCalculatorParams: (userInputParams: BusinessDepositCalculatorUserInputParams, rateParams?: RateParamsDef) => BusinessDepositCalculatorParams;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type RateParamsDef } from './CalculatorContent';
|
|
2
|
+
import { type BusinessDepositCalculatorSourceBookParams } from './useBusinessDepositCalculatorParams';
|
|
3
|
+
export declare type BusinessDepositCalculatorData = BusinessDepositCalculatorSourceBookParams[];
|
|
4
|
+
export declare function useBusinessDepositRates(rateParams?: RateParamsDef): BusinessDepositCalculatorData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ExchangeCurrencyItem } from '../../components/ExchangeRateTile/ExchangeCurrencyCalculator';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Region } from '../../hooks/useRegions';
|
|
3
3
|
export interface ExchangeData {
|
|
4
4
|
exchangeRate?: {
|
|
5
5
|
currencies?: ExchangeCurrencyItem[];
|
|
6
6
|
};
|
|
7
7
|
address?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function useFetchExchangeRateData(currentRegion:
|
|
9
|
+
export declare function useFetchExchangeRateData(currentRegion: Region): ExchangeData;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
code?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
slug?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function useLocation(defaultLocation?: string): [RegionData, (_: RegionData) => void];
|
|
1
|
+
import { type Region } from './useRegions';
|
|
2
|
+
export declare function useLocation(defaultLocation?: string): [Region, (_: Region) => void];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Region } from '../../hooks/useRegions';
|
|
3
|
-
export declare const renderRegion: (onChangeLocation?: ((region: Region) => void) | undefined) => (region: Region) => JSX.Element;
|
|
3
|
+
export declare const renderRegion: (onChangeLocation?: ((region: Region) => void) | undefined) => (region: Region) => JSX.Element | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Region } from '../hooks/useRegions';
|
|
3
3
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
4
4
|
import { type PopupAction } from '../ui-kit/PopupManager/PopupAction';
|
|
5
5
|
import { EventBus } from './EventBus';
|
|
6
6
|
interface GlobalEventMap {
|
|
7
|
-
location:
|
|
7
|
+
location: Region;
|
|
8
8
|
dialog: DialogAction;
|
|
9
9
|
popup: PopupAction;
|
|
10
10
|
tab: TabActivationEvent;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
1
|
import { type BusinessDepositCalculatorProps } from './CalculatorContent';
|
|
3
|
-
import { type BusinessDepositCalculatorData } from './getBusinessDepositCalculatorParams';
|
|
4
2
|
export interface BusinessDepositCalculatorProp extends BusinessDepositCalculatorProps {
|
|
5
3
|
className?: string;
|
|
6
|
-
calcSource?: BusinessDepositCalculatorData & JSONRefObject;
|
|
7
4
|
}
|
|
8
5
|
export declare const BusinessDepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<BusinessDepositCalculatorProp, any, any>;
|
|
@@ -9,14 +9,14 @@ const Text_1 = require("../../ui-kit/Text/Text");
|
|
|
9
9
|
const CalculatorFormLayout_1 = require("./CalculatorFormLayout");
|
|
10
10
|
const CalculatorValueBlock_1 = require("./CalculatorValueBlock");
|
|
11
11
|
const constants_1 = require("./constants");
|
|
12
|
-
const getBusinessDepositCalculatorParams_1 = require("./getBusinessDepositCalculatorParams");
|
|
13
12
|
const getDefaultValues_1 = require("./getDefaultValues");
|
|
14
13
|
const renderDaysInput_1 = require("./renderDaysInput");
|
|
15
14
|
const renderFootnote_1 = require("./renderFootnote");
|
|
16
15
|
const renderInterestPayment_1 = require("./renderInterestPayment");
|
|
17
16
|
const renderRate_1 = require("./renderRate");
|
|
18
17
|
const renderWantedSumInput_1 = require("./renderWantedSumInput");
|
|
19
|
-
|
|
18
|
+
const useBusinessDepositCalculatorParams_1 = require("./useBusinessDepositCalculatorParams");
|
|
19
|
+
exports.BusinessDepositCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', buttons, footnote, bottomFootnote, isShowDepositeName, defaultParams, rateParams, }) => {
|
|
20
20
|
const [userInputParams, { field }] = (0, useForm_1.useForm)({
|
|
21
21
|
moneyValue: (0, getDefaultValues_1.getMoneyDefaultValue)(defaultParams, constants_1.BUSINESS_DEFAULT_SUM),
|
|
22
22
|
daysValue: (0, getDefaultValues_1.getMonthsDefaultValue)(defaultParams, constants_1.BUSINESS_DEFAULT_DAYS),
|
|
@@ -24,7 +24,7 @@ exports.BusinessDepositCalculatorForm = (0, uni_jsx_1.JSX)(({ className = '', bu
|
|
|
24
24
|
isPartialWithdrawal: Boolean(defaultParams?.isPartialWithdrawal),
|
|
25
25
|
isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
|
|
26
26
|
});
|
|
27
|
-
const calculatorParams = (0,
|
|
27
|
+
const calculatorParams = (0, useBusinessDepositCalculatorParams_1.useBusinessDepositCalculatorParams)(userInputParams, rateParams);
|
|
28
28
|
const { income, finalSum, rate, isUnavailableByTerm, depositeName } = calculatorParams;
|
|
29
29
|
return ((0, jsx_runtime_1.jsx)(CalculatorFormLayout_1.CalculatorFormLayout, { className: className, inputChildren: (0, jsx_runtime_1.jsxs)("div", { children: [(0, renderWantedSumInput_1.renderWantedSumInput)({
|
|
30
30
|
title: 'Сумма, ₽',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BusinessDepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/BusinessDepositCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;
|
|
1
|
+
{"version":3,"file":"BusinessDepositCalculatorForm.js","sourceRoot":"","sources":["../../../src/components/Calculator/BusinessDepositCalculatorForm.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAAwE;AACxE,6DAA0D;AAC1D,uFAAoF;AACpF,iDAA8C;AAE9C,iEAA8D;AAC9D,iEAA8D;AAC9D,2CAA0E;AAC1E,yDAAiF;AACjF,uDAAoD;AACpD,qDAAkD;AAClD,mEAAgE;AAChE,6CAA0C;AAC1C,iEAA8D;AAC9D,6FAI8C;AAMjC,QAAA,6BAA6B,GAAG,IAAA,aAAG,EAC9C,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,UAAU,GACX,EAAE,EAAE;IACH,MAAM,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,IAAA,iBAAO,EAAC;QAC3C,UAAU,EAAE,IAAA,uCAAoB,EAAC,aAAa,EAAE,gCAAoB,CAAC;QACrE,SAAS,EAAE,IAAA,wCAAqB,EAAC,aAAa,EAAE,iCAAqB,CAAC;QACtE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,aAAa,CAAC;QACpD,mBAAmB,EAAE,OAAO,CAAC,aAAa,EAAE,mBAAmB,CAAC;QAChE,wBAAwB,EAAE,OAAO,CAAC,aAAa,EAAE,wBAAwB,CAAC;KAC3E,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAG,IAAA,uEAAkC,EAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACzF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC;IAEvF,OAAO,CACL,uBAAC,2CAAoB,IACnB,SAAS,EAAE,SAAS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EAAC,YAAY,uEAE5C,EACP,iCAAK,SAAS,EAAC,mCAAmC,aAChD,uBAAC,mBAAQ,IACP,IAAI,EAAC,8DAAY,EACjB,QAAQ,EAAE,gBAAgB,CAAC,0BAA0B,KACjD,KAAK,CAAC,eAAe,CAAC,EAC1B,KAAK,EAAE,gBAAgB,CAAC,aAAa,GACrC,EACF,uBAAC,mBAAQ,IACP,QAAQ,EAAE,gBAAgB,CAAC,0BAA0B,EACrD,IAAI,EAAC,6FAAkB,KACnB,KAAK,CAAC,qBAAqB,CAAC,EAChC,KAAK,EAAE,gBAAgB,CAAC,mBAAmB,GAC3C,IACE,IACF,CACP,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,QAAiB,EAAE,MAAe,EAAE,EAAE,CAAC,CACnE,iCAAK,SAAS,EAAC,sCAAsC,aACnD,uBAAC,2CAAoB,IAAC,KAAK,EAAC,qGAAqB,EAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,QAAG,EAAC,MAAM,EAAC,GAAG,GAAG,EAC1F,uBAAC,2CAAoB,IAAC,KAAK,EAAC,qGAAqB,EAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAC,QAAG,GAAG,IAC7E,CACP,CAAC"}
|
|
@@ -4,6 +4,30 @@ import { type Footnote } from '../../model/Footnote';
|
|
|
4
4
|
import { type HeadlineCommonProps, type TitleProps } from '../../model/HeadlineType';
|
|
5
5
|
import { type IconProps } from '../../model/Picture';
|
|
6
6
|
import { type ButtonsSectionContent } from '../../ui-kit/LinkButton/ButtonsSectionContent';
|
|
7
|
+
/**
|
|
8
|
+
* @title ЮЛ
|
|
9
|
+
* @default {"rateType": "UL"}
|
|
10
|
+
*/
|
|
11
|
+
export declare type ULRateDef = {
|
|
12
|
+
rateType: 'UL';
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @title ИП
|
|
16
|
+
* @default {"rateType": "IP"}
|
|
17
|
+
*/
|
|
18
|
+
export declare type IPRateDef = {
|
|
19
|
+
rateType: 'IP';
|
|
20
|
+
};
|
|
21
|
+
/** @title Не выбрано * */
|
|
22
|
+
export declare type EmptyRateParams = {
|
|
23
|
+
/** @default "" */
|
|
24
|
+
rateType: '';
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @title Назначение ставки
|
|
28
|
+
* @default {"rateType": ""}
|
|
29
|
+
*/
|
|
30
|
+
export declare type RateParamsDef = EmptyRateParams | ULRateDef | IPRateDef;
|
|
7
31
|
export declare type CommonCalculatorProps = Footnote & ButtonsSectionContent & {
|
|
8
32
|
/** @title Данные калькулятора */
|
|
9
33
|
calcSource?: JSONRefObject;
|
|
@@ -80,7 +104,9 @@ export interface BusinessDepositDefaultParams extends CommonDefaultParams {
|
|
|
80
104
|
/** @title Выплата процентов */
|
|
81
105
|
isMonthlyInterestPayment?: boolean;
|
|
82
106
|
}
|
|
83
|
-
export interface BusinessDepositCalculatorProps extends
|
|
107
|
+
export interface BusinessDepositCalculatorProps extends Footnote, ButtonsSectionContent {
|
|
108
|
+
/** @title Ставка для */
|
|
109
|
+
rateParams?: RateParamsDef;
|
|
84
110
|
/** @title Сноска снизу блока */
|
|
85
111
|
bottomFootnote?: string;
|
|
86
112
|
/** @title Показывать название депозита */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type BonusCalculatorData } from './getBonusCalculatorParams';
|
|
2
|
-
import { type BusinessDepositCalculatorSourceBookParams } from './getBusinessDepositCalculatorParams';
|
|
3
2
|
import { type CreditCalculatorSourceBookRateParams } from './getCreditCalculatorParams';
|
|
4
3
|
import { type DepositCalculatorSourceBookParams } from './getDepositCalculatorParams';
|
|
5
4
|
import { type RefinancingCalculatorSourceBookRateParams } from './getRefinancingCalculatorParams';
|
|
5
|
+
import { type BusinessDepositCalculatorSourceBookParams } from './useBusinessDepositCalculatorParams';
|
|
6
6
|
export declare const DEFAULT_MIN_SUM = 10000;
|
|
7
7
|
export declare const DEFAULT_MAX_SUM = 5000000;
|
|
8
8
|
export declare const CREDIT_DEFAULT_SUM = 200000;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type RateParamsDef } from './CalculatorContent';
|
|
2
|
+
export interface BusinessCommonDepositParams {
|
|
3
|
+
isMonthlyInterestPayment: boolean;
|
|
4
|
+
isReplenished: boolean;
|
|
5
|
+
isPartialWithdrawal: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface BusinessDepositCalculatorSourceBookParams extends BusinessCommonDepositParams {
|
|
8
|
+
minSum: number;
|
|
9
|
+
maxSum: number;
|
|
10
|
+
minDays: number;
|
|
11
|
+
maxDays: number;
|
|
12
|
+
depositeName: string;
|
|
13
|
+
rate: number;
|
|
14
|
+
}
|
|
15
|
+
export interface BusinessDepositCalculatorUserInputParams extends BusinessCommonDepositParams {
|
|
16
|
+
moneyValue: number;
|
|
17
|
+
daysValue: number;
|
|
18
|
+
}
|
|
19
|
+
export interface BusinessDepositCalculatorParams extends BusinessDepositCalculatorSourceBookParams, BusinessDepositCalculatorUserInputParams {
|
|
20
|
+
income?: number;
|
|
21
|
+
finalSum?: number;
|
|
22
|
+
isDisabledOperatingDeposit?: boolean;
|
|
23
|
+
isUnavailableByTerm?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const useBusinessDepositCalculatorParams: (userInputParams: BusinessDepositCalculatorUserInputParams, rateParams?: RateParamsDef) => BusinessDepositCalculatorParams;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.
|
|
2
|
+
exports.useBusinessDepositCalculatorParams = void 0;
|
|
3
3
|
const constants_1 = require("./constants");
|
|
4
4
|
const rangeHelpers_1 = require("./rangeHelpers");
|
|
5
|
-
const
|
|
5
|
+
const useBusinessDepositRates_1 = require("./useBusinessDepositRates");
|
|
6
|
+
const useBusinessDepositCalculatorParams = (userInputParams, rateParams) => {
|
|
6
7
|
const { daysValue, moneyValue, isPartialWithdrawal, isReplenished, isMonthlyInterestPayment } = userInputParams;
|
|
7
8
|
const isOperatingDeposit = isReplenished || isPartialWithdrawal;
|
|
8
9
|
const isDisabledOperatingDeposit = daysValue < constants_1.BUSINESS_OPERATING_MIN_DAYS || daysValue > constants_1.BUSINESS_OPERATING_MAX_DAYS;
|
|
10
|
+
const rateRows = (0, useBusinessDepositRates_1.useBusinessDepositRates)(rateParams);
|
|
9
11
|
if (daysValue <= constants_1.BUSINESS_RATE_MIN_DAYS) {
|
|
10
12
|
return {
|
|
11
13
|
...constants_1.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS,
|
|
@@ -14,7 +16,7 @@ const getBusinessDepositCalculatorParams = (userInputParams, calcSource) => {
|
|
|
14
16
|
isUnavailableByTerm: true,
|
|
15
17
|
};
|
|
16
18
|
}
|
|
17
|
-
const businessDepositCalculatorSourceBookParams =
|
|
19
|
+
const businessDepositCalculatorSourceBookParams = rateRows?.find((_) => {
|
|
18
20
|
return (isMonthlyInterestPayment === _.isMonthlyInterestPayment &&
|
|
19
21
|
checkIsOperatingDeposit(isOperatingDeposit, _) &&
|
|
20
22
|
(0, rangeHelpers_1.checkRangeByKeys)(moneyValue, ['minSum', 'maxSum'], _) &&
|
|
@@ -23,7 +25,7 @@ const getBusinessDepositCalculatorParams = (userInputParams, calcSource) => {
|
|
|
23
25
|
const { rate } = businessDepositCalculatorSourceBookParams;
|
|
24
26
|
const income = getDepositIncome(rate, userInputParams);
|
|
25
27
|
const finalSum = moneyValue + income;
|
|
26
|
-
const sourceBookRows =
|
|
28
|
+
const sourceBookRows = rateRows || [constants_1.DEFAULT_BUSINESS_DEPOSIT_CALCULATOR_PARAMS];
|
|
27
29
|
return {
|
|
28
30
|
...businessDepositCalculatorSourceBookParams,
|
|
29
31
|
...(0, rangeHelpers_1.getRangeByKeys)(['minSum', 'maxSum'], sourceBookRows),
|
|
@@ -34,7 +36,7 @@ const getBusinessDepositCalculatorParams = (userInputParams, calcSource) => {
|
|
|
34
36
|
finalSum,
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
|
-
exports.
|
|
39
|
+
exports.useBusinessDepositCalculatorParams = useBusinessDepositCalculatorParams;
|
|
38
40
|
const checkIsOperatingDeposit = (isOperatingDeposit, sourceBookRow) => isOperatingDeposit
|
|
39
41
|
? sourceBookRow.isReplenished && sourceBookRow.isPartialWithdrawal
|
|
40
42
|
: !sourceBookRow.isReplenished && !sourceBookRow.isPartialWithdrawal;
|
|
@@ -50,4 +52,4 @@ const getDepositIncome = (rate, userInputParams) => {
|
|
|
50
52
|
return Math.round((moneyValue * rate * daysValue) / 365 / 100);
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
|
-
//# sourceMappingURL=
|
|
55
|
+
//# sourceMappingURL=useBusinessDepositCalculatorParams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBusinessDepositCalculatorParams.js","sourceRoot":"","sources":["../../../src/components/Calculator/useBusinessDepositCalculatorParams.ts"],"names":[],"mappings":";;AACA,2CAKqB;AACrB,iDAAkE;AAClE,uEAAoE;AA8B7D,MAAM,kCAAkC,GAAG,CAChD,eAAyD,EACzD,UAA0B,EACO,EAAE;IACnC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,aAAa,EAAE,wBAAwB,EAAE,GAC3F,eAAe,CAAC;IAClB,MAAM,kBAAkB,GAAG,aAAa,IAAI,mBAAmB,CAAC;IAChE,MAAM,0BAA0B,GAC9B,SAAS,GAAG,uCAA2B,IAAI,SAAS,GAAG,uCAA2B,CAAC;IAErF,MAAM,QAAQ,GAAG,IAAA,iDAAuB,EAAC,UAAU,CAAC,CAAC;IAErD,IAAI,SAAS,IAAI,kCAAsB,EAAE;QACvC,OAAO;YACL,GAAG,sDAA0C;YAC7C,GAAG,eAAe;YAClB,0BAA0B;YAC1B,mBAAmB,EAAE,IAAI;SAC1B,CAAC;KACH;IACD,MAAM,yCAAyC,GAC7C,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QAC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C;IAE5E;;MAEE;IACF,IAAI,wBAAwB,EAAE;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC;KAC7F;SAAM;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;KAChE;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type RateParamsDef } from './CalculatorContent';
|
|
2
|
+
import { type BusinessDepositCalculatorSourceBookParams } from './useBusinessDepositCalculatorParams';
|
|
3
|
+
export declare type BusinessDepositCalculatorData = BusinessDepositCalculatorSourceBookParams[];
|
|
4
|
+
export declare function useBusinessDepositRates(rateParams?: RateParamsDef): BusinessDepositCalculatorData;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.useBusinessDepositRates = void 0;
|
|
3
|
+
const useAsyncData_1 = require("@redneckz/uni-jsx/lib/hooks/useAsyncData");
|
|
4
|
+
const fetchJSON_1 = require("../../utils/fetchJSON");
|
|
5
|
+
const DEPOSIT_RATES_SERVICE_MAP = {
|
|
6
|
+
UL: 'businessdepositrates',
|
|
7
|
+
IP: 'selfemployeddepositrates',
|
|
8
|
+
};
|
|
9
|
+
function useBusinessDepositRates(rateParams) {
|
|
10
|
+
const serviceName = rateParams?.rateType ? DEPOSIT_RATES_SERVICE_MAP[rateParams?.rateType] : '';
|
|
11
|
+
const { data } = (0, useAsyncData_1.useAsyncData)(serviceName ? `/api/v1/depositrates/${serviceName}` : null, fetchJSON_1.fetchJSONUnsafe);
|
|
12
|
+
return Array.isArray(data) ? data : [];
|
|
13
|
+
}
|
|
14
|
+
exports.useBusinessDepositRates = useBusinessDepositRates;
|
|
15
|
+
//# sourceMappingURL=useBusinessDepositRates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBusinessDepositRates.js","sourceRoot":"","sources":["../../../src/components/Calculator/useBusinessDepositRates.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,qDAAkF;AAIlF,MAAM,yBAAyB,GAAG;IAChC,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,0BAA0B;CAC/B,CAAC;AAIF,SAAgB,uBAAuB,CAAC,UAA0B;IAChE,MAAM,WAAW,GAAG,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhG,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAC3B,WAAW,CAAC,CAAC,CAAC,wBAAwB,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,EAC1D,2BAAqE,CACtE,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC;AATD,0DASC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ExchangeCurrencyItem } from '../../components/ExchangeRateTile/ExchangeCurrencyCalculator';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Region } from '../../hooks/useRegions';
|
|
3
3
|
export interface ExchangeData {
|
|
4
4
|
exchangeRate?: {
|
|
5
5
|
currencies?: ExchangeCurrencyItem[];
|
|
6
6
|
};
|
|
7
7
|
address?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function useFetchExchangeRateData(currentRegion:
|
|
9
|
+
export declare function useFetchExchangeRateData(currentRegion: Region): ExchangeData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchExchangeRateData.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/useFetchExchangeRateData.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AAGxE,qDAAkF;AASlF,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAEnD,SAAgB,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"useFetchExchangeRateData.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/useFetchExchangeRateData.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AAGxE,qDAAkF;AASlF,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAEnD,SAAgB,wBAAwB,CAAC,aAAqB;IAC5D,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,IAAI,KAAK,CAAC;IAEhD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAC3B,kBAAkB,GAAG,eAAe,UAAU,EAAE,EAChD,2BAAoD,CACrD,CAAC;IAEF,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AATD,4DASC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BurgerMenuDialog.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/BurgerMenuDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwF;AAGxF,+DAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"BurgerMenuDialog.js","sourceRoot":"","sources":["../../../src/components/StickyBottomMenu/BurgerMenuDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAwF;AAGxF,+DAA4D;AAC5D,yDAAsD;AAGtD,8DAA2D;AAC3D,0DAAuD;AACvD,8CAA2C;AAC3C,qFAAkF;AAClF,gEAA6D;AAC7D,yFAAsF;AACtF,yFAAsF;AACtF,iDAA8C;AAC9C,2DAAwD;AACxD,mDAAgD;AAMnC,QAAA,gBAAgB,GAAG,IAAA,aAAG,EAAwB,CAAC,KAAK,EAAE,EAAE;IACnE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,C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AAC,CAAC,CACZ,+BACE,SAAS,EAAC,wBAAwB,EAClC,IAAI,EAAE,WAAW,EACjB,GAAG,EAAC,qBAAqB,gBACd,8FAAmB,aAE9B,uBAAC,SAAG,IACF,KAAK,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,EACtD,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAC,oEAAoE,GAC9E,EACF,4IAA8B,IAC5B,CACL,CAAC,CAAC,CAAC,IAAI,CAAC;AAEX,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,OAAoB,EAAE,EAAE,CAAC,CACjE,iCAAK,SAAS,EAAC,yCAAyC,EAAC,OAAO,EAAE,OAAO,aACvE,uBAAC,SAAG,IACF,KAAK,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,OAAO,EAAE,EACxD,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAC,oEAAoE,GAC9E,EACF,iCAAK,SAAS,EAAC,2BAA2B,aACxC,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,YAAE,QAAQ,CAAC,IAAI,GAAQ,EAC3C,uBAAC,WAAI,IAAC,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,QAAQ,oFAExC,IACH,IACF,CACP,CAAC"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
code?: string;
|
|
4
|
-
name?: string;
|
|
5
|
-
slug?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function useLocation(defaultLocation?: string): [RegionData, (_: RegionData) => void];
|
|
1
|
+
import { type Region } from './useRegions';
|
|
2
|
+
export declare function useLocation(defaultLocation?: string): [Region, (_: Region) => void];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocation.js","sourceRoot":"","sources":["../../src/hooks/useLocation.ts"],"names":[],"mappings":";;AAAA,uDAAqE;AACrE,2E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G,MAAM,eAAe,GAAG,GAAkB,EAAE;IAC1C,IAAI;QACF,MAAM,IAAI,GAAG,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAEpE,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACjC;IAAC,OAAO,EAAE,EAAE;QACX,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,EAAE;IAClC,IAAI;QACF,UAAU,CAAC,YAAY,EAAE,OAAO,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3E;IAAC,OAAO,EAAE,EAAE;QACX,aAAa;KACd;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRegions.js","sourceRoot":"","sources":["../../src/hooks/useRegions.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,kDAA+E;AAE/E,MAAM,WAAW,GAAG,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"useRegions.js","sourceRoot":"","sources":["../../src/hooks/useRegions.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,kDAA+E;AAE/E,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAStC,SAAgB,UAAU;IACxB,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,2BAAY,EAAC,WAAW,EAAE,2BAAgD,CAAC,CAAC;IAE7F,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC;AAJD,gCAIC"}
|
|
@@ -4,9 +4,9 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const useLink_1 = require("../../hooks/useLink");
|
|
6
6
|
const style_1 = require("../../utils/style");
|
|
7
|
-
exports.LinkWrapper = (0, uni_jsx_1.JSX)(({ className = '', href, target, isRemote = false, children }) => {
|
|
7
|
+
exports.LinkWrapper = (0, uni_jsx_1.JSX)(({ className = '', href, target, isRemote = false, onClick, children }) => {
|
|
8
8
|
const link = (0, useLink_1.useLink)({ isRemote });
|
|
9
|
-
const linkProps = link({ href, target });
|
|
9
|
+
const linkProps = link({ href, target, onClick });
|
|
10
10
|
const Tag = href ? 'a' : 'div';
|
|
11
11
|
return ((0, jsx_runtime_1.jsx)(Tag, { className: (0, style_1.style)('block', className), ...(href ? linkProps : {}), role: href ? 'link' : 'none', children: children }));
|
|
12
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkWrapper.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkWrapper/LinkWrapper.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAE9C,6CAA0C;
|
|
1
|
+
{"version":3,"file":"LinkWrapper.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkWrapper/LinkWrapper.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,iDAA8C;AAE9C,6CAA0C;AAU7B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACnC,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAE/B,OAAO,CACL,uBAAC,GAAG,IACF,SAAS,EAAE,IAAA,aAAK,EAAC,OAAO,EAAE,SAAS,CAAC,KAChC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAC3B,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,YAE3B,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -6,11 +6,12 @@ const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
|
6
6
|
const useLink_1 = require("../../hooks/useLink");
|
|
7
7
|
const useLocation_1 = require("../../hooks/useLocation");
|
|
8
8
|
const useRegions_1 = require("../../hooks/useRegions");
|
|
9
|
-
const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
|
|
10
9
|
const groupBy_1 = require("../../utils/groupBy");
|
|
11
10
|
const jaroWinklerDistance_1 = require("../../utils/jaroWinklerDistance");
|
|
12
11
|
const Dialog_1 = require("../DialogManager/Dialog");
|
|
13
12
|
const useDialogManager_1 = require("../DialogManager/useDialogManager");
|
|
13
|
+
const LinkWrapper_1 = require("../LinkWrapper/LinkWrapper");
|
|
14
|
+
const Paragraph_1 = require("../Paragraph/Paragraph");
|
|
14
15
|
const Text_1 = require("../Text/Text");
|
|
15
16
|
const renderForeignOffices_1 = require("./renderForeignOffices");
|
|
16
17
|
const renderRegion_1 = require("./renderRegion");
|
|
@@ -19,7 +20,7 @@ const SearchBar_1 = require("./SearchBar");
|
|
|
19
20
|
const SEARCH_TERM_MIN_LENGTH = 3;
|
|
20
21
|
exports.LocationDialog = (0, uni_jsx_1.JSX)(({ foreignOffices, defaultLocation }) => {
|
|
21
22
|
const [currentLocation, selectCurrentLocation] = (0, useLocation_1.useLocation)(defaultLocation);
|
|
22
|
-
const link = (0, useLink_1.useLink)({ isRemote: true
|
|
23
|
+
const link = (0, useLink_1.useLink)({ isRemote: true });
|
|
23
24
|
const { href } = link({ href: `/branches/${currentLocation.slug}` });
|
|
24
25
|
const [query, setQuery] = (0, hooks_1.useState)('');
|
|
25
26
|
const regions = cleanUpRegions((0, useRegions_1.useRegions)()).sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -29,7 +30,7 @@ exports.LocationDialog = (0, uni_jsx_1.JSX)(({ foreignOffices, defaultLocation }
|
|
|
29
30
|
selectCurrentLocation(region);
|
|
30
31
|
close();
|
|
31
32
|
}, []);
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { className: "pb-20", head: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? ((0, jsx_runtime_1.
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { className: "pb-20", head: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h4", color: "text-primary-text", children: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B" }), currentLocation ? ((0, jsx_runtime_1.jsx)("div", { className: "mb-s", children: (0, jsx_runtime_1.jsxs)(Paragraph_1.Paragraph, { size: "text-l", color: "text-primary-text", children: ["\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:", (0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { isRemote: true, href: href, className: "inline mx-2xs text-primary-main", children: currentLocation.name })] }) })) : null, (0, jsx_runtime_1.jsx)(SearchBar_1.SearchBar, { onSearch: setQuery, searchTerm: query })] }), children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? ((0, jsx_runtime_1.jsx)("div", { children: regions
|
|
33
34
|
.filter(({ name }) => name && (0, jaroWinklerDistance_1.jaroWinklerDistance)(name.toLowerCase())(query.toLowerCase()) >= 0.8)
|
|
34
35
|
.map((0, renderRegion_1.renderRegion)(handleChangeLocation)) })) : ((0, jsx_runtime_1.jsx)("div", { className: "columns-1 sm:columns-5", children: Array.from(regionsGroupByLetter.entries()).map((0, renderRegionGroup_1.renderRegionGroup)(handleChangeLocation)) })), (0, renderForeignOffices_1.renderForeignOffices)(foreignOffices)] }));
|
|
35
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/LocationDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AAEpE,iDAA8C;AAC9C,yDAAsD;AACtD,uDAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"LocationDialog.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/LocationDialog.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AAEpE,iDAA8C;AAC9C,yDAAsD;AACtD,uDAAiE;AACjE,iDAA8C;AAC9C,yEAAsE;AACtE,oDAAiD;AACjD,wEAAqE;AACrE,4DAAyD;AACzD,sDAAmD;AACnD,uCAAoC;AACpC,iEAA8D;AAC9D,iDAA8C;AAC9C,2DAAwD;AACxD,2CAAwC;AAExC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAOpB,QAAA,cAAc,GAAG,IAAA,aAAG,EAAsB,CAAC,EAAE,cAAc,EAAE,eAAe,EAAE,EAAE,EAAE;IAC7F,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,GAAG,IAAA,yBAAW,EAAC,eAAe,CAAC,CAAC;IAE9E,MAAM,IAAI,GAAG,IAAA,iBAAO,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAErE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,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EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,CAC9E;qBACA,GAAG,CAAC,IAAA,2BAAY,EAAC,oBAAoB,CAAC,CAAC,GACtC,CACP,CAAC,CAAC,CAAC,CACF,gCAAK,SAAS,EAAC,wBAAwB,YACpC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,IAAA,qCAAiB,EAAC,oBAAoB,CAAC,CAAC,GACpF,CACP,EACA,IAAA,2CAAoB,EAAC,cAAc,CAAC,IAC9B,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAE3E,MAAM,cAAc,GAAG,CAAC,OAAiB,EAAE,EAAE,CAC3C,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvB,GAAG,MAAM;IACT,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE;CAC1E,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Region } from '../../hooks/useRegions';
|
|
3
|
-
export declare const renderRegion: (onChangeLocation?: ((region: Region) => void) | undefined) => (region: Region) => JSX.Element;
|
|
3
|
+
export declare const renderRegion: (onChangeLocation?: ((region: Region) => void) | undefined) => (region: Region) => JSX.Element | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.renderRegion = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const LinkWrapper_1 = require("../LinkWrapper/LinkWrapper");
|
|
4
5
|
const Text_1 = require("../Text/Text");
|
|
5
|
-
const renderRegion = (onChangeLocation) => (region) => ((0, jsx_runtime_1.jsx)(
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
const renderRegion = (onChangeLocation) => (region) => region.name ? ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { isRemote: true, href: `/branches/${region.slug}`, className: "mb-xs sm:mb-2xs hover:text-primary-hover", onClick: () => {
|
|
7
|
+
onChangeLocation && onChangeLocation(region);
|
|
8
|
+
}, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-l", font: "font-light", children: region.name }) }, String(region.id))) : null;
|
|
8
9
|
exports.renderRegion = renderRegion;
|
|
9
10
|
//# sourceMappingURL=renderRegion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderRegion.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/renderRegion.tsx"],"names":[],"mappings":";;;AACA,uCAAoC;AAE7B,MAAM,YAAY,GAAG,CAAC,gBAA2C,EAAE,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE,CAC9F,
|
|
1
|
+
{"version":3,"file":"renderRegion.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/renderRegion.tsx"],"names":[],"mappings":";;;AACA,4DAAyD;AACzD,uCAAoC;AAE7B,MAAM,YAAY,GAAG,CAAC,gBAA2C,EAAE,EAAE,CAAC,CAAC,MAAc,EAAE,EAAE,CAC9F,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CACZ,uBAAC,yBAAW,IAEV,QAAQ,QACR,IAAI,EAAE,aAAa,MAAM,CAAC,IAAI,EAAE,EAChC,SAAS,EAAC,0CAA0C,EACpD,OAAO,EAAE,GAAG,EAAE;QACZ,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC,YAED,uBAAC,WAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,YAClC,MAAM,CAAC,IAAI,GACP,IAVF,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAWV,CACf,CAAC,CAAC,CAAC,IAAI,CAAC;AAfE,QAAA,YAAY,gBAed"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type TabActivationEvent } from '../components/Tabs/TabActivationEvent';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Region } from '../hooks/useRegions';
|
|
3
3
|
import { type DialogAction } from '../ui-kit/DialogManager/DialogAction';
|
|
4
4
|
import { type PopupAction } from '../ui-kit/PopupManager/PopupAction';
|
|
5
5
|
import { EventBus } from './EventBus';
|
|
6
6
|
interface GlobalEventMap {
|
|
7
|
-
location:
|
|
7
|
+
location: Region;
|
|
8
8
|
dialog: DialogAction;
|
|
9
9
|
popup: PopupAction;
|
|
10
10
|
tab: TabActivationEvent;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
1
|
import { type BusinessDepositCalculatorProps } from './CalculatorContent';
|
|
3
|
-
import { type BusinessDepositCalculatorData } from './getBusinessDepositCalculatorParams';
|
|
4
2
|
export interface BusinessDepositCalculatorProp extends BusinessDepositCalculatorProps {
|
|
5
3
|
className?: string;
|
|
6
|
-
calcSource?: BusinessDepositCalculatorData & JSONRefObject;
|
|
7
4
|
}
|
|
8
5
|
export declare const BusinessDepositCalculatorForm: import("@redneckz/uni-jsx").UNIComponent<BusinessDepositCalculatorProp, any, any>;
|
|
@@ -7,14 +7,14 @@ import { Text } from '../../ui-kit/Text/Text.js';
|
|
|
7
7
|
import { CalculatorFormLayout } from './CalculatorFormLayout.js';
|
|
8
8
|
import { CalculatorValueBlock } from './CalculatorValueBlock.js';
|
|
9
9
|
import { BUSINESS_DEFAULT_DAYS, BUSINESS_DEFAULT_SUM } from './constants.js';
|
|
10
|
-
import { getBusinessDepositCalculatorParams, } from './getBusinessDepositCalculatorParams.js';
|
|
11
10
|
import { getMoneyDefaultValue, getMonthsDefaultValue } from './getDefaultValues.js';
|
|
12
11
|
import { renderDaysInput } from './renderDaysInput.js';
|
|
13
12
|
import { renderFootnote } from './renderFootnote.js';
|
|
14
13
|
import { renderInterestPayment } from './renderInterestPayment.js';
|
|
15
14
|
import { renderRate } from './renderRate.js';
|
|
16
15
|
import { renderWantedSumInput } from './renderWantedSumInput.js';
|
|
17
|
-
|
|
16
|
+
import { useBusinessDepositCalculatorParams, } from './useBusinessDepositCalculatorParams.js';
|
|
17
|
+
export const BusinessDepositCalculatorForm = JSX(({ className = '', buttons, footnote, bottomFootnote, isShowDepositeName, defaultParams, rateParams, }) => {
|
|
18
18
|
const [userInputParams, { field }] = useForm({
|
|
19
19
|
moneyValue: getMoneyDefaultValue(defaultParams, BUSINESS_DEFAULT_SUM),
|
|
20
20
|
daysValue: getMonthsDefaultValue(defaultParams, BUSINESS_DEFAULT_DAYS),
|
|
@@ -22,7 +22,7 @@ export const BusinessDepositCalculatorForm = JSX(({ className = '', buttons, foo
|
|
|
22
22
|
isPartialWithdrawal: Boolean(defaultParams?.isPartialWithdrawal),
|
|
23
23
|
isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
|
|
24
24
|
});
|
|
25
|
-
const calculatorParams =
|
|
25
|
+
const calculatorParams = useBusinessDepositCalculatorParams(userInputParams, rateParams);
|
|
26
26
|
const { income, finalSum, rate, isUnavailableByTerm, depositeName } = calculatorParams;
|
|
27
27
|
return (_jsx(CalculatorFormLayout, { className: className, inputChildren: _jsxs("div", { children: [renderWantedSumInput({
|
|
28
28
|
title: 'Сумма, ₽',
|