@arquimedes.co/eureka-forms 2.0.117 → 2.0.119

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.
@@ -151,7 +151,7 @@ export var calcDefaultValue = function (step) {
151
151
  }
152
152
  };
153
153
  export var iterateNestedSteps = function (idStep, steps, iteration, path) {
154
- if (path === void 0) { path = [idStep]; }
154
+ if (path === void 0) { path = []; }
155
155
  var step = steps[idStep];
156
156
  if (!step) {
157
157
  console.error('Missing Step:', idStep);
@@ -169,7 +169,7 @@ export var iterateNestedSteps = function (idStep, steps, iteration, path) {
169
169
  else {
170
170
  for (var _b = 0, _c = calcSubSteps(step.id, steps); _b < _c.length; _b++) {
171
171
  var idSubStep = _c[_b];
172
- iterateNestedSteps(idSubStep, steps, iteration, __spreadArray(__spreadArray([], path, true), [step.id], false));
172
+ iterateNestedSteps(idSubStep, steps, iteration, path);
173
173
  }
174
174
  }
175
175
  };
@@ -9,6 +9,15 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
20
+ };
12
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
22
  import { calcStepWidth } from '../../StepFunctions';
14
23
  import styles from './MaterialTitleStep.module.css';
@@ -44,6 +53,7 @@ function TitleStep(_a) {
44
53
  }
45
54
  return values;
46
55
  }, [dependencies]);
56
+ var path = useMemo(function () { return __spreadArray(__spreadArray([], step.stepPath, true), [step.id], false).join('.'); }, [step.stepPath, step.id]);
47
57
  return (_jsxs("div", __assign({ className: styles.container, style: {
48
58
  color: formStyle.textColor,
49
59
  width: widthStats.currentBreakPoint <= size
@@ -54,7 +64,7 @@ function TitleStep(_a) {
54
64
  widthStats.currentBreakPoint <= size
55
65
  ? 'center'
56
66
  : 'start',
57
- } }, { children: _jsx(SmartDraftRenderer, { draft: title, dependencies: values, property: "".concat(step.stepPath.join('.'), ".title"), onChange: function (title) { return onChange(__assign(__assign({}, value), { title: title })); } }) })), _jsx("div", __assign({ className: styles.descriptionPar }, { children: _jsx(SmartDraftRenderer, { draft: description, dependencies: values, margin: title ? '10px 0px' : '0px 0px 5px 0px', property: "".concat(step.stepPath.join('.'), ".description"), onChange: function (description) {
67
+ } }, { children: _jsx(SmartDraftRenderer, { draft: title, dependencies: values, property: "".concat(path, ".title"), onChange: function (title) { return onChange(__assign(__assign({}, value), { title: title })); } }) })), _jsx("div", __assign({ className: styles.descriptionPar }, { children: _jsx(SmartDraftRenderer, { draft: description, dependencies: values, margin: title ? '10px 0px' : '0px 0px 5px 0px', property: "".concat(path, ".description"), onChange: function (description) {
58
68
  return onChange(__assign(__assign({}, value), { description: description }));
59
69
  } }) }))] })));
60
70
  }
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.117",
4
+ "version": "2.0.119",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",