@maif/react-forms 1.0.46 → 1.0.47

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/lib/esm/index.js CHANGED
@@ -29137,14 +29137,16 @@ var cleanInputArray = function cleanInputArray(obj, defaultValues, flow, subSche
29137
29137
 
29138
29138
  if (step.array && !step.render) {
29139
29139
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, (v || []).map(function (value) {
29140
+ var _subSchema$key, _subSchema$key2;
29141
+
29140
29142
  return {
29141
- value: value
29143
+ value: _typeof$1(value) === 'object' && !(value instanceof Date) && !Array.isArray(value) ? cleanInputArray(value, defaultValues, (_subSchema$key = subSchema[key]) === null || _subSchema$key === void 0 ? void 0 : _subSchema$key.flow, ((_subSchema$key2 = subSchema[key]) === null || _subSchema$key2 === void 0 ? void 0 : _subSchema$key2.schema) || {}) : value
29142
29144
  };
29143
29145
  })));
29144
29146
  } else if (_typeof$1(v) === 'object' && !(v instanceof Date) && !Array.isArray(v)) {
29145
- var _subSchema$key, _subSchema$key2;
29147
+ var _subSchema$key3, _subSchema$key4;
29146
29148
 
29147
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanInputArray(v, defaultValues, (_subSchema$key = subSchema[key]) === null || _subSchema$key === void 0 ? void 0 : _subSchema$key.flow, ((_subSchema$key2 = subSchema[key]) === null || _subSchema$key2 === void 0 ? void 0 : _subSchema$key2.schema) || {})));
29149
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanInputArray(v, defaultValues, (_subSchema$key3 = subSchema[key]) === null || _subSchema$key3 === void 0 ? void 0 : _subSchema$key3.flow, ((_subSchema$key4 = subSchema[key]) === null || _subSchema$key4 === void 0 ? void 0 : _subSchema$key4.schema) || {})));
29148
29150
  } else {
29149
29151
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v === undefined ? Array.isArray(v) ? [] : step.type === type.object ? {} : null : v));
29150
29152
  }
@@ -29166,25 +29168,23 @@ var cleanOutputArray = function cleanOutputArray(obj, subSchema) {
29166
29168
  }).getOrElse(false);
29167
29169
 
29168
29170
  if (isArray) {
29169
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (_ref6) {
29170
- var _subSchema$key3;
29171
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (step) {
29172
+ var _subSchema$key5;
29171
29173
 
29172
- var value = _ref6.value;
29173
- if (!!value && _typeof$1(value) === 'object' && !(value instanceof Date && !Array.isArray(value))) return cleanOutputArray(value, ((_subSchema$key3 = subSchema[key]) === null || _subSchema$key3 === void 0 ? void 0 : _subSchema$key3.schema) || {});
29174
- return value;
29174
+ if (!!step.value && _typeof$1(step.value) === 'object' && !(step.value instanceof Date && !Array.isArray(step.value))) return cleanOutputArray(step.value, ((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.schema) || {});
29175
+ return step.value;
29175
29176
  })));
29176
29177
  }
29177
29178
 
