@sisense/sdk-query-client 1.11.0 → 1.13.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.
|
@@ -24,14 +24,21 @@ function prepareFilterMetadata(attributesMetadata, filters, filterRelations, hig
|
|
|
24
24
|
const [highlightsWithAttributes, highlightsWithoutAttributes] = matchHighlightsWithAttributes(attributesMetadata, highlights);
|
|
25
25
|
attributesMetadata.forEach((d) => applyHighlightFilters(d, highlightsWithAttributes));
|
|
26
26
|
const getFilterJaql = (f) => {
|
|
27
|
+
const jaql = f.jaql();
|
|
27
28
|
if (filterRelations) {
|
|
28
|
-
|
|
29
|
+
// instanceid is needed for filter relations only
|
|
30
|
+
if (Array.isArray(jaql)) {
|
|
31
|
+
return jaql.map((j) => (Object.assign(Object.assign({}, j), { instanceid: f.guid })));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return Object.assign(Object.assign({}, jaql), { instanceid: f.guid });
|
|
35
|
+
}
|
|
29
36
|
}
|
|
30
|
-
return
|
|
37
|
+
return jaql;
|
|
31
38
|
};
|
|
32
39
|
const filtersMetadata = (shouldSkipHighlightsWithoutAttributes
|
|
33
|
-
? filters.
|
|
34
|
-
: [...filters, ...highlightsWithoutAttributes].
|
|
40
|
+
? filters.flatMap((d) => getFilterJaql(d))
|
|
41
|
+
: [...filters, ...highlightsWithoutAttributes].flatMap((d) => getFilterJaql(d))).filter((f) => {
|
|
35
42
|
return Object.keys(f.jaql.filter || {}).length !== 0;
|
|
36
43
|
});
|
|
37
44
|
if (shouldSkipHighlightsWithoutAttributes && highlightsWithoutAttributes.length > 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function applyHighlightFilters(metadataItem, highlights) {
|
|
2
2
|
const filter = highlights === null || highlights === void 0 ? void 0 : highlights.find((f) => getMetadataItemId(metadataItem) === f.attribute.id);
|
|
3
|
-
if (filter) {
|
|
3
|
+
if (filter && !filter.disabled) {
|
|
4
4
|
if (filter.isScope) {
|
|
5
5
|
filter.isScope = false;
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Sisense",
|
|
12
12
|
"Compose SDK"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.
|
|
14
|
+
"version": "1.13.0",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": "./dist/index.js",
|
|
17
17
|
"main": "./dist/index.js",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"author": "Sisense",
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sisense/sdk-common": "^1.
|
|
24
|
-
"@sisense/sdk-data": "^1.
|
|
25
|
-
"@sisense/sdk-pivot-client": "^1.
|
|
26
|
-
"@sisense/sdk-rest-client": "^1.
|
|
23
|
+
"@sisense/sdk-common": "^1.13.0",
|
|
24
|
+
"@sisense/sdk-data": "^1.13.0",
|
|
25
|
+
"@sisense/sdk-pivot-client": "^1.13.0",
|
|
26
|
+
"@sisense/sdk-rest-client": "^1.13.0",
|
|
27
27
|
"@sisense/task-manager": "^0.1.0",
|
|
28
28
|
"numeral": "^2.0.6",
|
|
29
29
|
"ts-deepmerge": "6.0.2",
|