@legalplace/wizardx-core 4.43.12 → 4.43.13
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.
|
@@ -15,7 +15,7 @@ export const canVariableDisplay = (id, index, selectors) => {
|
|
|
15
15
|
return display;
|
|
16
16
|
};
|
|
17
17
|
const stateToProps = (selectors) => (state, ownProps) => {
|
|
18
|
-
var _a, _b;
|
|
18
|
+
var _a, _b, _c;
|
|
19
19
|
const { selectVariableReference, selectVariableInputByIndex, selectVariableConditionValue, selectVariableValidatorConditionValue, selectMandatoryVariableByIndex, selectListSelectValuesByIndex, selectInstanceProofs, } = selectors;
|
|
20
20
|
const { id, index } = ownProps;
|
|
21
21
|
const variable = selectVariableReference(id);
|
|
@@ -57,19 +57,22 @@ const stateToProps = (selectors) => (state, ownProps) => {
|
|
|
57
57
|
return Number((_b = (_a = proof === null || proof === void 0 ? void 0 : proof.metadata) === null || _a === void 0 ? void 0 : _a.custom) === null || _b === void 0 ? void 0 : _b.idUploadProof) === Number(id) &&
|
|
58
58
|
((_d = (_c = proof === null || proof === void 0 ? void 0 : proof.metadata) === null || _c === void 0 ? void 0 : _c.custom) === null || _d === void 0 ? void 0 : _d.index) === index;
|
|
59
59
|
});
|
|
60
|
+
const isProofNotUploaded = [
|
|
61
|
+
formProofStatus.AWAITING,
|
|
62
|
+
formProofStatus.PRE_UPLOADED,
|
|
63
|
+
].includes(instanceProof.status);
|
|
64
|
+
const isUploadedFromWizard = ((_b = instanceProof.metadata) === null || _b === void 0 ? void 0 : _b.uploadContext) === "quiz";
|
|
60
65
|
if (instanceProof &&
|
|
61
66
|
instanceIsPaid &&
|
|
62
|
-
instanceProof.status !== formProofStatus.LATER
|
|
67
|
+
instanceProof.status !== formProofStatus.LATER &&
|
|
68
|
+
(isProofNotUploaded || isUploadedFromWizard)) {
|
|
63
69
|
type = "upload";
|
|
64
70
|
display = true;
|
|
65
71
|
proofUniqid = instanceProof.uniqid;
|
|
66
|
-
isProofUploaded = !
|
|
67
|
-
formProofStatus.AWAITING,
|
|
68
|
-
formProofStatus.PRE_UPLOADED,
|
|
69
|
-
].includes(instanceProof.status);
|
|
72
|
+
isProofUploaded = !isProofNotUploaded;
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
|
-
const validatorMessage = typeof ((
|
|
75
|
+
const validatorMessage = typeof ((_c = variable.validator) === null || _c === void 0 ? void 0 : _c.message) === "string"
|
|
73
76
|
? parseRawWithRelatedVariables(variable.validator.message, parentOptionId, index)
|
|
74
77
|
: "";
|
|
75
78
|
const helper = variable.helper
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "4.43.
|
|
3
|
+
"version": "4.43.13",
|
|
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": "
|
|
103
|
+
"gitHead": "a159be60c3cec6fbcb5c3735960cb341910a67a7"
|
|
104
104
|
}
|