29178
- console.log('Not array', key);
29179
29179
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v));
29180
29180
  } else if (!!v && _typeof$1(v) === 'object' && !(v instanceof Date && !Array.isArray(v))) {
29181
- var _subSchema$key4;
29181
+ var _subSchema$key6;
29182
29182
 
29183
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$key4 = subSchema[key]) === null || _subSchema$key4 === void 0 ? void 0 : _subSchema$key4.schema) || {})));
29183
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$key6 = subSchema[key]) === null || _subSchema$key6 === void 0 ? void 0 : _subSchema$key6.schema) || {})));
29184
29184
  } else {
29185
- var _subSchema$key5;
29185
+ var _subSchema$key7;
29186
29186
 
29187
- if (((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.type) === 'json') {
29187
+ if (((_subSchema$key7 = subSchema[key]) === null || _subSchema$key7 === void 0 ? void 0 : _subSchema$key7.type) === 'json') {
29188
29188
  try {
29189
29189
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, JSON.parse(v)));
29190
29190
  } catch (err) {
@@ -29209,14 +29209,14 @@ var validate = function validate(flow, schema, value) {
29209
29209
  });
29210
29210
  };
29211
29211
 
29212
- var Watcher = function Watcher(_ref7) {
29213
- var options = _ref7.options,
29214
- control = _ref7.control,
29215
- schema = _ref7.schema,
29216
- onSubmit = _ref7.onSubmit,
29217
- handleSubmit = _ref7.handleSubmit;
29218
- _ref7.getValues;
29219
- _ref7.watch;
29212
+ var Watcher = function Watcher(_ref6) {
29213
+ var options = _ref6.options,
29214
+ control = _ref6.control,
29215
+ schema = _ref6.schema,
29216
+ onSubmit = _ref6.onSubmit,
29217
+ handleSubmit = _ref6.handleSubmit;
29218
+ _ref6.getValues;
29219
+ _ref6.watch;
29220
29220
  var data = useWatch({
29221
29221
  control: control
29222
29222
  });
@@ -29242,20 +29242,20 @@ var Watcher = function Watcher(_ref7) {
29242
29242
  return null;
29243
29243
  };
29244
29244
 
29245
- var Form = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
29246
- var schema = _ref8.schema,
29247
- flow = _ref8.flow,
29248
- value = _ref8.value,
29249
- inputWrapper = _ref8.inputWrapper,
29250
- onSubmit = _ref8.onSubmit,
29251
- _ref8$onError = _ref8.onError,
29252
- onError = _ref8$onError === void 0 ? function () {} : _ref8$onError,
29253
- footer = _ref8.footer,
29254
- _ref8$style = _ref8.style,
29255
- style = _ref8$style === void 0 ? {} : _ref8$style,
29256
- className = _ref8.className,
29257
- _ref8$options = _ref8.options,
29258
- options = _ref8$options === void 0 ? {} : _ref8$options;
29245
+ var Form = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
29246
+ var schema = _ref7.schema,
29247
+ flow = _ref7.flow,
29248
+ value = _ref7.value,
29249
+ inputWrapper = _ref7.inputWrapper,
29250
+ onSubmit = _ref7.onSubmit,
29251
+ _ref7$onError = _ref7.onError,
29252
+ onError = _ref7$onError === void 0 ? function () {} : _ref7$onError,
29253
+ footer = _ref7.footer,
29254
+ _ref7$style = _ref7.style,
29255
+ style = _ref7$style === void 0 ? {} : _ref7$style,
29256
+ className = _ref7.className,
29257
+ _ref7$options = _ref7.options,
29258
+ options = _ref7$options === void 0 ? {} : _ref7$options;
29259
29259
  var classes = useCustomStyle(style);
29260
29260
  var formFlow = flow || Object.keys(schema);
29261
29261
 
@@ -29453,18 +29453,18 @@ var Footer = function Footer(props) {
29453
29453
  }, ((_props$actions8 = props.actions) === null || _props$actions8 === void 0 ? void 0 : (_props$actions8$submi = _props$actions8.submit) === null || _props$actions8$submi === void 0 ? void 0 : _props$actions8$submi.label) || 'Save'));
29454
29454
  };
29455
29455
 
