@arquimedes.co/eureka-forms 1.9.46 → 1.9.48

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/App.js CHANGED
@@ -399,6 +399,9 @@ var mapOriginalValues = function (originalValues, form) {
399
399
  }
400
400
  }
401
401
  }
402
+ else {
403
+ newValues[idValue] = originalValues[idValue];
404
+ }
402
405
  }
403
406
  return newValues;
404
407
  };
@@ -94,7 +94,7 @@ function ColumnForm(_a) {
94
94
  return _jsx("div", {});
95
95
  }
96
96
  var onSubmit = function (token) { return __awaiter(_this, void 0, void 0, function () {
97
- var valid, values, newValues, _i, _a, idStep, step, payload, url, resp, _b, error_1;
97
+ var valid, values, newValues, _i, _a, idStep, payload, url, resp, _b, error_1;
98
98
  return __generator(this, function (_c) {
99
99
  switch (_c.label) {
100
100
  case 0:
@@ -116,8 +116,7 @@ function ColumnForm(_a) {
116
116
  newValues = {};
117
117
  for (_i = 0, _a = Object.keys(values); _i < _a.length; _i++) {
118
118
  idStep = _a[_i];
119
- step = form.steps[idStep];
120
- newValues[idStep] = calcValue(step, values, customSteps);
119
+ newValues[idStep] = calcValue(idStep, form.steps, values, customSteps);
121
120
  }
122
121
  if (!customSend) return [3 /*break*/, 4];
123
122
  return [4 /*yield*/, customSend(newValues, reload)];
@@ -220,14 +219,15 @@ function calcNextSection(form, idSection, sections) {
220
219
  }
221
220
  }
222
221
  }
223
- var calcValue = function (step, values, customSteps, value) {
224
- var _a, _b, _c;
225
- if (value === void 0) { value = values[(_a = step === null || step === void 0 ? void 0 : step.id) !== null && _a !== void 0 ? _a : '']; }
222
+ var calcValue = function (idStep, steps, values, customSteps, value) {
223
+ var _a, _b;
224
+ if (value === void 0) { value = values[idStep]; }
225
+ var step = steps[idStep];
226
226
  if (!step)
227
- return;
227
+ return value;
228
228
  var custom = customSteps[step === null || step === void 0 ? void 0 : step.type];
229
229
  if (custom !== undefined) {
230
- return (_c = (_b = custom.calcValue) === null || _b === void 0 ? void 0 : _b.call(custom, step, value)) !== null && _c !== void 0 ? _c : value;
230
+ return (_b = (_a = custom.calcValue) === null || _a === void 0 ? void 0 : _a.call(custom, step, value)) !== null && _b !== void 0 ? _b : value;
231
231
  }
232
232
  else {
233
233
  switch (step === null || step === void 0 ? void 0 : step.type) {
@@ -264,12 +264,11 @@ var calcValue = function (step, values, customSteps, value) {
264
264
  var newValue = {
265
265
  id: element.id,
266
266
  };
267
- for (var _d = 0, _e = Object.keys(step.steps); _d < _e.length; _d++) {
268
- var idStep = _e[_d];
269
- var mappedId = element.ids[idStep];
267
+ for (var _c = 0, _d = Object.keys(step.steps); _c < _d.length; _c++) {
268
+ var idStep_1 = _d[_c];
269
+ var mappedId = element.ids[idStep_1];
270
270
  if (values[mappedId] !== undefined) {
271
- var substep = step.steps[idStep];
272
- newValue[idStep] = calcValue(substep, values, customSteps, values[mappedId]);
271
+ newValue[idStep_1] = calcValue(idStep_1, step.steps, values, customSteps, values[mappedId]);
273
272
  }
274
273
  }
275
274
  mappedValues.push(newValue);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "1.9.46",
4
+ "version": "1.9.48",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",