@legalplace/wizardx-core 4.43.19 → 4.43.20

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.
@@ -1,7 +1,7 @@
1
1
  import { updateOptionAction, updateVariableAction, } from "../redux/actions/inputs";
2
2
  import { updateOptionMetaAction, updateVariableMetaAction, } from "../redux/actions/references";
3
3
  import { updateSmartscriptOptionHiddenAction, updateSmartscriptVariableHiddenAction, } from "../redux/actions/smartscript";
4
- import { selectDataSmartscript } from "../redux";
4
+ import { initMandatoryVariableAction, selectDataSmartscript } from "../redux";
5
5
  export class SmartScriptStore {
6
6
  static grabActions() {
7
7
  const actions = [...SmartScriptStore.actionsQueue];
@@ -165,6 +165,9 @@ SmartScriptStore.updateVariableMeta = (id, _meta, index) => {
165
165
  if (typeof ((_a = meta.validator) === null || _a === void 0 ? void 0 : _a.conditions) !== "undefined")
166
166
  delete meta.validator.conditions;
167
167
  SmartScriptStore.actionsQueue.push(updateVariableMetaAction(id, meta, index));
168
+ if (meta.mandatory !== undefined) {
169
+ SmartScriptStore.actionsQueue.push(initMandatoryVariableAction(id, Array(SmartScriptStore.inputs.variables[id].values.length).fill(meta.mandatory)));
170
+ }
168
171
  };
169
172
  SmartScriptStore.updateOptionMeta = (id, _meta) => {
170
173
  var _a, _b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.43.19",
3
+ "version": "4.43.20",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -100,5 +100,5 @@
100
100
  "*.test.ts",
101
101
  "*.test.tsx"
102
102
  ],
103
- "gitHead": "501cd7f237a9e56d79f8e3ae9071169beb82b409"
103
+ "gitHead": "63f21f9afc279a5dc835dd630b4b659d203470f7"
104
104
  }