@redneckz/wildless-cms-uni-blocks 0.14.779 → 0.14.787
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +177 -121
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/bundle/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/bundle/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/bundle/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/bundle/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/bundle/retail/inputs.d.ts +77 -76
- package/bundle/retail/model/LeadFormState.d.ts +2 -2
- package/bundle/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/bundle/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
- package/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
- package/dist/components/CalculatorCredit/CalculatorCredit.js +0 -2
- package/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/dist/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js +16 -7
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/dist/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/dist/components/CalculatorDeposit/normalize.js.map +1 -1
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +30 -41
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/dist/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/dist/components/CalculatorDeposit/renderRegistrationType.js +11 -7
- package/dist/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
- package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
- package/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
- package/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/dist/retail/components/Fields/AddressCourierField.js +50 -0
- package/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
- package/dist/retail/inputs.d.ts +77 -76
- package/dist/retail/inputs.js +6 -1
- package/dist/retail/inputs.js.map +1 -1
- package/dist/retail/model/LeadFormState.d.ts +2 -2
- package/dist/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/dist/ui-kit/Calculator/getDefaultParams.js +7 -1
- package/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/dist/ui-kit/Calculator/renderPaymentType.js +2 -0
- package/dist/ui-kit/Calculator/renderPaymentType.js.map +1 -1
- package/dist/ui-kit/Calculator/renderPayout.js +2 -0
- package/dist/ui-kit/Calculator/renderPayout.js.map +1 -1
- package/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
- package/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
- package/lib/components/CalculatorCredit/CalculatorCredit.js +0 -2
- package/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js +17 -8
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/lib/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/lib/components/CalculatorDeposit/normalize.js.map +1 -1
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +32 -43
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/lib/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/lib/components/CalculatorDeposit/renderRegistrationType.js +11 -7
- package/lib/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
- package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
- package/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
- package/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/lib/retail/components/Fields/AddressCourierField.js +48 -0
- package/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
- package/lib/retail/inputs.d.ts +77 -76
- package/lib/retail/inputs.js +6 -1
- package/lib/retail/inputs.js.map +1 -1
- package/lib/retail/model/LeadFormState.d.ts +2 -2
- package/lib/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/lib/ui-kit/Calculator/getDefaultParams.js +7 -1
- package/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/lib/ui-kit/Calculator/renderPaymentType.js +2 -0
- package/lib/ui-kit/Calculator/renderPaymentType.js.map +1 -1
- package/lib/ui-kit/Calculator/renderPayout.js +2 -0
- package/lib/ui-kit/Calculator/renderPayout.js.map +1 -1
- package/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +177 -121
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/mobile/bundle/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/mobile/bundle/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/mobile/bundle/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/mobile/bundle/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/mobile/bundle/retail/inputs.d.ts +77 -76
- package/mobile/bundle/retail/model/LeadFormState.d.ts +2 -2
- package/mobile/bundle/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/mobile/bundle/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/mobile/bundle/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
- package/mobile/dist/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js +0 -2
- package/mobile/dist/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +16 -7
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/mobile/dist/components/CalculatorDeposit/normalize.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +30 -41
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.js +11 -7
- package/mobile/dist/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
- package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
- package/mobile/dist/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js +1 -1
- package/mobile/dist/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/dist/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/mobile/dist/retail/components/Fields/AddressCourierField.js +50 -0
- package/mobile/dist/retail/components/Fields/AddressCourierField.js.map +1 -0
- package/mobile/dist/retail/inputs.d.ts +77 -76
- package/mobile/dist/retail/inputs.js +6 -1
- package/mobile/dist/retail/inputs.js.map +1 -1
- package/mobile/dist/retail/model/LeadFormState.d.ts +2 -2
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js +7 -1
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderPaymentType.js +2 -0
- package/mobile/dist/ui-kit/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderPayout.js +2 -0
- package/mobile/dist/ui-kit/Calculator/renderPayout.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +2 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +3 -2
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js +0 -3
- package/mobile/lib/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.js.map +1 -1
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js +0 -2
- package/mobile/lib/components/CalculatorCredit/CalculatorCredit.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.d.ts +1 -2
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +17 -8
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +31 -1
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +1 -27
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/normalize.d.ts +2 -3
- package/mobile/lib/components/CalculatorDeposit/normalize.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +3 -3
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +32 -43
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.d.ts +1 -1
- package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.js +11 -7
- package/mobile/lib/components/CalculatorDeposit/renderRegistrationType.js.map +1 -1
- package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js +1 -4
- package/mobile/lib/components/CalculatorRefinancing/CalculatorRefinancing.js.map +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +1 -1
- package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js +1 -1
- package/mobile/lib/retail/components/DocumentDialog/DocumentDialog.js.map +1 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +1 -1
- package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +1 -1
- package/mobile/lib/retail/components/Fields/AddressCourierField.d.ts +9 -0
- package/mobile/lib/retail/components/Fields/AddressCourierField.js +48 -0
- package/mobile/lib/retail/components/Fields/AddressCourierField.js.map +1 -0
- package/mobile/lib/retail/inputs.d.ts +77 -76
- package/mobile/lib/retail/inputs.js +6 -1
- package/mobile/lib/retail/inputs.js.map +1 -1
- package/mobile/lib/retail/model/LeadFormState.d.ts +2 -2
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.d.ts +11 -2
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js +7 -1
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.d.ts +1 -2
- package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -1
- package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderPaymentType.js +2 -0
- package/mobile/lib/ui-kit/Calculator/renderPaymentType.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderPayout.js +2 -0
- package/mobile/lib/ui-kit/Calculator/renderPayout.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/setDefaultParamsCalc.d.ts +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +13 -1
- package/mobile/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +0 -3
- package/mobile/src/components/CalculatorCredit/CalculatorCredit.tsx +0 -2
- package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +38 -15
- package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +41 -0
- package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -39
- package/mobile/src/components/CalculatorDeposit/normalize.tsx +1 -2
- package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +65 -52
- package/mobile/src/components/CalculatorDeposit/renderRegistrationType.tsx +15 -8
- package/mobile/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -4
- package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
- package/mobile/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
- package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
- package/mobile/src/retail/components/Fields/AddressCourierField.tsx +74 -0
- package/mobile/src/retail/inputs.tsx +10 -1
- package/mobile/src/retail/model/LeadFormState.ts +2 -2
- package/mobile/src/ui-kit/Calculator/getDefaultParams.tsx +13 -6
- package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -11
- package/mobile/src/ui-kit/Calculator/renderPaymentType.tsx +2 -0
- package/mobile/src/ui-kit/Calculator/renderPayout.tsx +2 -0
- package/mobile/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +2 -0
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +13 -1
- package/src/components/CalculatorBusinessDeposit/CalculatorBusinessDeposit.tsx +0 -3
- package/src/components/CalculatorCredit/CalculatorCredit.tsx +0 -2
- package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +12 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +38 -15
- package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +41 -0
- package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +3 -39
- package/src/components/CalculatorDeposit/normalize.tsx +1 -2
- package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +65 -52
- package/src/components/CalculatorDeposit/renderRegistrationType.tsx +15 -8
- package/src/components/CalculatorRefinancing/CalculatorRefinancing.tsx +1 -4
- package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +1 -1
- package/src/retail/components/DocumentDialog/DocumentDialog.tsx +1 -1
- package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +8 -3
- package/src/retail/components/Fields/AddressCourierField.tsx +74 -0
- package/src/retail/inputs.tsx +10 -1
- package/src/retail/model/LeadFormState.ts +2 -2
- package/src/ui-kit/Calculator/getDefaultParams.tsx +13 -6
- package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -11
- package/src/ui-kit/Calculator/renderPaymentType.tsx +2 -0
- package/src/ui-kit/Calculator/renderPayout.tsx +2 -0
- package/src/ui-kit/Calculator/setDefaultParamsCalc.tsx +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable max-lines, max-lines-per-function */
|
|
2
2
|
import { useCallback, useEffect } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
4
|
-
import { useForm } from '../../hooks/useForm/useForm';
|
|
4
|
+
import { useForm, type FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
5
5
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
6
|
import { CalculatorLayout } from '../../ui-kit/Calculator/CalculatorLayout';
|
|
7
7
|
import { CalculatorStyle } from '../../ui-kit/Calculator/CalculatorStyle';
|
|
@@ -20,13 +20,14 @@ import { UniBlock } from '../../UniBlock/UniBlock';
|
|
|
20
20
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
21
21
|
import { style } from '../../utils/style';
|
|
22
22
|
import { isDefaultParams } from '../CalculatorCredit/isDefaultParams';
|
|
23
|
-
import { type CalculatorDepositContent } from './CalculatorDepositContent';
|
|
24
23
|
import {
|
|
25
|
-
|
|
24
|
+
type CalculatorDepositContent,
|
|
26
25
|
type DepositCalculatorData,
|
|
27
26
|
type DepositCalculatorSourceBookParams,
|
|
28
|
-
type
|
|
29
|
-
|
|
27
|
+
type DepositParams,
|
|
28
|
+
type LinkButtonWithTypeContent,
|
|
29
|
+
} from './CalculatorDepositContent';
|
|
30
|
+
import { getDepositCalculatorParams } from './getDepositCalculatorParams';
|
|
30
31
|
import { isRubles } from './isRubles';
|
|
31
32
|
import { getRows, normalizeDepositParams } from './normalize';
|
|
32
33
|
import { renderDepositParamsForm } from './renderDepositParamsForm';
|
|
@@ -38,6 +39,7 @@ const MAP = {
|
|
|
38
39
|
isReplenish: 'isReplenish',
|
|
39
40
|
isWithdrawn: 'isWithdrawn',
|
|
40
41
|
moneyValue: 'minSum',
|
|
42
|
+
extraPercent: 'extraPercent',
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
const DEFAULT_CURRENCY: Option = {
|
|
@@ -47,11 +49,13 @@ const DEFAULT_CURRENCY: Option = {
|
|
|
47
49
|
|
|
48
50
|
const DEPOSIT_DEFAULT_SUM = 20000;
|
|
49
51
|
const DEPOSIT_DEFAULT_MONTHS = 1;
|
|
52
|
+
const DEPOSIT_DEFAULT_EXTRA_PERCENT = { text: 'Без учета надбавки', key: '0' };
|
|
50
53
|
|
|
51
54
|
export interface CalculatorDepositProps extends CalculatorDepositContent, UniBlockProps {
|
|
52
55
|
className?: string;
|
|
53
56
|
calcSource?: DepositCalculatorData & JSONRefObject;
|
|
54
57
|
}
|
|
58
|
+
|
|
55
59
|
export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
56
60
|
({
|
|
57
61
|
className,
|
|
@@ -67,7 +71,7 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
|
67
71
|
const currencyOptions = rows?.map((_) => _.currency) ?? [DEFAULT_CURRENCY];
|
|
68
72
|
const normalize = useCallback(normalizeDepositParams(rows), [rows]);
|
|
69
73
|
|
|
70
|
-
const [userInputParams, { field }] = useForm(
|
|
74
|
+
const [userInputParams, { field }] = useForm<DepositParams>(
|
|
71
75
|
{
|
|
72
76
|
moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
|
|
73
77
|
monthsValue: getMonthsDefaultValue(defaultParams, DEPOSIT_DEFAULT_MONTHS),
|
|
@@ -77,25 +81,30 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
|
77
81
|
isWithdrawn: Boolean(defaultParams?.isWithdrawn),
|
|
78
82
|
isNewClient: Boolean(defaultParams?.isNewClient),
|
|
79
83
|
currency: DEFAULT_CURRENCY,
|
|
84
|
+
extraPercent: defaultParams?.extraPercent ?? DEPOSIT_DEFAULT_EXTRA_PERCENT,
|
|
80
85
|
},
|
|
81
86
|
{ normalizer: normalize },
|
|
82
87
|
);
|
|
83
88
|
|
|
84
|
-
const currencyValue = field
|
|
85
|
-
const isNewClient = field?.('isNewClient')?.value;
|
|
89
|
+
const currencyValue = getCurrencyValue(field);
|
|
90
|
+
const isNewClient = Boolean(field?.('isNewClient')?.value);
|
|
91
|
+
const extraPercents = rows?.find((_) => _?.extraPercents)?.extraPercents;
|
|
86
92
|
const row = getRows(rows, currencyValue);
|
|
87
93
|
const calcParams = getDepositCalculatorParams(userInputParams, row, paramsViewSettings);
|
|
88
94
|
const { rate, income, finalSum, type = '' } = calcParams;
|
|
89
|
-
|
|
90
95
|
const handleDefaultParamsCals = useCallback(() => {
|
|
91
96
|
setDefaultParamsCalc({
|
|
92
97
|
field,
|
|
93
|
-
defParams: getDefaultParamsMax(
|
|
98
|
+
defParams: getDefaultParamsMax(
|
|
99
|
+
row,
|
|
100
|
+
isNewClient,
|
|
101
|
+
extraPercents,
|
|
102
|
+
) as DepositCalculatorSourceBookParams,
|
|
94
103
|
calcParams,
|
|
95
104
|
monthsValue: 'minMonths',
|
|
96
105
|
map: MAP,
|
|
97
106
|
});
|
|
98
|
-
}, [field, rows]);
|
|
107
|
+
}, [field, rows, extraPercents]);
|
|
99
108
|
|
|
100
109
|
useEffect(() => {
|
|
101
110
|
if (!isDefaultParams(defaultParams) && row) {
|
|
@@ -103,7 +112,11 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
|
103
112
|
}
|
|
104
113
|
}, [defaultParams, rows]);
|
|
105
114
|
|
|
106
|
-
const
|
|
115
|
+
const extraRate = field?.('extraPercent')?.value?.key;
|
|
116
|
+
const totalRate = getTotalRate(rate, extraRate);
|
|
117
|
+
const isMaxRate =
|
|
118
|
+
rate === getDefaultParamsMax(row, isNewClient)?.rate &&
|
|
119
|
+
extraRate === extraPercents?.at(-1)?.key;
|
|
107
120
|
|
|
108
121
|
return (
|
|
109
122
|
<CalculatorLayout className={className} title={title} {...rest}>
|
|
@@ -132,10 +145,14 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
|
132
145
|
...field('monthsValue'),
|
|
133
146
|
value: calcParams.monthsValue,
|
|
134
147
|
})}
|
|
135
|
-
{renderDepositParamsForm(
|
|
148
|
+
{renderDepositParamsForm(
|
|
149
|
+
{ ...calcParams, ...paramsViewSettings },
|
|
150
|
+
field,
|
|
151
|
+
extraPercents,
|
|
152
|
+
)}
|
|
136
153
|
</div>
|
|
137
154
|
{renderRate({
|
|
138
|
-
rate,
|
|
155
|
+
rate: totalRate,
|
|
139
156
|
children: renderMaxRateButton(handleDefaultParamsCals, isMaxRate),
|
|
140
157
|
})}
|
|
141
158
|
{renderDepositResult({
|
|
@@ -154,7 +171,7 @@ export const CalculatorDeposit = UniBlock<CalculatorDepositProps>(
|
|
|
154
171
|
|
|
155
172
|
const getStep = (key = '') => (isRubles(key) ? 1000 : 100);
|
|
156
173
|
|
|
157
|
-
const getTariffButton = (buttons:
|
|
174
|
+
const getTariffButton = (buttons: LinkButtonWithTypeContent[] = [], btnType = '') => {
|
|
158
175
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
159
176
|
const { type, ...button } = buttons.find((_) => _.type === btnType) ?? {};
|
|
160
177
|
|
|
@@ -167,3 +184,9 @@ const renderMaxRateButton = (handleDefaultParamsCals: () => void, isMaxRate = fa
|
|
|
167
184
|
Показать максимальную ставку
|
|
168
185
|
</Button>
|
|
169
186
|
);
|
|
187
|
+
|
|
188
|
+
const getTotalRate = (rate: number, extraRate?: string): number =>
|
|
189
|
+
Number(rate) + Number(extraRate ?? 0);
|
|
190
|
+
|
|
191
|
+
const getCurrencyValue = (field: FormFieldRegisterer<DepositParams>) =>
|
|
192
|
+
field?.('currency')?.value ?? DEFAULT_CURRENCY;
|
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
import {
|
|
2
|
+
type CalcDefaultParamsProps,
|
|
2
3
|
type CalcValueProps,
|
|
3
4
|
type CommonCalculatorProps,
|
|
4
5
|
type CommonDefaultParams,
|
|
5
6
|
} from '../../ui-kit/Calculator/CalculatorProps';
|
|
7
|
+
import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
6
8
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
7
9
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
8
10
|
|
|
11
|
+
export interface DepositCalculatorUserInputParams extends CommonDepositParams, CalcValueProps {}
|
|
12
|
+
|
|
13
|
+
export interface DepositCalculatorParams
|
|
14
|
+
extends DepositCalculatorSourceBookParams,
|
|
15
|
+
DepositCalculatorUserInputParams {
|
|
16
|
+
availableMonths: number[];
|
|
17
|
+
defaultMonth: number;
|
|
18
|
+
income: number;
|
|
19
|
+
finalSum: number;
|
|
20
|
+
currency?: Option;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type LinkButtonWithTypeContent = LinkButtonContent & {
|
|
24
|
+
type?: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type DepositCalculatorRowsData = {
|
|
28
|
+
currency: Option;
|
|
29
|
+
rates?: DepositCalculatorSourceBookParams[];
|
|
30
|
+
extraPercents?: Option[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type DepositCalculatorData = {
|
|
34
|
+
rows?: DepositCalculatorRowsData[];
|
|
35
|
+
buttons?: LinkButtonWithTypeContent[];
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export interface DepositCalculatorSourceBookParams
|
|
39
|
+
extends CommonDepositParams,
|
|
40
|
+
CalcDefaultParamsProps {
|
|
41
|
+
currency?: Option;
|
|
42
|
+
extraPercent?: Option;
|
|
43
|
+
}
|
|
44
|
+
|
|
9
45
|
export interface CalculatorDepositParamsViewSettings {
|
|
10
46
|
/**
|
|
11
47
|
* @title Выплата процентов
|
|
@@ -23,6 +59,8 @@ export interface CalculatorDepositParamsViewSettings {
|
|
|
23
59
|
isShowWithdrawn?: boolean;
|
|
24
60
|
/** @title Новый клиент */
|
|
25
61
|
isShowNewClient?: boolean;
|
|
62
|
+
/** @title Новый клиент */
|
|
63
|
+
isShowExtraPercent?: boolean;
|
|
26
64
|
}
|
|
27
65
|
|
|
28
66
|
export interface CommonDepositParams {
|
|
@@ -36,6 +74,8 @@ export interface CommonDepositParams {
|
|
|
36
74
|
isRemoteRegistration?: boolean;
|
|
37
75
|
/** @title Новый клиент */
|
|
38
76
|
isNewClient?: boolean;
|
|
77
|
+
/** @title Дополнительный процент */
|
|
78
|
+
extraPercent?: Option;
|
|
39
79
|
/** @title Валюта */
|
|
40
80
|
currency?: Option;
|
|
41
81
|
/** @hidden */
|
|
@@ -43,6 +83,7 @@ export interface CommonDepositParams {
|
|
|
43
83
|
}
|
|
44
84
|
|
|
45
85
|
export interface DepositDefaultParams extends CommonDefaultParams, CommonDepositParams {}
|
|
86
|
+
|
|
46
87
|
export interface DepositParams extends DepositDefaultParams, CalcValueProps {}
|
|
47
88
|
|
|
48
89
|
/**
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type CalcDefaultParamsProps,
|
|
3
|
-
type CalcValueProps,
|
|
4
|
-
} from '../../ui-kit/Calculator/CalculatorProps';
|
|
5
1
|
import { checkRangeByKeys, getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
|
|
6
|
-
import { type LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
7
|
-
import { type Option } from '../../ui-kit/Select/Option';
|
|
8
2
|
import { arrayByRange } from '../../utils/arrayByRange';
|
|
9
3
|
import { mergeIntervals } from '../../utils/mergeIntervals';
|
|
10
4
|
import {
|
|
11
5
|
type CalculatorDepositParamsViewSettings,
|
|
12
|
-
type
|
|
6
|
+
type DepositCalculatorParams,
|
|
7
|
+
type DepositCalculatorSourceBookParams,
|
|
8
|
+
type DepositCalculatorUserInputParams,
|
|
13
9
|
} from './CalculatorDepositContent';
|
|
14
10
|
|
|
15
11
|
const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
|
|
@@ -25,38 +21,6 @@ const DEFAULT_DEPOSIT_CALCULATOR_PARAMS: DepositCalculatorSourceBookParams = {
|
|
|
25
21
|
type: '',
|
|
26
22
|
};
|
|
27
23
|
|
|
28
|
-
export interface DepositCalculatorSourceBookParams
|
|
29
|
-
extends CommonDepositParams,
|
|
30
|
-
CalcDefaultParamsProps {
|
|
31
|
-
currency?: Option;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface DepositCalculatorUserInputParams extends CommonDepositParams, CalcValueProps {}
|
|
35
|
-
|
|
36
|
-
export interface DepositCalculatorParams
|
|
37
|
-
extends DepositCalculatorSourceBookParams,
|
|
38
|
-
DepositCalculatorUserInputParams {
|
|
39
|
-
availableMonths: number[];
|
|
40
|
-
defaultMonth: number;
|
|
41
|
-
income: number;
|
|
42
|
-
finalSum: number;
|
|
43
|
-
currency?: Option;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type TariffsButtonContent = LinkButtonContent & {
|
|
47
|
-
type?: string;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type DepositCalculatorRowsData = {
|
|
51
|
-
currency: Option;
|
|
52
|
-
rates: DepositCalculatorSourceBookParams[];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export type DepositCalculatorData = {
|
|
56
|
-
rows?: DepositCalculatorRowsData[];
|
|
57
|
-
buttons?: TariffsButtonContent[];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
24
|
export const getDepositCalculatorParams = (
|
|
61
25
|
userInputParams: DepositCalculatorUserInputParams,
|
|
62
26
|
rows?: DepositCalculatorSourceBookParams[],
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
|
|
2
2
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
3
3
|
import { clamp } from '../../utils/clamp';
|
|
4
|
-
import { type DepositParams } from './CalculatorDepositContent';
|
|
5
|
-
import { type DepositCalculatorRowsData } from './getDepositCalculatorParams';
|
|
4
|
+
import { type DepositCalculatorRowsData, type DepositParams } from './CalculatorDepositContent';
|
|
6
5
|
import { isRubles } from './isRubles';
|
|
7
6
|
|
|
8
7
|
export const normalizeDepositParams = (rows?: DepositCalculatorRowsData[]) => (_: DepositParams) =>
|
|
@@ -1,71 +1,84 @@
|
|
|
1
1
|
import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
renderBinaryRadioButtonGroup,
|
|
4
|
+
type BinaryRadioButtonGroupProps,
|
|
5
|
+
} from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
|
|
3
6
|
import { renderPayout } from '../../ui-kit/Calculator/renderPayout';
|
|
4
7
|
import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
|
|
5
|
-
import { type
|
|
6
|
-
import { type
|
|
8
|
+
import { type Option } from '../../ui-kit/Select/Option';
|
|
9
|
+
import { Select, type SelectProps } from '../../ui-kit/Select/Select';
|
|
10
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
11
|
+
import {
|
|
12
|
+
type CalculatorDepositParamsViewSettings,
|
|
13
|
+
type DepositCalculatorParams,
|
|
14
|
+
} from './CalculatorDepositContent';
|
|
7
15
|
import { renderRegistrationType } from './renderRegistrationType';
|
|
8
16
|
|
|
9
17
|
export const renderDepositParamsForm = (
|
|
10
18
|
params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
|
|
11
19
|
field: FormFieldRegisterer<any>,
|
|
20
|
+
extraPercents?: Option[],
|
|
12
21
|
) => {
|
|
13
22
|
const isCurrency = params?.currency?.key !== 'rub';
|
|
14
23
|
|
|
15
24
|
return (
|
|
16
|
-
<div className="grid gap-lg">
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
? renderBinaryRadioButtonGroup({
|
|
20
|
-
title: 'Пополнение',
|
|
21
|
-
...field('isReplenish'),
|
|
22
|
-
value: params.isReplenish,
|
|
23
|
-
orientation: 'vertical',
|
|
24
|
-
items: [
|
|
25
|
-
{ id: 'withReplenish', text: 'С пополнением' },
|
|
26
|
-
{ id: 'withoutReplenish', text: 'Без пополнения' },
|
|
27
|
-
],
|
|
28
|
-
disabled: isCurrency,
|
|
29
|
-
})
|
|
30
|
-
: null}
|
|
31
|
-
{params.isShowWithdrawn
|
|
32
|
-
? renderBinaryRadioButtonGroup({
|
|
33
|
-
title: 'Снятие',
|
|
34
|
-
...field('isWithdrawn'),
|
|
35
|
-
value: params.isWithdrawn,
|
|
36
|
-
orientation: 'vertical',
|
|
37
|
-
items: [
|
|
38
|
-
{ id: 'wthDrawn', text: 'Со снятием' },
|
|
39
|
-
{ id: 'noWithdrawn', text: 'Без снятия' },
|
|
40
|
-
],
|
|
41
|
-
disabled: isCurrency,
|
|
42
|
-
})
|
|
43
|
-
: null}
|
|
44
|
-
</div>
|
|
25
|
+
<div className="grid grid-cols-2 gap-lg">
|
|
26
|
+
{renderReplenish(field('isReplenish'), params, isCurrency)}
|
|
27
|
+
{renderWithdrawn(field('isWithdrawn'), params, isCurrency)}
|
|
45
28
|
{renderSeparator(params.isShowReplenish || params.isShowWithdrawn)}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
title: 'Выплата процентов',
|
|
50
|
-
...field('isMonthlyInterestPayment'),
|
|
51
|
-
value: params.isMonthlyInterestPayment,
|
|
52
|
-
orientation: 'vertical',
|
|
53
|
-
})
|
|
54
|
-
: null}
|
|
55
|
-
{params.isShowRemoteRegistration
|
|
56
|
-
? renderRegistrationType({
|
|
57
|
-
title: 'Оформление',
|
|
58
|
-
...field('isRemoteRegistration'),
|
|
59
|
-
value: params.isRemoteRegistration,
|
|
60
|
-
orientation: 'vertical',
|
|
61
|
-
})
|
|
62
|
-
: null}
|
|
63
|
-
</div>
|
|
64
|
-
{renderSeparator(params.isShowNewClient)}
|
|
29
|
+
{params.isShowMonthlyInterestPayment ? renderPayout(field('isMonthlyInterestPayment')) : null}
|
|
30
|
+
{renderRegistrationType(field('isRemoteRegistration'), params.isShowRemoteRegistration)}
|
|
31
|
+
{renderExtraPercents(field('extraPercent'), extraPercents)}
|
|
65
32
|
{params.isShowNewClient ? <Checkbox text="Новый вкладчик" {...field('isNewClient')} /> : null}
|
|
66
33
|
</div>
|
|
67
34
|
);
|
|
68
35
|
};
|
|
69
36
|
|
|
37
|
+
const renderReplenish = (
|
|
38
|
+
props: Partial<BinaryRadioButtonGroupProps>,
|
|
39
|
+
params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
|
|
40
|
+
isCurrency = false,
|
|
41
|
+
) =>
|
|
42
|
+
params.isShowReplenish
|
|
43
|
+
? renderBinaryRadioButtonGroup({
|
|
44
|
+
...props,
|
|
45
|
+
title: 'Пополнение',
|
|
46
|
+
orientation: 'vertical',
|
|
47
|
+
items: [
|
|
48
|
+
{ id: 'withReplenish', text: 'С пополнением' },
|
|
49
|
+
{ id: 'withoutReplenish', text: 'Без пополнения' },
|
|
50
|
+
],
|
|
51
|
+
disabled: isCurrency,
|
|
52
|
+
})
|
|
53
|
+
: null;
|
|
54
|
+
|
|
55
|
+
const renderWithdrawn = (
|
|
56
|
+
props: Partial<BinaryRadioButtonGroupProps>,
|
|
57
|
+
params: DepositCalculatorParams & CalculatorDepositParamsViewSettings,
|
|
58
|
+
isCurrency = false,
|
|
59
|
+
) =>
|
|
60
|
+
params.isShowWithdrawn
|
|
61
|
+
? renderBinaryRadioButtonGroup({
|
|
62
|
+
...props,
|
|
63
|
+
title: 'Снятие',
|
|
64
|
+
orientation: 'vertical',
|
|
65
|
+
items: [
|
|
66
|
+
{ id: 'wthDrawn', text: 'Со снятием' },
|
|
67
|
+
{ id: 'noWithdrawn', text: 'Без снятия' },
|
|
68
|
+
],
|
|
69
|
+
disabled: isCurrency,
|
|
70
|
+
})
|
|
71
|
+
: null;
|
|
72
|
+
|
|
70
73
|
const renderSeparator = (isShow = false) =>
|
|
71
|
-
isShow ? <div className="border-b border-main-divider w-full"></div> : null;
|
|
74
|
+
isShow ? <div className="border-b border-main-divider col-span-2 w-full"></div> : null;
|
|
75
|
+
|
|
76
|
+
const renderExtraPercents = (props: Partial<SelectProps>, extraPercents?: Option[]) =>
|
|
77
|
+
extraPercents?.length ? (
|
|
78
|
+
<div className="w-full space-y-s col-span-2">
|
|
79
|
+
<Text color="text-secondary-text" font="font-light">
|
|
80
|
+
Надбавка за операции по карте
|
|
81
|
+
</Text>
|
|
82
|
+
<Select options={extraPercents} {...props} />
|
|
83
|
+
</div>
|
|
84
|
+
) : null;
|
|
@@ -3,11 +3,18 @@ import {
|
|
|
3
3
|
type BinaryRadioButtonGroupProps,
|
|
4
4
|
} from '../../ui-kit/Calculator/renderBinaryRadioButtonGroup';
|
|
5
5
|
|
|
6
|
-
export const renderRegistrationType = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
export const renderRegistrationType = (
|
|
7
|
+
props: Partial<BinaryRadioButtonGroupProps>,
|
|
8
|
+
isShow = false,
|
|
9
|
+
) =>
|
|
10
|
+
isShow
|
|
11
|
+
? renderBinaryRadioButtonGroup({
|
|
12
|
+
...props,
|
|
13
|
+
title: 'Оформление',
|
|
14
|
+
orientation: 'vertical',
|
|
15
|
+
items: [
|
|
16
|
+
{ id: 'remote', text: 'Дистанционно' },
|
|
17
|
+
{ id: 'office', text: 'Офис Банка' },
|
|
18
|
+
],
|
|
19
|
+
})
|
|
20
|
+
: null;
|
|
@@ -57,9 +57,6 @@ export const CalculatorRefinancing = UniBlock<RefinancingCalculatorProp>(
|
|
|
57
57
|
);
|
|
58
58
|
|
|
59
59
|
const paymentTypeElement = renderPaymentType({
|
|
60
|
-
title: '',
|
|
61
|
-
mobileTitle: 'Тип платежа',
|
|
62
|
-
orientation: 'vertical',
|
|
63
60
|
...field('isAnnuity'),
|
|
64
61
|
});
|
|
65
62
|
|
|
@@ -114,7 +111,7 @@ export const CalculatorRefinancing = UniBlock<RefinancingCalculatorProp>(
|
|
|
114
111
|
postfix="₽"
|
|
115
112
|
/>
|
|
116
113
|
{calcParams.benefit > 0 ? (
|
|
117
|
-
<CalculatorValue title=
|
|
114
|
+
<CalculatorValue title="Выгода в месяц" value={calcParams.benefit} postfix="₽" />
|
|
118
115
|
) : null}
|
|
119
116
|
<div className="hidden sm:block mb-lg">{paymentTypeElement}</div>
|
|
120
117
|
{renderButtonsSection(buttons, { isVertical: true })}
|
|
@@ -44,4 +44,4 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export const countIncomeAverage = (wages?: number, retirementIncome?: number) =>
|
|
47
|
-
Number(wages) + Number(retirementIncome);
|
|
47
|
+
Number(wages ?? 0) + Number(retirementIncome ?? 0);
|
|
@@ -13,7 +13,7 @@ export const DocumentDialog = JSX<DocumentDialogProps>(({ src, onClose, onDocume
|
|
|
13
13
|
const isMobileMode = useMobileMode();
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0" onClose={onClose}>
|
|
16
|
+
<Dialog className="my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0 z-[101]" onClose={onClose}>
|
|
17
17
|
{isMobileMode ? (
|
|
18
18
|
<img src={src} />
|
|
19
19
|
) : (
|
|
@@ -45,11 +45,16 @@ export const EsiaLoginDialog = JSX<EsiaLoginDialogProps>(({ onClose }) => {
|
|
|
45
45
|
</ul>
|
|
46
46
|
<Img image={{ icon: 'GosUslugiIcon', iconVersion: 'normal' }} height="70" />
|
|
47
47
|
</div>
|
|
48
|
-
<div className="flex flex-wrap gap-lg w-full">
|
|
49
|
-
<Button type="button" onClick={handleAuth}>
|
|
48
|
+
<div className="@container flex flex-wrap gap-lg w-full">
|
|
49
|
+
<Button type="button" onClick={handleAuth} className="w-full md:w-auto">
|
|
50
50
|
Заполнить через Госуслуги
|
|
51
51
|
</Button>
|
|
52
|
-
<Button
|
|
52
|
+
<Button
|
|
53
|
+
type="button"
|
|
54
|
+
version="secondary"
|
|
55
|
+
onClick={handleClose}
|
|
56
|
+
className="w-full md:w-auto"
|
|
57
|
+
>
|
|
53
58
|
Пропустить
|
|
54
59
|
</Button>
|
|
55
60
|
</div>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import { type JSONRefObject } from '../../../data/JSONRefObject';
|
|
3
|
+
import { type CustomFieldProps } from '../../../ui-kit/FormField/CustomFieldProps';
|
|
4
|
+
import { UniBlock } from '../../../UniBlock/UniBlock';
|
|
5
|
+
import { type UniBlockProps } from '../../../UniBlock/UniBlockProps';
|
|
6
|
+
import { type DaDataSuggestion } from '../../api/dadataHints/dadataHintsType';
|
|
7
|
+
import { DaDataInputControl } from '../DaDataInputControl/DaDataInputControl';
|
|
8
|
+
import { getAddressFromDaDataItem } from './AddressField';
|
|
9
|
+
|
|
10
|
+
export interface AddressCourierFieldProps extends CustomFieldProps, UniBlockProps {
|
|
11
|
+
source?: JSONRefObject & {
|
|
12
|
+
deliveryCities?: string[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const AddressCourierField = UniBlock<AddressCourierFieldProps>(
|
|
17
|
+
({ field, input, source }) => {
|
|
18
|
+
const [errorCity, setErrorCity] = useState('');
|
|
19
|
+
const fieldValue = field('addressCourier')?.value;
|
|
20
|
+
const currentLocality = fieldValue?.locality;
|
|
21
|
+
const currentCity = fieldValue?.city;
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (
|
|
25
|
+
(currentCity || currentLocality) &&
|
|
26
|
+
!source?.deliveryCities?.includes(currentCity as string)
|
|
27
|
+
) {
|
|
28
|
+
field?.('addressCourier')?.onChange?.({
|
|
29
|
+
...fieldValue,
|
|
30
|
+
house: '',
|
|
31
|
+
});
|
|
32
|
+
setErrorCity('Город недоступен для доставки');
|
|
33
|
+
} else {
|
|
34
|
+
setErrorCity('');
|
|
35
|
+
}
|
|
36
|
+
}, [currentCity, currentLocality, source]);
|
|
37
|
+
|
|
38
|
+
const onDaDataChange = useCallback((item: DaDataSuggestion) => {
|
|
39
|
+
field?.('addressCourier')?.onChange?.(getAddressFromDaDataItem(item));
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
const onChange = useCallback((value: string) => {
|
|
43
|
+
field?.('addressCourier')?.onChange?.({
|
|
44
|
+
apartment: '',
|
|
45
|
+
city: '',
|
|
46
|
+
district: '',
|
|
47
|
+
fullAddress: value,
|
|
48
|
+
fiasCode: '',
|
|
49
|
+
house: '',
|
|
50
|
+
locality: '',
|
|
51
|
+
okatoRegionCode: '',
|
|
52
|
+
postcode: '',
|
|
53
|
+
region: '',
|
|
54
|
+
regionCode: '',
|
|
55
|
+
street: '',
|
|
56
|
+
qc: '',
|
|
57
|
+
qcComplete: '',
|
|
58
|
+
qcHouse: '',
|
|
59
|
+
});
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<DaDataInputControl
|
|
64
|
+
label="Адрес"
|
|
65
|
+
{...field('addressCourier')}
|
|
66
|
+
value={fieldValue?.fullAddress}
|
|
67
|
+
onChange={onChange}
|
|
68
|
+
{...input}
|
|
69
|
+
error={errorCity || field('addressCourier')?.error}
|
|
70
|
+
onDaDataChange={onDaDataChange}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
);
|
package/src/retail/inputs.tsx
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
2
|
+
import { type CustomFieldProps } from '../ui-kit/FormField/CustomFieldProps';
|
|
1
3
|
import { PhoneField } from '../ui-kit/FormField/Fields/PhoneField';
|
|
4
|
+
import { AddressCourierField } from './components/Fields/AddressCourierField';
|
|
2
5
|
import { AddressFactField } from './components/Fields/AddressFactField';
|
|
3
6
|
import { AddressField } from './components/Fields/AddressField';
|
|
4
7
|
import { AddressMatchField } from './components/Fields/AddressMatchField';
|
|
@@ -65,6 +68,10 @@ import { SurnameField } from './components/Fields/SurnameField';
|
|
|
65
68
|
import { TotalIncomeField } from './components/Fields/TotalIncomeField';
|
|
66
69
|
import { WagesField } from './components/Fields/WagesField';
|
|
67
70
|
|
|
71
|
+
const DELIVERY_CITIES_REF = {
|
|
72
|
+
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
73
|
+
};
|
|
74
|
+
|
|
68
75
|
export const InputsApplicationLeadMap = {
|
|
69
76
|
limitedBirthday: LimitedBirthdayField,
|
|
70
77
|
name: NameField,
|
|
@@ -142,7 +149,9 @@ export const InputsRetailMap = {
|
|
|
142
149
|
};
|
|
143
150
|
|
|
144
151
|
export const InputRetailCardMap = {
|
|
145
|
-
addressCourier:
|
|
152
|
+
addressCourier: (props: CustomFieldProps) => (
|
|
153
|
+
<AddressCourierField {...props} source={DELIVERY_CITIES_REF} />
|
|
154
|
+
),
|
|
146
155
|
paymentSystem: PaymentSystemField,
|
|
147
156
|
currency: CurrencyField,
|
|
148
157
|
cardCategory: CardCategoryField,
|
|
@@ -57,7 +57,7 @@ export interface Address {
|
|
|
57
57
|
qcHouse?: string;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export interface
|
|
60
|
+
export interface CalculatorProps {
|
|
61
61
|
moneyValue?: number;
|
|
62
62
|
monthsValue?: number;
|
|
63
63
|
isAnnuity?: boolean;
|
|
@@ -164,7 +164,7 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
164
164
|
cardCategory?: Option;
|
|
165
165
|
codeWord?: string;
|
|
166
166
|
esiaAccountTypeCd?: Option;
|
|
167
|
-
calculator?:
|
|
167
|
+
calculator?: CalculatorProps;
|
|
168
168
|
addressRetail?: Option;
|
|
169
169
|
loanAmount?: number;
|
|
170
170
|
creditPeriod?: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/
|
|
1
|
+
import { type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/CalculatorDepositContent';
|
|
2
|
+
import { type Option } from '../Select/Option';
|
|
2
3
|
import { type CalcDefaultParamsProps } from './CalculatorProps';
|
|
3
4
|
|
|
4
5
|
export const getDefaultParamsMin = (rateRows?: CalcDefaultParamsProps[]) =>
|
|
@@ -9,11 +10,17 @@ export const getDefaultParamsMin = (rateRows?: CalcDefaultParamsProps[]) =>
|
|
|
9
10
|
export const getDefaultParamsMax = (
|
|
10
11
|
rateRows: DepositCalculatorSourceBookParams[] = [],
|
|
11
12
|
isNewClient = false,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
extraPercents: Option[] = [],
|
|
14
|
+
) => {
|
|
15
|
+
return {
|
|
16
|
+
...getDefaultParams(
|
|
17
|
+
[(i: number, acc: number) => i > acc, (i, prev) => i?.minSum < prev?.minSum],
|
|
18
|
+
rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient)),
|
|
19
|
+
),
|
|
20
|
+
extraPercent: extraPercents.at(-1),
|
|
21
|
+
extraPercents,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
17
24
|
|
|
18
25
|
const getDefaultParams = (
|
|
19
26
|
comparators: [
|