@redneckz/wildless-cms-uni-blocks 0.14.548 → 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 +147 -94
- 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/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/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 +147 -94
- 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/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/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/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/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
package/bundle/bundle.umd.js
CHANGED
|
@@ -1045,26 +1045,35 @@
|
|
|
1045
1045
|
|
|
1046
1046
|
const identity = (_) => _;
|
|
1047
1047
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1048
|
+
// eslint-disable-next-line max-lines-per-function
|
|
1049
|
+
const useForm = (initialState, { resetOnSubmit, onSubmit, normalize, } = {}) => {
|
|
1050
|
+
const [formState, setFormStateUnsafe] = useState(initialState);
|
|
1051
|
+
const setFormState = useCallback(normalize
|
|
1052
|
+
? (_) => setFormStateUnsafe(_ instanceof Function
|
|
1053
|
+
? (prev) => {
|
|
1054
|
+
const _normalize = normalize(_(prev));
|
|
1055
|
+
return shellowCompare(prev, _normalize) ? prev : _normalize;
|
|
1056
|
+
}
|
|
1057
|
+
: normalize(_))
|
|
1058
|
+
: setFormStateUnsafe, [normalize]);
|
|
1059
|
+
useEffect(() => {
|
|
1060
|
+
if (normalize) {
|
|
1061
|
+
setFormStateUnsafe(normalize);
|
|
1062
|
+
}
|
|
1063
|
+
}, [normalize]);
|
|
1050
1064
|
const [isDirtyForm, setDirtyForm] = useState(false);
|
|
1051
1065
|
const [dirtyFieldsMap, setDirtyFieldsMap] = useState({});
|
|
1052
|
-
const handlersMap = useRef({});
|
|
1053
1066
|
const field = useCallback((fieldName, options) => {
|
|
1054
1067
|
const { parse = identity, format = identity } = options || {};
|
|
1055
|
-
if (!handlersMap.current) {
|
|
1056
|
-
handlersMap.current = {};
|
|
1057
|
-
}
|
|
1058
|
-
handlersMap.current[fieldName] ||= (value) => {
|
|
1059
|
-
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
1060
|
-
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
1061
|
-
};
|
|
1062
1068
|
return {
|
|
1063
1069
|
value: format(formState[fieldName]),
|
|
1064
1070
|
isDirty: isDirtyForm || dirtyFieldsMap[fieldName],
|
|
1065
|
-
onChange:
|
|
1071
|
+
onChange: (value) => {
|
|
1072
|
+
setFormState((prev) => ({ ...prev, [fieldName]: parse(value) }));
|
|
1073
|
+
setDirtyFieldsMap((prev) => ({ ...prev, [fieldName]: true }));
|
|
1074
|
+
},
|
|
1066
1075
|
};
|
|
1067
|
-
}, [
|
|
1076
|
+
}, [setFormState, isDirtyForm, dirtyFieldsMap]);
|
|
1068
1077
|
const update = useCallback((_) => {
|
|
1069
1078
|
setFormState(_);
|
|
1070
1079
|
setDirtyFieldsMap(_);
|
|
@@ -1090,6 +1099,7 @@
|
|
|
1090
1099
|
},
|
|
1091
1100
|
];
|
|
1092
1101
|
};
|
|
1102
|
+
const shellowCompare = (a, b) => Object.keys({ ...a, ...b }).every((key) => a[key] === b[key]);
|
|
1093
1103
|
|
|
1094
1104
|
const ApplicationFormLayout = JSX((props) => {
|
|
1095
1105
|
const { className, title, children, ...rest } = props;
|
|
@@ -1541,6 +1551,9 @@
|
|
|
1541
1551
|
feedbackMethod: defaultSelectValidator,
|
|
1542
1552
|
serviceType: defaultSelectValidator,
|
|
1543
1553
|
serviceDirection: defaultSelectValidator,
|
|
1554
|
+
meetingDay: defaultValidator,
|
|
1555
|
+
product: defaultValidator,
|
|
1556
|
+
localities: defaultValidator,
|
|
1544
1557
|
consentDataProcessing: agreementValidator,
|
|
1545
1558
|
annualRevenue: defaultValidator,
|
|
1546
1559
|
};
|
|
@@ -1770,6 +1783,15 @@
|
|
|
1770
1783
|
{ key: 'phone', text: 'Телефонный звонок' },
|
|
1771
1784
|
{ key: 'email', text: 'Электронное сообщение' },
|
|
1772
1785
|
];
|
|
1786
|
+
const PRODUCT_TYPE = [
|
|
1787
|
+
{ key: 'Карта дебетовая', text: 'Карта дебетовая' },
|
|
1788
|
+
{ key: 'Карта кредитная', text: 'Карта кредитная' },
|
|
1789
|
+
{ key: 'Потребительский кредит', text: 'Потребительский кредит' },
|
|
1790
|
+
{ key: 'Ипотечный кредит', text: 'Ипотечный кредит' },
|
|
1791
|
+
{ key: 'Вклад', text: 'Вклад' },
|
|
1792
|
+
{ key: 'Накопительный счет', text: 'Накопительный счет' },
|
|
1793
|
+
];
|
|
1794
|
+
const OUT_SERVICE_URL = '/api/v1/outservice/outserviceregions';
|
|
1773
1795
|
|
|
1774
1796
|
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) })));
|
|
1775
1797
|
|
|
@@ -1783,29 +1805,51 @@
|
|
|
1783
1805
|
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) }));
|
|
1784
1806
|
});
|
|
1785
1807
|
|
|
1808
|
+
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
1809
|
+
|
|
1786
1810
|
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"' })));
|
|
1787
1811
|
|
|
1812
|
+
function isRenderField({ input, field, }) {
|
|
1813
|
+
const { condition } = input;
|
|
1814
|
+
const { value } = field(condition?.name || '');
|
|
1815
|
+
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
const REGIONS_URL = '/api/v1/regions';
|
|
1819
|
+
function useRegions(url = REGIONS_URL) {
|
|
1820
|
+
const { data } = useAsyncData(url, fetchJSONUnsafe);
|
|
1821
|
+
return Array.isArray(data) ? data : [];
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
const LocalitiesField = JSX(({ field, input }) => {
|
|
1825
|
+
const fieldRegion = field('region');
|
|
1826
|
+
const regionKey = fieldRegion?.value?.key;
|
|
1827
|
+
const localities = useRegions(OUT_SERVICE_URL)
|
|
1828
|
+
?.find((_) => _.code === regionKey)
|
|
1829
|
+
?.localities?.map((_) => ({ key: _, text: _ }));
|
|
1830
|
+
useEffect(() => {
|
|
1831
|
+
if (regionKey !== '') {
|
|
1832
|
+
field?.('localities')?.onChange?.('');
|
|
1833
|
+
}
|
|
1834
|
+
}, [regionKey]);
|
|
1835
|
+
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 }));
|
|
1836
|
+
});
|
|
1837
|
+
|
|
1788
1838
|
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] })));
|
|
1789
1839
|
|
|
1790
1840
|
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);
|
|
1791
1841
|
|
|
1792
|
-
const
|
|
1793
|
-
const
|
|
1794
|
-
return (jsx(
|
|
1795
|
-
? fieldPhone
|
|
1796
|
-
: withValidator(fieldPhone, validatorObj.secondaryPhone)) }));
|
|
1842
|
+
const PartnerCommentsField = JSX(({ field, input }) => {
|
|
1843
|
+
const { required, ...rest } = input;
|
|
1844
|
+
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 }));
|
|
1797
1845
|
});
|
|
1798
1846
|
|
|
1799
1847
|
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);
|
|
1800
1848
|
|
|
1801
|
-
const
|
|
1802
|
-
function useRegions() {
|
|
1803
|
-
const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
|
|
1804
|
-
return Array.isArray(data) ? data : [];
|
|
1805
|
-
}
|
|
1849
|
+
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) })));
|
|
1806
1850
|
|
|
1807
|
-
const RegionField = JSX(({ field, input }) => {
|
|
1808
|
-
const regions = useRegions();
|
|
1851
|
+
const RegionField = JSX(({ field, input, url }) => {
|
|
1852
|
+
const regions = useRegions(url);
|
|
1809
1853
|
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) }));
|
|
1810
1854
|
});
|
|
1811
1855
|
|
|
@@ -1818,6 +1862,13 @@
|
|
|
1818
1862
|
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) }));
|
|
1819
1863
|
});
|
|
1820
1864
|
|
|
1865
|
+
const SecondaryPhoneField = JSX(({ field }) => {
|
|
1866
|
+
const fieldPhone = field('secondaryPhone');
|
|
1867
|
+
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 ('
|
|
1868
|
+
? fieldPhone
|
|
1869
|
+
: withValidator(fieldPhone, validatorObj.secondaryPhone)) }));
|
|
1870
|
+
});
|
|
1871
|
+
|
|
1821
1872
|
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) })));
|
|
1822
1873
|
|
|
1823
1874
|
const MIN_CREDIT_TERM = 1;
|
|
@@ -1860,12 +1911,15 @@
|
|
|
1860
1911
|
fullName: (jsx(InputControl, { label: "\u0424\u0418\u041E", ...getValidation(field('fullName'), validatorObj.fullName, required), ...rest })),
|
|
1861
1912
|
inn: (jsx(InputControl, { label: "\u0418\u041D\u041D", type: "number", ...getValidation(field('inn'), validatorObj.inn, required) })),
|
|
1862
1913
|
comment: jsx(CommentField, { field: field, input: input }),
|
|
1863
|
-
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input })),
|
|
1914
|
+
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input, url: getRegionUrl(typeForm) })),
|
|
1864
1915
|
addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
|
|
1865
1916
|
birthday: (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, required) })),
|
|
1917
|
+
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) })),
|
|
1918
|
+
product: jsx(ProductField, { field: field }),
|
|
1919
|
+
localities: jsx(LocalitiesField, { field: field, input: input }),
|
|
1866
1920
|
isClient: jsx(IsClientField, { field: field }),
|
|
1867
1921
|
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" })),
|
|
1868
|
-
partnerComments:
|
|
1922
|
+
partnerComments: jsx(PartnerCommentsField, { field: field, input: input }),
|
|
1869
1923
|
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) })),
|
|
1870
1924
|
acquiringType: jsx(AcquiringField, { field: field, input: input }),
|
|
1871
1925
|
onlineCheckout: jsx(OnlineCheckoutField, { field: field }),
|
|
@@ -1884,11 +1938,6 @@
|
|
|
1884
1938
|
};
|
|
1885
1939
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name] }, String(i))) : null;
|
|
1886
1940
|
};
|
|
1887
|
-
function isRenderField({ input, field, }) {
|
|
1888
|
-
const { condition } = input;
|
|
1889
|
-
const { value } = field(condition?.name || '');
|
|
1890
|
-
return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
|
|
1891
|
-
}
|
|
1892
1941
|
|
|
1893
1942
|
const getPartnerComments = (data) => {
|
|
1894
1943
|
const { acquiringType, onlineCheckout = false, posTerminal = false, term, amount, annualRevenue, } = data;
|
|
@@ -2544,7 +2593,7 @@
|
|
|
2544
2593
|
const CalculatorStyle = {
|
|
2545
2594
|
wrapper: 'flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl',
|
|
2546
2595
|
input: 'flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl',
|
|
2547
|
-
result: 'flex flex-col gap-y-xl min-w-
|
|
2596
|
+
result: 'flex flex-col gap-y-xl min-w-52',
|
|
2548
2597
|
};
|
|
2549
2598
|
|
|
2550
2599
|
const FormatValue = JSX(({ value, fractionDigits, fixed, prefix, postfix }) => (jsx(Text, { size: "text-h3", children: typeof value === 'number'
|
|
@@ -2822,7 +2871,7 @@
|
|
|
2822
2871
|
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 })] })] }));
|
|
2823
2872
|
|
|
2824
2873
|
const getDefaultParamsMin = (rateRows) => getDefaultParams([(i, acc) => i < acc, (i, prev) => i?.maxSum > prev?.maxSum], rateRows);
|
|
2825
|
-
const getDefaultParamsMax = (rateRows) => getDefaultParams([(i, acc) => i > acc, (i, prev) => i?.minSum < prev?.minSum], rateRows);
|
|
2874
|
+
const getDefaultParamsMax = (rateRows = [], isNewClient = false) => getDefaultParams([(i, acc) => i > acc, (i, prev) => i?.minSum < prev?.minSum], rateRows?.filter((_) => isNewClient === Boolean(_?.isNewClient)));
|
|
2826
2875
|
const getDefaultParams = (comparators, rateRows) => {
|
|
2827
2876
|
if (!rateRows?.length) {
|
|
2828
2877
|
return undefined;
|
|
@@ -3036,8 +3085,6 @@
|
|
|
3036
3085
|
});
|
|
3037
3086
|
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] }));
|
|
3038
3087
|
|
|
3039
|
-
const isNotRubles = (currency = 'rub') => currency !== 'rub';
|
|
3040
|
-
|
|
3041
3088
|
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);
|
|
3042
3089
|
|
|
3043
3090
|
const mergeIntervals = (intervals) => {
|
|
@@ -3076,32 +3123,36 @@
|
|
|
3076
3123
|
const isExcludeRemoteRegistration = !paramsViewSettings?.isShowRemoteRegistration;
|
|
3077
3124
|
const isExcludeReplenish = !paramsViewSettings?.isShowReplenish;
|
|
3078
3125
|
const isExcludeWithdrawn = !paramsViewSettings?.isShowWithdrawn;
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3126
|
+
const isExcludeNewClient = !paramsViewSettings?.isShowNewClient;
|
|
3127
|
+
const depositCalculatorSourceBookParams = rows?.find((row) => [
|
|
3128
|
+
checkRowByParam({
|
|
3129
|
+
row,
|
|
3130
|
+
userInputParams,
|
|
3131
|
+
paramKey: 'isReplenish',
|
|
3132
|
+
isExclude: isExcludeReplenish,
|
|
3133
|
+
}),
|
|
3085
3134
|
checkRowByParam({
|
|
3086
3135
|
row,
|
|
3087
3136
|
userInputParams,
|
|
3088
3137
|
paramKey: 'isWithdrawn',
|
|
3089
3138
|
isExclude: isExcludeWithdrawn,
|
|
3090
|
-
})
|
|
3139
|
+
}),
|
|
3091
3140
|
checkRowByParam({
|
|
3092
3141
|
row,
|
|
3093
3142
|
userInputParams,
|
|
3094
3143
|
paramKey: 'isMonthlyInterestPayment',
|
|
3095
3144
|
isExclude: isExcludeMonthlyInterestPayment,
|
|
3096
|
-
})
|
|
3145
|
+
}),
|
|
3097
3146
|
checkRowByParam({
|
|
3098
3147
|
row,
|
|
3099
3148
|
userInputParams,
|
|
3100
3149
|
paramKey: 'isRemoteRegistration',
|
|
3101
3150
|
isExclude: isExcludeRemoteRegistration,
|
|
3102
|
-
})
|
|
3103
|
-
|
|
3104
|
-
checkRangeByKeys(
|
|
3151
|
+
}),
|
|
3152
|
+
isExcludeNewClient || userInputParams?.['isNewClient'] === row?.['isNewClient'],
|
|
3153
|
+
checkRangeByKeys(moneyValue, ['minSum', 'maxSum'], row),
|
|
3154
|
+
checkRangeByKeys(monthsValue || defaultMonth, ['minMonths', 'maxMonths'], row),
|
|
3155
|
+
].every(Boolean)) || DEFAULT_DEPOSIT_CALCULATOR_PARAMS;
|
|
3105
3156
|
const { rate } = depositCalculatorSourceBookParams;
|
|
3106
3157
|
const income = getDepositIncome(rate, userInputParams);
|
|
3107
3158
|
const finalSum = moneyValue + income;
|
|
@@ -3132,6 +3183,8 @@
|
|
|
3132
3183
|
const checkRowByParam = ({ row, userInputParams, paramKey, isExclude }) => isExclude || userInputParams[paramKey] === row[paramKey];
|
|
3133
3184
|
const getMiddleMonth = (minMonths, maxMonths) => minMonths + Math.round((maxMonths - minMonths) / 2);
|
|
3134
3185
|
|
|
3186
|
+
const isRubles = (currency = 'rub') => currency === 'rub';
|
|
3187
|
+
|
|
3135
3188
|
const renderRegistrationType = (props) => renderBinaryRadioButtonGroup({
|
|
3136
3189
|
...props,
|
|
3137
3190
|
items: [
|
|
@@ -3166,7 +3219,7 @@
|
|
|
3166
3219
|
],
|
|
3167
3220
|
disabled: isCurrency,
|
|
3168
3221
|
})
|
|
3169
|
-
: null] }),
|
|
3222
|
+
: null] }), renderSeparator(params.isShowReplenish || params.isShowWithdrawn), jsxs("div", { className: "flex gap-lg", children: [params.isShowMonthlyInterestPayment
|
|
3170
3223
|
? renderPayout({
|
|
3171
3224
|
title: 'Выплата процентов',
|
|
3172
3225
|
...field('isMonthlyInterestPayment'),
|
|
@@ -3180,9 +3233,31 @@
|
|
|
3180
3233
|
value: params.isRemoteRegistration,
|
|
3181
3234
|
orientation: 'vertical',
|
|
3182
3235
|
})
|
|
3183
|
-
: null] })] }));
|
|
3236
|
+
: 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] }));
|
|
3237
|
+
};
|
|
3238
|
+
const renderSeparator = (isShow = false) => isShow ? jsx("div", { className: "border-b border-main-divider w-full" }) : null;
|
|
3239
|
+
|
|
3240
|
+
const normalizeMonthValue = (_, rows) => {
|
|
3241
|
+
const { minMonths, maxMonths } = getRangeByKeys(['minMonths', 'maxMonths'], getRows(rows, _?.currency));
|
|
3242
|
+
const monthsValue = _.monthsValue || Math.round((minMonths + maxMonths) / 2);
|
|
3243
|
+
return { monthsValue: clamp(monthsValue, minMonths, maxMonths) };
|
|
3244
|
+
};
|
|
3245
|
+
const normalizeMoneyValue = (_, rows) => {
|
|
3246
|
+
const { minSum, maxSum } = getRangeByKeys(['minSum', 'maxSum'], getRows(rows, _?.currency));
|
|
3247
|
+
const moneyValue = _.moneyValue || minSum;
|
|
3248
|
+
return { moneyValue: clamp(moneyValue, minSum, maxSum) };
|
|
3249
|
+
};
|
|
3250
|
+
const normalizeCurrency = (_, rows) => ({
|
|
3251
|
+
currency: _?.currency ?? rows?.map((row) => row.currency)?.[0],
|
|
3252
|
+
});
|
|
3253
|
+
const normalizeReplenishWithdrawn = (_) => {
|
|
3254
|
+
const _isRubles = isRubles(_?.currency?.key);
|
|
3255
|
+
return { isReplenish: _isRubles && _?.isReplenish, isWithdrawn: _isRubles && _?.isWithdrawn };
|
|
3256
|
+
};
|
|
3257
|
+
const getRows = (rows, currencyValue) => {
|
|
3258
|
+
const { rates } = rows?.find((_) => _?.currency.key === currencyValue?.key) ?? {};
|
|
3259
|
+
return rates ?? rows?.[0]?.rates;
|
|
3184
3260
|
};
|
|
3185
|
-
const separatorStyles = (isShow = false) => isShow ? jsx("div", { className: "border-b border-main-divider w-full" }) : null;
|
|
3186
3261
|
|
|
3187
3262
|
const MAP = {
|
|
3188
3263
|
isMonthlyInterestPayment: 'isMonthlyInterestPayment',
|
|
@@ -3196,67 +3271,49 @@
|
|
|
3196
3271
|
key: 'rub',
|
|
3197
3272
|
};
|
|
3198
3273
|
const DEPOSIT_DEFAULT_SUM = 20000;
|
|
3274
|
+
const DEPOSIT_DEFAULT_MONTHS = 1;
|
|
3199
3275
|
const CalculatorDeposit = UniBlock(({ className, title, calcSource, buttons = [], footnote = '', paramsViewSettings, defaultParams, ...rest }) => {
|
|
3200
3276
|
const { rows } = calcSource ?? {};
|
|
3201
3277
|
const currencyOptions = rows?.map((_) => _.currency) ?? [DEFAULT_CURRENCY];
|
|
3278
|
+
const normalize = useCallback((_) => !rows
|
|
3279
|
+
? _
|
|
3280
|
+
: {
|
|
3281
|
+
..._,
|
|
3282
|
+
...normalizeReplenishWithdrawn(_),
|
|
3283
|
+
...normalizeMoneyValue(_, rows),
|
|
3284
|
+
...normalizeMonthValue(_, rows),
|
|
3285
|
+
...normalizeCurrency(_, rows),
|
|
3286
|
+
}, [rows]);
|
|
3202
3287
|
const [userInputParams, { field }] = useForm({
|
|
3203
3288
|
moneyValue: getMoneyDefaultValue(defaultParams, DEPOSIT_DEFAULT_SUM),
|
|
3204
|
-
monthsValue: getMonthsDefaultValue(defaultParams),
|
|
3289
|
+
monthsValue: getMonthsDefaultValue(defaultParams, DEPOSIT_DEFAULT_MONTHS),
|
|
3205
3290
|
isMonthlyInterestPayment: Boolean(defaultParams?.isMonthlyInterestPayment),
|
|
3206
3291
|
isRemoteRegistration: Boolean(defaultParams?.isRemoteRegistration),
|
|
3207
3292
|
isReplenish: Boolean(defaultParams?.isReplenish),
|
|
3208
3293
|
isWithdrawn: Boolean(defaultParams?.isWithdrawn),
|
|
3294
|
+
isNewClient: Boolean(defaultParams?.isNewClient),
|
|
3209
3295
|
currency: DEFAULT_CURRENCY,
|
|
3210
|
-
});
|
|
3211
|
-
const currencyValue = field?.('currency')?.value;
|
|
3212
|
-
const
|
|
3213
|
-
const { onChange: setMoneyValue } = field('moneyValue');
|
|
3296
|
+
}, { normalize });
|
|
3297
|
+
const currencyValue = field?.('currency')?.value ?? DEFAULT_CURRENCY;
|
|
3298
|
+
const isNewClient = field?.('isNewClient')?.value;
|
|
3214
3299
|
const row = getRows(rows, currencyValue);
|
|
3215
|
-
const
|
|
3216
|
-
const
|
|
3217
|
-
useEffect(() => {
|
|
3218
|
-
if (currencyOptions?.[0]) {
|
|
3219
|
-
field?.('currency')?.onChange?.(currencyOptions?.[0]);
|
|
3220
|
-
}
|
|
3221
|
-
}, [calcSource]);
|
|
3300
|
+
const calcParams = getDepositCalculatorParams(userInputParams, row, paramsViewSettings);
|
|
3301
|
+
const { rate, income, finalSum, type = '' } = calcParams;
|
|
3222
3302
|
const handleDefaultParamsCals = () => {
|
|
3223
3303
|
setDefaultParamsCalc({
|
|
3224
3304
|
field,
|
|
3225
|
-
defParams:
|
|
3305
|
+
defParams: getDefaultParamsMax(row, isNewClient),
|
|
3226
3306
|
calcParams,
|
|
3227
3307
|
monthsValue: 'minMonths',
|
|
3228
3308
|
map: MAP,
|
|
3229
3309
|
});
|
|
3230
3310
|
};
|
|
3231
|
-
const { defaultMonth, rate, income, finalSum, type = '' } = calcParams;
|
|
3232
|
-
useEffect(() => {
|
|
3233
|
-
setDefParams(getDefaultParamsMax(row));
|
|
3234
|
-
}, [currencyValue, rows]);
|
|
3235
|
-
useEffect(() => {
|
|
3236
|
-
!userInputParams.monthsValue && setMonthsValue && setMonthsValue(defaultMonth);
|
|
3237
|
-
}, [defaultMonth]);
|
|
3238
|
-
useEffect(() => {
|
|
3239
|
-
setMoneyValue &&
|
|
3240
|
-
setMoneyValue(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
|
|
3241
|
-
}, [calcParams.minSum, calcParams.maxSum, row]);
|
|
3242
3311
|
useEffect(() => {
|
|
3243
|
-
if (!isDefaultParams(defaultParams) &&
|
|
3312
|
+
if (!isDefaultParams(defaultParams) && row) {
|
|
3244
3313
|
handleDefaultParamsCals();
|
|
3245
3314
|
}
|
|
3246
|
-
}, [
|
|
3247
|
-
|
|
3248
|
-
setMoneyValue?.(clamp(userInputParams.moneyValue, calcParams.minSum, calcParams.maxSum));
|
|
3249
|
-
if (isNotRubles(currencyValue?.key)) {
|
|
3250
|
-
field?.('isReplenish')?.onChange?.(false);
|
|
3251
|
-
field?.('isWithdrawn')?.onChange?.(false);
|
|
3252
|
-
}
|
|
3253
|
-
}, [currencyValue]);
|
|
3254
|
-
useEffect(() => {
|
|
3255
|
-
if (!isDefaultParams(defaultParams) && defParams) {
|
|
3256
|
-
handleDefaultParamsCals();
|
|
3257
|
-
}
|
|
3258
|
-
}, [defaultParams, row, defParams]);
|
|
3259
|
-
const isMaxRate = rate === defParams?.rate;
|
|
3315
|
+
}, [defaultParams, rows]);
|
|
3316
|
+
const isMaxRate = rate === getDefaultParamsMax(row, isNewClient)?.rate;
|
|
3260
3317
|
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({
|
|
3261
3318
|
className: 'w-full',
|
|
3262
3319
|
title: `Сумма, ${currencyValue?.text}`,
|
|
@@ -3285,17 +3342,13 @@
|
|
|
3285
3342
|
isCapitalization: field('isMonthlyInterestPayment').value,
|
|
3286
3343
|
})] }) }));
|
|
3287
3344
|
});
|
|
3288
|
-
const getStep = (key = '') => (
|
|
3345
|
+
const getStep = (key = '') => (isRubles(key) ? 1000 : 100);
|
|
3289
3346
|
const getTariffButton = (buttons = [], btnType = '') => {
|
|
3290
3347
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3291
3348
|
const { type, ...button } = buttons.find((_) => _.type === btnType) ?? {};
|
|
3292
3349
|
return button;
|
|
3293
3350
|
};
|
|
3294
3351
|
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" }));
|
|
3295
|
-
const getRows = (rows, currencyValue) => {
|
|
3296
|
-
const { rates } = rows?.find((_) => _?.currency.key === currencyValue?.key) ?? {};
|
|
3297
|
-
return rates ?? rows?.[0]?.rates;
|
|
3298
|
-
};
|
|
3299
3352
|
|
|
3300
3353
|
const checkRefinancingSourceBookRowCommonParams = (props) => checkRowParam({
|
|
3301
3354
|
...props,
|
|
@@ -6500,7 +6553,7 @@
|
|
|
6500
6553
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6501
6554
|
});
|
|
6502
6555
|
|
|
6503
|
-
const packageVersion = "0.14.
|
|
6556
|
+
const packageVersion = "0.14.548";
|
|
6504
6557
|
|
|
6505
6558
|
exports.Blocks = Blocks;
|
|
6506
6559
|
exports.ContentPage = ContentPage;
|