@infomaximum/widget-sdk 3.19.0 → 3.20.0
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.d.ts +2 -1
- package/dist/index.esm.js +6 -3
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,8 @@ declare enum EControlType {
|
|
|
32
32
|
filterMode = "filterMode",
|
|
33
33
|
displayCondition = "displayCondition",
|
|
34
34
|
eventsColor = "eventsColor",
|
|
35
|
-
inputMarkdown = "inputMarkdown"
|
|
35
|
+
inputMarkdown = "inputMarkdown",
|
|
36
|
+
filter = "filter"
|
|
36
37
|
}
|
|
37
38
|
/** Конфигурация элемента управления настройкой */
|
|
38
39
|
interface IControlRecord<Settings extends object, Value, ControlType = EControlType> {
|
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
|
}
|
|
@@ -923,6 +925,7 @@ var EControlType;
|
|
|
923
925
|
EControlType["displayCondition"] = "displayCondition";
|
|
924
926
|
EControlType["eventsColor"] = "eventsColor";
|
|
925
927
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
928
|
+
EControlType["filter"] = "filter";
|
|
926
929
|
})(EControlType || (EControlType = {}));
|
|
927
930
|
|
|
928
931
|
var ESortDirection;
|
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
|
}
|
|
@@ -924,6 +926,7 @@ exports.EControlType = void 0;
|
|
|
924
926
|
EControlType["displayCondition"] = "displayCondition";
|
|
925
927
|
EControlType["eventsColor"] = "eventsColor";
|
|
926
928
|
EControlType["inputMarkdown"] = "inputMarkdown";
|
|
929
|
+
EControlType["filter"] = "filter";
|
|
927
930
|
})(exports.EControlType || (exports.EControlType = {}));
|
|
928
931
|
|
|
929
932
|
exports.ESortDirection = void 0;
|