@redneckz/wildless-cms-uni-blocks 0.14.547 → 0.14.549
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 +150 -106
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
- package/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
- package/bundle/components/ApplicationForm/getField.d.ts +0 -4
- package/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
- package/bundle/hooks/useForm.d.ts +2 -1
- package/bundle/hooks/useRegions.d.ts +2 -1
- package/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
- package/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
- package/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/dist/components/ApplicationForm/LocalitiesField.js +24 -0
- package/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
- package/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/dist/components/ApplicationForm/ProductField.d.ts +2 -0
- package/dist/components/ApplicationForm/ProductField.js +10 -0
- package/dist/components/ApplicationForm/ProductField.js.map +1 -0
- package/dist/components/ApplicationForm/RegionField.js +2 -2
- package/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
- package/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
- package/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
- package/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/{lib/components/ApplicationForm/contants.d.ts → dist/components/ApplicationForm/constants.d.ts} +2 -0
- package/dist/components/ApplicationForm/constants.js +34 -0
- package/dist/components/ApplicationForm/constants.js.map +1 -0
- package/dist/components/ApplicationForm/getField.d.ts +0 -4
- package/dist/components/ApplicationForm/getField.js +13 -11
- package/dist/components/ApplicationForm/getField.js.map +1 -1
- package/dist/components/ApplicationForm/getInitialFormState.js +6 -6
- package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationForm/getObjectValidator.js +3 -0
- package/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/dist/components/ApplicationForm/getRegionUrl.js +6 -0
- package/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/dist/components/ApplicationForm/isRenderField.js +9 -0
- package/dist/components/ApplicationForm/isRenderField.js.map +1 -0
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/dist/components/CalculatorDeposit/isRubles.js +5 -0
- package/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/dist/components/CalculatorDeposit/utils.d.ts +17 -0
- package/dist/components/CalculatorDeposit/utils.js +32 -0
- package/dist/components/CalculatorDeposit/utils.js.map +1 -0
- package/dist/hooks/useForm.d.ts +2 -1
- package/dist/hooks/useForm.js +22 -12
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/useRegions.d.ts +2 -1
- package/dist/hooks/useRegions.js +2 -2
- package/dist/hooks/useRegions.js.map +1 -1
- package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
- package/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
- package/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
- package/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/lib/components/ApplicationForm/LocalitiesField.js +22 -0
- package/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
- package/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/lib/components/ApplicationForm/ProductField.d.ts +2 -0
- package/lib/components/ApplicationForm/ProductField.js +8 -0
- package/lib/components/ApplicationForm/ProductField.js.map +1 -0
- package/lib/components/ApplicationForm/RegionField.js +2 -2
- package/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
- package/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
- package/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
- package/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/{dist/components/ApplicationForm/contants.d.ts → lib/components/ApplicationForm/constants.d.ts} +2 -0
- package/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
- package/lib/components/ApplicationForm/constants.js.map +1 -0
- package/lib/components/ApplicationForm/getField.d.ts +0 -4
- package/lib/components/ApplicationForm/getField.js +11 -8
- package/lib/components/ApplicationForm/getField.js.map +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationForm/getObjectValidator.js +3 -0
- package/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/lib/components/ApplicationForm/getRegionUrl.js +3 -0
- package/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/lib/components/ApplicationForm/isRenderField.js +6 -0
- package/lib/components/ApplicationForm/isRenderField.js.map +1 -0
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/lib/components/CalculatorDeposit/isRubles.js +2 -0
- package/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/lib/components/CalculatorDeposit/utils.d.ts +17 -0
- package/lib/components/CalculatorDeposit/utils.js +25 -0
- package/lib/components/CalculatorDeposit/utils.js.map +1 -0
- package/lib/hooks/useForm.d.ts +2 -1
- package/lib/hooks/useForm.js +23 -13
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useRegions.d.ts +2 -1
- package/lib/hooks/useRegions.js +2 -2
- package/lib/hooks/useRegions.js.map +1 -1
- package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
- package/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +150 -106
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/bundle/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/bundle/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/bundle/components/ApplicationForm/{contants.d.ts → constants.d.ts} +2 -0
- package/mobile/bundle/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/bundle/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/bundle/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/bundle/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/bundle/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/bundle/hooks/useForm.d.ts +2 -1
- package/mobile/bundle/hooks/useRegions.d.ts +2 -1
- package/mobile/bundle/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/dist/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js +2 -2
- package/mobile/dist/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js +3 -3
- package/mobile/dist/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/LocalitiesField.js +24 -0
- package/mobile/dist/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js +6 -8
- package/mobile/dist/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/ProductField.js +10 -0
- package/mobile/dist/components/ApplicationForm/ProductField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/RegionField.js +2 -2
- package/mobile/dist/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js +14 -0
- package/mobile/dist/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js +2 -2
- package/mobile/dist/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/UltraPremiumField.js +2 -2
- package/mobile/dist/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/dist/components/ApplicationForm/constants.js +34 -0
- package/mobile/dist/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/dist/components/ApplicationForm/getField.js +13 -11
- package/mobile/dist/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js +6 -6
- package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getObjectValidator.js +3 -0
- package/mobile/dist/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/getRegionUrl.js +6 -0
- package/mobile/dist/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.js +9 -0
- package/mobile/dist/components/ApplicationForm/isRenderField.js.map +1 -0
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/dist/components/CalculatorDeposit/isRubles.js +5 -0
- package/mobile/dist/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/dist/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/dist/components/CalculatorDeposit/utils.js +32 -0
- package/mobile/dist/components/CalculatorDeposit/utils.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +2 -1
- package/mobile/dist/hooks/useForm.js +22 -12
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/hooks/useRegions.d.ts +2 -1
- package/mobile/dist/hooks/useRegions.js +2 -2
- package/mobile/dist/hooks/useRegions.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
- package/mobile/dist/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/mobile/dist/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +3 -3
- package/mobile/lib/components/ApplicationForm/CustomFieldProps.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackMethodField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js +1 -1
- package/mobile/lib/components/ApplicationForm/FeedbackTypeField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/LocalitiesField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/LocalitiesField.js +22 -0
- package/mobile/lib/components/ApplicationForm/LocalitiesField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.d.ts +1 -1
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js +5 -7
- package/mobile/lib/components/ApplicationForm/PartnerCommentsField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ProductField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/ProductField.js +8 -0
- package/mobile/lib/components/ApplicationForm/ProductField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/RegionField.js +2 -2
- package/mobile/lib/components/ApplicationForm/RegionField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.d.ts +2 -0
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js +12 -0
- package/mobile/lib/components/ApplicationForm/SecondaryPhoneField.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js +1 -1
- package/mobile/lib/components/ApplicationForm/ServiceDirectionField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/UltraPremiumField.js +1 -1
- package/mobile/lib/components/ApplicationForm/UltraPremiumField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/constants.d.ts +7 -0
- package/mobile/lib/components/ApplicationForm/{contants.js → constants.js} +10 -1
- package/mobile/lib/components/ApplicationForm/constants.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/getField.d.ts +0 -4
- package/mobile/lib/components/ApplicationForm/getField.js +11 -8
- package/mobile/lib/components/ApplicationForm/getField.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -1
- package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getObjectValidator.js +3 -0
- package/mobile/lib/components/ApplicationForm/getObjectValidator.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/getRegionUrl.d.ts +1 -0
- package/mobile/lib/components/ApplicationForm/getRegionUrl.js +3 -0
- package/mobile/lib/components/ApplicationForm/getRegionUrl.js.map +1 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.d.ts +6 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.js +6 -0
- package/mobile/lib/components/ApplicationForm/isRenderField.js.map +1 -0
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +25 -47
- package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +11 -2
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +2 -1
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +15 -11
- package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/isRubles.d.ts +1 -0
- package/mobile/lib/components/CalculatorDeposit/isRubles.js +2 -0
- package/mobile/lib/components/CalculatorDeposit/isRubles.js.map +1 -0
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +4 -3
- package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -1
- package/mobile/lib/components/CalculatorDeposit/utils.d.ts +17 -0
- package/mobile/lib/components/CalculatorDeposit/utils.js +25 -0
- package/mobile/lib/components/CalculatorDeposit/utils.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +2 -1
- package/mobile/lib/hooks/useForm.js +23 -13
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/hooks/useRegions.d.ts +2 -1
- package/mobile/lib/hooks/useRegions.js +2 -2
- package/mobile/lib/hooks/useRegions.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js +1 -7
- package/mobile/lib/ui-kit/BenefitsList/DefaultBenefitsList.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.d.ts +1 -2
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js +1 -1
- package/mobile/lib/ui-kit/Calculator/getDefaultParams.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
- package/mobile/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
- package/mobile/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
- package/mobile/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
- package/mobile/src/components/ApplicationForm/ProductField.tsx +15 -0
- package/mobile/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/mobile/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
- package/mobile/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
- package/mobile/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
- package/mobile/src/components/ApplicationForm/getField.tsx +16 -23
- package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/mobile/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
- package/mobile/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
- package/mobile/src/components/ApplicationForm/isRenderField.tsx +15 -0
- package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
- package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
- package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
- package/mobile/src/components/CalculatorDeposit/isRubles.tsx +1 -0
- package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
- package/mobile/src/components/CalculatorDeposit/utils.tsx +37 -0
- package/mobile/src/hooks/useForm.ts +33 -16
- package/mobile/src/hooks/useRegions.ts +3 -2
- package/mobile/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +1 -23
- package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/mobile/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +79 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +34 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +6 -2
- package/src/components/ApplicationForm/CustomFieldProps.ts +1 -0
- package/src/components/ApplicationForm/FeedbackMethodField.tsx +1 -1
- package/src/components/ApplicationForm/FeedbackTypeField.tsx +1 -1
- package/src/components/ApplicationForm/LocalitiesField.tsx +34 -0
- package/src/components/ApplicationForm/PartnerCommentsField.tsx +10 -9
- package/src/components/ApplicationForm/ProductField.tsx +15 -0
- package/src/components/ApplicationForm/RegionField.tsx +2 -2
- package/src/components/ApplicationForm/SecondaryPhoneField.tsx +18 -0
- package/src/components/ApplicationForm/ServiceDirectionField.tsx +1 -1
- package/src/components/ApplicationForm/UltraPremiumField.tsx +1 -1
- package/src/components/ApplicationForm/{contants.tsx → constants.tsx} +11 -0
- package/src/components/ApplicationForm/getField.tsx +16 -23
- package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
- package/src/components/ApplicationForm/getObjectValidator.tsx +3 -0
- package/src/components/ApplicationForm/getRegionUrl.tsx +4 -0
- package/src/components/ApplicationForm/isRenderField.tsx +15 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +2 -0
- package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +47 -71
- package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -1
- package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +14 -9
- package/src/components/CalculatorDeposit/isRubles.tsx +1 -0
- package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +5 -2
- package/src/components/CalculatorDeposit/utils.tsx +37 -0
- package/src/hooks/useForm.ts +33 -16
- package/src/hooks/useRegions.ts +3 -2
- package/src/ui-kit/BenefitsList/DefaultBenefitsList.tsx +1 -23
- package/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/src/ui-kit/Calculator/getDefaultParams.tsx +3 -3
- package/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/dist/components/ApplicationForm/contants.js +0 -25
- package/dist/components/ApplicationForm/contants.js.map +0 -1
- package/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
- package/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/lib/components/ApplicationForm/contants.js.map +0 -1
- package/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
- package/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/bundle/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/dist/components/ApplicationForm/contants.d.ts +0 -5
- package/mobile/dist/components/ApplicationForm/contants.js +0 -25
- package/mobile/dist/components/ApplicationForm/contants.js.map +0 -1
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.js +0 -5
- package/mobile/dist/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/lib/components/ApplicationForm/contants.d.ts +0 -5
- package/mobile/lib/components/ApplicationForm/contants.js.map +0 -1
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.d.ts +0 -1
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.js +0 -2
- package/mobile/lib/components/CalculatorDeposit/isNotRubles.js.map +0 -1
- package/mobile/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
- package/src/components/CalculatorDeposit/isNotRubles.tsx +0 -1
|
@@ -657,12 +657,6 @@
|
|
|
657
657
|
const imageAlwaysOnRightContainerStyle = (isImage) => style(isImage ? 'row-span-2' : '@xl:row-span-2');
|
|
658
658
|
const renderUnitContainer = (childrenBlocks) => childrenBlocks?.length ? (jsx("div", { className: "flex items-start justify-end", children: childrenBlocks })) : null;
|
|
659
659
|
|
|
660
|
-
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
661
|
-
|
|
662
|
-
const avg = (items = []) => (items?.length ? sum(items) / items.length : 0);
|
|
663
|
-
|
|
664
|
-
const deviation = (items) => items?.length ? Math.sqrt(Math.abs(avg(items.map((_) => _ ** 2)) - avg(items) ** 2)) : 0;
|
|
665
|
-
|
|
666
660
|
const renderBenefitIcon = (icon, benefitsVersion = 'normal') => icon?.icon || icon?.src ? (jsx("div", { className: style('sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon', benefitsVersion === 'normal'
|
|
667
661
|
? 'bg-secondary-light text-primary-main'
|
|
668
662
|
: 'bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black'), children: jsx(Img, { className: "w-6 h-6", image: { ...icon, iconVersion: icon.iconVersion || benefitsVersion } }) })) : null;
|
|
@@ -694,12 +688,7 @@
|
|
|
694
688
|
|
|
695
689
|
const BenefitItem = JSX(({ className, benefitsVersion, ..._ }) => (jsxs("div", { className: style('flex gap-m min-w-56 items-center', className), role: "listitem", children: ['icon' in _ ? renderBenefitIcon(_.icon, benefitsVersion) : null, jsx("div", { children: renderBenefitText(_) })] })));
|
|
696
690
|
|
|
697
|
-
const
|
|
698
|
-
const benefitLength = (_) => Math.max(_?.label?.length || 0, _?.description?.length || 0, _?.__html?.length || 0);
|
|
699
|
-
const isDistortedBenefits = (benefits) => deviation(benefits.map(benefitLength)) > MAX_BENEFITS_LEN_DEVIATION;
|
|
700
|
-
const hasIcon = (_) => _ && 'icon' in _ && _.icon && (_.icon.icon || _.icon.src);
|
|
701
|
-
const isTextualBenefits = (benefits) => !benefits.some(hasIcon);
|
|
702
|
-
const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s', isDistortedBenefits(benefits) || isTextualBenefits(benefits) ? 'flex-col' : 'flex-wrap', className), role: "list", children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
|
|
691
|
+
const DefaultBenefitsList = JSX(({ className, benefitsVersion = 'normal', benefits }) => benefits?.length ? (jsx("div", { className: style('flex gap-x-m gap-y-s flex-col', className), role: "list", children: benefits.map((_, i) => (jsx(BenefitItem, { benefitsVersion: benefitsVersion, ..._ }, String(i)))) })) : null);
|
|
703
692
|
|
|
704
693
|
const TabularBenefitsList = JSX(({ className, benefits }) => benefits?.length ? (jsx("div", { className: style('grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs', className), role: "list", children: benefits.flatMap(renderBenefitText) })) : null);
|
|
705
694
|
|
|
@@ -1064,26 +1053,35 @@
|
|
|
1064
1053
|
|
|
1065
1054
|
const identity = (_) => _;
|
|
1066
1055
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1056
|
+
// eslint-disable-next-line max-lines-per-function
|
|
1057
|
+
const useForm = (initialState, { resetOnSubmit, onSubmit, normalize, } = {}) => {
|
|
1058
|
+
const [formState, setFormStateUnsafe] = useState(initialState);
|
|
1059
|
+
const setFormState = useCallback(normalize
|
|
1060
|
+
? (_) => setFormStateUnsafe(_ instanceof Function
|
|
1061
|
+
? (prev) => {
|
|
1062
|
+
const _normalize = normalize(_(prev));
|
|
1063
|
+
return shellowCompare(prev, _normalize) ? prev : _normalize;
|
|
1064
|
+
}
|
|
1065
|
+
: normalize(_))
|
|
1066
|
+
: setFormStateUnsafe, [normalize]);
|
|
1067
|
+
useEffect(() => {
|
|
1068
|
+
if (normalize) {
|
|
1069
|
+
setFormStateUnsafe(normalize);
|
|
1070
|
+
}
|
|
1071
|
+
}, [normalize]);
|
|
1069
1072
|
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
1070
1073
|
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
1071
|
-
const handlersMap = useRef({});
|
|
1072
1074
|
const field = useCallback((fieldName, options) => {
|
|
1073
1075
|
const { parse = identity, format = identity } = options || {};
|
|
1074
|
-
if (!handlersMap.current) {
|
|
1075
|
-
handlersMap.current = {};
|
|
1076
|
-
}
|
|
1077
|
-
handlersMap.current[fieldName] ||= (value) => {
|
|
1078
|
-
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
1079
|
-
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
1080
|
-
};
|
|
1081
1076
|
return {
|
|
1082
1077
|
value: format(formState[fieldName]),
|
|
1083
1078
|
isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
|
|
1084
|
-
onChange:
|
|
1079
|
+
onChange: (value) => {
|
|
1080
|
+
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
1081
|
+
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
1082
|
+
},
|
|
1085
1083
|
};
|
|
1086
|
-
}, [
|
|
1084
|
+
}, [setFormState, isDirtyForm, dirtyFieldsMap]);
|
|
1087
1085
|
const update = useCallback((_) => {
|
|
1088
1086
|
setFormState(_);
|
|
1089
1087
|
setDirtyFieldsMap(_);
|
|
@@ -1109,6 +1107,7 @@
|
|
|
1109
1107
|
},
|
|
1110
1108
|
];
|
|
1111
1109
|
};
|
|
1110
|
+
const shellowCompare = (a, b) => Object.keys({ ...a, ...b }).every((key) => a[key] === b[key]);
|
|
1112
1111
|
|
|
1113
1112
|
const ApplicationFormLayout = JSX((props) => {
|
|
1114
1113
|
const { className, title, children, ...rest } = props;
|
|
@@ -1560,6 +1559,9 @@
|
|
|
1560
1559
|
feedbackMethod: defaultSelectValidator,
|
|
1561
1560
|
serviceType: defaultSelectValidator,
|
|
1562
1561
|
serviceDirection: defaultSelectValidator,
|
|
1562
|
+
meetingDay: defaultValidator,
|
|
1563
|
+
product: defaultValidator,
|
|
1564
|
+
localities: defaultValidator,
|
|
1563
1565
|
consentDataProcessing: agreementValidator,
|
|
1564
1566
|
annualRevenue: defaultValidator,
|
|
1565
1567
|
};
|
|
@@ -1789,6 +1791,15 @@
|
|
|
1789
1791
|
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1790
1792
|
{ key: 'email', text: 'Электронное сообщение' },
|
|
1791
1793
|
];
|
|
1794
|
+
const PRODUCT_TYPE = [
|
|
1795
|
+
{ key: 'Карта дебетовая', text: 'Карта дебетовая' },
|
|
1796
|
+
{ key: 'Карта кредитная', text: 'Карта кредитная' },
|
|
1797
|
+
{ key: 'Потребительский кредит', text: 'Потребительский кредит' },
|
|
1798
|
+
{ key: 'Ипотечный кредит', text: 'Ипотечный кредит' },
|
|
1799
|
+
{ key: 'Вклад', text: 'Вклад' },
|
|
1800
|
+
{ key: 'Накопительный счет', text: 'Накопительный счет' },
|
|
1801
|
+
];
|
|
1802
|
+
const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
|
|
1792
1803
|
|
|
1793
1804
|
const FeedbackMethodField = JSX(({ field }) => (jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), validatorObj.feedbackMethod) })));
|
|
1794
1805
|
|
|
@@ -1802,29 +1813,51 @@
|
|
|
1802
1813
|
return (jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(feedbackType, validatorObj.feedbackType) }));
|
|
1803
1814
|
});
|
|
1804
1815
|
|
|
1816
|
+
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
1817
|
+
|
|
1805
1818
|
const IsClientField = JSX(({ field }) => (jsx(CheckboxWithError, { ...field('isClient'), text: '\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u043C \u0431\u0430\u043D\u043A\u0430 \u0410\u041E "\u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A"' })));
|
|
1806
1819
|
|
|
1820
|
+
function isRenderField({ input, field, }) {
|
|
1821
|
+
const { condition } = input;
|
|
1822
|
+
const { value } = field(condition?.name || '');
|
|
1823
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
const REGIONS_URL = '/api/v1/regions';
|
|
1827
|
+
function useRegions(url = REGIONS_URL) {
|
|
1828
|
+
const { data } = useAsyncData(url, fetchJSONUnsafe);
|
|
1829
|
+
return Array.isArray(data) ? data : [];
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
const LocalitiesField = JSX(({ field, input }) => {
|
|
1833
|
+
const fieldRegion = field('region');
|
|
1834
|
+
const regionKey = fieldRegion?.value?.key;
|
|
1835
|
+
const localities = useRegions(OUT_SERVICE_URL)
|
|
1836
|
+
?.find((_) => _.code === regionKey)
|
|
1837
|
+
?.localities?.map((_) => ({ key: _, text: _ }));
|
|
1838
|
+
useEffect(() => {
|
|
1839
|
+
if (regionKey !== '') {
|
|
1840
|
+
field?.('localities')?.onChange?.('');
|
|
1841
|
+
}
|
|
1842
|
+
}, [regionKey]);
|
|
1843
|
+
return (jsx(SelectControl, { label: "\u041D\u0430\u0441\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u043F\u0443\u043D\u043A\u0442", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: localities, ...getValidation(field('localities'), validatorObj.localities, input?.required), isSearch: true }));
|
|
1844
|
+
});
|
|
1845
|
+
|
|
1807
1846
|
const SlideCheckbox = JSX(({ value = false, text, type = 'checkbox', onChange }) => (jsxs("div", { role: type, "aria-checked": value, className: "flex justify-start items-center w-full cursor-pointer mb-s", onClick: () => onChange && onChange(!value), children: [jsx("div", { className: style('relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl', value ? 'bg-primary-main' : 'bg-main-divider'), children: jsx("div", { className: style('absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full', value ? 'left-1/2' : 'left-[5%]') }) }), text ? (jsx(Text, { size: "text-l", font: "font-light", color: "text-primary-text", children: text })) : null] })));
|
|
1808
1847
|
|
|
1809
1848
|
const OnlineCheckoutField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 \u043E\u043D\u043B\u0430\u0439\u043D-\u043A\u0430\u0441\u0441\u0443", ...field('onlineCheckout') })) : null);
|
|
1810
1849
|
|
|
1811
|
-
const
|
|
1812
|
-
const
|
|
1813
|
-
return (jsx(
|
|
1814
|
-
? fieldPhone
|
|
1815
|
-
: withValidator(fieldPhone, validatorObj.secondaryPhone)) }));
|
|
1850
|
+
const PartnerCommentsField = JSX(({ field, input }) => {
|
|
1851
|
+
const { required, ...rest } = input;
|
|
1852
|
+
return (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441", isTextarea: true, ...rest }));
|
|
1816
1853
|
});
|
|
1817
1854
|
|
|
1818
1855
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
1819
1856
|
|
|
1820
|
-
const
|
|
1821
|
-
function useRegions() {
|
|
1822
|
-
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
1823
|
-
return Array.isArray(data) ? data : [];
|
|
1824
|
-
}
|
|
1857
|
+
const ProductField = JSX(({ field }) => (jsx(SelectControl, { placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0434\u0443\u043A\u0442", label: "\u041F\u0440\u043E\u0434\u0443\u043A\u0442", options: PRODUCT_TYPE, ...withValidator(field('product'), validatorObj.product) })));
|
|
1825
1858
|
|
|
1826
|
-
const RegionField = JSX(({ field, input }) => {
|
|
1827
|
-
const regions = useRegions();
|
|
1859
|
+
const RegionField = JSX(({ field, input, url }) => {
|
|
1860
|
+
const regions = useRegions(url);
|
|
1828
1861
|
return (jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: useMemo(() => regions?.map(({ code = '', name = '' }) => ({ key: code, text: name })), [regions]), ...getValidation(field('region'), validatorObj.region, input?.required) }));
|
|
1829
1862
|
});
|
|
1830
1863
|
|
|
@@ -1837,6 +1870,13 @@
|
|
|
1837
1870
|
return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", options: regions, ...getValidation(field('region'), validatorObj.region, input?.required) }));
|
|
1838
1871
|
});
|
|
1839
1872
|
|
|
1873
|
+
const SecondaryPhoneField = JSX(({ field }) => {
|
|
1874
|
+
const fieldPhone = field('secondaryPhone');
|
|
1875
|
+
return (jsx(InputPhoneControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...(!fieldPhone.value || fieldPhone.value === '+7 ('
|
|
1876
|
+
? fieldPhone
|
|
1877
|
+
: withValidator(fieldPhone, validatorObj.secondaryPhone)) }));
|
|
1878
|
+
});
|
|
1879
|
+
|
|
1840
1880
|
const ServiceDirectionField = JSX(({ field }) => (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), validatorObj.serviceDirection) })));
|
|
1841
1881
|
|
|
1842
1882
|
const MIN_CREDIT_TERM = 1;
|
|
@@ -1879,12 +1919,15 @@
|
|
|
1879
1919
|
fullName: (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, required), ...rest })),
|
|
1880
1920
|
inn: (jsx(InputControl, { label: "\u0418\u041D\u041D", type: "number", ...getValidation(field('inn'), validatorObj.inn, required) })),
|
|
1881
1921
|
comment: jsx(CommentField, { field: field, input: input }),
|
|
1882
|
-
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input })),
|
|
1922
|
+
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input, url: getRegionUrl(typeForm) })),
|
|
1883
1923
|
addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
|
|
1884
1924
|
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
|
|
1925
|
+
desiredMeetingDate: (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, required) })),
|
|
1926
|
+
product: jsx(ProductField, { field: field }),
|
|
1927
|
+
localities: jsx(LocalitiesField, { field: field, input: input }),
|
|
1885
1928
|
isClient: jsx(IsClientField, { field: field }),
|
|
1886
1929
|
consentToReceiveMaterials: (jsx(CheckboxWithError, { ...field('consentToReceiveMaterials'), text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u043D\u0430 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0438 \u0430\u043D\u0430\u043B\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043C\u0430\u0442\u0435\u0440\u0438\u0430\u043B\u043E\u0432 \u043F\u043E \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0439 \u043F\u043E\u0447\u0442\u0435" })),
|
|
1887
|
-
partnerComments:
|
|
1930
|
+
partnerComments: jsx(PartnerCommentsField, { field: field, input: input }),
|
|
1888
1931
|
collectionCount: (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", type: "number", ...getValidation(field('collectionCount'), validatorObj.collectionCount, required) })),
|
|
1889
1932
|
acquiringType: jsx(AcquiringField, { field: field, input: input }),
|
|
1890
1933
|
onlineCheckout: jsx(OnlineCheckoutField, { field: field }),
|
|
@@ -1903,11 +1946,6 @@
|
|
|
1903
1946
|
};
|
|
1904
1947
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
1905
1948
|
};
|
|
1906
|
-
function isRenderField({ input, field, }) {
|
|
1907
|
-
const { condition } = input;
|
|
1908
|
-
const { value } = field(condition?.name || '');
|
|
1909
|
-
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
1910
|
-
}
|
|
1911
1949
|
|
|
1912
1950
|
const getPartnerComments = (data) => {
|
|
1913
1951
|
const { acquiringType, onlineCheckout = false, posTerminal = false, term, amount, annualRevenue, } = data;
|
|
@@ -2551,7 +2589,7 @@
|
|
|
2551
2589
|
const CalculatorStyle = {
|
|
2552
2590
|
wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl',
|
|
2553
2591
|
input: 'flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl',
|
|
2554
|
-
result: 'flex flex-col gap-y-xl min-w-
|
|
2592
|
+
result: 'flex flex-col gap-y-xl min-w-52',
|
|
2555
2593
|
};
|
|
2556
2594
|
|
|
2557
2595
|
const FormatValue = JSX(({ value, fractionDigits, fixed, prefix, postfix }) => (jsx(Text, { size: "text-h3", children: typeof value === 'number'
|
|
@@ -2829,7 +2867,7 @@
|
|
|
2829
2867
|
const renderBusinessDepositParamsForm = (calculatorParams, field) => (jsxs("div", { className: "space-y-s", children: [jsx(Text, { color: "text-secondary-text", font: "font-light", children: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B" }), jsxs("div", { className: "flex flex-col gap-y-lg sm:gap-y-s", children: [jsx(Checkbox, { text: "\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435", disabled: calculatorParams.isDisabledOperatingDeposit, ...field('isReplenished'), value: calculatorParams.isReplenished }), jsx(Checkbox, { disabled: calculatorParams.isDisabledOperatingDeposit, text: "\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u0441\u043D\u044F\u0442\u0438\u0435", ...field('isPartialWithdrawal'), value: calculatorParams.isPartialWithdrawal })] })] }));
|
|
2830
2868
|
|
|
2831
2869
|
const getDefaultParamsMin = (rateRows) => getDefaultParams([(i, acc) => i < acc, (i, prev) => i?.maxSum > prev?.maxSum], rateRows);
|
|
2832
|
-
const getDefaultParamsMax = (rateRows) => getDefaultParams([(i, acc) => i > acc, (i, prev) => i?.minSum < prev?.minSum], rateRows);
|
|
2870
|
+
const getDefaultParamsMax = (rateRows = [], isNewClient = false) => getDefaultParams([(i, acc) => i > acc, (i, prev) => i?.minSum < prev?.minSum], rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient)));
|
|
2833
2871
|
const getDefaultParams = (comparators, rateRows) => {
|
|
2834
2872
|
if (!rateRows?.length) {
|
|
2835
2873
|
return undefined;
|
|
@@ -3043,8 +3081,6 @@
|
|
|
3043
3081
|
});
|
|
3044
3082
|
const renderCreditParamsForm$1 = (params, field) => (jsxs("div", { className: "flex flex-col gap-y-2xl", children: [params.isShowSalaryClient ? (jsx(Checkbox, { text: `Получаю зарплату на счёт\nв Россельхозбанке`, ...field('isSalaryClient'), value: params.isSalaryClient, className: "whitespace-pre-line sm:whitespace-normal" })) : null, params.isShowStateEmployee ? (jsx(Checkbox, { text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('isStateEmployee'), value: params.isStateEmployee })) : null, params.isShowPensionClient ? (jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u043F\u0435\u043D\u0441\u0438\u044E \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0430", ...field('isPensionClient'), value: params.isPensionClient })) : null, params.isShowInsurance ? (jsx(Checkbox, { text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", ...field('isInsurance'), value: params.isInsurance })) : null] }));
|
|
3045
3083
|
|
|
3046
|
-
const isNotRubles = (currency = 'rub') => currency !== 'rub';
|
|
3047
|
-
|
|
3048
3084
|
const arrayByRange = (start, stop, step = 1) => Array.from({ length: Math.abs(stop - start) / step + 1 }, (value, index) => stop >= start ? start + index * step : start - index * step);
|
|
3049
3085
|
|
|
3050
3086
|
const mergeIntervals = (intervals) => {
|
|
@@ -3083,32 +3119,36 @@
|
|
|
3083
3119
|
const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
|
|
3084
3120
|
const isExcludeReplenish = !paramsViewSettings?.isShowReplenish;
|
|
3085
3121
|
const isExcludeWithdrawn = !paramsViewSettings?.isShowWithdrawn;
|
|
3086
|
-
const
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3122
|
+
const isExcludeNewClient = !paramsViewSettings?.isShowNewClient;
|
|
3123
|
+
const depositCalculatorSourceBookParams = rows?.find((row) => [
|
|
3124
|
+
checkRowByParam({
|
|
3125
|
+
row,
|
|
3126
|
+
userInputParams,
|
|
3127
|
+
paramKey: 'isReplenish',
|
|
3128
|
+
isExclude: isExcludeReplenish,
|
|
3129
|
+
}),
|
|
3092
3130
|
checkRowByParam({
|
|
3093
3131
|
row,
|
|
3094
3132
|
userInputParams,
|
|
3095
3133
|
paramKey: 'isWithdrawn',
|
|
3096
3134
|
isExclude: isExcludeWithdrawn,
|
|
3097
|
-
})
|
|
3135
|
+
}),
|
|
3098
3136
|
checkRowByParam({
|
|
3099
3137
|
row,
|
|
3100
3138
|
userInputParams,
|
|
3101
3139
|
paramKey: 'isMonthlyInterestPayment',
|
|
3102
3140
|
isExclude: isExcludeMonthlyInterestPayment,
|
|
3103
|
-
})
|
|
3141
|
+
}),
|
|
3104
3142
|
checkRowByParam({
|
|
3105
3143
|
row,
|
|
3106
3144
|
userInputParams,
|
|
3107
3145
|
paramKey: 'isRemoteRegistration',
|
|
3108
3146
|
isExclude: isExcludeRemoteRegistration,
|
|
3109
|
-
})
|
|
3110
|
-
|
|
3111
|
-
checkRangeByKeys(
|
|
3147
|
+
}),
|
|
3148
|
+
isExcludeNewClient || userInputParams?.['isNewClient'] === row?.['isNewClient'],
|
|
3149
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row),
|
|
3150
|
+
checkRangeByKeys(monthsValue || defaultMonth, ['minMonths', 'maxMonths'], row),
|
|
3151
|
+
].every(Boolean)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
3112
3152
|
const { rate } = depositCalculatorSourceBookParams;
|
|
3113
3153
|
const income = getDepositIncome(rate, userInputParams);
|
|
3114
3154
|
const finalSum = moneyValue + income;
|
|
@@ -3139,6 +3179,8 @@
|
|
|
3139
3179
|
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
3140
3180
|
const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
|
|
3141
3181
|
|
|
3182
|
+
const isRubles = (currency = 'rub') => currency === 'rub';
|
|
3183
|
+
|
|
3142
3184
|
const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
|
|
3143
3185
|
...props,
|
|
3144
3186
|
items: [
|
|
@@ -3173,7 +3215,7 @@
|
|
|
3173
3215
|
],
|
|
3174
3216
|
disabled: isCurrency,
|
|
3175
3217
|
})
|
|
3176
|
-
: null] }),
|
|
3218
|
+
: null] }), renderSeparator(params.isShowReplenish || params.isShowWithdrawn), jsxs("div", { className: "flex gap-lg", children: [params.isShowMonthlyInterestPayment
|
|
3177
3219
|
? renderPayout({
|
|
3178
3220
|
title: 'Выплата процентов',
|
|
3179
3221
|
...field('isMonthlyInterestPayment'),
|
|
@@ -3187,9 +3229,31 @@
|
|
|
3187
3229
|
value: params.isRemoteRegistration,
|
|
3188
3230
|
orientation: 'vertical',
|
|
3189
3231
|
})
|
|
3190
|
-
: null] })] }));
|
|
3232
|
+
: null] }), renderSeparator(params.isShowNewClient), params.isShowNewClient ? jsx(Checkbox, { text: "\u041D\u043E\u0432\u044B\u0439 \u0432\u043A\u043B\u0430\u0434\u0447\u0438\u043A", ...field('isNewClient') }) : null] }));
|
|
3233
|
+
};
|
|
3234
|
+
const renderSeparator = (isShow = false) => isShow ? jsx("div", { className: "border-b border-main-divider w-full" }) : null;
|
|
3235
|
+
|
|
3236
|
+
const normalizeMonthValue = (_, rows) => {
|
|
3237
|
+
const { minMonths, maxMonths } = getRangeByKeys(['minMonths', 'maxMonths'], getRows(rows, _?.currency));
|
|
3238
|
+
const monthsValue = _.monthsValue || Math.round((minMonths + maxMonths) / 2);
|
|
3239
|
+
return { monthsValue: clamp(monthsValue, minMonths, maxMonths) };
|
|
3240
|
+
};
|
|
3241
|
+
const normalizeMoneyValue = (_, rows) => {
|
|
3242
|
+
const { minSum, maxSum } = getRangeByKeys(['minSum', 'maxSum'], getRows(rows, _?.currency));
|
|
3243
|
+
const moneyValue = _.moneyValue || minSum;
|
|
3244
|
+
return { moneyValue: clamp(moneyValue, minSum, maxSum) };
|
|
3245
|
+
};
|
|
3246
|
+
const normalizeCurrency = (_, rows) => ({
|
|
3247
|
+
currency: _?.currency ?? rows?.map((row) => row.currency)?.[0],
|
|
3248
|
+
});
|
|
3249
|
+
const normalizeReplenishWithdrawn = (_) => {
|
|
3250
|
+
const _isRubles = isRubles(_?.currency?.key);
|
|
3251
|
+
return { isReplenish: _isRubles && _?.isReplenish, isWithdrawn: _isRubles && _?.isWithdrawn };
|
|
3252
|
+
};
|
|
3253
|
+
const getRows = (rows, currencyValue) => {
|
|
3254
|
+
const { rates } = rows?.find((_) => _?.currency.key === currencyValue?.key) ?? {};
|
|
3255
|
+
return rates ?? rows?.[0]?.rates;
|
|
3191
3256
|
};
|
|
3192
|
-
const separatorStyles = (isShow = false) => isShow ? jsx("div", { className: "border-b border-main-divider w-full" }) : null;
|
|
3193
3257
|
|
|
3194
3258
|
const MAP = {
|
|
3195
3259
|
isMonthlyInterestPayment: 'isMonthlyInterestPayment',
|
|
@@ -3203,67 +3267,49 @@
|
|
|
3203
3267
|
key: 'rub',
|
|
3204
3268
|
};
|
|
3205
3269
|
const DEPOSIT_DEFAULT_SUM = 20000;
|
|
3270
|
+
const DEPOSIT_DEFAULT_MONTHS = 1;
|
|
3206
3271
|
const CalculatorDeposit = UniBlock(({ className, title, calcSource, buttons = [], footnote = '', paramsViewSettings, defaultParams, ...rest }) => {
|
|
3207
3272
|
const { rows } = calcSource ?? {};
|
|
3208
3273
|
const currencyOptions = rows?.map((_) => _.currency) ?? [DEFAULT_CURRENCY];
|
|
3274
|
+
const normalize = useCallback((_) => !rows
|
|
3275
|
+
? _
|
|
3276
|
+
: {
|
|
3277
|
+
..._,
|
|
3278
|
+
...normalizeReplenishWithdrawn(_),
|
|
3279
|
+
...normalizeMoneyValue(_, rows),
|
|
3280
|
+
...normalizeMonthValue(_, rows),
|
|
3281
|
+
...normalizeCurrency(_, rows),
|
|
3282
|
+
}, [rows]);
|
|
3209
3283
|
const [userInputParams, { field }] = useForm({
|
|
3210
3284
|
moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
|
|
3211
|
-
monthsValue: getMonthsDefaultValue(defaultParams),
|
|
3285
|
+
monthsValue: getMonthsDefaultValue(defaultParams, DEPOSIT_DEFAULT_MONTHS),
|
|
3212
3286
|
isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
|
|
3213
3287
|
isRemoteRegistration: Boolean(defaultParams?.isRemoteRegistration),
|
|
3214
3288
|
isReplenish: Boolean(defaultParams?.isReplenish),
|
|
3215
3289
|
isWithdrawn: Boolean(defaultParams?.isWithdrawn),
|
|
3290
|
+
isNewClient: Boolean(defaultParams?.isNewClient),
|
|
3216
3291
|
currency: DEFAULT_CURRENCY,
|
|
3217
|
-
});
|
|
3218
|
-
const currencyValue = field?.('currency')?.value;
|
|
3219
|
-
const
|
|
3220
|
-
const { onChange: setMoneyValue } = field('moneyValue');
|
|
3292
|
+
}, { normalize });
|
|
3293
|
+
const currencyValue = field?.('currency')?.value ?? DEFAULT_CURRENCY;
|
|
3294
|
+
const isNewClient = field?.('isNewClient')?.value;
|
|
3221
3295
|
const row = getRows(rows, currencyValue);
|
|
3222
|
-
const
|
|
3223
|
-
const
|
|
3224
|
-
useEffect(() => {
|
|
3225
|
-
if (currencyOptions?.[0]) {
|
|
3226
|
-
field?.('currency')?.onChange?.(currencyOptions?.[0]);
|
|
3227
|
-
}
|
|
3228
|
-
}, [calcSource]);
|
|
3296
|
+
const calcParams = getDepositCalculatorParams(userInputParams, row, paramsViewSettings);
|
|
3297
|
+
const { rate, income, finalSum, type = '' } = calcParams;
|
|
3229
3298
|
const handleDefaultParamsCals = () => {
|
|
3230
3299
|
setDefaultParamsCalc({
|
|
3231
3300
|
field,
|
|
3232
|
-
defParams:
|
|
3301
|
+
defParams: getDefaultParamsMax(row, isNewClient),
|
|
3233
3302
|
calcParams,
|
|
3234
3303
|
monthsValue: 'minMonths',
|
|
3235
3304
|
map: MAP,
|
|
3236
3305
|
});
|
|
3237
3306
|
};
|
|
3238
|
-
const { defaultMonth, rate, income, finalSum, type = '' } = calcParams;
|
|
3239
|
-
useEffect(() => {
|
|
3240
|
-
setDefParams(getDefaultParamsMax(row));
|
|
3241
|
-
}, [currencyValue, rows]);
|
|
3242
|
-
useEffect(() => {
|
|
3243
|
-
!userInputParams.monthsValue && setMonthsValue && setMonthsValue(defaultMonth);
|
|
3244
|
-
}, [defaultMonth]);
|
|
3245
|
-
useEffect(() => {
|
|
3246
|
-
setMoneyValue &&
|
|
3247
|
-
setMoneyValue(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
|
|
3248
|
-
}, [calcParams.minSum, calcParams.maxSum, row]);
|
|
3249
3307
|
useEffect(() => {
|
|
3250
|
-
if (!isDefaultParams(defaultParams) &&
|
|
3308
|
+
if (!isDefaultParams(defaultParams) && row) {
|
|
3251
3309
|
handleDefaultParamsCals();
|
|
3252
3310
|
}
|
|
3253
|
-
}, [
|
|
3254
|
-
|
|
3255
|
-
setMoneyValue?.(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
|
|
3256
|
-
if (isNotRubles(currencyValue?.key)) {
|
|
3257
|
-
field?.('isReplenish')?.onChange?.(false);
|
|
3258
|
-
field?.('isWithdrawn')?.onChange?.(false);
|
|
3259
|
-
}
|
|
3260
|
-
}, [currencyValue]);
|
|
3261
|
-
useEffect(() => {
|
|
3262
|
-
if (!isDefaultParams(defaultParams) && defParams) {
|
|
3263
|
-
handleDefaultParamsCals();
|
|
3264
|
-
}
|
|
3265
|
-
}, [defaultParams, row, defParams]);
|
|
3266
|
-
const isMaxRate = rate === defParams?.rate;
|
|
3311
|
+
}, [defaultParams, rows]);
|
|
3312
|
+
const isMaxRate = rate === getDefaultParamsMax(row, isNewClient)?.rate;
|
|
3267
3313
|
return (jsx(CalculatorLayout, { className: className, title: title, ...rest, children: jsxs("section", { className: style(CalculatorStyle.wrapper, className), children: [jsxs("div", { className: CalculatorStyle.input, children: [jsxs("div", { className: "flex gap-m", children: [renderWantedSumInput({
|
|
3268
3314
|
className: 'w-full',
|
|
3269
3315
|
title: `Сумма, ${currencyValue?.text}`,
|
|
@@ -3292,17 +3338,13 @@
|
|
|
3292
3338
|
isCapitalization: field('isMonthlyInterestPayment').value,
|
|
3293
3339
|
})] }) }));
|
|
3294
3340
|
});
|
|
3295
|
-
const getStep = (key = '') => (
|
|
3341
|
+
const getStep = (key = '') => (isRubles(key) ? 1000 : 100);
|
|
3296
3342
|
const getTariffButton = (buttons = [], btnType = '') => {
|
|
3297
3343
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3298
3344
|
const { type, ...button } = buttons.find((_) => _.type === btnType) ?? {};
|
|
3299
3345
|
return button;
|
|
3300
3346
|
};
|
|
3301
3347
|
const renderMaxRateButton = (handleDefaultParamsCals, isMaxRate = false) => isMaxRate ? null : (jsx(Button, { type: "button", version: "secondary", onClick: handleDefaultParamsCals, children: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0443\u044E \u0441\u0442\u0430\u0432\u043A\u0443" }));
|
|
3302
|
-
const getRows = (rows, currencyValue) => {
|
|
3303
|
-
const { rates } = rows?.find((_) => _?.currency.key === currencyValue?.key) ?? {};
|
|
3304
|
-
return rates ?? rows?.[0]?.rates;
|
|
3305
|
-
};
|
|
3306
3348
|
|
|
3307
3349
|
const checkRefinancingSourceBookRowCommonParams = (props) => checkRowParam({
|
|
3308
3350
|
...props,
|
|
@@ -5851,6 +5893,8 @@
|
|
|
5851
5893
|
? cells.map((_, i) => (jsx(RenderCellInner, { cell: _, fieldIdx: i, rowIdx: rowIdx, cellIdx: cellIdx, setTableInner: setTableInner, tableInner: tableInner, openTableInnerIdx: openTableInnerIdx, setOpenTableInnerIdx: setOpenTableInnerIdx }, String(i))))
|
|
5852
5894
|
: null })));
|
|
5853
5895
|
|
|
5896
|
+
const sum = (list = []) => list.reduce((a, b) => a + b, 0);
|
|
5897
|
+
|
|
5854
5898
|
const COLUMN_WIDTH = 140;
|
|
5855
5899
|
const getHorizontalShift = (columns, activeColumnIndex) => sum(columns.slice(0, activeColumnIndex).map((_) => _?.cols?.length ?? 1)) * COLUMN_WIDTH;
|
|
5856
5900
|
|
|
@@ -6137,7 +6181,7 @@
|
|
|
6137
6181
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6138
6182
|
});
|
|
6139
6183
|
|
|
6140
|
-
const packageVersion = "0.14.
|
|
6184
|
+
const packageVersion = "0.14.548";
|
|
6141
6185
|
|
|
6142
6186
|
exports.Blocks = Blocks;
|
|
6143
6187
|
exports.ContentPage = ContentPage;
|