@qrvey/utils 1.15.0-20 → 1.15.0-21
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBackendValues = void 0;
|
|
4
4
|
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
5
5
|
const flattenDeep_1 = require("../../../general/array/flattenDeep");
|
|
6
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
6
7
|
const FILTER_VALIDATOR_1 = require("../../constants/common/FILTER_VALIDATOR");
|
|
7
8
|
const FILTER_VALIDATOR_INFO_1 = require("../../constants/common/FILTER_VALIDATOR_INFO");
|
|
8
9
|
const isRankingFilter_1 = require("../common/isRankingFilter");
|
|
@@ -86,7 +87,9 @@ function getNullValues(values, filter) {
|
|
|
86
87
|
return addValue ? [FILTER_VALIDATOR_INFO_1.FILTER_VALIDATOR_INFO[filter.validator].label] : [];
|
|
87
88
|
}
|
|
88
89
|
function getInValues(values) {
|
|
89
|
-
return values
|
|
90
|
+
return values
|
|
91
|
+
.map((value) => (Object.assign(Object.assign({}, getValue(value, value)), { anchor: (0, isEmpty_1.isEmpty)(value.anchor) ? undefined : value.anchor })))
|
|
92
|
+
.filter(Boolean);
|
|
90
93
|
}
|
|
91
94
|
function getValue(objectValue, value) {
|
|
92
95
|
return objectValue.enabled ? value : undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { COLUMN } from "../../../columns/constants/COLUMN";
|
|
2
2
|
import { flattenDeep } from "../../../general/array/flattenDeep";
|
|
3
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
3
4
|
import { FILTER_VALIDATOR } from "../../constants/common/FILTER_VALIDATOR";
|
|
4
5
|
import { FILTER_VALIDATOR_INFO } from "../../constants/common/FILTER_VALIDATOR_INFO";
|
|
5
6
|
import { isRankingFilter } from "../common/isRankingFilter";
|
|
@@ -82,7 +83,9 @@ function getNullValues(values, filter) {
|
|
|
82
83
|
return addValue ? [FILTER_VALIDATOR_INFO[filter.validator].label] : [];
|
|
83
84
|
}
|
|
84
85
|
function getInValues(values) {
|
|
85
|
-
return values
|
|
86
|
+
return values
|
|
87
|
+
.map((value) => (Object.assign(Object.assign({}, getValue(value, value)), { anchor: isEmpty(value.anchor) ? undefined : value.anchor })))
|
|
88
|
+
.filter(Boolean);
|
|
86
89
|
}
|
|
87
90
|
function getValue(objectValue, value) {
|
|
88
91
|
return objectValue.enabled ? value : undefined;
|