@redneckz/wildless-cms-uni-blocks 0.14.714 → 0.14.716
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/bundle.umd.js +68 -51
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/bundle/ui-kit/Button/Button.d.ts +1 -0
- package/bundle/ui-kit/Loader/Loader.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/renderSubmitButton.js +1 -1
- package/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStep.js +2 -2
- package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +7 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStep.js +2 -2
- package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/dist/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +7 -1
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/ui-kit/Button/Button.d.ts +1 -0
- package/dist/ui-kit/Button/Button.js +6 -5
- package/dist/ui-kit/Button/Button.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js +9 -1
- package/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +3 -3
- package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/dist/ui-kit/Loader/Loader.d.ts +1 -0
- package/dist/ui-kit/Loader/Loader.js +2 -2
- package/dist/ui-kit/Loader/Loader.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +5 -4
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/lib/components/ApplicationLeadForm/renderSubmitButton.js +1 -1
- package/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStep.js +2 -2
- package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +7 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStep.js +2 -2
- package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/lib/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +7 -1
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/ui-kit/Button/Button.d.ts +1 -0
- package/lib/ui-kit/Button/Button.js +7 -6
- package/lib/ui-kit/Button/Button.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js +9 -1
- package/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +3 -3
- package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/lib/ui-kit/Loader/Loader.d.ts +1 -0
- package/lib/ui-kit/Loader/Loader.js +2 -2
- package/lib/ui-kit/Loader/Loader.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +5 -4
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +68 -51
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/mobile/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/bundle/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/bundle/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/mobile/bundle/ui-kit/Button/Button.d.ts +1 -0
- package/mobile/bundle/ui-kit/Loader/Loader.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +2 -2
- package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +7 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStep.js +2 -2
- package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +7 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/ui-kit/Button/Button.d.ts +1 -0
- package/mobile/dist/ui-kit/Button/Button.js +6 -5
- package/mobile/dist/ui-kit/Button/Button.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js +9 -1
- package/mobile/dist/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +3 -3
- package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/dist/ui-kit/Loader/Loader.d.ts +1 -0
- package/mobile/dist/ui-kit/Loader/Loader.js +2 -2
- package/mobile/dist/ui-kit/Loader/Loader.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +5 -4
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.d.ts +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +10 -7
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +2 -2
- package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.d.ts +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +7 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStep.js +2 -2
- package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +1 -0
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.d.ts +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +7 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/ui-kit/Button/Button.d.ts +1 -0
- package/mobile/lib/ui-kit/Button/Button.js +7 -6
- package/mobile/lib/ui-kit/Button/Button.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js +9 -1
- package/mobile/lib/ui-kit/FormField/Fields/Experience5YearsField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +3 -3
- package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
- package/mobile/lib/ui-kit/Loader/Loader.d.ts +1 -0
- package/mobile/lib/ui-kit/Loader/Loader.js +2 -2
- package/mobile/lib/ui-kit/Loader/Loader.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +5 -4
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/renderSubmitButton.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +12 -7
- package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -2
- package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +17 -12
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +7 -2
- package/mobile/src/components/CreditForm/CreditFormStep.tsx +2 -2
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +17 -12
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +7 -2
- package/mobile/src/ui-kit/Button/Button.tsx +7 -3
- package/mobile/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +24 -10
- package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +7 -5
- package/mobile/src/ui-kit/Loader/Loader.tsx +5 -3
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +5 -4
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/src/components/ApplicationLeadForm/renderSubmitButton.tsx +2 -2
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +12 -7
- package/src/components/CreditCardForm/CreditCardFormStep.tsx +2 -2
- package/src/components/CreditCardForm/StepsNavigationButtons.tsx +17 -12
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +7 -2
- package/src/components/CreditForm/CreditFormStep.tsx +2 -2
- package/src/components/CreditForm/StepsNavigationButtons.tsx +17 -12
- package/src/components/CreditForm/useCreditFormAPI.tsx +7 -2
- package/src/ui-kit/Button/Button.tsx +7 -3
- package/src/ui-kit/FormField/Fields/Experience5YearsField.tsx +24 -10
- package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +7 -5
- package/src/ui-kit/Loader/Loader.tsx +5 -3
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVerifyPhoneDialogSubmit.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAO1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,MAAM,EACN,SAAS,GACuB,EAAE,EAAE;IACpC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"useVerifyPhoneDialogSubmit.js","sourceRoot":"","sources":["../../../src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAO1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,MAAM,EACN,SAAS,GACuB,EAAE,EAAE;IACpC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACpF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAE3D,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,KAAK,CAAC,IAAI,cAAc,CAAC,CAAC;IACnE,MAAM,sBAAsB,GAAG,QAAQ,GAAG,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAEvF,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1C,IAAI;YACF,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,cAAc,CAAC,CAAC,CAAC,CAAC;YAClB,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1B,YAAY,EAAE,CAAC;YACf,MAAM,SAAS,CAAC;gBACd,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,eAAe,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE;aAC3C,CAAC,CAAC;YACH,UAAU,EAAE,CAAC;YACb,MAAM,SAAS,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;SACpC;QAAC,MAAM;YACN,YAAY,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SAC/E;gBAAS;YACR,UAAU,EAAE,CAAC;SACd;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,OAAO;QACL,YAAY;QACZ,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC;QAC5B,SAAS;QACT,SAAS;QACT,WAAW;QACX,sBAAsB;QACtB,cAAc;QACd,iBAAiB;QACjB,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1988,9 +1988,9 @@
|
|
|
1988
1988
|
return (jsx(CheckboxWithError, { text: "\u0410\u0434\u0440\u0435\u0441 \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043C\u0435\u0441\u0442\u0430 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438", ...getValidation(field('addressMatch'), validatorObj.addressMatch, input?.required) }));
|
|
1989
1989
|
});
|
|
1990
1990
|
|
|
1991
|
-
const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
|
|
1991
|
+
const Loader = JSX(({ color = 'text-primary-main', position = 'absolute', blur = true, size = 'big' }) => (jsx("div", { className: style('flex justify-center items-center h-full w-full z-50', position, {
|
|
1992
1992
|
'backdrop-blur': blur,
|
|
1993
|
-
}), children: jsx("div", { className: style('inline-block
|
|
1993
|
+
}), children: jsx("div", { className: style('inline-block ', 'animate-spin rounded-full', 'border-solid border-current', 'border-r-transparent', size === 'small' ? 'border-4 h-8 w-8' : 'border-8 h-28 w-28', color), role: "status" }) })));
|
|
1994
1994
|
|
|
1995
1995
|
const MapMarkerClusterIcon = '/icons/MapMarkerClusterIcon.svg';
|
|
1996
1996
|
const MapMarkerClusterYellowIcon = '/icons/MapMarkerClusterYellowIcon.svg';
|
|
@@ -3131,8 +3131,8 @@
|
|
|
3131
3131
|
|
|
3132
3132
|
const BirthdayField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, input?.required) })));
|
|
3133
3133
|
|
|
3134
|
-
const FIELD_NAME$
|
|
3135
|
-
const BirthPlaceField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthPlace'), validatorObj.birthPlace, input?.required), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$
|
|
3134
|
+
const FIELD_NAME$b = 'birthPlace';
|
|
3135
|
+
const BirthPlaceField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthPlace'), validatorObj.birthPlace, input?.required), ...input, disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$b) })));
|
|
3136
3136
|
|
|
3137
3137
|
const getCardTypes = async (paymentSystemTypeCd, creditProgramId) => {
|
|
3138
3138
|
const data = await fetchRetailJSON('/dictionaryFiltered', 'POST', {
|
|
@@ -3255,14 +3255,14 @@
|
|
|
3255
3255
|
};
|
|
3256
3256
|
const Button = JSX(({ children, ...props }) => {
|
|
3257
3257
|
const button = useButton();
|
|
3258
|
-
const { className, version = 'primary', active, disabled, type = 'button', rounded = true, role, onClick, } = button(props);
|
|
3259
|
-
return (
|
|
3258
|
+
const { className, version = 'primary', active, disabled, isLoading, type = 'button', rounded = true, role, onClick, } = button(props);
|
|
3259
|
+
return (jsxs("button", { className: style('font-sans px-9 py-4', 'flex justify-center items-center gap-xs relative', {
|
|
3260
3260
|
'text-white bg-primary-active': active,
|
|
3261
|
-
'bg-main-gray text-main-disabled cursor-not-allowed': disabled,
|
|
3261
|
+
'bg-main-gray text-main-disabled cursor-not-allowed': disabled || isLoading,
|
|
3262
3262
|
'rounded-md': rounded,
|
|
3263
|
-
}, !active && !disabled
|
|
3263
|
+
}, !active && !disabled && !isLoading
|
|
3264
3264
|
? style(buttonStyleMap[version], secondaryButtonStyleMap[version])
|
|
3265
|
-
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
3265
|
+
: '', className), type: type, role: role, onClick: onClick, children: [isLoading ? jsx(Loader, { blur: true, size: "small" }) : null, children] }));
|
|
3266
3266
|
});
|
|
3267
3267
|
|
|
3268
3268
|
const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", type: "button", children: jsx(Icon, { name: "CloseIcon", width: "20", height: "20", iconVersion: "gray" }) })));
|
|
@@ -3595,12 +3595,12 @@
|
|
|
3595
3595
|
};
|
|
3596
3596
|
const swap = (_) => Object.fromEntries(Object.entries(_).map(([k, v]) => [v, k]));
|
|
3597
3597
|
|
|
3598
|
-
const FIELD_NAME$
|
|
3598
|
+
const FIELD_NAME$a = 'calculator';
|
|
3599
3599
|
const CreditCalcField = JSX(({ field, params }) => {
|
|
3600
3600
|
const handleChange = useCallback((_) => {
|
|
3601
|
-
field(FIELD_NAME$
|
|
3601
|
+
field(FIELD_NAME$a).onChange?.(_);
|
|
3602
3602
|
}, []);
|
|
3603
|
-
return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$
|
|
3603
|
+
return (jsx(CalculatorCredit, { ...params?.calcData, padding: "p-0", defaultParams: defaultValueAdapter(field(FIELD_NAME$a).value), onChange: handleChange }));
|
|
3604
3604
|
});
|
|
3605
3605
|
|
|
3606
3606
|
const LABEL_TEXT = `Имеет ли юридическое лицо, акционером / участником / членом / пайщиком /
|
|
@@ -3629,30 +3629,30 @@
|
|
|
3629
3629
|
|
|
3630
3630
|
const DisablePeopleFlgField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u042F\u0432\u043B\u044F\u044E\u0441\u044C \u0438\u043D\u0432\u0430\u043B\u0438\u0434\u043E\u043C", ...getValidation(field('disablePeopleFlg'), validatorObj.disablePeopleFlg, input?.required) })));
|
|
3631
3631
|
|
|
3632
|
-
const FIELD_NAME$
|
|
3633
|
-
const DulIssueDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...getValidation(field(FIELD_NAME$
|
|
3632
|
+
const FIELD_NAME$9 = 'dulIssueDateField';
|
|
3633
|
+
const DulIssueDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0432\u044B\u0434\u0430\u0447\u0438", ...getValidation(field(FIELD_NAME$9), validatorObj.dulIssueDateField, input?.required), disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$9) })));
|
|
3634
3634
|
|
|
3635
|
-
const FIELD_NAME$
|
|
3635
|
+
const FIELD_NAME$8 = 'dulIssuedBy';
|
|
3636
3636
|
const DulIssuedByField = JSX(({ field, input }) => {
|
|
3637
3637
|
const { value: dulSubdivisionCode, onChange: changeDulSubdivisionCode } = field('dulSubdivisionCode');
|
|
3638
3638
|
const onDaDataChange = useCallback((item) => {
|
|
3639
3639
|
changeDulSubdivisionCode?.(item?.data?.code?.replace('-', ''));
|
|
3640
3640
|
}, []);
|
|
3641
|
-
return (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$
|
|
3641
|
+
return (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$8), label: "\u041A\u0435\u043C \u0432\u044B\u0434\u0430\u043D", ...input, ...getValidation(field(FIELD_NAME$8), validatorObj.dulIssuedBy, input?.required), onDaDataChange: onDaDataChange, daDataQueryPrefix: dulSubdivisionCode }));
|
|
3642
3642
|
});
|
|
3643
3643
|
|
|
3644
|
-
const FIELD_NAME$
|
|
3645
|
-
const DulNumberField = JSX(({ field, input }) => (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$
|
|
3644
|
+
const FIELD_NAME$7 = 'dulNumber';
|
|
3645
|
+
const DulNumberField = JSX(({ field, input }) => (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$7), label: "\u041D\u043E\u043C\u0435\u0440 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 6, ...getValidation(field('dulNumber'), validatorObj.dulNumber, input?.required) })));
|
|
3646
3646
|
|
|
3647
|
-
const FIELD_NAME$
|
|
3648
|
-
const DulSerieField = JSX(({ field, input }) => (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$
|
|
3647
|
+
const FIELD_NAME$6 = 'dulSerie';
|
|
3648
|
+
const DulSerieField = JSX(({ field, input }) => (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$6), label: "\u0421\u0435\u0440\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430", isInteger: true, maxLength: 4, ...getValidation(field('dulSerie'), validatorObj.dulSerie, input?.required) })));
|
|
3649
3649
|
|
|
3650
|
-
const FIELD_NAME$
|
|
3650
|
+
const FIELD_NAME$5 = 'dulSubdivisionCode';
|
|
3651
3651
|
const DulSubdivisionCodeField = JSX(({ field, input }) => {
|
|
3652
3652
|
const onDaDataChange = useCallback((item) => {
|
|
3653
3653
|
field?.('dulIssuedBy')?.onChange?.(item?.data?.name);
|
|
3654
3654
|
}, []);
|
|
3655
|
-
return (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$
|
|
3655
|
+
return (jsx(InputControl, { disabled: input?.filledByEsia && isEsiaAuthorize(field, FIELD_NAME$5), label: "\u041A\u043E\u0434 \u043F\u043E\u0434\u0440\u0430\u0437\u0434\u0435\u043B\u0435\u043D\u0438\u044F", isInteger: true, maxLength: 6, ...input, ...getValidation(field(FIELD_NAME$5), validatorObj.dulSubdivisionCode, input?.required), onDaDataChange: onDaDataChange }));
|
|
3656
3656
|
});
|
|
3657
3657
|
|
|
3658
3658
|
const EducationField = JSX(({ field, input }) => {
|
|
@@ -3694,7 +3694,13 @@
|
|
|
3694
3694
|
|
|
3695
3695
|
const ExpensesField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0440\u0430\u0441\u0445\u043E\u0434\u044B \u0432 \u043C\u0435\u0441\u044F\u0446", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('expenses'), validatorObj.expenses, input?.required), ...input })));
|
|
3696
3696
|
|
|
3697
|
-
const
|
|
3697
|
+
const FIELD_NAME$4 = 'experience5Years';
|
|
3698
|
+
const MAX_YEARS = 5;
|
|
3699
|
+
const MIN_YEARS = 0;
|
|
3700
|
+
const Experience5YearsField = JSX(({ field, input }) => {
|
|
3701
|
+
const onChange = useCallback((value) => field(FIELD_NAME$4)?.onChange?.(String(clamp(Number(value), MIN_YEARS, MAX_YEARS))), []);
|
|
3702
|
+
return (jsx(InputControl, { label: "\u0421\u0442\u0430\u0436", placeholder: "\u0417\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 5 \u043B\u0435\u0442", type: "number", ...getValidation(field(FIELD_NAME$4), validatorObj[FIELD_NAME$4], input?.required), ...input, onChange: onChange }));
|
|
3703
|
+
});
|
|
3698
3704
|
|
|
3699
3705
|
const FamilyMembersField = JSX(({ field }) => {
|
|
3700
3706
|
const { value, onChange } = field('familyMembers');
|
|
@@ -3946,11 +3952,10 @@
|
|
|
3946
3952
|
const ParticipantDateRegistrationField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0441\u0442\u0443 \u0436\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430", ...getValidation(field('participantDateRegistration'), validatorObj.participantDateRegistration, input?.required) })));
|
|
3947
3953
|
|
|
3948
3954
|
const MAX_PART = 100;
|
|
3955
|
+
const MIN_PART = 0;
|
|
3949
3956
|
const FIELD_NAME$1 = 'partInBusiness';
|
|
3950
3957
|
const PartInBusinessField = JSX(({ field, input }) => {
|
|
3951
|
-
const onChange = useCallback((value) =>
|
|
3952
|
-
field(FIELD_NAME$1)?.onChange?.(String(Number(value) > MAX_PART ? MAX_PART : Number(value) || ''));
|
|
3953
|
-
}, []);
|
|
3958
|
+
const onChange = useCallback((value) => field(FIELD_NAME$1)?.onChange?.(String(clamp(Number(value), MIN_PART, MAX_PART))), []);
|
|
3954
3959
|
return (jsx(InputControl, { label: "\u0414\u043E\u043B\u044F \u0443\u0447\u0430\u0441\u0442\u0438\u044F \u0432 \u0431\u0438\u0437\u043D\u0435\u0441\u0435", placeholder: "\u0432 %", isInteger: true, maxLength: 3, ...getValidation(field(FIELD_NAME$1), validatorObj.partInBusiness, input?.required), ...input, onChange: onChange }));
|
|
3955
3960
|
});
|
|
3956
3961
|
|
|
@@ -4478,7 +4483,7 @@
|
|
|
4478
4483
|
},
|
|
4479
4484
|
];
|
|
4480
4485
|
|
|
4481
|
-
const renderSubmitButton = (button,
|
|
4486
|
+
const renderSubmitButton = (button, isSending) => (jsx(Button, { className: style('w-full @xl:w-auto'), type: "submit", isLoading: isSending, children: button?.text ? button.text : 'Отправить заявку' }));
|
|
4482
4487
|
|
|
4483
4488
|
const createDraftTask = async (body) => {
|
|
4484
4489
|
const res = await fetchRetailJSON('/user-data/createDraftTask', 'POST', body);
|
|
@@ -4659,7 +4664,7 @@
|
|
|
4659
4664
|
|
|
4660
4665
|
const useVerifyPhoneDialogSubmit = ({ values, onSuccess, }) => {
|
|
4661
4666
|
const [errorText, setErrorText] = useState('');
|
|
4662
|
-
const [isLoading,
|
|
4667
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4663
4668
|
const [timeNextReq, setTimeNextReq] = useState(0);
|
|
4664
4669
|
const [isTimerStarted, setIsTimerStarted] = useState(false);
|
|
4665
4670
|
const [attempts, setAttempts] = useState(0);
|
|
@@ -4671,19 +4676,19 @@
|
|
|
4671
4676
|
setIsTimerStarted(false);
|
|
4672
4677
|
setTimeNextReq(0);
|
|
4673
4678
|
setAttempts((_) => _ + 1);
|
|
4674
|
-
|
|
4679
|
+
startLoading();
|
|
4675
4680
|
await checkCode({
|
|
4676
4681
|
smsText: values.join(''),
|
|
4677
4682
|
smsCodesSetName: { key: 'AUTHENTICATION' },
|
|
4678
4683
|
});
|
|
4679
4684
|
resetError();
|
|
4680
|
-
onSuccess?.(values.join(''));
|
|
4685
|
+
await onSuccess?.(values.join(''));
|
|
4681
4686
|
}
|
|
4682
4687
|
catch {
|
|
4683
4688
|
setErrorText(attempts > 1 ? 'Исчерпан лимит ввода смс-кода' : 'Неверный код');
|
|
4684
4689
|
}
|
|
4685
4690
|
finally {
|
|
4686
|
-
|
|
4691
|
+
endLoading();
|
|
4687
4692
|
}
|
|
4688
4693
|
}, [values, attempts]);
|
|
4689
4694
|
useEffect(() => {
|
|
@@ -5134,6 +5139,7 @@
|
|
|
5134
5139
|
|
|
5135
5140
|
const useApplicationLeadApi = ({ inputs, programId, nextStepLink, }) => {
|
|
5136
5141
|
const [responseStatus, setResponseStatus] = useState('');
|
|
5142
|
+
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
5137
5143
|
const saveUserData = useSaveUserData();
|
|
5138
5144
|
const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
|
|
5139
5145
|
const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
|
|
@@ -5145,6 +5151,7 @@
|
|
|
5145
5151
|
return;
|
|
5146
5152
|
}
|
|
5147
5153
|
try {
|
|
5154
|
+
startSending();
|
|
5148
5155
|
const profileId = await createUserProfile({
|
|
5149
5156
|
profile: { phone: formatPhone(formData.phone) },
|
|
5150
5157
|
});
|
|
@@ -5161,10 +5168,7 @@
|
|
|
5161
5168
|
};
|
|
5162
5169
|
const handleSuccessVerify = async () => {
|
|
5163
5170
|
try {
|
|
5164
|
-
const lastTaskId = await getLastTaskStatus({
|
|
5165
|
-
profileId,
|
|
5166
|
-
programId,
|
|
5167
|
-
});
|
|
5171
|
+
const lastTaskId = await getLastTaskStatus({ profileId, programId });
|
|
5168
5172
|
if (lastTaskId) {
|
|
5169
5173
|
const task = await getTaskById({ taskId: lastTaskId });
|
|
5170
5174
|
verifyPhoneDialog.close();
|
|
@@ -5182,14 +5186,13 @@
|
|
|
5182
5186
|
setResponseStatus('Fail');
|
|
5183
5187
|
}
|
|
5184
5188
|
};
|
|
5185
|
-
const acceptedConsents =
|
|
5186
|
-
.filter((_) => formData[_])
|
|
5187
|
-
.map((_) => CONSENTS[_]?.text);
|
|
5189
|
+
const acceptedConsents = getAcceptedConsents(formData);
|
|
5188
5190
|
verifyPhoneDialog.open({
|
|
5189
5191
|
phone: formData?.phone,
|
|
5190
5192
|
consents: acceptedConsents,
|
|
5191
5193
|
onSuccess: handleSuccessVerify,
|
|
5192
5194
|
});
|
|
5195
|
+
endSending();
|
|
5193
5196
|
}
|
|
5194
5197
|
}
|
|
5195
5198
|
catch {
|
|
@@ -5199,8 +5202,12 @@
|
|
|
5199
5202
|
return {
|
|
5200
5203
|
handleSubmit,
|
|
5201
5204
|
responseStatus,
|
|
5205
|
+
isSending,
|
|
5202
5206
|
};
|
|
5203
5207
|
};
|
|
5208
|
+
const getAcceptedConsents = (formData) => Object.keys(CONSENTS)
|
|
5209
|
+
.filter((_) => formData[_])
|
|
5210
|
+
.map((_) => CONSENTS[_]?.text);
|
|
5204
5211
|
const updateUserData = async ({ programId, profileId, formData, saveUserData, }) => {
|
|
5205
5212
|
const transformedForm = transformOtherConsentsField(formData);
|
|
5206
5213
|
await updateUserProfile(getUpdateUserProfileData(profileId, transformedForm));
|
|
@@ -5387,7 +5394,7 @@
|
|
|
5387
5394
|
const ApplicationLeadForm = JSX(({ className, title, programId = '', nextStepLink = '/credit-lead', button, ...rest }) => {
|
|
5388
5395
|
const inputs = useMemo(() => (applicationFormData?.flatMap((_) => _?.inputs) || []), [applicationFormData]);
|
|
5389
5396
|
const [initialFormState, { isLoading }] = useInitApplicationLead(inputs, nextStepLink);
|
|
5390
|
-
const { handleSubmit, responseStatus } = useApplicationLeadApi({
|
|
5397
|
+
const { handleSubmit, responseStatus, isSending } = useApplicationLeadApi({
|
|
5391
5398
|
inputs,
|
|
5392
5399
|
programId,
|
|
5393
5400
|
nextStepLink,
|
|
@@ -5399,7 +5406,7 @@
|
|
|
5399
5406
|
responseTypeDialog.open({ responseType: responseStatus });
|
|
5400
5407
|
}
|
|
5401
5408
|
}, [responseStatus]);
|
|
5402
|
-
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$2({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
5409
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, applicationFormData.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$2({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button, isSending)] }) }));
|
|
5403
5410
|
});
|
|
5404
5411
|
|
|
5405
5412
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -6970,10 +6977,10 @@
|
|
|
6970
6977
|
});
|
|
6971
6978
|
const getValue$3 = (field) => (name) => field(name)?.value;
|
|
6972
6979
|
|
|
6973
|
-
const StepsNavigationButtons$1 = JSX(({ step, onPrevStep }) => {
|
|
6980
|
+
const StepsNavigationButtons$1 = JSX(({ step, isSending, onPrevStep }) => {
|
|
6974
6981
|
const isFirstStep = step === 0;
|
|
6975
6982
|
const isFinalStep = step === 5;
|
|
6976
|
-
return (jsxs("div", { className: "flex justify-between gap-m", children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
6983
|
+
return (jsxs("div", { className: "flex justify-between gap-m", children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { isLoading: isSending, type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
6977
6984
|
});
|
|
6978
6985
|
|
|
6979
6986
|
const getAdditionalInfoData = (formData) => {
|
|
@@ -7263,6 +7270,7 @@
|
|
|
7263
7270
|
};
|
|
7264
7271
|
|
|
7265
7272
|
const useCreditCardFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
7273
|
+
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
7266
7274
|
const isFinalStep = step === 5;
|
|
7267
7275
|
const retailFormStore = useRetailFormStore();
|
|
7268
7276
|
const initialState = useMemo(() => getInitialFormState$1(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
@@ -7287,6 +7295,7 @@
|
|
|
7287
7295
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
7288
7296
|
return;
|
|
7289
7297
|
}
|
|
7298
|
+
startSending();
|
|
7290
7299
|
retailFormStore.leadForm = formData;
|
|
7291
7300
|
try {
|
|
7292
7301
|
const { taskId, profileId, participantId } = retailFormStore;
|
|
@@ -7308,21 +7317,24 @@
|
|
|
7308
7317
|
catch (ex) {
|
|
7309
7318
|
// Do nothing
|
|
7310
7319
|
}
|
|
7320
|
+
finally {
|
|
7321
|
+
endSending();
|
|
7322
|
+
}
|
|
7311
7323
|
}, [isFinalStep, resetForm]);
|
|
7312
|
-
return [initialState, handleSubmit];
|
|
7324
|
+
return [initialState, handleSubmit, isSending];
|
|
7313
7325
|
};
|
|
7314
7326
|
const getValue$2 = (formData) => (name) => formData[name];
|
|
7315
7327
|
|
|
7316
7328
|
const CreditCardFormStep = JSX(({ step, sections, isFormFinished, onPrevStep, onNextStep, onFinish }) => {
|
|
7317
7329
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
7318
|
-
const [initialState, onSubmit] = useCreditCardFormAPI({
|
|
7330
|
+
const [initialState, onSubmit, isSending] = useCreditCardFormAPI({
|
|
7319
7331
|
step,
|
|
7320
7332
|
inputs,
|
|
7321
7333
|
onNextStep,
|
|
7322
7334
|
onFinish,
|
|
7323
7335
|
});
|
|
7324
7336
|
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
7325
|
-
return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step }), jsx(StepsNavigationButtons$1, { step: step, onPrevStep: onPrevStep })] }));
|
|
7337
|
+
return isFormFinished ? (jsx(CreditCardFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep$1({ sections, field, step }), jsx(StepsNavigationButtons$1, { isSending: isSending, step: step, onPrevStep: onPrevStep })] }));
|
|
7326
7338
|
});
|
|
7327
7339
|
|
|
7328
7340
|
const PERSONAL_INFO_CONTENT = [
|
|
@@ -7920,10 +7932,10 @@
|
|
|
7920
7932
|
});
|
|
7921
7933
|
const getValue$1 = (field) => (name) => field(name)?.value;
|
|
7922
7934
|
|
|
7923
|
-
const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
|
|
7935
|
+
const StepsNavigationButtons = JSX(({ step, onPrevStep, isSending }) => {
|
|
7924
7936
|
const isFirstStep = step === 0;
|
|
7925
7937
|
const isFinalStep = step === 5;
|
|
7926
|
-
return (jsxs("div", { className: 'flex justify-between gap-m', children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
7938
|
+
return (jsxs("div", { className: 'flex justify-between gap-m', children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", isLoading: isSending, children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
7927
7939
|
});
|
|
7928
7940
|
|
|
7929
7941
|
const PAYMENT_TYPE_DATA = {
|
|
@@ -8102,6 +8114,7 @@
|
|
|
8102
8114
|
};
|
|
8103
8115
|
|
|
8104
8116
|
const useCreditFormAPI = ({ step, inputs, onNextStep, onFinish, }) => {
|
|
8117
|
+
const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
|
|
8105
8118
|
const isFinalStep = step === 5;
|
|
8106
8119
|
const retailFormStore = useRetailFormStore();
|
|
8107
8120
|
const initialState = useMemo(() => getInitialFormState(step, retailFormStore.leadForm), [step, retailFormStore.leadForm]);
|
|
@@ -8126,6 +8139,7 @@
|
|
|
8126
8139
|
if (!isValidationSuccess(feedbackValidator(formData))) {
|
|
8127
8140
|
return;
|
|
8128
8141
|
}
|
|
8142
|
+
startSending();
|
|
8129
8143
|
retailFormStore.leadForm = formData;
|
|
8130
8144
|
try {
|
|
8131
8145
|
const { taskId, profileId, participantId } = retailFormStore;
|
|
@@ -8147,8 +8161,11 @@
|
|
|
8147
8161
|
catch (ex) {
|
|
8148
8162
|
// Do nothing
|
|
8149
8163
|
}
|
|
8164
|
+
finally {
|
|
8165
|
+
endSending();
|
|
8166
|
+
}
|
|
8150
8167
|
}, [isFinalStep, resetForm]);
|
|
8151
|
-
return [initialState, handleSubmit];
|
|
8168
|
+
return [initialState, handleSubmit, isSending];
|
|
8152
8169
|
};
|
|
8153
8170
|
const getValue = (formData) => (name) => formData[name];
|
|
8154
8171
|
|
|
@@ -8156,14 +8173,14 @@
|
|
|
8156
8173
|
const { programId } = useRetailFormStore();
|
|
8157
8174
|
const calcData = programsSource?.[programId ?? '']; // Need normalizator useForm, to be save defaultParams
|
|
8158
8175
|
const inputs = useMemo(() => (sections?.flatMap((_) => _?.inputs) || []), [sections]);
|
|
8159
|
-
const [initialState, onSubmit] = useCreditFormAPI({
|
|
8176
|
+
const [initialState, onSubmit, isSending] = useCreditFormAPI({
|
|
8160
8177
|
step,
|
|
8161
8178
|
inputs,
|
|
8162
8179
|
onNextStep,
|
|
8163
8180
|
onFinish,
|
|
8164
8181
|
});
|
|
8165
8182
|
const [, { field, onSubmit: handleSubmit }] = useForm(initialState, { onSubmit });
|
|
8166
|
-
return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons, { step: step, onPrevStep: onPrevStep })] }));
|
|
8183
|
+
return isFormFinished ? (jsx(CreditFormStatusTracker, {})) : (jsxs("form", { onSubmit: handleSubmit, className: "space-y-m", children: [renderStep({ sections, field, step, params: { calcData } }), jsx(StepsNavigationButtons, { step: step, isSending: isSending, onPrevStep: onPrevStep })] }));
|
|
8167
8184
|
});
|
|
8168
8185
|
|
|
8169
8186
|
const stepsSectionsMap = [
|
|
@@ -10106,7 +10123,7 @@
|
|
|
10106
10123
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10107
10124
|
});
|
|
10108
10125
|
|
|
10109
|
-
const packageVersion = "0.14.
|
|
10126
|
+
const packageVersion = "0.14.715";
|
|
10110
10127
|
|
|
10111
10128
|
exports.Blocks = Blocks;
|
|
10112
10129
|
exports.ContentPage = ContentPage;
|