@infomaximum/widget-sdk 3.19.0 → 3.19.1
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/index.esm.js +5 -3
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -492,9 +492,11 @@ function checkDisplayCondition(displayCondition, variables) {
|
|
|
492
492
|
var _a;
|
|
493
493
|
if ((displayCondition === null || displayCondition === void 0 ? void 0 : displayCondition.mode) === EDisplayConditionMode.VARIABLE) {
|
|
494
494
|
var variableGuid = displayCondition.variableGuid, variableValue = displayCondition.variableValue;
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
var currentVariableValue = variableGuid && ((_a = variables.get(variableGuid)) === null || _a === void 0 ? void 0 : _a.value);
|
|
496
|
+
var isCurrentVariableMatch = Array.isArray(currentVariableValue)
|
|
497
|
+
? !!variableValue && (currentVariableValue === null || currentVariableValue === void 0 ? void 0 : currentVariableValue.includes(variableValue))
|
|
498
|
+
: currentVariableValue === variableValue;
|
|
499
|
+
if (!isCurrentVariableMatch) {
|
|
498
500
|
return false;
|
|
499
501
|
}
|
|
500
502
|
}
|
package/dist/index.js
CHANGED
|
@@ -493,9 +493,11 @@ function checkDisplayCondition(displayCondition, variables) {
|
|
|
493
493
|
var _a;
|
|
494
494
|
if ((displayCondition === null || displayCondition === void 0 ? void 0 : displayCondition.mode) === exports.EDisplayConditionMode.VARIABLE) {
|
|
495
495
|
var variableGuid = displayCondition.variableGuid, variableValue = displayCondition.variableValue;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
var currentVariableValue = variableGuid && ((_a = variables.get(variableGuid)) === null || _a === void 0 ? void 0 : _a.value);
|
|
497
|
+
var isCurrentVariableMatch = Array.isArray(currentVariableValue)
|
|
498
|
+
? !!variableValue && (currentVariableValue === null || currentVariableValue === void 0 ? void 0 : currentVariableValue.includes(variableValue))
|
|
499
|
+
: currentVariableValue === variableValue;
|
|
500
|
+
if (!isCurrentVariableMatch) {
|
|
499
501
|
return false;
|
|
500
502
|
}
|
|
501
503
|
}
|