29456
- var Step = function Step(_ref9) {
29457
- var entry = _ref9.entry,
29458
- realEntry = _ref9.realEntry,
29459
- step = _ref9.step,
29460
- schema = _ref9.schema,
29461
- inputWrapper = _ref9.inputWrapper,
29462
- httpClient = _ref9.httpClient,
29463
- defaultValue = _ref9.defaultValue,
29464
- index = _ref9.index,
29465
- functionalProperty = _ref9.functionalProperty,
29466
- parent = _ref9.parent,
29467
- onAfterChange = _ref9.onAfterChange;
29456
+ var Step = function Step(_ref8) {
29457
+ var entry = _ref8.entry,
29458
+ realEntry = _ref8.realEntry,
29459
+ step = _ref8.step,
29460
+ schema = _ref8.schema,
29461
+ inputWrapper = _ref8.inputWrapper,
29462
+ httpClient = _ref8.httpClient,
29463
+ defaultValue = _ref8.defaultValue,
29464
+ index = _ref8.index,
29465
+ functionalProperty = _ref8.functionalProperty,
29466
+ parent = _ref8.parent,
29467
+ onAfterChange = _ref8.onAfterChange;
29468
29468
  var classes = useCustomStyle();
29469
29469
 
29470
29470
  var _useFormContext2 = useFormContext(),
@@ -29558,12 +29558,12 @@ var Step = function Step(_ref9) {
29558
29558
  var newData = cleanOutputArray(d, schema);
29559
29559
  if (!deepEqual(newData, currentData) || newData !== undefined && currentData === undefined) onAfterChangeFunc({
29560
29560
  entry: entry,
29561
- previousValue: currentData,
29562
29561
  value: getValues(entry),
29562
+ rawValues: newData,
29563
+ previousValue: currentData,
29563
29564
  getValue: function getValue(e) {
29564
29565
  return getValues(e);
29565
29566
  },
29566
- rawValues: newData,
29567
29567
  setValue: _setValue,
29568
29568
  onChange: function onChange(v) {
29569
29569
  return _setValue(entry, v);
@@ -29835,11 +29835,11 @@ var Step = function Step(_ref9) {
29835
29835
  return /*#__PURE__*/React.createElement(Controller, {
29836
29836
  name: entry,
29837
29837
  control: control,
29838
- render: function render(_ref10) {
29839
- var field = _ref10.field;
29838
+ render: function render(_ref9) {
29839
+ var field = _ref9.field;
29840
29840
 
29841
- var FileInput = function FileInput(_ref11) {
29842
- var onChange = _ref11.onChange;
29841
+ var FileInput = function FileInput(_ref10) {
29842
+ var onChange = _ref10.onChange;
29843
29843
 
29844
29844
  var _useState3 = useState(false),
29845
29845
  _useState4 = _slicedToArray(_useState3, 2),
@@ -29924,11 +29924,11 @@ var Step = function Step(_ref9) {
29924
29924
  }
29925
29925
  };
29926
29926
 
29927
- var ArrayStep = function ArrayStep(_ref12) {
29928
- var entry = _ref12.entry,
29929
- step = _ref12.step,
29930
- component = _ref12.component,
29931
- disabled = _ref12.disabled;
29927
+ var ArrayStep = function ArrayStep(_ref11) {
29928
+ var entry = _ref11.entry,
29929
+ step = _ref11.step,
29930
+ component = _ref11.component,
29931
+ disabled = _ref11.disabled;
29932
29932
  var classes = useCustomStyle();
29933
29933
 
29934
29934
  var _useFormContext3 = useFormContext(),
@@ -30015,19 +30015,19 @@ var ArrayStep = function ArrayStep(_ref12) {
30015
30015
  }, error.message)));
30016
30016
  };
30017
30017
 
30018
- var NestedForm = function NestedForm(_ref13) {
30018
+ var NestedForm = function NestedForm(_ref12) {
30019
30019
  var _classNames17;
30020
30020
 
30021
- var schema = _ref13.schema,
30022
- flow = _ref13.flow,
30023
- parent = _ref13.parent,
30024
- inputWrapper = _ref13.inputWrapper,
30025
- maybeCustomHttpClient = _ref13.maybeCustomHttpClient,
30026
- errorDisplayed = _ref13.errorDisplayed,
30027
- value = _ref13.value,
30028
- step = _ref13.step,
30029
- functionalProperty = _ref13.functionalProperty,
30030
- index = _ref13.index;
30021
+ var schema = _ref12.schema,
30022
+ flow = _ref12.flow,
30023
+ parent = _ref12.parent,
30024
+ inputWrapper = _ref12.inputWrapper,
30025
+ maybeCustomHttpClient = _ref12.maybeCustomHttpClient,
30026
+ errorDisplayed = _ref12.errorDisplayed,
30027
+ value = _ref12.value,
30028
+ step = _ref12.step,
30029
+ functionalProperty = _ref12.functionalProperty,
30030
+ index = _ref12.index;
30031
30031
 
30032
30032
  var _useFormContext4 = useFormContext(),
30033
30033
  getValues = _useFormContext4.getValues,
@@ -30138,10 +30138,10 @@ var NestedForm = function NestedForm(_ref13) {
30138
30138
  onClick: function onClick() {
30139
30139
  return setCollapsed(!collapsed);
30140
30140
  }
30141
- }), computedSandF.map(function (_ref14, idx) {
30142
- var step = _ref14.step,
30143
- visibleStep = _ref14.visibleStep,
30144
- entry = _ref14.entry;
30141
+ }), computedSandF.map(function (_ref13, idx) {
30142
+ var step = _ref13.step,
30143
+ visibleStep = _ref13.visibleStep,
30144
+ entry = _ref13.entry;
30145
30145
 
30146
30146
  if (!step && typeof entry === 'string') {
30147
30147
  console.error("no step found for the entry \"".concat(entry, "\" in the given schema. Your form might not work properly. Please fix it"));
package/lib/index.js CHANGED
@@ -29171,14 +29171,16 @@ var cleanInputArray = function cleanInputArray(obj, defaultValues, flow, subSche
29171
29171
 
29172
29172
  if (step.array && !step.render) {
29173
29173
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, (v || []).map(function (value) {
29174
+ var _subSchema$key, _subSchema$key2;
29175
+
29174
29176
  return {
29175
- value: value
29177
+ value: _typeof$1(value) === 'object' && !(value instanceof Date) && !Array.isArray(value) ? cleanInputArray(value, defaultValues, (_subSchema$key = subSchema[key]) === null || _subSchema$key === void 0 ? void 0 : _subSchema$key.flow, ((_subSchema$key2 = subSchema[key]) === null || _subSchema$key2 === void 0 ? void 0 : _subSchema$key2.schema) || {}) : value
29176
29178
  };
29177
29179
  })));
29178
29180
  } else if (_typeof$1(v) === 'object' && !(v instanceof Date) && !Array.isArray(v)) {
29179
- var _subSchema$key, _subSchema$key2;
29181
+ var _subSchema$key3, _subSchema$key4;
29180
29182
 
29181
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanInputArray(v, defaultValues, (_subSchema$key = subSchema[key]) === null || _subSchema$key === void 0 ? void 0 : _subSchema$key.flow, ((_subSchema$key2 = subSchema[key]) === null || _subSchema$key2 === void 0 ? void 0 : _subSchema$key2.schema) || {})));
29183
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanInputArray(v, defaultValues, (_subSchema$key3 = subSchema[key]) === null || _subSchema$key3 === void 0 ? void 0 : _subSchema$key3.flow, ((_subSchema$key4 = subSchema[key]) === null || _subSchema$key4 === void 0 ? void 0 : _subSchema$key4.schema) || {})));
29182
29184
  } else {
29183
29185
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v === undefined ? Array.isArray(v) ? [] : step.type === type.object ? {} : null : v));
29184
29186
  }
@@ -29200,25 +29202,23 @@ var cleanOutputArray = function cleanOutputArray(obj, subSchema) {
29200
29202
  }).getOrElse(false);
29201
29203
 
29202
29204
  if (isArray) {
29203
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (_ref6) {
29204
- var _subSchema$key3;
29205
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (step) {
29206
+ var _subSchema$key5;
29205
29207
 
29206
- var value = _ref6.value;
29207
- if (!!value && _typeof$1(value) === 'object' && !(value instanceof Date && !Array.isArray(value))) return cleanOutputArray(value, ((_subSchema$key3 = subSchema[key]) === null || _subSchema$key3 === void 0 ? void 0 : _subSchema$key3.schema) || {});
29208
- return value;
29208
+ if (!!step.value && _typeof$1(step.value) === 'object' && !(step.value instanceof Date && !Array.isArray(step.value))) return cleanOutputArray(step.value, ((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.schema) || {});
29209
+ return step.value;
29209
29210
  })));
29210
29211
  }
29211
29212
 
29212
- console.log('Not array', key);
29213
29213
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v));
29214
29214
  } else if (!!v && _typeof$1(v) === 'object' && !(v instanceof Date && !Array.isArray(v))) {
29215
- var _subSchema$key4;
29215
+ var _subSchema$key6;
29216
29216
 
29217
- return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$key4 = subSchema[key]) === null || _subSchema$key4 === void 0 ? void 0 : _subSchema$key4.schema) || {})));
29217
+ return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$key6 = subSchema[key]) === null || _subSchema$key6 === void 0 ? void 0 : _subSchema$key6.schema) || {})));
29218
29218
  } else {
29219
- var _subSchema$key5;
29219
+ var _subSchema$key7;
29220
29220
 
29221
- if (((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.type) === 'json') {
29221
+ if (((_subSchema$key7 = subSchema[key]) === null || _subSchema$key7 === void 0 ? void 0 : _subSchema$key7.type) === 'json') {
29222
29222
  try {
29223
29223
  return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, JSON.parse(v)));
29224
29224
  } catch (err) {
@@ -29243,14 +29243,14 @@ var validate = function validate(flow, schema, value) {
29243
29243
  });
29244
29244
  };
29245
29245
 
29246
- var Watcher = function Watcher(_ref7) {
29247
- var options = _ref7.options,
29248
- control = _ref7.control,
29249
- schema = _ref7.schema,
29250
- onSubmit = _ref7.onSubmit,
29251
- handleSubmit = _ref7.handleSubmit;
29252
- _ref7.getValues;
29253
- _ref7.watch;
29246
+ var Watcher = function Watcher(_ref6) {
29247
+ var options = _ref6.options,
29248
+ control = _ref6.control,
29249
+ schema = _ref6.schema,
29250
+ onSubmit = _ref6.onSubmit,
29251
+ handleSubmit = _ref6.handleSubmit;
29252
+ _ref6.getValues;
29253
+ _ref6.watch;
29254
29254
  var data = reactHookForm.useWatch({
29255
29255
  control: control
29256
29256
  });
@@ -29276,20 +29276,20 @@ var Watcher = function Watcher(_ref7) {
29276
29276
  return null;
29277
29277
  };
29278
29278
 
29279
- var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref8, ref) {
29280
- var schema = _ref8.schema,
29281
- flow = _ref8.flow,
29282
- value = _ref8.value,
29283
- inputWrapper = _ref8.inputWrapper,
29284
- onSubmit = _ref8.onSubmit,
29285
- _ref8$onError = _ref8.onError,
29286
- onError = _ref8$onError === void 0 ? function () {} : _ref8$onError,
29287
- footer = _ref8.footer,
29288
- _ref8$style = _ref8.style,
29289
- style = _ref8$style === void 0 ? {} : _ref8$style,
29290
- className = _ref8.className,
29291
- _ref8$options = _ref8.options,
29292
- options = _ref8$options === void 0 ? {} : _ref8$options;
29279
+ var Form = /*#__PURE__*/React__default["default"].forwardRef(function (_ref7, ref) {
29280
+ var schema = _ref7.schema,
29281
+ flow = _ref7.flow,
29282
+ value = _ref7.value,
29283
+ inputWrapper = _ref7.inputWrapper,
29284
+ onSubmit = _ref7.onSubmit,
29285
+ _ref7$onError = _ref7.onError,
29286
+ onError = _ref7$onError === void 0 ? function () {} : _ref7$onError,
29287
+ footer = _ref7.footer,
29288
+ _ref7$style = _ref7.style,
29289
+ style = _ref7$style === void 0 ? {} : _ref7$style,
29290
+ className = _ref7.className,
29291
+ _ref7$options = _ref7.options,
29292
+ options = _ref7$options === void 0 ? {} : _ref7$options;
29293
29293
  var classes = useCustomStyle(style);
29294
29294
  var formFlow = flow || Object.keys(schema);
29295
29295
 
@@ -29487,18 +29487,18 @@ var Footer = function Footer(props) {
29487
29487
  }, ((_props$actions8 = props.actions) === null || _props$actions8 === void 0 ? void 0 : (_props$actions8$submi = _props$actions8.submit) === null || _props$actions8$submi === void 0 ? void 0 : _props$actions8$submi.label) || 'Save'));
29488
29488
  };
29489
29489
 
29490
- var Step = function Step(_ref9) {
29491
- var entry = _ref9.entry,
29492
- realEntry = _ref9.realEntry,
29493
- step = _ref9.step,
29494
- schema = _ref9.schema,
29495
- inputWrapper = _ref9.inputWrapper,
29496
- httpClient = _ref9.httpClient,
29497
- defaultValue = _ref9.defaultValue,
29498
- index = _ref9.index,
29499
- functionalProperty = _ref9.functionalProperty,
29500
- parent = _ref9.parent,
29501
- onAfterChange = _ref9.onAfterChange;
29490
+ var Step = function Step(_ref8) {
29491
+ var entry = _ref8.entry,
29492
+ realEntry = _ref8.realEntry,
29493
+ step = _ref8.step,
29494
+ schema = _ref8.schema,
29495
+ inputWrapper = _ref8.inputWrapper,
29496
+ httpClient = _ref8.httpClient,
29497
+ defaultValue = _ref8.defaultValue,
29498
+ index = _ref8.index,
29499
+ functionalProperty = _ref8.functionalProperty,
29500
+ parent = _ref8.parent,
29501
+ onAfterChange = _ref8.onAfterChange;
29502
29502
  var classes = useCustomStyle();
29503
29503
 
29504
29504
  var _useFormContext2 = reactHookForm.useFormContext(),
@@ -29592,12 +29592,12 @@ var Step = function Step(_ref9) {
29592
29592
  var newData = cleanOutputArray(d, schema);
29593
29593
  if (!deepEqual__default["default"](newData, currentData) || newData !== undefined && currentData === undefined) onAfterChangeFunc({
29594
29594
  entry: entry,
29595
- previousValue: currentData,
29596
29595
  value: getValues(entry),
29596
+ rawValues: newData,
29597
+ previousValue: currentData,
29597
29598
  getValue: function getValue(e) {
29598
29599
  return getValues(e);
29599
29600
  },
29600
- rawValues: newData,
29601
29601
  setValue: _setValue,
29602
29602
  onChange: function onChange(v) {
29603
29603
  return _setValue(entry, v);
@@ -29869,11 +29869,11 @@ var Step = function Step(_ref9) {
29869
29869
  return /*#__PURE__*/React__default["default"].createElement(reactHookForm.Controller, {
29870
29870
  name: entry,
29871
29871
  control: control,
29872
- render: function render(_ref10) {
29873
- var field = _ref10.field;
29872
+ render: function render(_ref9) {
29873
+ var field = _ref9.field;
29874
29874
 
29875
- var FileInput = function FileInput(_ref11) {
29876
- var onChange = _ref11.onChange;
29875
+ var FileInput = function FileInput(_ref10) {
29876
+ var onChange = _ref10.onChange;
29877
29877
 
29878
29878
  var _useState3 = React.useState(false),
29879
29879
  _useState4 = _slicedToArray(_useState3, 2),
@@ -29958,11 +29958,11 @@ var Step = function Step(_ref9) {
29958
29958
  }
29959
29959
  };
29960
29960
 
29961
- var ArrayStep = function ArrayStep(_ref12) {
29962
- var entry = _ref12.entry,
29963
- step = _ref12.step,
29964
- component = _ref12.component,
29965
- disabled = _ref12.disabled;
29961
+ var ArrayStep = function ArrayStep(_ref11) {
29962
+ var entry = _ref11.entry,
29963
+ step = _ref11.step,
29964
+ component = _ref11.component,
29965
+ disabled = _ref11.disabled;
29966
29966
  var classes = useCustomStyle();
29967
29967
 
29968
29968
  var _useFormContext3 = reactHookForm.useFormContext(),
@@ -30049,19 +30049,19 @@ var ArrayStep = function ArrayStep(_ref12) {
30049
30049
  }, error.message)));
30050
30050
  };
30051
30051
 
30052
- var NestedForm = function NestedForm(_ref13) {
30052
+ var NestedForm = function NestedForm(_ref12) {
30053
30053
  var _classNames17;
30054
30054
 
30055
- var schema = _ref13.schema,
30056
- flow = _ref13.flow,
30057
- parent = _ref13.parent,
30058
- inputWrapper = _ref13.inputWrapper,
30059
- maybeCustomHttpClient = _ref13.maybeCustomHttpClient,
30060
- errorDisplayed = _ref13.errorDisplayed,
30061
- value = _ref13.value,
30062
- step = _ref13.step,
30063
- functionalProperty = _ref13.functionalProperty,
30064
- index = _ref13.index;
30055
+ var schema = _ref12.schema,
30056
+ flow = _ref12.flow,
30057
+ parent = _ref12.parent,
30058
+ inputWrapper = _ref12.inputWrapper,
30059
+ maybeCustomHttpClient = _ref12.maybeCustomHttpClient,
30060
+ errorDisplayed = _ref12.errorDisplayed,
30061
+ value = _ref12.value,
30062
+ step = _ref12.step,
30063
+ functionalProperty = _ref12.functionalProperty,
30064
+ index = _ref12.index;
30065
30065
 
30066
30066
  var _useFormContext4 = reactHookForm.useFormContext(),
30067
30067
  getValues = _useFormContext4.getValues,
@@ -30172,10 +30172,10 @@ var NestedForm = function NestedForm(_ref13) {
30172
30172
  onClick: function onClick() {
30173
30173
  return setCollapsed(!collapsed);
30174
30174
  }
30175
- }), computedSandF.map(function (_ref14, idx) {
30176
- var step = _ref14.step,
30177
- visibleStep = _ref14.visibleStep,
30178
- entry = _ref14.entry;
30175
+ }), computedSandF.map(function (_ref13, idx) {
30176
+ var step = _ref13.step,
30177
+ visibleStep = _ref13.visibleStep,
30178
+ entry = _ref13.entry;
30179
30179
 
30180
30180
  if (!step && typeof entry === 'string') {
30181
30181
  console.error("no step found for the entry \"".concat(entry, "\" in the given schema. Your form might not work properly. Please fix it"));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maif/react-forms",
3
3
  "description": "Build react safe forms as fast as possible",
4
- "version": "1.0.46",
4
+ "version": "1.0.47",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
7
7
  "types": "lib/index.js",