@wix/form-public 0.141.0 → 0.142.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 +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -27203,7 +27203,7 @@ var InputField = (_ref) => {
|
|
|
27203
27203
|
requiredIndicator,
|
|
27204
27204
|
requiredIndicatorPlacement
|
|
27205
27205
|
} = form.requiredIndicatorProperties || {};
|
|
27206
|
-
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
27206
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType] || BaseMapper;
|
|
27207
27207
|
const _onBlur = React45.useCallback(() => {
|
|
27208
27208
|
const currentFieldValue = fieldValueRef.current;
|
|
27209
27209
|
bi == null || bi.report(formFieldFocus({
|
|
@@ -27310,7 +27310,7 @@ var ReadOnlyField = (_ref) => {
|
|
|
27310
27310
|
requiredIndicator,
|
|
27311
27311
|
requiredIndicatorPlacement
|
|
27312
27312
|
} = form.requiredIndicatorProperties || {};
|
|
27313
|
-
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
27313
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType] || BaseMapper;
|
|
27314
27314
|
const FieldComponent = componentsById[field.fieldType];
|
|
27315
27315
|
if (!FieldComponent) {
|
|
27316
27316
|
return null;
|
|
@@ -27360,7 +27360,7 @@ var NestedFormField = (_ref) => {
|
|
|
27360
27360
|
requiredIndicator,
|
|
27361
27361
|
requiredIndicatorPlacement
|
|
27362
27362
|
} = form.requiredIndicatorProperties || {};
|
|
27363
|
-
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
27363
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType] || BaseMapper;
|
|
27364
27364
|
const handleChange = React45.useCallback((value) => {
|
|
27365
27365
|
if (!value) {
|
|
27366
27366
|
value = null;
|
|
@@ -27508,7 +27508,7 @@ var SubmitButtonField = (_ref) => {
|
|
|
27508
27508
|
const submitButtonText = submitText || text || "";
|
|
27509
27509
|
const previousButtonText = previousText || "";
|
|
27510
27510
|
const nextButtonText = nextText || "";
|
|
27511
|
-
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType];
|
|
27511
|
+
const propsMapper = FIELD_PROPS_MAPPERS[field.fieldType] || BaseMapper;
|
|
27512
27512
|
const FieldComponent = componentsById[field.fieldType];
|
|
27513
27513
|
if (!FieldComponent) {
|
|
27514
27514
|
return null;
|
|
@@ -32039,11 +32039,16 @@ var normalizeValues = (form, values, recursive = true, config) => {
|
|
|
32039
32039
|
if (recursive && nestedForm) {
|
|
32040
32040
|
result2[fieldTarget] = normalizeValues(nestedForm, fieldValue, false, config);
|
|
32041
32041
|
} else {
|
|
32042
|
-
|
|
32043
|
-
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
|
|
32042
|
+
const normalizer = NORMALIZED_VALUE[fieldType];
|
|
32043
|
+
if (normalizer) {
|
|
32044
|
+
result2[fieldTarget] = normalizer({
|
|
32045
|
+
field,
|
|
32046
|
+
fieldValue,
|
|
32047
|
+
config
|
|
32048
|
+
});
|
|
32049
|
+
} else {
|
|
32050
|
+
result2[fieldTarget] = fieldValue;
|
|
32051
|
+
}
|
|
32047
32052
|
}
|
|
32048
32053
|
return result2;
|
|
32049
32054
|
}, {});
|