@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.cjs
CHANGED
|
@@ -20538,8 +20538,7 @@ var EMPTY_VALUE = null;
|
|
|
20538
20538
|
|
|
20539
20539
|
// ../form-fields/dist/esm/constants/experiments.js
|
|
20540
20540
|
var EXPERIMENTS = {
|
|
20541
|
-
USE_FIELDS_V2: "specs.forms.UseFieldsV2"
|
|
20542
|
-
SUBMIT_STATUS_MESSAGE_VIEWER: "specs.forms.SubmitStatusMessageViewer"};
|
|
20541
|
+
USE_FIELDS_V2: "specs.forms.UseFieldsV2"};
|
|
20543
20542
|
|
|
20544
20543
|
// ../form-fields/dist/esm/constants/breakpoints.js
|
|
20545
20544
|
var Breakpoint = /* @__PURE__ */ (function(Breakpoint2) {
|
|
@@ -29038,8 +29037,6 @@ var BiFormSubmissionStatus;
|
|
|
29038
29037
|
})(BiFormSubmissionStatus || (BiFormSubmissionStatus = {}));
|
|
29039
29038
|
var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuccess, onSubmitFailure, resetFormValues, values, submitSettings, handleStepChange, navigateToCheckout, onValidate, handleScrollToFirstError }) => {
|
|
29040
29039
|
const { setSubmitSuccessMessage, setSubmitFailureCode, setSubmitFailureMessage } = useSubmitStatus();
|
|
29041
|
-
const { isExperimentEnabled } = useExperiments();
|
|
29042
|
-
const useSubmitStatusMessageViewer = isExperimentEnabled(EXPERIMENTS.SUBMIT_STATUS_MESSAGE_VIEWER);
|
|
29043
29040
|
const { t: t2 } = useTranslation();
|
|
29044
29041
|
const { report } = useBi();
|
|
29045
29042
|
const fireSubmitSuccess = useSubmitSuccessTrigger();
|
|
@@ -29111,7 +29108,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29111
29108
|
onSubmitFailure?.(error2);
|
|
29112
29109
|
reportSubmitFormBi({ status: BiFormSubmissionStatus.FAILURE });
|
|
29113
29110
|
handleCustomErrorMessages(error2);
|
|
29114
|
-
|
|
29111
|
+
handleSubmitFailure(error2);
|
|
29115
29112
|
throw error2;
|
|
29116
29113
|
}
|
|
29117
29114
|
if (response) {
|
|
@@ -29122,7 +29119,7 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29122
29119
|
});
|
|
29123
29120
|
panorama?.transaction(INTERACTIONS.SUBMIT_FORM).finish();
|
|
29124
29121
|
fireSubmitSuccess({ ...values });
|
|
29125
|
-
|
|
29122
|
+
handleSubmitSuccess(response);
|
|
29126
29123
|
resetFormValues?.();
|
|
29127
29124
|
}
|
|
29128
29125
|
return response;
|
|
@@ -29135,7 +29132,6 @@ var useSubmit = ({ validateAndScrollToError, submitAction, onSubmit, onSubmitSuc
|
|
|
29135
29132
|
submitAction,
|
|
29136
29133
|
onSubmitFailure,
|
|
29137
29134
|
handleCustomErrorMessages,
|
|
29138
|
-
useSubmitStatusMessageViewer,
|
|
29139
29135
|
handleSubmitFailure,
|
|
29140
29136
|
onSubmitSuccess,
|
|
29141
29137
|
fireSubmitSuccess,
|