@arquimedes.co/eureka-forms 2.0.43 → 2.0.44-test
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/AppHooks.js +5 -0
- package/dist/FormSteps/StepFunctions.js +12 -10
- package/package.json +1 -1
package/dist/App/AppHooks.js
CHANGED
|
@@ -147,6 +147,11 @@ export var useSetupApp = function (isEmbedded, _a) {
|
|
|
147
147
|
}
|
|
148
148
|
if (form) {
|
|
149
149
|
form = createNextState(form, function (form) {
|
|
150
|
+
var firstSection = form.sections[form.firstSection];
|
|
151
|
+
if (firstSection.steps === undefined &&
|
|
152
|
+
form.rootSteps !== undefined) {
|
|
153
|
+
firstSection.steps = form.rootSteps;
|
|
154
|
+
}
|
|
150
155
|
//If a rootStep is a mapper of type section
|
|
151
156
|
if (form && classifiers)
|
|
152
157
|
form.classifiers = classifiers;
|
|
@@ -272,20 +272,20 @@ export var calcSubSteps = function (idStep, allSteps, idModifier) {
|
|
|
272
272
|
return subSteps;
|
|
273
273
|
};
|
|
274
274
|
export var evaluateCondition = function (condition, dependencies) {
|
|
275
|
-
var _a, _b;
|
|
275
|
+
var _a, _b, _c;
|
|
276
276
|
switch (condition.type) {
|
|
277
277
|
case ConditionTypes.EXPRESSION: {
|
|
278
278
|
if (condition.expression === ExpressionTypes.OR) {
|
|
279
|
-
for (var _i = 0,
|
|
280
|
-
var subCondition =
|
|
279
|
+
for (var _i = 0, _d = condition.conditions; _i < _d.length; _i++) {
|
|
280
|
+
var subCondition = _d[_i];
|
|
281
281
|
if (evaluateCondition(subCondition, dependencies))
|
|
282
282
|
return true;
|
|
283
283
|
}
|
|
284
284
|
return false;
|
|
285
285
|
}
|
|
286
286
|
else {
|
|
287
|
-
for (var
|
|
288
|
-
var subCondition = _e
|
|
287
|
+
for (var _e = 0, _f = condition.conditions; _e < _f.length; _e++) {
|
|
288
|
+
var subCondition = _f[_e];
|
|
289
289
|
if (!evaluateCondition(subCondition, dependencies))
|
|
290
290
|
return false;
|
|
291
291
|
}
|
|
@@ -333,7 +333,9 @@ export var evaluateCondition = function (condition, dependencies) {
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
case FormStepTypes.SELECTOR: {
|
|
336
|
-
var val = dependency.type === 'ORIGINAL'
|
|
336
|
+
var val = dependency.type === 'ORIGINAL'
|
|
337
|
+
? value
|
|
338
|
+
: (_a = value === null || value === void 0 ? void 0 : value.value) !== null && _a !== void 0 ? _a : null;
|
|
337
339
|
if (condition.operator === OperatorTypes.EQUAL) {
|
|
338
340
|
return condition.value === val;
|
|
339
341
|
}
|
|
@@ -343,10 +345,10 @@ export var evaluateCondition = function (condition, dependencies) {
|
|
|
343
345
|
}
|
|
344
346
|
case FormStepTypes.TEXTINPUT: {
|
|
345
347
|
if (condition.operator === OperatorTypes.INCLUDES) {
|
|
346
|
-
return (
|
|
348
|
+
return (_b = value === null || value === void 0 ? void 0 : value.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(condition.value.toLowerCase());
|
|
347
349
|
}
|
|
348
350
|
else if (condition.operator === OperatorTypes.NOTINCLUDES) {
|
|
349
|
-
return !((
|
|
351
|
+
return !((_c = value === null || value === void 0 ? void 0 : value.toLowerCase()) === null || _c === void 0 ? void 0 : _c.includes(condition.value.toLowerCase()));
|
|
350
352
|
}
|
|
351
353
|
else if (condition.operator === OperatorTypes.EQUAL) {
|
|
352
354
|
return (condition.value.toLowerCase() ===
|
|
@@ -408,8 +410,8 @@ export var evaluateCondition = function (condition, dependencies) {
|
|
|
408
410
|
}
|
|
409
411
|
case FormStepTypes.ENTITYVALUEPICKER: {
|
|
410
412
|
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
411
|
-
for (var
|
|
412
|
-
var idEntityValue = _g
|
|
413
|
+
for (var _g = 0, _h = condition.values; _g < _h.length; _g++) {
|
|
414
|
+
var idEntityValue = _h[_g];
|
|
413
415
|
if ((value === null || value === void 0 ? void 0 : value._id) === idEntityValue) {
|
|
414
416
|
return boolFactor;
|
|
415
417
|
}
|
package/package.json
CHANGED