@redneckz/wildless-cms-uni-blocks 0.14.779 → 0.14.788
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 +178 -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/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/Rate.js +1 -1
- package/dist/ui-kit/Calculator/Rate.js.map +1 -1
- 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/Rate.js +1 -1
- package/lib/ui-kit/Calculator/Rate.js.map +1 -1
- 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 +178 -122
- 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/Rate.js +1 -1
- package/mobile/dist/ui-kit/Calculator/Rate.js.map +1 -1
- 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/Rate.js +1 -1
- package/mobile/lib/ui-kit/Calculator/Rate.js.map +1 -1
- 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/Rate.tsx +1 -1
- 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/Rate.tsx +1 -1
- 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,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
1
2
|
import { PhoneField } from '../ui-kit/FormField/Fields/PhoneField.js';
|
|
3
|
+
import { AddressCourierField } from './components/Fields/AddressCourierField.js';
|
|
2
4
|
import { AddressFactField } from './components/Fields/AddressFactField.js';
|
|
3
5
|
import { AddressField } from './components/Fields/AddressField.js';
|
|
4
6
|
import { AddressMatchField } from './components/Fields/AddressMatchField.js';
|
|
@@ -64,6 +66,9 @@ import { SnilsField } from './components/Fields/SnilsField.js';
|
|
|
64
66
|
import { SurnameField } from './components/Fields/SurnameField.js';
|
|
65
67
|
import { TotalIncomeField } from './components/Fields/TotalIncomeField.js';
|
|
66
68
|
import { WagesField } from './components/Fields/WagesField.js';
|
|
69
|
+
const DELIVERY_CITIES_REF = {
|
|
70
|
+
$ref: '/wcms-resources/delivery-cities-data.json',
|
|
71
|
+
};
|
|
67
72
|
export const InputsApplicationLeadMap = {
|
|
68
73
|
limitedBirthday: LimitedBirthdayField,
|
|
69
74
|
name: NameField,
|
|
@@ -138,7 +143,7 @@ export const InputsRetailMap = {
|
|
|
138
143
|
inn: DaDataInnField,
|
|
139
144
|
};
|
|
140
145
|
export const InputRetailCardMap = {
|
|
141
|
-
addressCourier:
|
|
146
|
+
addressCourier: (props) => (_jsx(AddressCourierField, { ...props, source: DELIVERY_CITIES_REF })),
|
|
142
147
|
paymentSystem: PaymentSystemField,
|
|
143
148
|
currency: CurrencyField,
|
|
144
149
|
cardCategory: CardCategoryField,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../src/retail/inputs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../src/retail/inputs.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,cAA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EAAE,oBAAoB;IACtC,cAAc,EAAE,mBAAmB;IACnC,YAAY,EAAE,iBAAiB;IAC/B,QAAQ,EAAE,aAAa;IACvB,UAAU,EAAE,eAAe;IAC3B,kBAAkB,EAAE,uBAAuB;IAC3C,GAAG,EAAE,cAAc;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc,EAAE,CAAC,KAAuB,EAAE,EAAE,CAAC,CAC3C,KAAC,mBAAmB,OAAK,KAAK,EAAE,MAAM,EAAE,mBAAmB,GAAI,CAChE;IACD,aAAa,EAAE,kBAAkB;IACjC,QAAQ,EAAE,aAAa;IACvB,YAAY,EAAE,iBAAiB;IAC/B,QAAQ,EAAE,aAAa;IACvB,YAAY,EAAE,iBAAiB;IAC/B,YAAY,EAAE,iBAAiB;IAC/B,SAAS,EAAE,cAAc;IACzB,YAAY,EAAE,iBAAiB;CAChC,CAAC"}
|
|
@@ -50,7 +50,7 @@ export interface Address {
|
|
|
50
50
|
qcComplete?: string;
|
|
51
51
|
qcHouse?: string;
|
|
52
52
|
}
|
|
53
|
-
export interface
|
|
53
|
+
export interface CalculatorProps {
|
|
54
54
|
moneyValue?: number;
|
|
55
55
|
monthsValue?: number;
|
|
56
56
|
isAnnuity?: boolean;
|
|
@@ -152,7 +152,7 @@ export interface LeadFormState extends FormRetailConsents, FormStateDeliveryType
|
|
|
152
152
|
cardCategory?: Option;
|
|
153
153
|
codeWord?: string;
|
|
154
154
|
esiaAccountTypeCd?: Option;
|
|
155
|
-
calculator?:
|
|
155
|
+
calculator?: CalculatorProps;
|
|
156
156
|
addressRetail?: Option;
|
|
157
157
|
loanAmount?: number;
|
|
158
158
|
creditPeriod?: number;
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { toLocalNumberFormat } from '../../utils/toLocalNumberFormat.js';
|
|
4
4
|
import { Text } from '../Text/Text.js';
|
|
5
|
-
export const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName, color = 'text-secondary-text', }) => (_jsxs("div", { children: [_jsx(Text, { size: "text-l", font: "font-light", color: color, children: title }), _jsxs("div", { className: "relative", children: [_jsxs("div", { className: "flex @xl:justify-center gradient-color-text", children: [_jsx("span", { className: "font-mohave text-title-huge -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? _jsx("span", { className: "text-7xl mt-5", children: unit }) : null] }), depositeName && isShowDepositeName ? (_jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
5
|
+
export const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName, color = 'text-secondary-text', }) => (_jsxs("div", { children: [_jsx(Text, { size: "text-l", font: "font-light", color: color, children: title }), _jsxs("div", { className: "relative", children: [_jsxs("div", { className: "flex @xl:justify-center gradient-color-text gap-xs", children: [_jsx("span", { className: "font-mohave text-title-huge -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? _jsx("span", { className: "text-7xl mt-5", children: unit }) : null] }), depositeName && isShowDepositeName ? (_jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
6
6
|
//# sourceMappingURL=Rate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rate.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/Rate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAYpC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CACrB,CAAC,EACC,I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ACpC,cAAK,SAAS,EAAC,sDAAsD,YAAE,YAAY,GAAO,CAC3F,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CACF,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
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
|
export declare const getDefaultParamsMin: (rateRows?: CalcDefaultParamsProps[]) => CalcDefaultParamsProps | undefined;
|
|
4
|
-
export declare const getDefaultParamsMax: (rateRows?: DepositCalculatorSourceBookParams[], isNewClient?: boolean) =>
|
|
5
|
+
export declare const getDefaultParamsMax: (rateRows?: DepositCalculatorSourceBookParams[], isNewClient?: boolean, extraPercents?: Option[]) => {
|
|
6
|
+
extraPercent: Option | undefined;
|
|
7
|
+
extraPercents: Option[];
|
|
8
|
+
minSum?: number | undefined;
|
|
9
|
+
maxSum?: number | undefined;
|
|
10
|
+
minMonths?: number | undefined;
|
|
11
|
+
maxMonths?: number | undefined;
|
|
12
|
+
rate?: number | undefined;
|
|
13
|
+
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export const getDefaultParamsMin = (rateRows) => getDefaultParams([(i, acc) => i < acc, (i, prev) => i?.maxSum > prev?.maxSum], rateRows);
|
|
2
|
-
export const getDefaultParamsMax = (rateRows = [], isNewClient = false
|
|
2
|
+
export const getDefaultParamsMax = (rateRows = [], isNewClient = false, extraPercents = []) => {
|
|
3
|
+
return {
|
|
4
|
+
...getDefaultParams([(i, acc) => i > acc, (i, prev) => i?.minSum < prev?.minSum], rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient))),
|
|
5
|
+
extraPercent: extraPercents.at(-1),
|
|
6
|
+
extraPercents,
|
|
7
|
+
};
|
|
8
|
+
};
|
|
3
9
|
const getDefaultParams = (comparators, rateRows) => {
|
|
4
10
|
if (!rateRows?.length) {
|
|
5
11
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultParams.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/getDefaultParams.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDefaultParams.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/getDefaultParams.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAmC,EAAE,EAAE,CACzE,gBAAgB,CACd,CAAC,CAAC,CAAS,EAAE,GAAW,EAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EACrF,QAAQ,CACT,CAAC;AACJ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,WAAgD,EAAE,EAClD,WAAW,GAAG,KAAK,EACnB,gBAA0B,EAAE,EAC5B,EAAE;IACF,OAAO;QACL,GAAG,gBAAgB,CACjB,CAAC,CAAC,CAAS,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC,EAC5E,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,KAAK,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CACjE;QACD,YAAY,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAClC,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,WAGC,EACD,QAAmC,EACC,EAAE;IACtC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IACD,MAAM,KAAK,GAAG,QAAQ,EAAE,MAAM,CAC5B,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACT,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE;YACvC,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;aAAM,IAAI,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;YACjC,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;SACpB;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EACD,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACd,CAAC;IACF,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAClF;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -3,11 +3,10 @@ import { type RadioButtonItem } from '../../ui-kit/RadioButtonGroup/RadioButtonG
|
|
|
3
3
|
export interface BinaryRadioButtonGroupProps {
|
|
4
4
|
items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
|
|
5
5
|
title?: string;
|
|
6
|
-
mobileTitle?: string;
|
|
7
6
|
orientation?: ListOrientation;
|
|
8
7
|
value?: boolean;
|
|
9
8
|
className?: string;
|
|
10
9
|
onChange?: (value: boolean) => void;
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
}
|
|
13
|
-
export declare const renderBinaryRadioButtonGroup: ({ items, title,
|
|
12
|
+
export declare const renderBinaryRadioButtonGroup: ({ items, title, orientation, value, onChange, ...rest }: BinaryRadioButtonGroupProps) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { RadioButtonGroup, } from '../../ui-kit/RadioButtonGroup/RadioButtonGroup.js';
|
|
3
3
|
import { Text } from '../../ui-kit/Text/Text.js';
|
|
4
|
-
export const renderBinaryRadioButtonGroup = ({ items, title,
|
|
4
|
+
export const renderBinaryRadioButtonGroup = ({ items, title, orientation = 'horizontal', value, onChange, ...rest }) => (_jsxs("div", { className: "grid gap-s whitespace-nowrap lg:sm:col-span-1 col-span-2", children: [title ? (_jsx("div", { role: "radiogroup", "aria-label": title, children: _jsx(Text, { color: "text-secondary-text", font: "font-light", children: title }) })) : null, _jsx(RadioButtonGroup, { orientation: orientation, items: items, value: items[value ? 0 : 1].id, onChange: (_) => onChange && onChange(_ === items[0].id), ...rest })] }));
|
|
5
5
|
//# sourceMappingURL=renderBinaryRadioButtonGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBinaryRadioButtonGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,gBAAgB,GAEjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderBinaryRadioButtonGroup.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,gBAAgB,GAEjB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAY9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,EAC3C,KAAK,EACL,KAAK,EACL,WAAW,GAAG,YAAY,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACqB,EAAE,EAAE,CAAC,CACjC,eAAK,SAAS,EAAC,0DAA0D,aACtE,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,IAAI,EAAC,YAAY,gBAAa,KAAK,YACtC,KAAC,IAAI,IAAC,KAAK,EAAC,qBAAqB,EAAC,IAAI,EAAC,YAAY,YAChD,KAAK,GACD,GACH,CACP,CAAC,CAAC,CAAC,IAAI,EAER,KAAC,gBAAgB,IACf,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAC9B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KACpD,IAAI,GACR,IACE,CACP,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { renderBinaryRadioButtonGroup, } from './renderBinaryRadioButtonGroup.js';
|
|
2
2
|
export const renderPaymentType = (props) => renderBinaryRadioButtonGroup({
|
|
3
3
|
...props,
|
|
4
|
+
title: 'Тип платежа',
|
|
5
|
+
orientation: 'vertical',
|
|
4
6
|
className: 'sm:flex-col',
|
|
5
7
|
items: [
|
|
6
8
|
{ id: 'annuity', text: 'Аннуитетный' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPaymentType.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderPaymentType.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAE7B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA2C,EAAE,EAAE,CAC/E,4BAA4B,CAAC;IAC3B,GAAG,KAAK;IACR,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE;QACtC,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,oBAAoB,EAAE;KACnD;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"renderPaymentType.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderPaymentType.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAE7B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA2C,EAAE,EAAE,CAC/E,4BAA4B,CAAC;IAC3B,GAAG,KAAK;IACR,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,UAAU;IACvB,SAAS,EAAE,aAAa;IACxB,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,aAAa,EAAE;QACtC,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,oBAAoB,EAAE;KACnD;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { renderBinaryRadioButtonGroup, } from './renderBinaryRadioButtonGroup.js';
|
|
2
2
|
export const renderPayout = (props) => renderBinaryRadioButtonGroup({
|
|
3
3
|
...props,
|
|
4
|
+
title: 'Выплата процентов',
|
|
5
|
+
orientation: 'vertical',
|
|
4
6
|
items: [
|
|
5
7
|
{ id: 'everyMonth', text: 'Ежемесячно' },
|
|
6
8
|
{ id: 'atEndTerm', text: 'В конце срока' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPayout.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderPayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAE7B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAA2C,EAAE,EAAE,CAC1E,4BAA4B,CAAC;IAC3B,GAAG,KAAK;IACR,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE;QACxC,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE;KAC3C;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"renderPayout.js","sourceRoot":"","sources":["../../../src/ui-kit/Calculator/renderPayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAE7B,MAAM,gCAAgC,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAA2C,EAAE,EAAE,CAC1E,4BAA4B,CAAC;IAC3B,GAAG,KAAK;IACR,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,UAAU;IACvB,KAAK,EAAE;QACL,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE;QACxC,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE;KAC3C;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CreditCalculatorParams, type CreditCalculatorSourceBookParams } from '../../components/CalculatorCredit/CalculatorCreditContent';
|
|
2
|
-
import { type DepositCalculatorParams, type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/
|
|
2
|
+
import { type DepositCalculatorParams, type DepositCalculatorSourceBookParams } from '../../components/CalculatorDeposit/CalculatorDepositContent';
|
|
3
3
|
import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
4
4
|
interface ParamsCalcProps {
|
|
5
5
|
field: FormFieldRegisterer<any>;
|
|
@@ -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');
|
|
@@ -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) =>
|