@redneckz/wildless-cms-uni-blocks 0.14.899 → 0.14.901
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/bin/migration-scripts/0.14.900.js +18 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +221 -28
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/bundle/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/bundle/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/bundle/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/consents.js +1 -1
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/dist/components/ExchangeRateTile/CurrencyProps.js +10 -0
- package/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js +23 -0
- package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.js +10 -0
- package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +73 -0
- package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js +26 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +2 -0
- package/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +1 -0
- package/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/dist/components/ExchangeRateTile/calculateResult.js +11 -0
- package/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js +21 -0
- package/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/dist/components/ExchangeRateTile/formatCurrency.js +10 -0
- package/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/dist/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/dist/components/ExchangeRateTile/renderInput.js +16 -0
- package/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +13 -0
- package/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/consents.js +1 -1
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/lib/components/ExchangeRateTile/CurrencyProps.js +8 -0
- package/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js +21 -0
- package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.js +8 -0
- package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +71 -0
- package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.d.ts +5 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.d.ts +5 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js +24 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +2 -0
- package/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +1 -0
- package/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/lib/components/ExchangeRateTile/calculateResult.js +7 -0
- package/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js +18 -0
- package/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/lib/components/ExchangeRateTile/formatCurrency.js +7 -0
- package/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/lib/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/lib/components/ExchangeRateTile/renderInput.js +13 -0
- package/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +10 -0
- package/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +221 -28
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/mobile/bundle/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/mobile/bundle/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/mobile/bundle/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/mobile/bundle/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/mobile/bundle/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/mobile/bundle/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/mobile/bundle/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/mobile/bundle/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/mobile/bundle/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/mobile/bundle/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js +10 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +23 -0
- package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +10 -0
- package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +73 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +26 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js +2 -0
- package/mobile/dist/components/ExchangeRateTile/ExchangeRateTileContent.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js +11 -0
- package/mobile/dist/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js +21 -0
- package/mobile/dist/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js +10 -0
- package/mobile/dist/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js +16 -0
- package/mobile/dist/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js +13 -0
- package/mobile/dist/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +8 -7
- package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.d.ts +6 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js +8 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyProps.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.d.ts +7 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +21 -0
- package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.d.ts +6 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +8 -0
- package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.d.ts +24 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +71 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.d.ts +5 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +24 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.d.ts +9 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js +2 -0
- package/mobile/lib/components/ExchangeRateTile/ExchangeRateTileContent.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/calculateResult.d.ts +2 -0
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js +7 -0
- package/mobile/lib/components/ExchangeRateTile/calculateResult.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.d.ts +8 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js +18 -0
- package/mobile/lib/components/ExchangeRateTile/callbackCurrencySelect.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.d.ts +1 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js +7 -0
- package/mobile/lib/components/ExchangeRateTile/formatCurrency.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.d.ts +11 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js +13 -0
- package/mobile/lib/components/ExchangeRateTile/renderInput.js.map +1 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.d.ts +9 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js +10 -0
- package/mobile/lib/components/ExchangeRateTile/useFetchExchangeRateData.js.map +1 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +92 -29
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/mobile/src/components/ApplicationLeadForm/consents.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +10 -7
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyProps.ts +6 -0
- package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +64 -0
- package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +28 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +155 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.example.json +12 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +60 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -0
- package/mobile/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
- package/mobile/src/components/ExchangeRateTile/calculateResult.ts +9 -0
- package/mobile/src/components/ExchangeRateTile/callbackCurrencySelect.ts +25 -0
- package/mobile/src/components/ExchangeRateTile/formatCurrency.ts +8 -0
- package/mobile/src/components/ExchangeRateTile/renderInput.tsx +43 -0
- package/mobile/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +25 -0
- package/package.json +2 -2
- package/src/components/ApplicationForm/ApplicationForm.example.json +92 -29
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +11 -11
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +11 -11
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -1
- package/src/components/ApplicationLeadForm/consents.ts +1 -1
- package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +10 -7
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/Blocks.ts +2 -0
- package/src/components/ExchangeRateTile/CurrencyProps.ts +6 -0
- package/src/components/ExchangeRateTile/CurrencyTable.tsx +64 -0
- package/src/components/ExchangeRateTile/CurrentLocation.tsx +28 -0
- package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +155 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.example.json +12 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.mobile.tsx +21 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.fixture.tsx +21 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +60 -0
- package/src/components/ExchangeRateTile/ExchangeRateTile.ui.json +8 -0
- package/src/components/ExchangeRateTile/ExchangeRateTileContent.ts +11 -0
- package/src/components/ExchangeRateTile/calculateResult.ts +9 -0
- package/src/components/ExchangeRateTile/callbackCurrencySelect.ts +25 -0
- package/src/components/ExchangeRateTile/formatCurrency.ts +8 -0
- package/src/components/ExchangeRateTile/renderInput.tsx +43 -0
- package/src/components/ExchangeRateTile/useFetchExchangeRateData.ts +25 -0
|
@@ -30,9 +30,10 @@ export declare type FieldDef = Required & LabelProps & ConditionFieldProps & Fil
|
|
|
30
30
|
name?: NameFieldDef;
|
|
31
31
|
dadata?: boolean;
|
|
32
32
|
defaultValue?: string;
|
|
33
|
+
placeholder?: string;
|
|
33
34
|
};
|
|
34
35
|
/** @hidden */
|
|
35
|
-
export declare type EndpointType = 'lead' | '
|
|
36
|
+
export declare type EndpointType = 'lead' | 'initcorporatelead';
|
|
36
37
|
/**
|
|
37
38
|
* @title Секция полей ввода
|
|
38
39
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
import { type ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
3
|
+
interface CurrencyTableProps extends ComponentType {
|
|
4
|
+
exchangeCurrencyItems: ExchangeCurrencyItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare const CurrencyTable: import("@redneckz/uni-jsx").UNIComponent<CurrencyTableProps, any, any>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
interface CurrentLocationProps extends ComponentType {
|
|
3
|
+
address?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const CurrentLocation: import("@redneckz/uni-jsx").UNIComponent<CurrentLocationProps, any, any>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
import { type ButtonCommonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
3
|
+
import { Currency } from './CurrencyProps';
|
|
4
|
+
export interface ExchangeCurrencyItem {
|
|
5
|
+
currency?: {
|
|
6
|
+
id?: number;
|
|
7
|
+
code?: string;
|
|
8
|
+
currency?: Currency;
|
|
9
|
+
};
|
|
10
|
+
buyExchangeRate?: number;
|
|
11
|
+
saleExchangeRate?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ExchangeCurrencyCalculatorProps extends ComponentType {
|
|
14
|
+
currencyRatesBuy: ExchangeCurrencyItem[];
|
|
15
|
+
currencyRatesSell: ExchangeCurrencyItem[];
|
|
16
|
+
button?: ButtonCommonContent;
|
|
17
|
+
}
|
|
18
|
+
export interface CalcState {
|
|
19
|
+
inputSell: string;
|
|
20
|
+
inputBuy: string;
|
|
21
|
+
selectSell: Currency;
|
|
22
|
+
selectBuy: Currency;
|
|
23
|
+
}
|
|
24
|
+
export declare const ExchangeCurrencyCalculator: import("@redneckz/uni-jsx").UNIComponent<ExchangeCurrencyCalculatorProps, any, any>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
|
+
import { type ExchangeRateTileContent } from './ExchangeRateTileContent';
|
|
3
|
+
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const ExchangeRateTile: import("@redneckz/uni-jsx").UNIComponent<ExchangeRateTileProps, any, any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
3
|
+
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
|
+
/**
|
|
5
|
+
* @title Курсы обмена валют
|
|
6
|
+
*/
|
|
7
|
+
export declare type ExchangeRateTileContent = UniBlockContent & TitleProps & {
|
|
8
|
+
button?: LinkButtonContent;
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Currency } from './CurrencyProps';
|
|
2
|
+
interface TableFuncProps {
|
|
3
|
+
value: Currency;
|
|
4
|
+
oppositeValue: Currency;
|
|
5
|
+
handleConvert: (currencyFrom?: Currency, currencyTo?: Currency) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const callbackCurrencySelect: (props: TableFuncProps) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatCurrency: (value?: number) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ControlProps } from '../../model/ControlProps';
|
|
2
|
+
import { type PlaceholderProps } from '../../model/PlaceholderProps';
|
|
3
|
+
import { type Currency } from './CurrencyProps';
|
|
4
|
+
import { type ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
5
|
+
interface InputProps extends PlaceholderProps, ControlProps<string> {
|
|
6
|
+
rates: ExchangeCurrencyItem[];
|
|
7
|
+
selected: string;
|
|
8
|
+
setSelected: (value: Currency) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function renderInput(props: InputProps): any;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ExchangeCurrencyItem } from '../../components/ExchangeRateTile/ExchangeCurrencyCalculator';
|
|
2
|
+
import { type Region } from '../../hooks/useRegions';
|
|
3
|
+
export interface ExchangeData {
|
|
4
|
+
exchangeRate?: {
|
|
5
|
+
currencies?: ExchangeCurrencyItem[];
|
|
6
|
+
};
|
|
7
|
+
address?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function useFetchExchangeRateData(currentRegion: Region): ExchangeData;
|
|
@@ -30,9 +30,10 @@ export declare type FieldDef = Required & LabelProps & ConditionFieldProps & Fil
|
|
|
30
30
|
name?: NameFieldDef;
|
|
31
31
|
dadata?: boolean;
|
|
32
32
|
defaultValue?: string;
|
|
33
|
+
placeholder?: string;
|
|
33
34
|
};
|
|
34
35
|
/** @hidden */
|
|
35
|
-
export declare type EndpointType = 'lead' | '
|
|
36
|
+
export declare type EndpointType = 'lead' | 'initcorporatelead';
|
|
36
37
|
/**
|
|
37
38
|
* @title Секция полей ввода
|
|
38
39
|
*/
|
|
@@ -41,7 +41,7 @@ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSu
|
|
|
41
41
|
}, []);
|
|
42
42
|
(0, hooks_1.useEffect)(() => {
|
|
43
43
|
leadFormStore.productType = productType;
|
|
44
|
-
const {
|
|
44
|
+
const { referalCode, refererCode, productId, marketingInfo } = getLeadQueryParams(queryFromStorage, sessionStore);
|
|
45
45
|
if (referalCode) {
|
|
46
46
|
sessionStore.referalData = {
|
|
47
47
|
refererCode,
|
|
@@ -50,6 +50,11 @@ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSu
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
sessionStore.marketingInfo = marketingInfo;
|
|
53
|
+
}, [queryFromStorage]);
|
|
54
|
+
(0, hooks_1.useEffect)(() => {
|
|
55
|
+
const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
|
|
56
|
+
const code = params.get('code');
|
|
57
|
+
const state = params.get('state');
|
|
53
58
|
if (code && state) {
|
|
54
59
|
requestEsiaProfile(code, state);
|
|
55
60
|
}
|
|
@@ -57,7 +62,7 @@ const useInitApplicationLead = ({ inputs, productType, setEsiaStatus, esiaAuthSu
|
|
|
57
62
|
sessionStorage.removeItem('accessToken');
|
|
58
63
|
sessionStorage.removeItem('refreshToken');
|
|
59
64
|
}
|
|
60
|
-
}, [
|
|
65
|
+
}, []);
|
|
61
66
|
return initialFormState;
|
|
62
67
|
};
|
|
63
68
|
exports.useInitApplicationLead = useInitApplicationLead;
|
|
@@ -65,9 +70,7 @@ const getLeadQueryParams = (queryFromStorage, sessionStore) => {
|
|
|
65
70
|
const referalData = sessionStore.referalData;
|
|
66
71
|
const marketingInfoFromStorage = sessionStore.marketingInfo;
|
|
67
72
|
const queryStorage = new URLSearchParams(decodeURIComponent(queryFromStorage || ''));
|
|
68
|
-
const
|
|
69
|
-
const code = params.get('code');
|
|
70
|
-
const state = params.get('state');
|
|
73
|
+
const code = queryStorage.get('code');
|
|
71
74
|
const referalCode = code ? referalData?.referalCode : queryStorage.get('referalCode');
|
|
72
75
|
const refererCode = code ? referalData?.refererCode : queryStorage.get('refererCode');
|
|
73
76
|
const productId = code ? referalData?.productId : queryStorage.get('productId');
|
|
@@ -83,8 +86,6 @@ const getLeadQueryParams = (queryFromStorage, sessionStore) => {
|
|
|
83
86
|
userId: queryStorage.get('userId'),
|
|
84
87
|
};
|
|
85
88
|
return {
|
|
86
|
-
code,
|
|
87
|
-
state,
|
|
88
89
|
referalCode,
|
|
89
90
|
refererCode,
|
|
90
91
|
productId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInitApplicationLead.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useInitApplicationLead.ts"],"names":[],"mappings":";;AAAA,8BAA8B;AAC9B,2CAA2C;AAC3C,uDAA8E;AAC9E,iFAA8E;AAC9E,qDAAkD;AAClD,4EAAyE;AAKzE,iEAAgE;AAChE,6EAA8E;AAC9E,+DAA4D;AAC5D,yDAAsD;AACtD,yDAAsD;AAe/C,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,GACU,EAAiB,EAAE;IAC5C,MA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WAAW,CAAC;QAExC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"useInitApplicationLead.js","sourceRoot":"","sources":["../../../src/components/ApplicationLeadForm/useInitApplicationLead.ts"],"names":[],"mappings":";;AAAA,8BAA8B;AAC9B,2CAA2C;AAC3C,uDAA8E;AAC9E,iFAA8E;AAC9E,qDAAkD;AAClD,4EAAyE;AAKzE,iEAAgE;AAChE,6EAA8E;AAC9E,+DAA4D;AAC5D,yDAAsD;AACtD,yDAAsD;AAe/C,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,GACU,EAAiB,EAAE;IAC5C,MAAM,aAAa,GAAG,IAAA,mCAAgB,GAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAA,qBAAS,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAA,iCAAe,GAAwB,CAAC;IAC7D,MAAM,gBAAgB,GAAG,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,mCAAiB,CAAC,CAAC;IAE/E,MAAM,gBAAgB,GAAG,IAAA,eAAO,EAC9B,GAAG,EAAE,CAAC,IAAA,yCAAmB,EAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,eAAe,CAAC,EAC1E,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,CACjC,CAAC;IAEF,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EAAC,KAAK,EAAE,IAAY,EAAE,KAAa,EAAE,EAAE;QAC3E,aAAa,CAAC,yCAAY,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,IAAA,uCAAkB,EAAC;gBACpC,IAAI;gBACJ,KAAK;gBACL,WAAW,EAAE,UAAU,CAAC,QAAQ,EAAE,IAAI;gBACtC,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;YAEH,IAAI,IAAI,EAAE;gBACR,MAAM,UAAU,GAAG,MAAM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AAY,CAAC,GAAG,CAAC,QAAQ,CAAC;SACnC,CAAC;IAEN,OAAO;QACL,WAAW;QACX,WAAW;QACX,SAAS;QACT,aAAa;KACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -23,6 +23,7 @@ const CreditForm_1 = require("./CreditForm/CreditForm");
|
|
|
23
23
|
const DebitForm_1 = require("./DebitForm/DebitForm");
|
|
24
24
|
const DepositFiltration_1 = require("./DepositFiltration/DepositFiltration");
|
|
25
25
|
const ErrorBlock_1 = require("./ErrorBlock/ErrorBlock");
|
|
26
|
+
const ExchangeRateTile_1 = require("./ExchangeRateTile/ExchangeRateTile");
|
|
26
27
|
const Footer_1 = require("./Footer/Footer");
|
|
27
28
|
const GalleryLayout_1 = require("./GalleryLayout/GalleryLayout");
|
|
28
29
|
const GrantSupport_1 = require("./GrantSupport/GrantSupport");
|
|
@@ -65,6 +66,7 @@ exports.Blocks = {
|
|
|
65
66
|
ErrorBlock: ErrorBlock_1.ErrorBlock,
|
|
66
67
|
Footer: Footer_1.Footer,
|
|
67
68
|
GalleryLayout: GalleryLayout_1.GalleryLayout,
|
|
69
|
+
ExchangeRateTile: ExchangeRateTile_1.ExchangeRateTile,
|
|
68
70
|
GrantSupport: GrantSupport_1.GrantSupport,
|
|
69
71
|
Header: Header_1.Header,
|
|
70
72
|
Headline: Headline_1.Headline,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAEA,4CAAyC;AACzC,uEAAoE;AACpE,mFAAgF;AAChF,yFAAsF;AACtF,iEAA8D;AAC9D,gFAA6E;AAC7E,8DAA2D;AAC3D,uEAAoE;AACpE,qGAAkG;AAClG,0EAAuE;AACvE,6EAA0E;AAC1E,yFAAsF;AACtF,8DAA2D;AAC3D,kDAA+C;AAC/C,mFAAgF;AAChF,wGAAqG;AACrG,mFAAgF;AAChF,iEAA8D;AAC9D,oEAAiE;AACjE,wDAAq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AU,EAAV,uBAAU;IACV,gBAAgB,EAAhB,mCAAgB;IAChB,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,cAAc,EAAd,+BAAc;IACd,KAAK,EAAL,aAAK;IACL,mBAAmB,EAAnB,yCAAmB;IACnB,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV,SAAS,EAAT,qBAAS;CACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"Blocks.js","sourceRoot":"","sources":["../../src/components/Blocks.ts"],"names":[],"mappings":";;AAEA,4CAAyC;AACzC,uEAAoE;AACpE,mFAAgF;AAChF,yFAAsF;AACtF,iEAA8D;AAC9D,gFAA6E;AAC7E,8DAA2D;AAC3D,uEAAoE;AACpE,qGAAkG;AAClG,0EAAuE;AACvE,6EAA0E;AAC1E,yFAAsF;AACtF,8DAA2D;AAC3D,kDAA+C;AAC/C,mFAAgF;AAChF,wGAAqG;AACrG,mFAAgF;AAChF,iEAA8D;AAC9D,oEAAiE;AACjE,wDAAqD;AACrD,qDAAkD;AAClD,6EAA0E;AAC1E,wDAAqD;AACrD,0EAAuE;AACvE,4CAAyC;AACzC,iEAA8D;AAC9D,8DAA2D;AAC3D,4CAAyC;AACzC,kDAA+C;AAC/C,0EAAuE;AACvE,kDAA+C;AAC/C,kDAA+C;AAC/C,iEAA8D;AAC9D,oEAAiE;AACjE,8DAA2D;AAC3D,iEAA8D;AAC9D,wDAAqD;AACrD,wDAAqD;AACrD,0EAAuE;AACvE,wDAAqD;AACrD,8DAA2D;AAC3D,qDAAkD;AAClD,oEAAiE;AACjE,yCAAsC;AAEzB,QAAA,MAAM,GAAmB;IACpC,MAAM,EAAN,eAAM;IACN,eAAe,EAAf,iCAAe;IACf,qBAAqB,EAArB,6CAAqB;IACrB,aAAa,EAAb,6BAAa;IACb,kBAAkB,EAAlB,uCAAkB;IAClB,YAAY,EAAZ,2BAAY;IACZ,eAAe,EAAf,iCAAe;IACf,yBAAyB,EAAzB,qDAAyB;IACzB,gBAAgB,EAAhB,mCAAgB;IAChB,iBAAiB,EAAjB,qCAAiB;IACjB,qBAAqB,EAArB,6CAAqB;IACrB,YAAY,EAAZ,2BAAY;IACZ,QAAQ,EAAR,mBAAQ;IACR,mBAAmB,EAAnB,yCAAmB;IACnB,0BAA0B,EAA1B,uDAA0B;IAC1B,mBAAmB,EAAnB,yCAAmB;IACnB,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,UAAU,EAAV,uBAAU;IACV,MAAM,EAAN,eAAM;IACN,aAAa,EAAb,6BAAa;IACb,gBAAgB,EAAhB,mCAAgB;IAChB,YAAY,EAAZ,2BAAY;IACZ,MAAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,gBAAgB,EAAhB,mCAAgB;IAChB,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,aAAa,EAAb,6BAAa;IACb,cAAc,EAAd,+BAAc;IACd,YAAY,EAAZ,2BAAY;IACZ,aAAa,EAAb,6BAAa;IACb,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,gBAAgB,EAAhB,mCAAgB;IAChB,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,cAAc,EAAd,+BAAc;IACd,KAAK,EAAL,aAAK;IACL,mBAAmB,EAAnB,yCAAmB;IACnB,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV,SAAS,EAAT,qBAAS;CACV,CAAC"}
|
|
@@ -22,6 +22,7 @@ const CreditForm_1 = require("./CreditForm/CreditForm");
|
|
|
22
22
|
const DebitForm_1 = require("./DebitForm/DebitForm");
|
|
23
23
|
const DepositFiltration_1 = require("./DepositFiltration/DepositFiltration");
|
|
24
24
|
const ErrorBlock_1 = require("./ErrorBlock/ErrorBlock");
|
|
25
|
+
const ExchangeRateTile_1 = require("./ExchangeRateTile/ExchangeRateTile");
|
|
25
26
|
const Footer_1 = require("./Footer/Footer");
|
|
26
27
|
const GalleryLayout_1 = require("./GalleryLayout/GalleryLayout");
|
|
27
28
|
const GrantSupport_1 = require("./GrantSupport/GrantSupport");
|
|
@@ -60,6 +61,7 @@ exports.Blocks = {
|
|
|
60
61
|
CarouselTariffsCard: CarouselTariffsCard_1.CarouselTariffsCard,
|
|
61
62
|
DepositFiltration: DepositFiltration_1.DepositFiltration,
|
|
62
63
|
ErrorBlock: ErrorBlock_1.ErrorBlock,
|
|
64
|
+
ExchangeRateTile: ExchangeRateTile_1.ExchangeRateTile,
|
|
63
65
|
Footer: Footer_1.Footer,
|
|
64
66
|
GalleryLayout: GalleryLayout_1.GalleryLayout,
|
|
65
67
|
GrantSupport: GrantSupport_1.GrantSupport,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blocks.mobile.js","sourceRoot":"","sources":["../../src/components/Blocks.mobile.ts"],"names":[],"mappings":";;AAEA,4CAAyC;AACzC,uEAAoE;AACpE,mFAAgF;AAChF,yFAAsF;AACtF,iEAA8D;AAC9D,gFAA6E;AAC7E,8DAA2D;AAC3D,uEAAoE;AACpE,qGAAkG;AAClG,0EAAuE;AACvE,6EAA0E;AAC1E,yFAAsF;AACtF,8DAA2D;AAC3D,kDAA+C;AAC/C,mFAAgF;AAChF,wGAAqG;AACrG,mFAAgF;AAChF,oEAAiE;AACjE,wDAAqD;AACrD,qDAAkD;AAClD,6EAA0E;AAC1E,wDAAqD;AACrD,4CAAyC;AACzC,iEAA8D;AAC9D,8DAA2D;AAC3D,4CAAyC;AACzC,kDAA+C;AAC/C,0EAAuE;AACvE,kDAA+C;AAC/C,kDAA+C;AAC/C,iEAA8D;AAC9D,oEAAiE;AACjE,8DAA2D;AAC3D,iEAA8D;AAC9D,wDAAqD;AACrD,wDAAqD;AACrD,0EAAuE;AACvE,wDAAqD;AACrD,8DAA2D;AAC3D,qDAAkD;AAClD,oEAAiE;AAEpD,QA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AAM,EAAN,eAAM;IACN,QAAQ,EAAR,mBAAQ;IACR,gBAAgB,EAAhB,mCAAgB;IAChB,QAAQ,EAAR,mBAAQ;IACR,QAAQ,EAAR,mBAAQ;IACR,aAAa,EAAb,6BAAa;IACb,cAAc,EAAd,+BAAc;IACd,YAAY,EAAZ,2BAAY;IACZ,aAAa,EAAb,6BAAa;IACb,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,gBAAgB,EAAhB,mCAAgB;IAChB,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,SAAS,EAAT,qBAAS;IACT,cAAc,EAAd,+BAAc;IACd,mBAAmB,EAAnB,yCAAmB;IACnB,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV,SAAS,EAAT,qBAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Currency = void 0;
|
|
3
|
+
var Currency;
|
|
4
|
+
(function (Currency) {
|
|
5
|
+
Currency["RUB"] = "RUB";
|
|
6
|
+
Currency["EUR"] = "EUR";
|
|
7
|
+
Currency["USD"] = "USD";
|
|
8
|
+
Currency["CNY"] = "CNY";
|
|
9
|
+
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
10
|
+
//# sourceMappingURL=CurrencyProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrencyProps.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/CurrencyProps.ts"],"names":[],"mappings":";;AAAA,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,uBAAW,CAAA;AACb,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
import { type ExchangeCurrencyItem } from './ExchangeCurrencyCalculator';
|
|
3
|
+
interface CurrencyTableProps extends ComponentType {
|
|
4
|
+
exchangeCurrencyItems: ExchangeCurrencyItem[];
|
|
5
|
+
}
|
|
6
|
+
export declare const CurrencyTable: import("@redneckz/uni-jsx").UNIComponent<CurrencyTableProps, any, any>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CurrencyTable = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const Img_1 = require("../../ui-kit/Img/Img");
|
|
6
|
+
const Text_1 = require("../../ui-kit/Text/Text");
|
|
7
|
+
const style_1 = require("../../utils/style");
|
|
8
|
+
const formatCurrency_1 = require("./formatCurrency");
|
|
9
|
+
const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
|
|
10
|
+
const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
|
|
11
|
+
const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
|
|
12
|
+
const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
|
|
13
|
+
const CURRENCY_ICONS_MAP = {
|
|
14
|
+
USD: 'DollarIcon',
|
|
15
|
+
EUR: 'EuroIcon',
|
|
16
|
+
CNY: 'ChineseYuanRenminbiIcon',
|
|
17
|
+
};
|
|
18
|
+
exports.CurrencyTable = (0, uni_jsx_1.JSX)(({ className, exchangeCurrencyItems }) => ((0, jsx_runtime_1.jsxs)("table", { className: (0, style_1.style)('h-fit w-full', className), children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: TABLE_HEAD_STYLE, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), (0, jsx_runtime_1.jsx)("th", { className: TABLE_HEAD_STYLE_CENTER, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), (0, jsx_runtime_1.jsx)("th", { className: TABLE_HEAD_STYLE_RIGHT, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
|
|
19
|
+
const renderCurrencyRow = (exchangeCurrencyItem) => {
|
|
20
|
+
const currency = exchangeCurrencyItem?.currency?.currency;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { className: "pb-2xs text-h6", children: [(0, jsx_runtime_1.jsx)("td", { className: "pt-m m-auto flex text-left", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-xs", children: [currency ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: currency })] }) }), (0, jsx_runtime_1.jsx)("td", { className: "pt-m pl-5xl text-center", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: (0, formatCurrency_1.formatCurrency)(exchangeCurrencyItem?.saleExchangeRate) }) }), (0, jsx_runtime_1.jsx)("td", { className: "pt-m pl-5xl text-right", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: (0, formatCurrency_1.formatCurrency)(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=CurrencyTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrencyTable.js","sourceRoot":"","sources":["../../../src/components/ExchangeR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C,CAAC,CAAC,CACV,uBAAC,SAAG,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAC9E,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,YAAE,QAAQ,GAAQ,IAClC,GACH,EACL,+BAAI,SAAS,EAAC,yBAAyB,YACrC,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,YAAE,IAAA,+BAAc,EAAC,oBAAoB,EAAE,gBAAgB,CAAC,GAAQ,GACjF,EACL,+BAAI,SAAS,EAAC,wBAAwB,YACpC,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,YAAE,IAAA,+BAAc,EAAC,oBAAoB,EAAE,eAAe,CAAC,GAAQ,GAChF,KAdE,QAAQ,CAeZ,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
interface CurrentLocationProps extends ComponentType {
|
|
3
|
+
address?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const CurrentLocation: import("@redneckz/uni-jsx").UNIComponent<CurrentLocationProps, any, any>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.CurrentLocation = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const RoundedIcon_1 = require("../../ui-kit/Icon/RoundedIcon");
|
|
6
|
+
const Paragraph_1 = require("../../ui-kit/Paragraph/Paragraph");
|
|
7
|
+
const style_1 = require("../../utils/style");
|
|
8
|
+
const icon = { icon: 'GpsIcon' };
|
|
9
|
+
exports.CurrentLocation = (0, uni_jsx_1.JSX)(({ className = '', address }) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('flex gap-s w-full justify-between @sm:justify-center', className), children: [(0, jsx_runtime_1.jsx)(RoundedIcon_1.RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? ((0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, (0, jsx_runtime_1.jsx)(Paragraph_1.Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
|
|
10
|
+
//# sourceMappingURL=CurrentLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CurrentLocation.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/CurrentLocation.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,+DAA4D;AAC5D,gEAA6D;AAC7D,6CAA0C;AAM1C,MAAM,IAAI,GAAY,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAE7B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACxF,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,sDAAsD,EAAE,SAAS,CAAC,aACtF,uBAAC,yBAAW,OAAK,IAAI,EAAE,aAAa,EAAC,SAAS,EAAC,SAAS,EAAC,UAAU,GAAG,EACtE,iCAAK,SAAS,EAAC,iCAAiC,aAC7C,OAAO,CAAC,CAAC,CAAC,CACT,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,mBAAmB,YAC/C,OAAO,GACE,CACb,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,qBAAS,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,qBAAqB,uLAExC,IACR,IACF,CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
2
|
+
import { type ButtonCommonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
3
|
+
import { Currency } from './CurrencyProps';
|
|
4
|
+
export interface ExchangeCurrencyItem {
|
|
5
|
+
currency?: {
|
|
6
|
+
id?: number;
|
|
7
|
+
code?: string;
|
|
8
|
+
currency?: Currency;
|
|
9
|
+
};
|
|
10
|
+
buyExchangeRate?: number;
|
|
11
|
+
saleExchangeRate?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ExchangeCurrencyCalculatorProps extends ComponentType {
|
|
14
|
+
currencyRatesBuy: ExchangeCurrencyItem[];
|
|
15
|
+
currencyRatesSell: ExchangeCurrencyItem[];
|
|
16
|
+
button?: ButtonCommonContent;
|
|
17
|
+
}
|
|
18
|
+
export interface CalcState {
|
|
19
|
+
inputSell: string;
|
|
20
|
+
inputBuy: string;
|
|
21
|
+
selectSell: Currency;
|
|
22
|
+
selectBuy: Currency;
|
|
23
|
+
}
|
|
24
|
+
export declare const ExchangeCurrencyCalculator: import("@redneckz/uni-jsx").UNIComponent<ExchangeCurrencyCalculatorProps, any, any>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.ExchangeCurrencyCalculator = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
|
+
const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
|
|
7
|
+
const calculateResult_1 = require("./calculateResult");
|
|
8
|
+
const callbackCurrencySelect_1 = require("./callbackCurrencySelect");
|
|
9
|
+
const CurrencyProps_1 = require("./CurrencyProps");
|
|
10
|
+
const renderInput_1 = require("./renderInput");
|
|
11
|
+
exports.ExchangeCurrencyCalculator = (0, uni_jsx_1.JSX)(({ className = '', currencyRatesBuy, currencyRatesSell, button }) => {
|
|
12
|
+
const [calcState, setCalcState] = (0, hooks_1.useState)({
|
|
13
|
+
inputSell: '',
|
|
14
|
+
inputBuy: '',
|
|
15
|
+
selectSell: currencyRatesBuy?.[0]?.currency?.currency || CurrencyProps_1.Currency.RUB,
|
|
16
|
+
selectBuy: currencyRatesSell?.[0]?.currency?.currency || CurrencyProps_1.Currency.USD,
|
|
17
|
+
});
|
|
18
|
+
const handleSetCalcState = (0, hooks_1.useCallback)((newState) => setCalcState((oldState) => ({ ...oldState, ...newState })), []);
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: `flex flex-col gap-m pt-2xl ${className}`, children: [currencyRatesBuy && currencyRatesSell ? ((0, jsx_runtime_1.jsxs)("div", { className: "grid gap-m", children: [(0, renderInput_1.renderInput)({
|
|
20
|
+
placeholder: 'Хочу продать',
|
|
21
|
+
rates: currencyRatesSell,
|
|
22
|
+
selected: calcState.selectSell,
|
|
23
|
+
setSelected: handleSelectSell(calcState, handleSetCalcState, currencyRatesSell),
|
|
24
|
+
value: calcState.inputSell,
|
|
25
|
+
onChange: (value) => handleInputSell(handleSetCalcState, currencyRatesSell)(value, calcState.selectSell, calcState.selectBuy),
|
|
26
|
+
}), (0, renderInput_1.renderInput)({
|
|
27
|
+
placeholder: 'Получу',
|
|
28
|
+
rates: currencyRatesBuy,
|
|
29
|
+
selected: calcState.selectBuy,
|
|
30
|
+
setSelected: handleSelectBuy(calcState, handleSetCalcState, currencyRatesBuy),
|
|
31
|
+
value: calcState.inputBuy,
|
|
32
|
+
onChange: (value) => handleInputBuy(handleSetCalcState, currencyRatesBuy)(value, calcState.selectBuy, calcState.selectSell),
|
|
33
|
+
})] })) : null, button?.text ? ((0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { text: button.text, version: button?.version, ...button })) : null] }));
|
|
34
|
+
});
|
|
35
|
+
const handleSelectSell = (calcState, setCalcState, currencyRatesSell) => (value) => {
|
|
36
|
+
setCalcState({ selectSell: value });
|
|
37
|
+
(0, callbackCurrencySelect_1.callbackCurrencySelect)({
|
|
38
|
+
value,
|
|
39
|
+
oppositeValue: calcState.selectBuy,
|
|
40
|
+
handleConvert: (currencyFrom = calcState.selectSell, currencyTo = calcState.selectBuy) => {
|
|
41
|
+
handleInputSell(setCalcState, currencyRatesSell)(calcState.inputSell, currencyFrom, currencyTo);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const handleSelectBuy = (calcState, setCalcState, currencyRatesBuy) => (value) => {
|
|
46
|
+
setCalcState({ selectBuy: value });
|
|
47
|
+
(0, callbackCurrencySelect_1.callbackCurrencySelect)({
|
|
48
|
+
value,
|
|
49
|
+
oppositeValue: calcState.selectSell,
|
|
50
|
+
handleConvert: (currencyTo = calcState.selectBuy, currencyFrom = calcState.selectSell) => handleInputBuy(setCalcState, currencyRatesBuy)(calcState.inputBuy, currencyTo, currencyFrom),
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
const handleInputSell = (setCalcState, currencyRatesSell) => (value, currencyFrom, currencyTo) => {
|
|
54
|
+
setCalcState({ inputSell: (0, calculateResult_1.formatValue)(value), selectBuy: currencyTo });
|
|
55
|
+
const rate = currencyRatesSell.find((_) => _.currency?.currency === currencyTo)?.buyExchangeRate ||
|
|
56
|
+
currencyRatesSell.find((_) => _.currency?.currency === currencyFrom)?.buyExchangeRate;
|
|
57
|
+
if (rate) {
|
|
58
|
+
setCalcState({
|
|
59
|
+
inputBuy: String((0, calculateResult_1.calculateResult)(value, rate, currencyFrom === CurrencyProps_1.Currency.RUB) || ''),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleInputBuy = (setCalcState, currencyRatesBuy) => (value, currencyTo, currencyFrom) => {
|
|
64
|
+
setCalcState({ inputBuy: (0, calculateResult_1.formatValue)(value), selectSell: currencyFrom });
|
|
65
|
+
const rate = currencyRatesBuy.find((_) => _.currency?.currency === currencyFrom)?.saleExchangeRate ||
|
|
66
|
+
currencyRatesBuy.find((_) => _.currency?.currency === currencyTo)?.saleExchangeRate;
|
|
67
|
+
if (rate) {
|
|
68
|
+
setCalcState({
|
|
69
|
+
inputSell: String((0, calculateResult_1.calculateResult)(value, rate, currencyTo === CurrencyProps_1.Currency.RUB) || ''),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=ExchangeCurrencyCalculator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExchangeCurrencyCalculator.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAAoE;AAEpE,mEAAgE;AAEhE,uDAAiE;AACjE,qEAAkE;AAClE,mDAA2C;AAC3C,+CAA4C;AAyB/B,QAAA,0BAA0B,GAAG,IAAA,aAAG,EAC3C,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE;IAClE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAY;QACpD,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAAI,wBAAQ,CAAC,GAAG;QACrE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAAI,wBAAQ,CAAC,GAAG;KACtE,CAAC,CAAC;IAEH,MAAM,kBAAkB,GAAG,IAAA,mBAAW,EACpC,CA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C,IAAI,EAAE,CAAC;SACnF,CAAC,CAAC;KACJ;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
2
|
+
import { type ExchangeRateTileContent } from './ExchangeRateTileContent';
|
|
3
|
+
export interface ExchangeRateTileProps extends ExchangeRateTileContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const ExchangeRateTile: import("@redneckz/uni-jsx").UNIComponent<ExchangeRateTileProps, any, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.ExchangeRateTile = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const useLocation_1 = require("../../hooks/useLocation");
|
|
6
|
+
const BaseTile_1 = require("../../ui-kit/BaseTile/BaseTile");
|
|
7
|
+
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
8
|
+
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
9
|
+
const style_1 = require("../../utils/style");
|
|
10
|
+
const CurrencyProps_1 = require("./CurrencyProps");
|
|
11
|
+
const CurrencyTable_1 = require("./CurrencyTable");
|
|
12
|
+
const CurrentLocation_1 = require("./CurrentLocation");
|
|
13
|
+
const ExchangeCurrencyCalculator_1 = require("./ExchangeCurrencyCalculator");
|
|
14
|
+
const useFetchExchangeRateData_1 = require("./useFetchExchangeRateData");
|
|
15
|
+
exports.ExchangeRateTile = (0, uni_jsx_1.JSX)(({ className = '', title = 'Курсы обмена валют', button, ...rest }) => {
|
|
16
|
+
const currentLocation = (0, useLocation_1.useLocation)();
|
|
17
|
+
const exchangeRates = (0, useFetchExchangeRateData_1.useFetchExchangeRateData)(currentLocation);
|
|
18
|
+
const currencyRates = getCurrencyRates(exchangeRates?.exchangeRate?.currencies);
|
|
19
|
+
const currencyRatesBuy = currencyRates.filter((_) => _.buyExchangeRate);
|
|
20
|
+
currencyRatesBuy.unshift({ currency: { currency: CurrencyProps_1.Currency.RUB } });
|
|
21
|
+
const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
|
|
22
|
+
currencyRatesSell.push({ currency: { currency: CurrencyProps_1.Currency.RUB } });
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('box-border min-h-80', className), ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "h-full", title: (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full gap-6xl flex-wrap @lg:flex-nowrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-full @2xl:w-auto @5xl:w-1/2", children: [currencyRates ? ((0, jsx_runtime_1.jsx)(CurrencyTable_1.CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, (0, jsx_runtime_1.jsx)(CurrentLocation_1.CurrentLocation, { address: exchangeRates?.address })] }), (0, jsx_runtime_1.jsx)(ExchangeCurrencyCalculator_1.ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })] }) }) }));
|
|
24
|
+
});
|
|
25
|
+
const getCurrencyRates = (currencies) => currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
|
|
26
|
+
//# sourceMappingURL=ExchangeRateTile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExchangeRateTile.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/ExchangeRateTile.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yDAAsD;AACtD,6DAA0D;AAC1D,4DAAyD;AACzD,0DAAuD;AAEvD,6CAA0C;AAC1C,mDAA2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CACf,uBAAC,6BAAa,IAAC,SAAS,EAAC,OAAO,EAAC,qBAAqB,EAAE,aAAa,GAAI,CAC1E,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,iCAAe,IAAC,OAAO,EAAE,aAAa,EAAE,OAAO,GAAI,IAChD,EACN,uBAAC,uDAA0B,IACzB,SAAS,EAAC,YAAY,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,MAAM,EAAE,MAAM,GACd,IACE,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,UAAmC,EAAE,EAAE,CAC/D,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAY,CAAC,CAAC,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TitleProps } from '../../model/HeadlineType';
|
|
2
|
+
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
3
|
+
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
|
+
/**
|
|
5
|
+
* @title Курсы обмена валют
|
|
6
|
+
*/
|
|
7
|
+
export declare type ExchangeRateTileContent = UniBlockContent & TitleProps & {
|
|
8
|
+
button?: LinkButtonContent;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExchangeRateTileContent.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/ExchangeRateTileContent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.formatValue = exports.calculateResult = void 0;
|
|
3
|
+
const roundTo_1 = require("../../utils/roundTo");
|
|
4
|
+
const calculateResult = (value, rate, precision) => {
|
|
5
|
+
const result = Number((0, exports.formatValue)(value)) * Math.pow(rate, precision ? -1 : 1);
|
|
6
|
+
return Number.isInteger(result) ? result : (0, roundTo_1.roundTo)(result);
|
|
7
|
+
};
|
|
8
|
+
exports.calculateResult = calculateResult;
|
|
9
|
+
const formatValue = (value) => value.replace(/[^\d.,]/g, '').replace(',', '.');
|
|
10
|
+
exports.formatValue = formatValue;
|
|
11
|
+
//# sourceMappingURL=calculateResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateResult.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/calculateResult.ts"],"names":[],"mappings":";;AAAA,iDAA8C;AAEvC,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,SAAkB,EAAE,EAAE;IACjF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/E,OAAO,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,iBAAO,EAAC,MAAM,CAAC,CAAC;AAC7D,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B;AAEK,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAAjF,QAAA,WAAW,eAAsE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Currency } from './CurrencyProps';
|
|
2
|
+
interface TableFuncProps {
|
|
3
|
+
value: Currency;
|
|
4
|
+
oppositeValue: Currency;
|
|
5
|
+
handleConvert: (currencyFrom?: Currency, currencyTo?: Currency) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const callbackCurrencySelect: (props: TableFuncProps) => void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.callbackCurrencySelect = void 0;
|
|
3
|
+
const tableFunc_1 = require("../../utils/tableFunc");
|
|
4
|
+
const CurrencyProps_1 = require("./CurrencyProps");
|
|
5
|
+
const callbackCurrencySelect = (props) => (0, tableFunc_1.tableFunc)([
|
|
6
|
+
[
|
|
7
|
+
(_) => _.value !== CurrencyProps_1.Currency.RUB && _.oppositeValue !== CurrencyProps_1.Currency.RUB,
|
|
8
|
+
() => props.handleConvert(props.value, CurrencyProps_1.Currency.RUB),
|
|
9
|
+
],
|
|
10
|
+
[
|
|
11
|
+
(_) => _.value === CurrencyProps_1.Currency.RUB && _.oppositeValue === CurrencyProps_1.Currency.RUB,
|
|
12
|
+
() => props.handleConvert(props.value, CurrencyProps_1.Currency.USD),
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
(_) => _.value === CurrencyProps_1.Currency.RUB && _.oppositeValue === CurrencyProps_1.Currency.RUB,
|
|
16
|
+
() => props.handleConvert(props.value, CurrencyProps_1.Currency.CNY),
|
|
17
|
+
],
|
|
18
|
+
[() => true, () => props.handleConvert(props.value)],
|
|
19
|
+
])(props)?.();
|
|
20
|
+
exports.callbackCurrencySelect = callbackCurrencySelect;
|
|
21
|
+
//# sourceMappingURL=callbackCurrencySelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callbackCurrencySelect.js","sourceRoot":"","sources":["../../../src/components/ExchangeRateTile/callbackCurrencySelect.ts"],"names":[],"mappings":";;AAAA,qDAAkD;AAClD,mDAA2C;AAQpC,MAAM,sBAAsB,GAAG,CAAC,KAAqB,EAAE,EAAE,CAC9D,IAAA,qBAAS,EAA6B;IACpC;QACE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,wBAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa,KAAK,wBAAQ,CAAC,GAAG;QACnE,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,wBAAQ,CAAC,GAAG,CAAC;KACrD;IACD;QACE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,wBAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa,KAAK,wBAAQ,CAAC,GAAG;QACnE,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,wBAAQ,CAAC,GAAG,CAAC;KACrD;IACD;QACE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,wBAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,aAAa,KAAK,wBAAQ,CAAC,GAAG;QACnE,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,wBAAQ,CAAC,GAAG,CAAC;KACrD;IACD,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;CACrD,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;AAfH,QAAA,sBAAsB,0BAenB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatCurrency: (value?: number) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.formatCurrency = void 0;
|
|
3
|
+
const CurrencyProps_1 = require("./CurrencyProps");
|
|
4
|
+
const currencyNumberFormat = new Intl.NumberFormat('ru', {
|
|
5
|
+
style: 'currency',
|
|
6
|
+
currency: CurrencyProps_1.Currency.RUB,
|
|
7
|
+
});
|
|
8
|
+
const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
|
|
9
|
+
exports.formatCurrency = formatCurrency;
|
|
10
|
+
//# sourceMappingURL=formatCurrency.js.map
|