@wix/form-public 0.23.0 → 0.24.0
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/dist/index.cjs +3 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -20512,8 +20512,7 @@ var EMPTY_VALUE = null;
|
|
|
20512
20512
|
|
|
20513
20513
|
// ../form-fields/dist/esm/constants/experiments.js
|
|
20514
20514
|
var EXPERIMENTS = {
|
|
20515
|
-
USE_FIELDS_V2: "specs.forms.UseFieldsV2"
|
|
20516
|
-
SUBMIT_STATUS_MESSAGE_VIEWER: "specs.forms.SubmitStatusMessageViewer"};
|
|
20515
|
+
USE_FIELDS_V2: "specs.forms.UseFieldsV2"};
|
|
20517
20516
|
|
|
20518
20517
|
// ../form-fields/dist/esm/constants/breakpoints.js
|
|
20519
20518
|
var Breakpoint = /* @__PURE__ */ (function(Breakpoint2) {
|
|
@@ -29012,8 +29011,6 @@ var BiFormSubmissionStatus;
|
|
|
29012
29011
|
})(BiFormSubmissionStatus || (BiFormSubmissionStatus = {}));
|
|
29013
29012
|
var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuccess, onSubmitFailure, resetFormValues, values, submitSettings, handleStepChange, navigateToCheckout, onValidate, handleScrollToFirstError }) => {
|
|
29014
29013
|
const { setSubmitSuccessMessage, setSubmitFailureCode, setSubmitFailureMessage } = useSubmitStatus();
|
|
29015
|
-
const { isExperimentEnabled } = useExperiments();
|
|
29016
|
-
const useSubmitStatusMessageViewer = isExperimentEnabled(EXPERIMENTS.SUBMIT_STATUS_MESSAGE_VIEWER);
|
|
29017
29014
|
const { t: t2 } = useTranslation();
|
|
29018
29015
|
const { report } = useBi();
|
|
29019
29016
|
const fireSubmitSuccess = useSubmitSuccessTrigger();
|
|
@@ -29085,7 +29082,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29085
29082
|
onSubmitFailure?.(error2);
|
|
29086
29083
|
reportSubmitFormBi({ status: BiFormSubmissionStatus.FAILURE });
|
|
29087
29084
|
handleCustomErrorMessages(error2);
|
|
29088
|
-
|
|
29085
|
+
handleSubmitFailure(error2);
|
|
29089
29086
|
throw error2;
|
|
29090
29087
|
}
|
|
29091
29088
|
if (response) {
|
|
@@ -29096,7 +29093,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29096
29093
|
});
|
|
29097
29094
|
panorama?.transaction(INTERACTIONS.SUBMIT_FORM).finish();
|
|
29098
29095
|
fireSubmitSuccess({ ...values });
|
|
29099
|
-
|
|
29096
|
+
handleSubmitSuccess(response);
|
|
29100
29097
|
resetFormValues?.();
|
|
29101
29098
|
}
|
|
29102
29099
|
return response;
|
|
@@ -29109,7 +29106,6 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29109
29106
|
submitAction,
|
|
29110
29107
|
onSubmitFailure,
|
|
29111
29108
|
handleCustomErrorMessages,
|
|
29112
|
-
useSubmitStatusMessageViewer,
|
|
29113
29109
|
handleSubmitFailure,
|
|
29114
29110
|
onSubmitSuccess,
|
|
29115
29111
|
fireSubmitSuccess,
|