@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 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
- if (variableGuid &&
496
- variableValue &&
497
- ((_a = variables.get(variableGuid)) === null || _a === void 0 ? void 0 : _a.value) !== variableValue) {
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
- if (variableGuid &&
497
- variableValue &&
498
- ((_a = variables.get(variableGuid)) === null || _a === void 0 ? void 0 : _a.value) !== variableValue) {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/widget-sdk",
3
- "version": "3.19.0",
3
+ "version": "3.19.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",