@redneckz/wildless-cms-uni-blocks 0.14.996 → 0.14.998
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/api/getSubmitBody.d.ts +1636 -244
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +408 -12
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/bundle/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/bundle/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/bundle/components/CalculatorRko/constants.d.ts +25 -0
- package/bundle/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/bundle/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/bundle/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/bundle/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/bundle/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/bundle/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/bundle/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/bundle/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/bundle/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/bundle/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/bundle/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/bundle/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/bundle/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/bundle/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/bundle/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/bundle/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/bundle/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/bundle/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/bundle/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/bundle/ui-kit/Text/Text.d.ts +2 -1
- package/dist/api/getSubmitBody.d.ts +1636 -244
- package/dist/api/getSubmitBody.js +6 -0
- package/dist/api/getSubmitBody.js.map +1 -1
- package/dist/components/Blocks.js +4 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +4 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/dist/components/CalculatorDeposit/normalize.js +1 -8
- package/dist/components/CalculatorDeposit/normalize.js.map +1 -1
- package/dist/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/dist/components/CalculatorRko/CalculatorRko.js +75 -0
- package/dist/components/CalculatorRko/CalculatorRko.js.map +1 -0
- package/dist/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/dist/components/CalculatorRko/CalculatorRkoContent.js +2 -0
- package/dist/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
- package/dist/components/CalculatorRko/constants.d.ts +25 -0
- package/dist/components/CalculatorRko/constants.js +54 -0
- package/dist/components/CalculatorRko/constants.js.map +1 -0
- package/dist/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/dist/components/CalculatorRko/filterByClientType.js +27 -0
- package/dist/components/CalculatorRko/filterByClientType.js.map +1 -0
- package/dist/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/dist/components/CalculatorRko/getCalculatedCommission.js +106 -0
- package/dist/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
- package/dist/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/dist/components/CalculatorRko/getInitialRkoTariffsParams.js +15 -0
- package/dist/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
- package/dist/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/dist/components/CalculatorRko/getRkoCalculatorParams.js +23 -0
- package/dist/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
- package/dist/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/dist/components/CalculatorRko/markBestTariff.js +15 -0
- package/dist/components/CalculatorRko/markBestTariff.js.map +1 -0
- package/dist/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/dist/components/CalculatorRko/mergeTariffData.js +26 -0
- package/dist/components/CalculatorRko/mergeTariffData.js.map +1 -0
- package/dist/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/dist/components/CalculatorRko/renderCommissionSum.js +8 -0
- package/dist/components/CalculatorRko/renderCommissionSum.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCard.js +41 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +22 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
- package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/dist/components/RkoTariffCardsTable/constants.js +20 -0
- package/dist/components/RkoTariffCardsTable/constants.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/dist/components/RkoTariffCardsTable/getCommissionTypes.js +11 -0
- package/dist/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/dist/components/RkoTariffCardsTable/renderDesktopCard.js +7 -0
- package/dist/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/dist/components/RkoTariffCardsTable/renderHiddenCommission.js +9 -0
- package/dist/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/dist/components/RkoTariffCardsTable/renderMobileCard.js +22 -0
- package/dist/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js +9 -0
- package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
- package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +11 -0
- package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/dist/ui-kit/Button/ButtonTitle.js +1 -1
- package/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/dist/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/dist/ui-kit/Calculator/CalculatorStyle.js +2 -0
- package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/dist/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/dist/ui-kit/Calculator/renderCountInput.js +8 -0
- package/dist/ui-kit/Calculator/renderCountInput.js.map +1 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +4 -1
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/Text/Text.d.ts +2 -1
- package/dist/ui-kit/Text/Text.js +1 -1
- package/dist/ui-kit/Text/Text.js.map +1 -1
- package/lib/api/getSubmitBody.d.ts +1636 -244
- package/lib/api/getSubmitBody.js +6 -0
- package/lib/api/getSubmitBody.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/Blocks.js +4 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +4 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/lib/components/CalculatorDeposit/normalize.js +0 -6
- package/lib/components/CalculatorDeposit/normalize.js.map +1 -1
- package/lib/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/lib/components/CalculatorRko/CalculatorRko.fixture.d.ts +6 -0
- package/lib/components/CalculatorRko/CalculatorRko.fixture.mobile.d.ts +6 -0
- package/lib/components/CalculatorRko/CalculatorRko.js +73 -0
- package/lib/components/CalculatorRko/CalculatorRko.js.map +1 -0
- package/lib/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/lib/components/CalculatorRko/CalculatorRkoContent.js +2 -0
- package/lib/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
- package/lib/components/CalculatorRko/constants.d.ts +25 -0
- package/lib/components/CalculatorRko/constants.js +52 -0
- package/lib/components/CalculatorRko/constants.js.map +1 -0
- package/lib/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/lib/components/CalculatorRko/filterByClientType.js +24 -0
- package/lib/components/CalculatorRko/filterByClientType.js.map +1 -0
- package/lib/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/lib/components/CalculatorRko/getCalculatedCommission.js +103 -0
- package/lib/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
- package/lib/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/lib/components/CalculatorRko/getInitialRkoTariffsParams.js +12 -0
- package/lib/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
- package/lib/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/lib/components/CalculatorRko/getRkoCalculatorParams.js +20 -0
- package/lib/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
- package/lib/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/lib/components/CalculatorRko/markBestTariff.js +12 -0
- package/lib/components/CalculatorRko/markBestTariff.js.map +1 -0
- package/lib/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/lib/components/CalculatorRko/mergeTariffData.js +23 -0
- package/lib/components/CalculatorRko/mergeTariffData.js.map +1 -0
- package/lib/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/lib/components/CalculatorRko/renderCommissionSum.js +5 -0
- package/lib/components/CalculatorRko/renderCommissionSum.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCard.js +39 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.d.ts +4 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.mobile.d.ts +4 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +20 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
- package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/lib/components/RkoTariffCardsTable/constants.js +18 -0
- package/lib/components/RkoTariffCardsTable/constants.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/lib/components/RkoTariffCardsTable/getCommissionTypes.js +8 -0
- package/lib/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/lib/components/RkoTariffCardsTable/renderDesktopCard.js +4 -0
- package/lib/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/lib/components/RkoTariffCardsTable/renderHiddenCommission.js +6 -0
- package/lib/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/lib/components/RkoTariffCardsTable/renderMobileCard.js +19 -0
- package/lib/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js +6 -0
- package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
- package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +8 -0
- package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/lib/ui-kit/Button/ButtonTitle.js +1 -1
- package/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/lib/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/lib/ui-kit/Calculator/CalculatorStyle.js +2 -0
- package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/lib/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/lib/ui-kit/Calculator/renderCountInput.js +5 -0
- package/lib/ui-kit/Calculator/renderCountInput.js.map +1 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +4 -1
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/Text/Text.d.ts +2 -1
- package/lib/ui-kit/Text/Text.js +1 -1
- package/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/bundle/api/getSubmitBody.d.ts +1636 -244
- package/mobile/bundle/bundle.umd.js +408 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/mobile/bundle/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/mobile/bundle/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/mobile/bundle/components/CalculatorRko/constants.d.ts +25 -0
- package/mobile/bundle/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/mobile/bundle/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/mobile/bundle/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/mobile/bundle/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/mobile/bundle/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/mobile/bundle/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/mobile/bundle/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/mobile/bundle/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/mobile/bundle/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/mobile/bundle/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/mobile/bundle/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/mobile/bundle/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/mobile/bundle/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/mobile/bundle/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/mobile/bundle/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/mobile/bundle/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/bundle/ui-kit/Text/Text.d.ts +2 -1
- package/mobile/dist/api/getSubmitBody.d.ts +1636 -244
- package/mobile/dist/api/getSubmitBody.js +6 -0
- package/mobile/dist/api/getSubmitBody.js.map +1 -1
- package/mobile/dist/components/Blocks.js +4 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/mobile/dist/components/CalculatorDeposit/normalize.js +1 -8
- package/mobile/dist/components/CalculatorDeposit/normalize.js.map +1 -1
- package/mobile/dist/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRko.js +75 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRko.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.js +2 -0
- package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/constants.d.ts +25 -0
- package/mobile/dist/components/CalculatorRko/constants.js +54 -0
- package/mobile/dist/components/CalculatorRko/constants.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/mobile/dist/components/CalculatorRko/filterByClientType.js +27 -0
- package/mobile/dist/components/CalculatorRko/filterByClientType.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/mobile/dist/components/CalculatorRko/getCalculatedCommission.js +106 -0
- package/mobile/dist/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.js +15 -0
- package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.js +23 -0
- package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/mobile/dist/components/CalculatorRko/markBestTariff.js +15 -0
- package/mobile/dist/components/CalculatorRko/markBestTariff.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/mobile/dist/components/CalculatorRko/mergeTariffData.js +26 -0
- package/mobile/dist/components/CalculatorRko/mergeTariffData.js.map +1 -0
- package/mobile/dist/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/mobile/dist/components/CalculatorRko/renderCommissionSum.js +8 -0
- package/mobile/dist/components/CalculatorRko/renderCommissionSum.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js +41 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +22 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
- package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/mobile/dist/components/RkoTariffCardsTable/constants.js +20 -0
- package/mobile/dist/components/RkoTariffCardsTable/constants.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.js +11 -0
- package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.js +7 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.js +9 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.js +22 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js +9 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +11 -0
- package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.js +1 -1
- package/mobile/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +2 -0
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/mobile/dist/ui-kit/Calculator/renderCountInput.js +8 -0
- package/mobile/dist/ui-kit/Calculator/renderCountInput.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +4 -1
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/Text/Text.d.ts +2 -1
- package/mobile/dist/ui-kit/Text/Text.js +1 -1
- package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
- package/mobile/lib/api/getSubmitBody.d.ts +1636 -244
- package/mobile/lib/api/getSubmitBody.js +6 -0
- package/mobile/lib/api/getSubmitBody.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +4 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/normalize.d.ts +0 -3
- package/mobile/lib/components/CalculatorDeposit/normalize.js +0 -6
- package/mobile/lib/components/CalculatorDeposit/normalize.js.map +1 -1
- package/mobile/lib/components/CalculatorRko/CalculatorRko.d.ts +5 -0
- package/mobile/lib/components/CalculatorRko/CalculatorRko.js +73 -0
- package/mobile/lib/components/CalculatorRko/CalculatorRko.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.d.ts +74 -0
- package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.js +2 -0
- package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/constants.d.ts +25 -0
- package/mobile/lib/components/CalculatorRko/constants.js +52 -0
- package/mobile/lib/components/CalculatorRko/constants.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/filterByClientType.d.ts +1 -0
- package/mobile/lib/components/CalculatorRko/filterByClientType.js +24 -0
- package/mobile/lib/components/CalculatorRko/filterByClientType.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
- package/mobile/lib/components/CalculatorRko/getCalculatedCommission.js +103 -0
- package/mobile/lib/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
- package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.js +12 -0
- package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
- package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.js +20 -0
- package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/markBestTariff.d.ts +5 -0
- package/mobile/lib/components/CalculatorRko/markBestTariff.js +12 -0
- package/mobile/lib/components/CalculatorRko/markBestTariff.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/mergeTariffData.d.ts +3 -0
- package/mobile/lib/components/CalculatorRko/mergeTariffData.js +23 -0
- package/mobile/lib/components/CalculatorRko/mergeTariffData.js.map +1 -0
- package/mobile/lib/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
- package/mobile/lib/components/CalculatorRko/renderCommissionSum.js +5 -0
- package/mobile/lib/components/CalculatorRko/renderCommissionSum.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.d.ts +10 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js +39 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +20 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +16 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
- package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/constants.d.ts +3 -0
- package/mobile/lib/components/RkoTariffCardsTable/constants.js +18 -0
- package/mobile/lib/components/RkoTariffCardsTable/constants.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
- package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.js +8 -0
- package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.js +4 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.js +6 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.js +19 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js +6 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +8 -0
- package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.d.ts +5 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.js +1 -1
- package/mobile/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +2 -0
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/renderCountInput.d.ts +2 -0
- package/mobile/lib/ui-kit/Calculator/renderCountInput.js +5 -0
- package/mobile/lib/ui-kit/Calculator/renderCountInput.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +4 -1
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/Text/Text.d.ts +2 -1
- package/mobile/lib/ui-kit/Text/Text.js +1 -1
- package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
- package/mobile/src/api/getSubmitBody.ts +8 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +44 -0
- package/mobile/src/components/Blocks.ts +4 -0
- package/mobile/src/components/CalculatorDeposit/normalize.tsx +0 -7
- package/mobile/src/components/CalculatorRko/CalculatorRko.tsx +129 -0
- package/mobile/src/components/CalculatorRko/CalculatorRkoContent.ts +96 -0
- package/mobile/src/components/CalculatorRko/constants.ts +56 -0
- package/mobile/src/components/CalculatorRko/filterByClientType.ts +31 -0
- package/mobile/src/components/CalculatorRko/getCalculatedCommission.ts +174 -0
- package/mobile/src/components/CalculatorRko/getInitialRkoTariffsParams.ts +17 -0
- package/mobile/src/components/CalculatorRko/getRkoCalculatorParams.ts +47 -0
- package/mobile/src/components/CalculatorRko/markBestTariff.ts +16 -0
- package/mobile/src/components/CalculatorRko/mergeTariffData.ts +37 -0
- package/mobile/src/components/CalculatorRko/renderCommissionSum.tsx +9 -0
- package/mobile/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +93 -0
- package/mobile/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +45 -0
- package/mobile/src/components/RkoTariffCardsTable/RkoTariffCardsTableContent.ts +18 -0
- package/mobile/src/components/RkoTariffCardsTable/constants.ts +20 -0
- package/mobile/src/components/RkoTariffCardsTable/getCommissionTypes.ts +10 -0
- package/mobile/src/components/RkoTariffCardsTable/renderDesktopCard.tsx +7 -0
- package/mobile/src/components/RkoTariffCardsTable/renderHiddenCommission.tsx +23 -0
- package/mobile/src/components/RkoTariffCardsTable/renderMobileCard.tsx +61 -0
- package/mobile/src/components/RkoTariffCardsTable/renderRecommendedLabel.tsx +9 -0
- package/mobile/src/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.tsx +25 -0
- package/mobile/src/model/FormTypeFieldDef.ts +2 -1
- package/mobile/src/ui-kit/Button/ButtonTitle.tsx +7 -2
- package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +2 -0
- package/mobile/src/ui-kit/Calculator/renderCountInput.tsx +13 -0
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +19 -13
- package/mobile/src/ui-kit/Text/Text.tsx +4 -3
- package/package.json +2 -2
- package/src/api/getSubmitBody.ts +8 -0
- package/src/components/ApplicationForm/ApplicationForm.example.json +44 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +26 -0
- package/src/components/Blocks.mobile.ts +4 -0
- package/src/components/Blocks.ts +4 -0
- package/src/components/CalculatorDeposit/normalize.tsx +0 -7
- package/src/components/CalculatorRko/CalculatorRko.fixture.mobile.tsx +28 -0
- package/src/components/CalculatorRko/CalculatorRko.fixture.tsx +28 -0
- package/src/components/CalculatorRko/CalculatorRko.tsx +129 -0
- package/src/components/CalculatorRko/CalculatorRkoContent.ts +96 -0
- package/src/components/CalculatorRko/constants.ts +56 -0
- package/src/components/CalculatorRko/filterByClientType.ts +31 -0
- package/src/components/CalculatorRko/getCalculatedCommission.ts +174 -0
- package/src/components/CalculatorRko/getInitialRkoTariffsParams.ts +17 -0
- package/src/components/CalculatorRko/getRkoCalculatorParams.ts +47 -0
- package/src/components/CalculatorRko/markBestTariff.ts +16 -0
- package/src/components/CalculatorRko/mergeTariffData.ts +37 -0
- package/src/components/CalculatorRko/renderCommissionSum.tsx +9 -0
- package/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +93 -0
- package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.mobile.tsx +60 -0
- package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.tsx +60 -0
- package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +45 -0
- package/src/components/RkoTariffCardsTable/RkoTariffCardsTableContent.ts +18 -0
- package/src/components/RkoTariffCardsTable/constants.ts +20 -0
- package/src/components/RkoTariffCardsTable/getCommissionTypes.ts +10 -0
- package/src/components/RkoTariffCardsTable/renderDesktopCard.tsx +7 -0
- package/src/components/RkoTariffCardsTable/renderHiddenCommission.tsx +23 -0
- package/src/components/RkoTariffCardsTable/renderMobileCard.tsx +61 -0
- package/src/components/RkoTariffCardsTable/renderRecommendedLabel.tsx +9 -0
- package/src/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.tsx +25 -0
- package/src/model/FormTypeFieldDef.ts +2 -1
- package/src/ui-kit/Button/ButtonTitle.tsx +7 -2
- package/src/ui-kit/Calculator/CalculatorStyle.tsx +2 -0
- package/src/ui-kit/Calculator/renderCountInput.tsx +13 -0
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +19 -13
- package/src/ui-kit/Text/Text.tsx +4 -3
- package/tailwind.config.cjs +7 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type CommissionType } from './CalculatorRkoContent';
|
|
2
|
+
const SLICE_CORRECTION = 1; // если диапазон включает обе границы
|
|
3
|
+
|
|
4
|
+
type CalculateCommissionProps = {
|
|
5
|
+
ranges?: RangeType[];
|
|
6
|
+
value?: number;
|
|
7
|
+
minKey?: string;
|
|
8
|
+
maxKey?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type CalculateCommissionByTypeProps = {
|
|
12
|
+
type: CommissionType;
|
|
13
|
+
sliceAmount: number;
|
|
14
|
+
commissionValue: number;
|
|
15
|
+
context: { min: number; max: number; amount: number };
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type CheckRangeProps = {
|
|
19
|
+
range: RangeType;
|
|
20
|
+
amount: number;
|
|
21
|
+
minKey: string;
|
|
22
|
+
maxKey: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type RangeType = Record<string, number | string>;
|
|
26
|
+
|
|
27
|
+
export const getCalculatedCommission = ({
|
|
28
|
+
ranges = [],
|
|
29
|
+
value = 0,
|
|
30
|
+
minKey = 'min',
|
|
31
|
+
maxKey = 'max',
|
|
32
|
+
}: CalculateCommissionProps) => {
|
|
33
|
+
const amount = Number(value);
|
|
34
|
+
if (isNaN(amount) || amount <= 0) {
|
|
35
|
+
return 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const groupedTariffs = groupRangesByTariff(ranges);
|
|
39
|
+
const result = {};
|
|
40
|
+
|
|
41
|
+
for (const tariff in groupedTariffs) {
|
|
42
|
+
result[tariff] = calculateTariffCommission({
|
|
43
|
+
ranges: groupedTariffs[tariff],
|
|
44
|
+
value: amount,
|
|
45
|
+
minKey,
|
|
46
|
+
maxKey,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const calculateTariffCommission = ({
|
|
54
|
+
ranges = [],
|
|
55
|
+
value = 0,
|
|
56
|
+
minKey = 'min',
|
|
57
|
+
maxKey = 'max',
|
|
58
|
+
}: CalculateCommissionProps): number => {
|
|
59
|
+
const validRanges = getValidTariffRanges(ranges, minKey);
|
|
60
|
+
|
|
61
|
+
let totalCommission = 0;
|
|
62
|
+
let minCommission = 0;
|
|
63
|
+
|
|
64
|
+
for (const range of validRanges) {
|
|
65
|
+
minCommission = Number(range.minCommission) ?? 0;
|
|
66
|
+
|
|
67
|
+
if (!isValidRange({ range, amount: value, minKey, maxKey })) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const sliceAmount = calculateSliceAmount({ range, amount: value, minKey, maxKey });
|
|
72
|
+
|
|
73
|
+
const commission = calculateCommissionByType({
|
|
74
|
+
type: range.commissionType as CommissionType,
|
|
75
|
+
sliceAmount,
|
|
76
|
+
commissionValue: Number(range.commissionValue),
|
|
77
|
+
context: {
|
|
78
|
+
min: Number(range[minKey]),
|
|
79
|
+
max: Number(range[maxKey]),
|
|
80
|
+
amount: Number(value),
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
totalCommission += commission;
|
|
85
|
+
|
|
86
|
+
if (value <= range[maxKey]) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (totalCommission < minCommission) {
|
|
92
|
+
totalCommission = minCommission;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return Math.round(totalCommission);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const calculateSliceAmount = ({ range, amount, minKey, maxKey }: CheckRangeProps): number => {
|
|
99
|
+
const min = range[minKey];
|
|
100
|
+
const max = range[maxKey];
|
|
101
|
+
|
|
102
|
+
const sliceStart = Math.max(Number(min), 0);
|
|
103
|
+
const sliceEnd = Math.min(Number(max), amount);
|
|
104
|
+
|
|
105
|
+
return sliceEnd - sliceStart + SLICE_CORRECTION;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const isValidRange = ({ range, amount, minKey, maxKey }: CheckRangeProps): boolean => {
|
|
109
|
+
const min = range[minKey];
|
|
110
|
+
const max = range[maxKey];
|
|
111
|
+
const commissionValue = Number(range.commissionValue);
|
|
112
|
+
|
|
113
|
+
if (min == null || max == null || isNaN(commissionValue)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (amount < min) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const sliceStart = Math.max(Number(min), 0);
|
|
121
|
+
const sliceEnd = Math.min(Number(max), amount);
|
|
122
|
+
|
|
123
|
+
return sliceStart <= sliceEnd;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const getValidTariffRanges = (ranges: RangeType[], minKey: string) =>
|
|
127
|
+
ranges
|
|
128
|
+
.filter((r) => r.commissionValue != null && r.commissionType != null)
|
|
129
|
+
.sort((a, b) => Number(a[minKey]) - Number(b[minKey]));
|
|
130
|
+
|
|
131
|
+
const calculateCommissionByType = ({
|
|
132
|
+
type,
|
|
133
|
+
sliceAmount,
|
|
134
|
+
commissionValue,
|
|
135
|
+
context,
|
|
136
|
+
}: CalculateCommissionByTypeProps): number => {
|
|
137
|
+
const { min, max, amount } = context;
|
|
138
|
+
|
|
139
|
+
switch (type) {
|
|
140
|
+
case 'fixedSum':
|
|
141
|
+
if (min === 0 || amount <= max) {
|
|
142
|
+
return commissionValue;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return 0;
|
|
146
|
+
|
|
147
|
+
case 'percent':
|
|
148
|
+
return (sliceAmount * commissionValue) / 100;
|
|
149
|
+
|
|
150
|
+
case 'fixedAmount':
|
|
151
|
+
return Math.round(sliceAmount * commissionValue);
|
|
152
|
+
|
|
153
|
+
default:
|
|
154
|
+
return 0;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const groupRangesByTariff = (ranges: RangeType[]) => {
|
|
159
|
+
const tariffs: Record<string, any[]> = {};
|
|
160
|
+
|
|
161
|
+
for (const range of ranges) {
|
|
162
|
+
const { tariff } = range;
|
|
163
|
+
if (!tariff) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (!tariffs[tariff]) {
|
|
168
|
+
tariffs[tariff] = [];
|
|
169
|
+
}
|
|
170
|
+
tariffs[tariff].push(range);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return tariffs;
|
|
174
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TariffCardContent } from '../RkoTariffCardsTable/RkoTariffCardsTableContent';
|
|
2
|
+
import { type RkoCalculatorSourceBookTariffsParams } from './CalculatorRkoContent';
|
|
3
|
+
|
|
4
|
+
export const getInitialRkoTariffsParams = (
|
|
5
|
+
tariffs: RkoCalculatorSourceBookTariffsParams[] = [],
|
|
6
|
+
): TariffCardContent[] =>
|
|
7
|
+
tariffs.map((tariff) => {
|
|
8
|
+
return {
|
|
9
|
+
...tariff,
|
|
10
|
+
flTransferSumCommission: 0,
|
|
11
|
+
cashOutSumCommission: 0,
|
|
12
|
+
cashInSumCommission: 0,
|
|
13
|
+
transferLegalCountCommission: 0,
|
|
14
|
+
totalCommission: tariff.accountServiceFee,
|
|
15
|
+
isBest: false,
|
|
16
|
+
};
|
|
17
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
|
|
2
|
+
import {
|
|
3
|
+
type ClientType,
|
|
4
|
+
type RkoCalculatorParams,
|
|
5
|
+
type RkoCalculatorRowsData,
|
|
6
|
+
type RkoCalculatorSourceBookCommissionsParams,
|
|
7
|
+
type RkoCalculatorUserInputParams,
|
|
8
|
+
} from './CalculatorRkoContent';
|
|
9
|
+
|
|
10
|
+
export const getRkoCalculatorParams = (
|
|
11
|
+
userInputParams: RkoCalculatorUserInputParams,
|
|
12
|
+
rows?: RkoCalculatorRowsData[],
|
|
13
|
+
clientType?: ClientType,
|
|
14
|
+
): RkoCalculatorParams => {
|
|
15
|
+
const commissionsRows: RkoCalculatorSourceBookCommissionsParams | undefined =
|
|
16
|
+
rows?.[0]?.commissions;
|
|
17
|
+
|
|
18
|
+
const { minTransferLegalCount, maxTransferLegalCount } = getRangeByKeys(
|
|
19
|
+
['minTransferLegalCount', 'maxTransferLegalCount'],
|
|
20
|
+
commissionsRows?.transferLegalCountCommission.filter((item) => item.clientType === clientType),
|
|
21
|
+
);
|
|
22
|
+
const { minFlTransferSum, maxFlTransferSum } = getRangeByKeys(
|
|
23
|
+
['minFlTransferSum', 'maxFlTransferSum'],
|
|
24
|
+
commissionsRows?.flTransferSumCommission.filter((item) => item.clientType === clientType),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const { minCashInSum, maxCashInSum } = getRangeByKeys(
|
|
28
|
+
['minCashInSum', 'maxCashInSum'],
|
|
29
|
+
commissionsRows?.cashInSumCommission.filter((item) => item.clientType === clientType),
|
|
30
|
+
);
|
|
31
|
+
const { minCashOutSum, maxCashOutSum } = getRangeByKeys(
|
|
32
|
+
['minCashOutSum', 'maxCashOutSum'],
|
|
33
|
+
commissionsRows?.cashOutSumCommission.filter((item) => item.clientType === clientType),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
...userInputParams,
|
|
38
|
+
minTransferLegalCount,
|
|
39
|
+
maxTransferLegalCount,
|
|
40
|
+
minFlTransferSum,
|
|
41
|
+
maxFlTransferSum,
|
|
42
|
+
minCashInSum,
|
|
43
|
+
maxCashInSum,
|
|
44
|
+
minCashOutSum,
|
|
45
|
+
maxCashOutSum,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const markBestTariff = <T extends { totalCommission: number }>(
|
|
2
|
+
tariffs: T[],
|
|
3
|
+
): (T & { isBest?: boolean })[] => {
|
|
4
|
+
if (tariffs.length === 0) {
|
|
5
|
+
return tariffs;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const minCommission = Math.min(...tariffs.map((t) => t.totalCommission));
|
|
9
|
+
|
|
10
|
+
const minTariffIndex = tariffs.findIndex((t) => t.totalCommission === minCommission);
|
|
11
|
+
|
|
12
|
+
return tariffs.map((tariff, index) => ({
|
|
13
|
+
...tariff,
|
|
14
|
+
isBest: index === minTariffIndex,
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type TariffCardContent } from '../RkoTariffCardsTable/RkoTariffCardsTableContent';
|
|
2
|
+
import {
|
|
3
|
+
type RkoCalculatorSourceBookCommissionsParams,
|
|
4
|
+
type RkoCalculatorSourceBookTariffsParams,
|
|
5
|
+
} from './CalculatorRkoContent';
|
|
6
|
+
|
|
7
|
+
export const mergeTariffData = (
|
|
8
|
+
commissionData: RkoCalculatorSourceBookCommissionsParams,
|
|
9
|
+
tariffs: RkoCalculatorSourceBookTariffsParams[] = [],
|
|
10
|
+
): TariffCardContent[] => {
|
|
11
|
+
const commissionKeys = [
|
|
12
|
+
'flTransferSumCommission',
|
|
13
|
+
'cashOutSumCommission',
|
|
14
|
+
'cashInSumCommission',
|
|
15
|
+
'transferLegalCountCommission',
|
|
16
|
+
] as const;
|
|
17
|
+
|
|
18
|
+
return tariffs.map((tariff) => {
|
|
19
|
+
const { tariffName, accountServiceFee } = tariff;
|
|
20
|
+
|
|
21
|
+
const commissions = commissionKeys.reduce((acc, key) => {
|
|
22
|
+
acc[key] = commissionData[key]?.[tariffName] ?? 0;
|
|
23
|
+
|
|
24
|
+
return acc;
|
|
25
|
+
}, {} as Record<typeof commissionKeys[number], number>);
|
|
26
|
+
|
|
27
|
+
const totalCommission =
|
|
28
|
+
Object.values(commissions).reduce((sum, val) => sum + val, 0) + accountServiceFee;
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
...tariff,
|
|
32
|
+
...commissions,
|
|
33
|
+
isBest: false,
|
|
34
|
+
totalCommission,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Option } from '../../ui-kit/Select/Option';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
import { RKO_DEFAULT_CURRENCY } from './constants';
|
|
4
|
+
|
|
5
|
+
export const renderCommissionSum = (value: number, currency: Option, className?: string) => (
|
|
6
|
+
<Text className={className}>
|
|
7
|
+
{value?.toLocaleString()} {(currency ?? RKO_DEFAULT_CURRENCY).text}
|
|
8
|
+
</Text>
|
|
9
|
+
);
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
|
|
3
|
+
import { useMobileMode } from '../../hooks/useMobileMode';
|
|
4
|
+
import { type ComponentType } from '../../model/ComponentType';
|
|
5
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
6
|
+
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
7
|
+
import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
8
|
+
import type { Option } from '../../ui-kit/Select/Option';
|
|
9
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
10
|
+
import { style } from '../../utils/style';
|
|
11
|
+
import { RKO_COLUMNS_ORDER } from './constants';
|
|
12
|
+
import { renderDesktopCard } from './renderDesktopCard';
|
|
13
|
+
import { renderMobileCard } from './renderMobileCard';
|
|
14
|
+
import { renderRecommendedLabel } from './renderRecommendedLabel';
|
|
15
|
+
import { type TariffCardContent } from './RkoTariffCardsTableContent';
|
|
16
|
+
|
|
17
|
+
export interface TariffCardProps extends TariffCardContent, ComponentType {
|
|
18
|
+
currency: Option;
|
|
19
|
+
buttons: LinkButtonContent[];
|
|
20
|
+
commissionTypes?: string[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const RkoTariffCard = JSX(
|
|
24
|
+
({
|
|
25
|
+
tariffName,
|
|
26
|
+
tariffDesc,
|
|
27
|
+
className,
|
|
28
|
+
transferLegalCountCommission,
|
|
29
|
+
flTransferSumCommission,
|
|
30
|
+
cashInSumCommission,
|
|
31
|
+
accountServiceFee,
|
|
32
|
+
cashOutSumCommission,
|
|
33
|
+
totalCommission,
|
|
34
|
+
currency,
|
|
35
|
+
isBest = false,
|
|
36
|
+
commissionTypes,
|
|
37
|
+
}: TariffCardProps) => {
|
|
38
|
+
const [isUnfolded, { toggle }] = useBool(false);
|
|
39
|
+
|
|
40
|
+
const tariffData = {
|
|
41
|
+
accountServiceFee,
|
|
42
|
+
transferLegalCountCommission,
|
|
43
|
+
flTransferSumCommission,
|
|
44
|
+
cashOutSumCommission,
|
|
45
|
+
cashInSumCommission,
|
|
46
|
+
totalCommission,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const commissions = RKO_COLUMNS_ORDER.map((key) => tariffData[key]);
|
|
50
|
+
|
|
51
|
+
const isMobileMode = useMobileMode();
|
|
52
|
+
|
|
53
|
+
const handleOpenDepositClick = () =>
|
|
54
|
+
globalThis?.sessionStorage.setItem('rkoTariffName', tariffName);
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div
|
|
58
|
+
className={style(
|
|
59
|
+
className,
|
|
60
|
+
'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl',
|
|
61
|
+
isBest
|
|
62
|
+
? 'bg-primary-main text-white relative'
|
|
63
|
+
: 'bg-white text-primary-text border border-solid border-gray',
|
|
64
|
+
)}
|
|
65
|
+
>
|
|
66
|
+
<div className="col-span-2">
|
|
67
|
+
<Heading headingType={isMobileMode ? 'h2' : 'h6'} title={tariffName} />
|
|
68
|
+
<Text size="text-xs">{tariffDesc}</Text>
|
|
69
|
+
</div>
|
|
70
|
+
{isMobileMode
|
|
71
|
+
? renderMobileCard({
|
|
72
|
+
commissions,
|
|
73
|
+
currency,
|
|
74
|
+
isUnfolded,
|
|
75
|
+
handleFold: toggle,
|
|
76
|
+
commissionTypes,
|
|
77
|
+
isBest,
|
|
78
|
+
})
|
|
79
|
+
: renderDesktopCard(commissions, currency)}
|
|
80
|
+
<div className="flex flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto col-span-2">
|
|
81
|
+
<LinkButton
|
|
82
|
+
version={isBest ? 'secondary' : 'primary'}
|
|
83
|
+
className={style('basis-full @lg:basis-auto w-full')}
|
|
84
|
+
text="Открыть счёт"
|
|
85
|
+
href="/business/calculator-rko#opendeposit"
|
|
86
|
+
onClick={handleOpenDepositClick}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
{renderRecommendedLabel(isBest)}
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
2
|
+
import { RkoTariffCardsTable } from './RkoTariffCardsTable';
|
|
3
|
+
|
|
4
|
+
const ITEMS = [
|
|
5
|
+
{
|
|
6
|
+
tariffName: 'Базовый лайт',
|
|
7
|
+
tariffDesc: 'Для старта бизнеса',
|
|
8
|
+
clientType: 'standard',
|
|
9
|
+
accountServiceFee: 0,
|
|
10
|
+
transferLegalCountCommission: 1150,
|
|
11
|
+
flTransferSumCommission: 0,
|
|
12
|
+
cashInSumCommission: 3300,
|
|
13
|
+
cashOutSumCommission: 3300,
|
|
14
|
+
totalCommission: 1520,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
tariffName: 'Базовый комфорт',
|
|
18
|
+
tariffDesc: 'Оптимальный тариф',
|
|
19
|
+
clientType: 'standard',
|
|
20
|
+
accountServiceFee: 650,
|
|
21
|
+
transferLegalCountCommission: 1570,
|
|
22
|
+
flTransferSumCommission: 500,
|
|
23
|
+
cashInSumCommission: 3300,
|
|
24
|
+
cashOutSumCommission: 3500,
|
|
25
|
+
totalCommission: 2730,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
tariffName: 'Расчетный эконом',
|
|
29
|
+
tariffDesc: 'Для малых оборотов',
|
|
30
|
+
clientType: 'standard',
|
|
31
|
+
accountServiceFee: 1290,
|
|
32
|
+
transferLegalCountCommission: 2100,
|
|
33
|
+
flTransferSumCommission: 1200,
|
|
34
|
+
cashInSumCommission: 3900,
|
|
35
|
+
cashOutSumCommission: 4200,
|
|
36
|
+
totalCommission: 4730,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const buttons: LinkButtonContent[] = [
|
|
41
|
+
{
|
|
42
|
+
href: 'https://rshb.ru',
|
|
43
|
+
text: 'Открыть счёт',
|
|
44
|
+
target: '_self',
|
|
45
|
+
version: 'secondary',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
default: (
|
|
51
|
+
<RkoTariffCardsTable
|
|
52
|
+
items={ITEMS}
|
|
53
|
+
currency={{
|
|
54
|
+
text: '₽',
|
|
55
|
+
key: 'rub',
|
|
56
|
+
}}
|
|
57
|
+
buttons={buttons}
|
|
58
|
+
/>
|
|
59
|
+
),
|
|
60
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
2
|
+
import { RkoTariffCardsTable } from './RkoTariffCardsTable';
|
|
3
|
+
|
|
4
|
+
const ITEMS = [
|
|
5
|
+
{
|
|
6
|
+
tariffName: 'Базовый лайт',
|
|
7
|
+
tariffDesc: 'Для старта бизнеса',
|
|
8
|
+
clientType: 'standard',
|
|
9
|
+
accountServiceFee: 0,
|
|
10
|
+
transferLegalCountCommission: 1150,
|
|
11
|
+
flTransferSumCommission: 0,
|
|
12
|
+
cashInSumCommission: 3300,
|
|
13
|
+
cashOutSumCommission: 3300,
|
|
14
|
+
totalCommission: 1520,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
tariffName: 'Базовый комфорт',
|
|
18
|
+
tariffDesc: 'Оптимальный тариф',
|
|
19
|
+
clientType: 'standard',
|
|
20
|
+
accountServiceFee: 650,
|
|
21
|
+
transferLegalCountCommission: 1570,
|
|
22
|
+
flTransferSumCommission: 500,
|
|
23
|
+
cashInSumCommission: 3300,
|
|
24
|
+
cashOutSumCommission: 3500,
|
|
25
|
+
totalCommission: 2730,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
tariffName: 'Расчетный эконом',
|
|
29
|
+
tariffDesc: 'Для малых оборотов',
|
|
30
|
+
clientType: 'standard',
|
|
31
|
+
accountServiceFee: 1290,
|
|
32
|
+
transferLegalCountCommission: 2100,
|
|
33
|
+
flTransferSumCommission: 1200,
|
|
34
|
+
cashInSumCommission: 3900,
|
|
35
|
+
cashOutSumCommission: 4200,
|
|
36
|
+
totalCommission: 4730,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const buttons: LinkButtonContent[] = [
|
|
41
|
+
{
|
|
42
|
+
href: 'https://rshb.ru',
|
|
43
|
+
text: 'Открыть счёт',
|
|
44
|
+
target: '_self',
|
|
45
|
+
version: 'secondary',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
default: (
|
|
51
|
+
<RkoTariffCardsTable
|
|
52
|
+
items={ITEMS}
|
|
53
|
+
currency={{
|
|
54
|
+
text: '₽',
|
|
55
|
+
key: 'rub',
|
|
56
|
+
}}
|
|
57
|
+
buttons={buttons}
|
|
58
|
+
/>
|
|
59
|
+
),
|
|
60
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useMobileMode } from '../../hooks/useMobileMode';
|
|
3
|
+
import type { UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
4
|
+
import { RKO_DEFAULT_CURRENCY } from '../CalculatorRko/constants';
|
|
5
|
+
import { type CommissionKey } from './constants';
|
|
6
|
+
import { getSortedCommissionTypes } from './getCommissionTypes';
|
|
7
|
+
import { renderRkoTariffsTableHeader } from './renderRkoTariffsTableHeader';
|
|
8
|
+
import { RkoTariffCard } from './RkoTariffCard';
|
|
9
|
+
import { type RkoTariffCardsTableContent } from './RkoTariffCardsTableContent';
|
|
10
|
+
|
|
11
|
+
export interface RkoTariffCardsTableProps extends RkoTariffCardsTableContent, UniBlockProps {}
|
|
12
|
+
|
|
13
|
+
export const RkoTariffCardsTable = JSX(
|
|
14
|
+
({ items = [], currency = RKO_DEFAULT_CURRENCY, buttons = [] }: RkoTariffCardsTableProps) => {
|
|
15
|
+
const isMobileMode = useMobileMode();
|
|
16
|
+
|
|
17
|
+
const commissionTypes: CommissionKey[] = getSortedCommissionTypes(items) ?? [];
|
|
18
|
+
const columnsCount = commissionTypes.length + 4; // 2 на "Название тарифа" и 2 на кнопку
|
|
19
|
+
|
|
20
|
+
const tableLayoutStyle = `lg:grid lg:grid-cols-${String(columnsCount)} gap-m`;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div className="lg:space-y-m space-y-xl w-full">
|
|
24
|
+
{isMobileMode
|
|
25
|
+
? null
|
|
26
|
+
: renderRkoTariffsTableHeader({
|
|
27
|
+
params: commissionTypes,
|
|
28
|
+
className: tableLayoutStyle,
|
|
29
|
+
})}
|
|
30
|
+
|
|
31
|
+
{items.map((item, index) => (
|
|
32
|
+
<div key={index}>
|
|
33
|
+
<RkoTariffCard
|
|
34
|
+
{...item}
|
|
35
|
+
className={tableLayoutStyle}
|
|
36
|
+
currency={currency}
|
|
37
|
+
buttons={buttons}
|
|
38
|
+
commissionTypes={commissionTypes}
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
))}
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LinkButtonContent } from '../../ui-kit/LinkButton/LinkButtonContent';
|
|
2
|
+
import type { Option } from '../../ui-kit/Select/Option';
|
|
3
|
+
import { type TariffProps } from '../CalculatorRko/CalculatorRkoContent';
|
|
4
|
+
|
|
5
|
+
export interface TariffCardContent extends TariffProps {
|
|
6
|
+
transferLegalCountCommission: number;
|
|
7
|
+
flTransferSumCommission: number;
|
|
8
|
+
cashInSumCommission: number;
|
|
9
|
+
cashOutSumCommission: number;
|
|
10
|
+
totalCommission: number;
|
|
11
|
+
isBest?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface RkoTariffCardsTableContent {
|
|
15
|
+
items?: TariffCardContent[];
|
|
16
|
+
currency?: Option;
|
|
17
|
+
buttons?: LinkButtonContent[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const RKO_COMMISSIONS_TITLE_MAP: Record<string, string> = {
|
|
2
|
+
tariffName: 'Название тарифа',
|
|
3
|
+
accountServiceFee: 'Обслуживание счета',
|
|
4
|
+
transferLegalCountCommission: 'Переводы Юрлицам и ИП',
|
|
5
|
+
flTransferSumCommission: 'Переводы физлицам',
|
|
6
|
+
cashOutSumCommission: 'Снятие наличных',
|
|
7
|
+
cashInSumCommission: 'Внесение наличных',
|
|
8
|
+
totalCommission: 'Итоговая комиссия',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const RKO_COLUMNS_ORDER = [
|
|
12
|
+
'accountServiceFee',
|
|
13
|
+
'transferLegalCountCommission',
|
|
14
|
+
'flTransferSumCommission',
|
|
15
|
+
'cashOutSumCommission',
|
|
16
|
+
'cashInSumCommission',
|
|
17
|
+
'totalCommission',
|
|
18
|
+
] as const;
|
|
19
|
+
|
|
20
|
+
export type CommissionKey = typeof RKO_COLUMNS_ORDER[number];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RKO_COLUMNS_ORDER, type CommissionKey } from './constants';
|
|
2
|
+
import { type TariffCardContent } from './RkoTariffCardsTableContent';
|
|
3
|
+
|
|
4
|
+
export const getSortedCommissionTypes = (items: TariffCardContent[]): CommissionKey[] => {
|
|
5
|
+
if (!items || items.length === 0) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return RKO_COLUMNS_ORDER.filter((key) => key in items[0]);
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Option } from '../../ui-kit/Select/Option';
|
|
2
|
+
import { renderCommissionSum } from '../CalculatorRko/renderCommissionSum';
|
|
3
|
+
|
|
4
|
+
export const renderDesktopCard = (commissions: number[], currency: Option) =>
|
|
5
|
+
commissions.map((commission, index) => (
|
|
6
|
+
<div key={index}>{renderCommissionSum(commission, currency)}</div>
|
|
7
|
+
));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Option } from '../../ui-kit/Select/Option';
|
|
2
|
+
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
import { renderCommissionSum } from '../CalculatorRko/renderCommissionSum';
|
|
4
|
+
import { RKO_COMMISSIONS_TITLE_MAP } from './constants';
|
|
5
|
+
|
|
6
|
+
type RenderHiddenCommissionProps = {
|
|
7
|
+
commission: number;
|
|
8
|
+
currency: Option;
|
|
9
|
+
commissionType?: string;
|
|
10
|
+
index?: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const renderHiddenCommission = ({
|
|
14
|
+
commission,
|
|
15
|
+
currency,
|
|
16
|
+
commissionType,
|
|
17
|
+
index,
|
|
18
|
+
}: RenderHiddenCommissionProps) => (
|
|
19
|
+
<div className="flex justify-between align-center" key={index}>
|
|
20
|
+
<Text>{RKO_COMMISSIONS_TITLE_MAP[commissionType ?? '']}</Text>
|
|
21
|
+
{renderCommissionSum(commission, currency)}
|
|
22
|
+
</div>
|
|
23
|
+
);
|