@maif/react-forms 1.0.45 → 1.0.46
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 +8 -4
- package/lib/index.js +8 -4
- package/package.json +1 -1
package/lib/esm/index.js
CHANGED
|
@@ -29167,20 +29167,24 @@ var cleanOutputArray = function cleanOutputArray(obj, subSchema) {
|
|
|
29167
29167
|
|
|
29168
29168
|
if (isArray) {
|
|
29169
29169
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (_ref6) {
|
|
29170
|
+
var _subSchema$key3;
|
|
29171
|
+
|
|
29170
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) || {});
|
|
29171
29174
|
return value;
|
|
29172
29175
|
})));
|
|
29173
29176
|
}
|
|
29174
29177
|
|
|
29178
|
+
console.log('Not array', key);
|
|
29175
29179
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v));
|
|
29176
29180
|
} else if (!!v && _typeof$1(v) === 'object' && !(v instanceof Date && !Array.isArray(v))) {
|
|
29177
|
-
var _subSchema$
|
|
29181
|
+
var _subSchema$key4;
|
|
29178
29182
|
|
|
29179
|
-
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$
|
|
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) || {})));
|
|
29180
29184
|
} else {
|
|
29181
|
-
var _subSchema$
|
|
29185
|
+
var _subSchema$key5;
|
|
29182
29186
|
|
|
29183
|
-
if (((_subSchema$
|
|
29187
|
+
if (((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.type) === 'json') {
|
|
29184
29188
|
try {
|
|
29185
29189
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, JSON.parse(v)));
|
|
29186
29190
|
} catch (err) {
|
package/lib/index.js
CHANGED
|
@@ -29201,20 +29201,24 @@ var cleanOutputArray = function cleanOutputArray(obj, subSchema) {
|
|
|
29201
29201
|
|
|
29202
29202
|
if (isArray) {
|
|
29203
29203
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v.map(function (_ref6) {
|
|
29204
|
+
var _subSchema$key3;
|
|
29205
|
+
|
|
29204
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) || {});
|
|
29205
29208
|
return value;
|
|
29206
29209
|
})));
|
|
29207
29210
|
}
|
|
29208
29211
|
|
|
29212
|
+
console.log('Not array', key);
|
|
29209
29213
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, v));
|
|
29210
29214
|
} else if (!!v && _typeof$1(v) === 'object' && !(v instanceof Date && !Array.isArray(v))) {
|
|
29211
|
-
var _subSchema$
|
|
29215
|
+
var _subSchema$key4;
|
|
29212
29216
|
|
|
29213
|
-
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, cleanOutputArray(v, ((_subSchema$
|
|
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) || {})));
|
|
29214
29218
|
} else {
|
|
29215
|
-
var _subSchema$
|
|
29219
|
+
var _subSchema$key5;
|
|
29216
29220
|
|
|
29217
|
-
if (((_subSchema$
|
|
29221
|
+
if (((_subSchema$key5 = subSchema[key]) === null || _subSchema$key5 === void 0 ? void 0 : _subSchema$key5.type) === 'json') {
|
|
29218
29222
|
try {
|
|
29219
29223
|
return _objectSpread2$1(_objectSpread2$1({}, acc), {}, _defineProperty$1({}, key, JSON.parse(v)));
|
|
29220
29224
|
} catch (err) {
|