@legalplace/wizardx-core 4.25.1 → 4.25.3
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/libs/InputsInitiator.js +24 -2
- package/package.json +6 -6
|
@@ -51,7 +51,18 @@ export class IntputsInitiator {
|
|
|
51
51
|
values = new Array(this.ovc.options[optionId].length).fill(true);
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
|
-
|
|
54
|
+
const parentsTree = this.references.relations.options[optionId].parents;
|
|
55
|
+
const rootOptionId = parentsTree.length > 0
|
|
56
|
+
? parentsTree[parentsTree.length - 1]
|
|
57
|
+
: optionId;
|
|
58
|
+
const rootOptionReference = this.references.options[rootOptionId];
|
|
59
|
+
const rootOptionInput = this.ovc.options[rootOptionId];
|
|
60
|
+
const { length } = !rootOptionInput && rootOptionReference.meta.type === "static"
|
|
61
|
+
? [true]
|
|
62
|
+
: rootOptionInput;
|
|
63
|
+
values = new Array(length)
|
|
64
|
+
.fill(false)
|
|
65
|
+
.map((_, index) => { var _a, _b; return ((_b = (_a = this.ovc) === null || _a === void 0 ? void 0 : _a.options[optionId]) === null || _b === void 0 ? void 0 : _b[index]) || false; });
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
68
|
else if ([
|
|
@@ -74,7 +85,18 @@ export class IntputsInitiator {
|
|
|
74
85
|
let values = [""];
|
|
75
86
|
if (this.ovc &&
|
|
76
87
|
Object.prototype.hasOwnProperty.call(this.ovc.variables, variableId)) {
|
|
77
|
-
|
|
88
|
+
const parentsTree = this.references.relations.variables[variableId].parents;
|
|
89
|
+
const rootOptionId = parentsTree.length > 0
|
|
90
|
+
? parentsTree[parentsTree.length - 1]
|
|
91
|
+
: variableId;
|
|
92
|
+
const rootOptionReference = this.references.options[rootOptionId];
|
|
93
|
+
const rootOptionInput = this.ovc.options[rootOptionId];
|
|
94
|
+
const { length } = !rootOptionInput && rootOptionReference.meta.type === "static"
|
|
95
|
+
? [true]
|
|
96
|
+
: rootOptionInput;
|
|
97
|
+
values = new Array(length)
|
|
98
|
+
.fill("")
|
|
99
|
+
.map((_, index) => { var _a, _b; return ((_b = (_a = this.ovc) === null || _a === void 0 ? void 0 : _a.variables[variableId]) === null || _b === void 0 ? void 0 : _b[index]) || ""; });
|
|
78
100
|
}
|
|
79
101
|
else {
|
|
80
102
|
const defaultValue = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.3",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@legalplace/model-healthcheck": "^1.1.5",
|
|
27
27
|
"@legalplace/referencesparser": "^3.1.28",
|
|
28
28
|
"@legalplace/storybook": "2.298.0",
|
|
29
|
-
"@legalplace/typeorm-constants": "^3.
|
|
29
|
+
"@legalplace/typeorm-constants": "^3.46.0",
|
|
30
30
|
"@loadable/component": "^5.15.0",
|
|
31
31
|
"@redux-saga/core": "^1.1.3",
|
|
32
32
|
"connected-react-router": "^6.8.0",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"xss": "^1.0.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@legalplace/data-gouv": "^1.5.
|
|
57
|
+
"@legalplace/data-gouv": "^1.5.55",
|
|
58
58
|
"@legalplace/eslint-config": "^2.2.0",
|
|
59
|
-
"@legalplace/models-v3-types": "^5.13.
|
|
59
|
+
"@legalplace/models-v3-types": "^5.13.3",
|
|
60
60
|
"@legalplace/prettier-config": "^2.1.3",
|
|
61
|
-
"@legalplace/typeorm-entities": "^5.
|
|
61
|
+
"@legalplace/typeorm-entities": "^5.41.0",
|
|
62
62
|
"@swc-node/jest": "^1.3.2",
|
|
63
63
|
"@swc/core": "^1.2.93",
|
|
64
64
|
"@swc/jest": "^0.2.4",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"*.test.ts",
|
|
97
97
|
"*.test.tsx"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "e7ddf51dbcfa42c419448fe68a703899b096ecd2"
|
|
100
100
|
}
|