@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.
@@ -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, _c = condition.conditions; _i < _c.length; _i++) {
280
- var subCondition = _c[_i];
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 _d = 0, _e = condition.conditions; _d < _e.length; _d++) {
288
- var subCondition = _e[_d];
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' ? value : value.value;
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 (_a = value === null || value === void 0 ? void 0 : value.toLowerCase()) === null || _a === void 0 ? void 0 : _a.includes(condition.value.toLowerCase());
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 !((_b = value === null || value === void 0 ? void 0 : value.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(condition.value.toLowerCase()));
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 _f = 0, _g = condition.values; _f < _g.length; _f++) {
412
- var idEntityValue = _g[_f];
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
@@ -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": "2.0.43",
4
+ "version":"2.0.44-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",