@legalplace/wizardx-core 4.31.4 → 4.31.6

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.
@@ -121,28 +121,30 @@ SmartScriptStore.inputs = {
121
121
  };
122
122
  SmartScriptStore.updateVariableInput = (id, value, index = 0) => {
123
123
  var _a;
124
+ const indexValue = typeof index === "string" ? parseInt(index, 10) : index;
124
125
  if (!Object.prototype.hasOwnProperty.call(SmartScriptStore.inputs.variables, id)) {
125
126
  console.error(`SmartScript error: trying to update meta for undefined variable ${id}`);
126
127
  return;
127
128
  }
128
- if (((_a = SmartScriptStore.inputs.variables[id]) === null || _a === void 0 ? void 0 : _a[index]) !== value) {
129
+ if (((_a = SmartScriptStore.inputs.variables[id]) === null || _a === void 0 ? void 0 : _a[indexValue]) !== value) {
129
130
  if (typeof SmartScriptStore.inputs.variables[id] === "undefined")
130
131
  SmartScriptStore.inputs.variables[id] = [];
131
- SmartScriptStore.inputs.variables[id][index] = value;
132
- SmartScriptStore.actionsQueue.push(updateVariableAction(id, value, index));
132
+ SmartScriptStore.inputs.variables[id][indexValue] = value;
133
+ SmartScriptStore.actionsQueue.push(updateVariableAction(id, value, indexValue));
133
134
  }
134
135
  };
135
136
  SmartScriptStore.updateOptionInput = (id, value, index = 0) => {
136
137
  var _a, _b;
138
+ const indexValue = typeof index === "string" ? parseInt(index, 10) : index;
137
139
  if (!Object.prototype.hasOwnProperty.call(SmartScriptStore.inputs.options, id)) {
138
140
  console.error(`SmartScript error: trying to update input for undefined option ${id}`);
139
141
  return;
140
142
  }
141
- if (((_b = (_a = SmartScriptStore.inputs) === null || _a === void 0 ? void 0 : _a.options[id]) === null || _b === void 0 ? void 0 : _b[index]) !== value) {
143
+ if (((_b = (_a = SmartScriptStore.inputs) === null || _a === void 0 ? void 0 : _a.options[id]) === null || _b === void 0 ? void 0 : _b[indexValue]) !== value) {
142
144
  if (typeof SmartScriptStore.inputs.options[id] === "undefined")
143
145
  SmartScriptStore.inputs.options[id] = [];
144
- SmartScriptStore.inputs.options[id][index] = value;
145
- SmartScriptStore.actionsQueue.push(updateOptionAction(id, value, index));
146
+ SmartScriptStore.inputs.options[id][indexValue] = value;
147
+ SmartScriptStore.actionsQueue.push(updateOptionAction(id, value, indexValue));
146
148
  }
147
149
  };
148
150
  SmartScriptStore.updateVariableMeta = (id, _meta, index) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.31.4",
3
+ "version": "4.31.6",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "@legalplace/lplogic": "2.3.1",
26
26
  "@legalplace/model-healthcheck": "^1.1.5",
27
27
  "@legalplace/referencesparser": "^3.1.32",
28
- "@legalplace/storybook": "2.346.12",
28
+ "@legalplace/storybook": "2.346.18",
29
29
  "@legalplace/typeorm-constants": "^3.55.0",
30
30
  "@loadable/component": "^5.15.0",
31
31
  "@redux-saga/core": "^1.1.3",
@@ -96,5 +96,5 @@
96
96
  "*.test.ts",
97
97
  "*.test.tsx"
98
98
  ],
99
- "gitHead": "cc98af23ee4bbd436f14e90385331333d3dcfaf0"
99
+ "gitHead": "488e1176ec1e07740bb443d17bf5090608190bb6"
100
100
  }