@redneckz/wildless-cms-uni-blocks 0.14.778 → 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 +179 -122
- 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/components/Header/useChatBot.js +2 -1
- package/dist/components/Header/useChatBot.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/components/Header/useChatBot.js +2 -1
- package/lib/components/Header/useChatBot.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/components/Header/useChatBot.js +2 -1
- package/mobile/dist/components/Header/useChatBot.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/components/Header/useChatBot.js +2 -1
- package/mobile/lib/components/Header/useChatBot.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/components/Header/useChatBot.ts +3 -2
- 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/components/Header/useChatBot.ts +3 -2
- 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,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: [
|
|
@@ -8,7 +8,6 @@ import { Text } from '../../ui-kit/Text/Text';
|
|
|
8
8
|
export interface BinaryRadioButtonGroupProps {
|
|
9
9
|
items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
|
|
10
10
|
title?: string;
|
|
11
|
-
mobileTitle?: string;
|
|
12
11
|
orientation?: ListOrientation;
|
|
13
12
|
value?: boolean;
|
|
14
13
|
className?: string;
|
|
@@ -19,27 +18,19 @@ export interface BinaryRadioButtonGroupProps {
|
|
|
19
18
|
export const renderBinaryRadioButtonGroup = ({
|
|
20
19
|
items,
|
|
21
20
|
title,
|
|
22
|
-
mobileTitle = title,
|
|
23
21
|
orientation = 'horizontal',
|
|
24
22
|
value,
|
|
25
23
|
onChange,
|
|
26
24
|
...rest
|
|
27
25
|
}: BinaryRadioButtonGroupProps) => (
|
|
28
|
-
<div className="grid gap-s whitespace-nowrap">
|
|
26
|
+
<div className="grid gap-s whitespace-nowrap lg:sm:col-span-1 col-span-2">
|
|
29
27
|
{title ? (
|
|
30
|
-
<div
|
|
28
|
+
<div role="radiogroup" aria-label={title}>
|
|
31
29
|
<Text color="text-secondary-text" font="font-light">
|
|
32
30
|
{title}
|
|
33
31
|
</Text>
|
|
34
32
|
</div>
|
|
35
33
|
) : null}
|
|
36
|
-
{mobileTitle ? (
|
|
37
|
-
<div className="@5xl:hidden" role="radiogroup" aria-label={mobileTitle}>
|
|
38
|
-
<Text color="text-secondary-text" font="font-light">
|
|
39
|
-
{mobileTitle}
|
|
40
|
-
</Text>
|
|
41
|
-
</div>
|
|
42
|
-
) : null}
|
|
43
34
|
|
|
44
35
|
<RadioButtonGroup
|
|
45
36
|
orientation={orientation}
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
export const renderPaymentType = (props: Partial<BinaryRadioButtonGroupProps>) =>
|
|
7
7
|
renderBinaryRadioButtonGroup({
|
|
8
8
|
...props,
|
|
9
|
+
title: 'Тип платежа',
|
|
10
|
+
orientation: 'vertical',
|
|
9
11
|
className: 'sm:flex-col',
|
|
10
12
|
items: [
|
|
11
13
|
{ id: 'annuity', text: 'Аннуитетный' },
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
export const renderPayout = (props: Partial<BinaryRadioButtonGroupProps>) =>
|
|
7
7
|
renderBinaryRadioButtonGroup({
|
|
8
8
|
...props,
|
|
9
|
+
title: 'Выплата процентов',
|
|
10
|
+
orientation: 'vertical',
|
|
9
11
|
items: [
|
|
10
12
|
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
11
13
|
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
type DepositCalculatorParams,
|
|
7
7
|
type DepositCalculatorSourceBookParams,
|
|
8
|
-
} from '../../components/CalculatorDeposit/
|
|
8
|
+
} from '../../components/CalculatorDeposit/CalculatorDepositContent';
|
|
9
9
|
import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
10
10
|
import { clamp } from '../../utils/clamp';
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
29
29
|
nextStepLink = '/credit-lead',
|
|
30
30
|
button,
|
|
31
31
|
productType = 'credit',
|
|
32
|
+
data,
|
|
32
33
|
...rest
|
|
33
34
|
}) => {
|
|
34
35
|
const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
|
|
@@ -48,6 +49,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
|
|
|
48
49
|
programId,
|
|
49
50
|
nextStepLink,
|
|
50
51
|
productType,
|
|
52
|
+
data,
|
|
51
53
|
});
|
|
52
54
|
|
|
53
55
|
const [, { field, onSubmit }] = useForm(initialFormState, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
1
2
|
import { type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
3
4
|
import { type InputRetailSectionsType } from '../../retail/model/InputSectionsType';
|
|
@@ -13,6 +14,7 @@ export type ProductType = 'credit' | 'creditCard' | 'debitCard';
|
|
|
13
14
|
* @title Форма заявки настраиваемая
|
|
14
15
|
*/
|
|
15
16
|
export type ApplicationLeadFormContent = UniBlockContent &
|
|
17
|
+
AspectsProps &
|
|
16
18
|
TitleProps &
|
|
17
19
|
InputRetailSectionsType & {
|
|
18
20
|
/** @title Кнопка */
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
2
|
import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
4
|
+
import { handleAspects } from '../../hooks/useAspects/handleAspects';
|
|
5
|
+
import { useAspects } from '../../hooks/useAspects/useAspects';
|
|
6
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
4
7
|
import { createDraftTask } from '../../retail/api/createDraftTask';
|
|
5
8
|
import { createUserProfile } from '../../retail/api/createUserProfile';
|
|
6
9
|
import { createUserTaskDebit } from '../../retail/api/createUserTaskDebit';
|
|
@@ -15,26 +18,30 @@ import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/Ver
|
|
|
15
18
|
import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
|
|
16
19
|
import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
|
|
17
20
|
import { useDialog } from '../../ui-kit/DialogManager/useDialog';
|
|
21
|
+
import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
|
|
18
22
|
import { formatPhone } from '../../utils/formatPhone';
|
|
19
23
|
import { type ProductType } from './ApplicationLeadFormContent';
|
|
20
24
|
import { productTypeToConsentsMap } from './consents';
|
|
21
25
|
import { getCreditLeadFormTaskData, getDebitLeadFormTaskData } from './getLeadFormTaskData';
|
|
22
26
|
import { useSaveUserData, type UserData } from './useSaveUserData';
|
|
23
27
|
|
|
24
|
-
interface ApplicationLeadApiProps {
|
|
28
|
+
interface ApplicationLeadApiProps extends AspectsProps {
|
|
25
29
|
programId: string;
|
|
26
30
|
nextStepLink: string;
|
|
27
31
|
productType: ProductType;
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
// eslint-disable-next-line max-lines-per-function
|
|
30
35
|
export const useApplicationLeadApi = ({
|
|
31
36
|
programId,
|
|
32
37
|
nextStepLink,
|
|
33
38
|
productType,
|
|
39
|
+
data,
|
|
34
40
|
}: ApplicationLeadApiProps) => {
|
|
35
41
|
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
36
42
|
const [ok, setOK] = useState<boolean | undefined>();
|
|
37
43
|
const saveUserData = useSaveUserData();
|
|
44
|
+
const aspects = useAspects();
|
|
38
45
|
|
|
39
46
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
40
47
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
@@ -57,6 +64,11 @@ export const useApplicationLeadApi = ({
|
|
|
57
64
|
productType,
|
|
58
65
|
saveUserData,
|
|
59
66
|
});
|
|
67
|
+
handleAspects({
|
|
68
|
+
aspectsAttributes: data,
|
|
69
|
+
aspects,
|
|
70
|
+
ev: {} as PreventableEventWithTarget,
|
|
71
|
+
});
|
|
60
72
|
verifyPhoneDialog.close();
|
|
61
73
|
if (productType === 'debitCard') {
|
|
62
74
|
openEsiaLoginDialog();
|
|
@@ -77,10 +77,7 @@ export const CalculatorBusinessDeposit = UniBlock<CalculatorBusinessDepositProp>
|
|
|
77
77
|
<div className="flex flex-col sm:flex-row gap-y-m gap-x-5xl">
|
|
78
78
|
{renderBusinessDepositParamsForm(calculatorParams, field)}
|
|
79
79
|
{renderPayout({
|
|
80
|
-
title: 'Выплата процентов',
|
|
81
|
-
orientation: 'vertical',
|
|
82
80
|
...field('isMonthlyInterestPayment'),
|
|
83
|
-
className: 'sm:flex-col',
|
|
84
81
|
})}
|
|
85
82
|
</div>
|
|
86
83
|
</div>
|
|
@@ -78,8 +78,6 @@ export const CalculatorCredit = UniBlock<CalculatorDepositProps>(
|
|
|
78
78
|
|
|
79
79
|
const calcParams = getCreditCalculatorParams(userInputParams, calcSource, paramsViewSettings);
|
|
80
80
|
const paymentTypeElement = renderPaymentType({
|
|
81
|
-
title: 'Тип платежа',
|
|
82
|
-
orientation: 'vertical',
|
|
83
81
|
...field('isAnnuity'),
|
|
84
82
|
});
|
|
85
83
|
const { onChange: setMoneyValue } = field('moneyValue');
|
|
@@ -97,4 +97,16 @@ export default {
|
|
|
97
97
|
<PopupManager />
|
|
98
98
|
</div>
|
|
99
99
|
),
|
|
100
|
+
extraPercents: (
|
|
101
|
+
<div className="container grid grid-cols-12">
|
|
102
|
+
<CalculatorDeposit
|
|
103
|
+
{...calculator}
|
|
104
|
+
title="Калькулятор с задаными дефолтными значениями"
|
|
105
|
+
paramsViewSettings={{
|
|
106
|
+
isShowReplenish: true,
|
|
107
|
+
}}
|
|
108
|
+
/>
|
|
109
|
+
<PopupManager />
|
|
110
|
+
</div>
|
|
111
|
+
),
|
|
100
112
|
};
|
|
@@ -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;
|