plmt-constructor-sdk 0.17.6 → 0.17.9
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.
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isFulfillingCondition = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
4
|
const data_1 = require("../data");
|
|
6
5
|
function isFulfillingCondition(type, cellValue, condition) {
|
|
7
6
|
const method = condition.condition;
|
|
8
7
|
const conditionValue = condition.value;
|
|
9
8
|
switch (type) {
|
|
10
|
-
case
|
|
9
|
+
case data_1.ColumnType.String:
|
|
11
10
|
return isFulfillingStringCondition(method, cellValue, conditionValue);
|
|
12
|
-
case
|
|
13
|
-
case
|
|
11
|
+
case data_1.ColumnType.Number:
|
|
12
|
+
case data_1.ColumnType.Boolean:
|
|
14
13
|
const value = Array.isArray(conditionValue)
|
|
15
14
|
? conditionValue.map((item) => Number(item))
|
|
16
15
|
: conditionValue;
|
|
17
16
|
return isFulfillingNumberCondition(method, cellValue, value);
|
|
18
|
-
case
|
|
17
|
+
case data_1.ColumnType.Date:
|
|
19
18
|
const cellDate = new Date(cellValue);
|
|
20
19
|
if (Array.isArray(conditionValue)) {
|
|
21
20
|
if (conditionValue.length < 2)
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COLOR_STEPS =
|
|
4
|
-
var ColumnType;
|
|
5
|
-
(function (ColumnType) {
|
|
6
|
-
ColumnType[ColumnType["String"] = 0] = "String";
|
|
7
|
-
ColumnType[ColumnType["Number"] = 1] = "Number";
|
|
8
|
-
ColumnType[ColumnType["Date"] = 2] = "Date";
|
|
9
|
-
ColumnType[ColumnType["Boolean"] = 3] = "Boolean";
|
|
10
|
-
})(ColumnType = exports.ColumnType || (exports.ColumnType = {}));
|
|
3
|
+
exports.COLOR_STEPS = void 0;
|
|
11
4
|
exports.COLOR_STEPS = 128;
|