@sisense/sdk-data 1.28.0 → 1.30.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/cjs/dimensional-model/attributes.d.ts +2 -2
- package/dist/cjs/dimensional-model/attributes.js +7 -7
- package/dist/cjs/dimensional-model/base.d.ts +7 -1
- package/dist/cjs/dimensional-model/base.js +2 -1
- package/dist/cjs/dimensional-model/filters/filter-config-utils.d.ts +4 -0
- package/dist/cjs/dimensional-model/filters/filter-config-utils.js +5 -2
- package/dist/cjs/dimensional-model/filters/filter-relations.d.ts +187 -0
- package/dist/cjs/dimensional-model/filters/filter-relations.js +537 -0
- package/dist/cjs/dimensional-model/filters/helpers.d.ts +112 -0
- package/dist/cjs/dimensional-model/filters/helpers.js +178 -0
- package/dist/cjs/dimensional-model/filters/index.d.ts +2 -0
- package/dist/cjs/dimensional-model/filters/index.js +18 -0
- package/dist/cjs/dimensional-model/filters/utils/attribute-measure-util.d.ts +1 -35
- package/dist/cjs/dimensional-model/filters/utils/attribute-measure-util.js +37 -101
- package/dist/cjs/dimensional-model/interfaces.d.ts +9 -0
- package/dist/cjs/dimensional-model/interfaces.js +0 -1
- package/dist/cjs/dimensional-model/measures/factory.js +1 -32
- package/dist/cjs/dimensional-model/measures/measures.d.ts +3 -3
- package/dist/cjs/dimensional-model/measures/measures.js +10 -9
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/interfaces.d.ts +2 -2
- package/dist/cjs/utils.d.ts +74 -2
- package/dist/cjs/utils.js +138 -3
- package/dist/dimensional-model/attributes.d.ts +2 -2
- package/dist/dimensional-model/attributes.js +7 -7
- package/dist/dimensional-model/base.d.ts +7 -1
- package/dist/dimensional-model/base.js +2 -1
- package/dist/dimensional-model/filters/filter-config-utils.d.ts +4 -0
- package/dist/dimensional-model/filters/filter-config-utils.js +5 -2
- package/dist/dimensional-model/filters/filter-relations.d.ts +187 -0
- package/dist/dimensional-model/filters/filter-relations.js +509 -0
- package/dist/dimensional-model/filters/helpers.d.ts +112 -0
- package/dist/dimensional-model/filters/helpers.js +169 -0
- package/dist/dimensional-model/filters/index.d.ts +2 -0
- package/dist/dimensional-model/filters/index.js +2 -0
- package/dist/dimensional-model/filters/utils/attribute-measure-util.d.ts +1 -35
- package/dist/dimensional-model/filters/utils/attribute-measure-util.js +36 -74
- package/dist/dimensional-model/interfaces.d.ts +9 -0
- package/dist/dimensional-model/interfaces.js +0 -1
- package/dist/dimensional-model/measures/factory.js +2 -30
- package/dist/dimensional-model/measures/measures.d.ts +3 -3
- package/dist/dimensional-model/measures/measures.js +10 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces.d.ts +2 -2
- package/dist/tsconfig.prod.cjs.tsbuildinfo +1 -1
- package/dist/utils.d.ts +74 -2
- package/dist/utils.js +133 -2
- package/package.json +4 -3
- package/dist/cjs/dimensional-model/filter-relations.d.ts +0 -9
- package/dist/cjs/dimensional-model/filter-relations.js +0 -18
- package/dist/dimensional-model/filter-relations.d.ts +0 -9
- package/dist/dimensional-model/filter-relations.js +0 -14
|
@@ -11,7 +11,7 @@ export declare const jaqlSimpleColumnType: (datatype: string) => string;
|
|
|
11
11
|
export declare class DimensionalAttribute extends DimensionalElement implements Attribute {
|
|
12
12
|
readonly expression: string;
|
|
13
13
|
protected _sort: Sort;
|
|
14
|
-
constructor(name: string, expression: string, type?: string, desc?: string, sort?: Sort, dataSource?: JaqlDataSource);
|
|
14
|
+
constructor(name: string, expression: string, type?: string, desc?: string, sort?: Sort, dataSource?: JaqlDataSource, composeCode?: string);
|
|
15
15
|
/**
|
|
16
16
|
* gets the element's ID
|
|
17
17
|
*/
|
|
@@ -46,7 +46,7 @@ export declare class DimensionalAttribute extends DimensionalElement implements
|
|
|
46
46
|
export declare class DimensionalLevelAttribute extends DimensionalAttribute implements LevelAttribute {
|
|
47
47
|
private _format;
|
|
48
48
|
readonly granularity: string;
|
|
49
|
-
constructor(l: string, expression: string, granularity: string, format?: string, desc?: string, sort?: Sort, dataSource?: JaqlDataSource);
|
|
49
|
+
constructor(l: string, expression: string, granularity: string, format?: string, desc?: string, sort?: Sort, dataSource?: JaqlDataSource, composeCode?: string);
|
|
50
50
|
/**
|
|
51
51
|
* gets the element's ID
|
|
52
52
|
*/
|
|
@@ -13,8 +13,8 @@ exports.jaqlSimpleColumnType = jaqlSimpleColumnType;
|
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
class DimensionalAttribute extends base_js_1.DimensionalElement {
|
|
16
|
-
constructor(name, expression, type, desc, sort, dataSource) {
|
|
17
|
-
super(name, type || types_js_1.MetadataTypes.Attribute, desc, dataSource);
|
|
16
|
+
constructor(name, expression, type, desc, sort, dataSource, composeCode) {
|
|
17
|
+
super(name, type || types_js_1.MetadataTypes.Attribute, desc, dataSource, composeCode);
|
|
18
18
|
this._sort = types_js_1.Sort.None;
|
|
19
19
|
this.expression = expression;
|
|
20
20
|
this._sort = sort || types_js_1.Sort.None;
|
|
@@ -40,7 +40,7 @@ class DimensionalAttribute extends base_js_1.DimensionalElement {
|
|
|
40
40
|
* @returns An instance representing the sorted {@link Attribute} of this instance
|
|
41
41
|
*/
|
|
42
42
|
sort(sort) {
|
|
43
|
-
return new DimensionalAttribute(this.name, this.expression, this.type, this.description, sort, this.dataSource);
|
|
43
|
+
return new DimensionalAttribute(this.name, this.expression, this.type, this.description, sort, this.dataSource, this.composeCode);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Gets the JAQL representation of this instance
|
|
@@ -77,8 +77,8 @@ exports.DimensionalAttribute = DimensionalAttribute;
|
|
|
77
77
|
* @internal
|
|
78
78
|
*/
|
|
79
79
|
class DimensionalLevelAttribute extends DimensionalAttribute {
|
|
80
|
-
constructor(l, expression, granularity, format, desc, sort, dataSource) {
|
|
81
|
-
super(l, expression, types_js_1.MetadataTypes.DateLevel, desc, sort, dataSource);
|
|
80
|
+
constructor(l, expression, granularity, format, desc, sort, dataSource, composeCode) {
|
|
81
|
+
super(l, expression, types_js_1.MetadataTypes.DateLevel, desc, sort, dataSource, composeCode);
|
|
82
82
|
this._format = format;
|
|
83
83
|
this.granularity = granularity;
|
|
84
84
|
}
|
|
@@ -109,7 +109,7 @@ class DimensionalLevelAttribute extends DimensionalAttribute {
|
|
|
109
109
|
* @returns An instance representing the sorted {@link LevelAttribute} of this instance
|
|
110
110
|
*/
|
|
111
111
|
sort(sort) {
|
|
112
|
-
return new DimensionalLevelAttribute(this.name, this.expression, this.granularity, this._format, this.description, sort, this.dataSource);
|
|
112
|
+
return new DimensionalLevelAttribute(this.name, this.expression, this.granularity, this._format, this.description, sort, this.dataSource, this.composeCode);
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
115
|
* The string formatting of this instance
|
|
@@ -126,7 +126,7 @@ class DimensionalLevelAttribute extends DimensionalAttribute {
|
|
|
126
126
|
* @returns An instance representing the formatted {@link LevelAttribute} of this instance
|
|
127
127
|
*/
|
|
128
128
|
format(format) {
|
|
129
|
-
return new DimensionalLevelAttribute(this.name, this.expression, this.granularity, format, this.description, this._sort, this.dataSource);
|
|
129
|
+
return new DimensionalLevelAttribute(this.name, this.expression, this.granularity, format, this.description, this._sort, this.dataSource, this.composeCode);
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* Gets a serializable representation of the element
|
|
@@ -21,7 +21,7 @@ export declare abstract class DimensionalElement implements Element {
|
|
|
21
21
|
* Defines the element's data source
|
|
22
22
|
*/
|
|
23
23
|
get dataSource(): JaqlDataSource;
|
|
24
|
-
constructor(name: string, type: string, desc?: string, dataSource?: JaqlDataSource);
|
|
24
|
+
constructor(name: string, type: string, desc?: string, dataSource?: JaqlDataSource, composeCode?: string);
|
|
25
25
|
/**
|
|
26
26
|
* gets the element's description
|
|
27
27
|
*/
|
|
@@ -34,6 +34,12 @@ export declare abstract class DimensionalElement implements Element {
|
|
|
34
34
|
* gets the element's ID
|
|
35
35
|
*/
|
|
36
36
|
abstract get id(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional CSDK code to initialize this element
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
composeCode?: string;
|
|
37
43
|
/**
|
|
38
44
|
* Gets a serializable representation of the element
|
|
39
45
|
*/
|
|
@@ -5,13 +5,14 @@ exports.normalizeName = exports.DimensionalElement = void 0;
|
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
class DimensionalElement {
|
|
8
|
-
constructor(name, type, desc, dataSource) {
|
|
8
|
+
constructor(name, type, desc, dataSource, composeCode) {
|
|
9
9
|
this._name = name;
|
|
10
10
|
this.type = type;
|
|
11
11
|
this.description = desc || '';
|
|
12
12
|
if (dataSource) {
|
|
13
13
|
this._dataSource = dataSource;
|
|
14
14
|
}
|
|
15
|
+
this.composeCode = composeCode;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Defines the element's name
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { BaseFilterConfig, CompleteBaseFilterConfig, CompleteMembersFilterConfig, MembersFilterConfig } from '../interfaces.js';
|
|
2
2
|
/**
|
|
3
3
|
* Returns a default configuration for a base filter.
|
|
4
|
+
*
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
7
|
export declare const getDefaultBaseFilterConfig: () => CompleteBaseFilterConfig;
|
|
7
8
|
/**
|
|
8
9
|
* Returns a default configuration for a members filter.
|
|
10
|
+
*
|
|
9
11
|
* @internal
|
|
10
12
|
*/
|
|
11
13
|
export declare const getDefaultMembersFilterConfig: () => CompleteMembersFilterConfig;
|
|
12
14
|
/**
|
|
13
15
|
* Checks whether the given configuration is a members filter configuration.
|
|
16
|
+
*
|
|
14
17
|
* @param config - The filter configuration.
|
|
15
18
|
* @returns Whether the configuration is a members filter configuration.
|
|
16
19
|
* @internal
|
|
@@ -18,6 +21,7 @@ export declare const getDefaultMembersFilterConfig: () => CompleteMembersFilterC
|
|
|
18
21
|
export declare function isMembersFilterConfig(config: BaseFilterConfig | MembersFilterConfig): config is MembersFilterConfig;
|
|
19
22
|
/**
|
|
20
23
|
* Simplifies the filter configuration by removing default values.
|
|
24
|
+
*
|
|
21
25
|
* @param config - The filter configuration.
|
|
22
26
|
* @returns The simplified filter configuration.
|
|
23
27
|
* @internal
|
|
@@ -8,6 +8,7 @@ const isEqual_js_1 = __importDefault(require("lodash-es/isEqual.js"));
|
|
|
8
8
|
const utils_js_1 = require("../../utils.js");
|
|
9
9
|
/**
|
|
10
10
|
* Returns a default configuration for a base filter.
|
|
11
|
+
*
|
|
11
12
|
* @internal
|
|
12
13
|
*/
|
|
13
14
|
const getDefaultBaseFilterConfig = () => ({
|
|
@@ -18,12 +19,14 @@ const getDefaultBaseFilterConfig = () => ({
|
|
|
18
19
|
exports.getDefaultBaseFilterConfig = getDefaultBaseFilterConfig;
|
|
19
20
|
/**
|
|
20
21
|
* Returns a default configuration for a members filter.
|
|
22
|
+
*
|
|
21
23
|
* @internal
|
|
22
24
|
*/
|
|
23
25
|
const getDefaultMembersFilterConfig = () => (Object.assign(Object.assign({}, (0, exports.getDefaultBaseFilterConfig)()), { excludeMembers: false, enableMultiSelection: true, deactivatedMembers: [] }));
|
|
24
26
|
exports.getDefaultMembersFilterConfig = getDefaultMembersFilterConfig;
|
|
25
27
|
/**
|
|
26
28
|
* Checks whether the given configuration is a members filter configuration.
|
|
29
|
+
*
|
|
27
30
|
* @param config - The filter configuration.
|
|
28
31
|
* @returns Whether the configuration is a members filter configuration.
|
|
29
32
|
* @internal
|
|
@@ -34,6 +37,7 @@ function isMembersFilterConfig(config) {
|
|
|
34
37
|
exports.isMembersFilterConfig = isMembersFilterConfig;
|
|
35
38
|
/**
|
|
36
39
|
* Simplifies the filter configuration by removing default values.
|
|
40
|
+
*
|
|
37
41
|
* @param config - The filter configuration.
|
|
38
42
|
* @returns The simplified filter configuration.
|
|
39
43
|
* @internal
|
|
@@ -43,7 +47,6 @@ const simplifyFilterConfig = (config) => {
|
|
|
43
47
|
? (0, exports.getDefaultMembersFilterConfig)()
|
|
44
48
|
: (0, exports.getDefaultBaseFilterConfig)();
|
|
45
49
|
// Filter out properties that match their default values
|
|
46
|
-
|
|
47
|
-
return simplifiedConfig;
|
|
50
|
+
return Object.fromEntries(Object.entries(config).filter(([key, value]) => !(0, isEqual_js_1.default)(value, defaultConfig[key])));
|
|
48
51
|
};
|
|
49
52
|
exports.simplifyFilterConfig = simplifyFilterConfig;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Filter, FilterRelations, FilterRelationsJaql, FilterRelationsModel, FilterRelationsModelNode } from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Type guard for checking if the provided filters are FilterRelations.
|
|
4
|
+
*
|
|
5
|
+
* @param filters - The filters to check.
|
|
6
|
+
* @returns `true` if the filters are FilterRelations, `false` otherwise.
|
|
7
|
+
* @group Filter Utilities
|
|
8
|
+
*/
|
|
9
|
+
export declare function isFilterRelations(filters: Filter[] | FilterRelations | undefined): filters is FilterRelations;
|
|
10
|
+
/**
|
|
11
|
+
* Rules of filter relations - logical operators of how filters are related to each other.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare type FilterRelationsRules = FilterRelationsRule | FilterRelationsRuleNode | null;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare type FilterRelationsRule = {
|
|
19
|
+
left: FilterRelationsRuleNode;
|
|
20
|
+
right: FilterRelationsRuleNode;
|
|
21
|
+
operator: 'AND' | 'OR';
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare type FilterRelationsRuleIdNode = {
|
|
25
|
+
instanceid: string;
|
|
26
|
+
};
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare type FilterRelationsRuleNode = FilterRelationsRule | FilterRelationsRuleIdNode;
|
|
29
|
+
/**
|
|
30
|
+
* Filter action types
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare type FilterAction = {
|
|
35
|
+
type: 'add';
|
|
36
|
+
payload: Filter;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'remove';
|
|
39
|
+
payload: Filter;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Merges source filters with target filters and recalculates relations.
|
|
43
|
+
*
|
|
44
|
+
* @param sourceFilters - The source filters or filter relations to merge.
|
|
45
|
+
* @param targetFilters - The target filters or filter relations to merge with.
|
|
46
|
+
* @returns Updated source filters merged with target filters. If the source filters are FilterRelations, the relations are recalculated.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function mergeFiltersOrFilterRelations(sourceFilters?: Filter[] | FilterRelations, targetFilters?: Filter[] | FilterRelations): Filter[] | FilterRelations;
|
|
50
|
+
/**
|
|
51
|
+
* Splits filters or filter relations into filters and relations rules.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare function splitFiltersAndRelations(filtersOrFilterRelations: Filter[] | FilterRelations | undefined): {
|
|
55
|
+
filters: Filter[];
|
|
56
|
+
relations: FilterRelationsRules;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns pure filters array from the given filters or filter relations.
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export declare function getFiltersArray(filtersOrFilterRelations: Filter[] | FilterRelations | undefined): Filter[];
|
|
63
|
+
/**
|
|
64
|
+
* Combines filters and relations into a single FilterRelations object.
|
|
65
|
+
* If the relations are empty or relations are trivial (single node), the filters are returned as is.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare function combineFiltersAndRelations(filters: Filter[], relations: FilterRelationsRules): Filter[] | FilterRelations;
|
|
69
|
+
/** Type guard for checking if a node is a single relations node (trivial case when relations are needless).
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare function isTrivialSingleNodeRelations(relations: FilterRelationsRules): relations is FilterRelationsRuleIdNode;
|
|
73
|
+
/**
|
|
74
|
+
* Calculates new relations based on the changes in filters.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare function calculateNewRelations(prevFilters: Filter[], prevRelations: FilterRelationsRules, newFilters: Filter[]): FilterRelationsRules;
|
|
78
|
+
/**
|
|
79
|
+
* Replaces a filter in the relations tree with a new filter.
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export declare function getRelationsWithReplacedFilter(relations: FilterRelationsRules, filterToReplace: Filter, newFilter: Filter): FilterRelationsRules;
|
|
83
|
+
/**
|
|
84
|
+
* Converts filter relations model from Fusion to internal CSDK filter relations rules.
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export declare function convertFilterRelationsModelToRelationRules(filterRelationsModel: FilterRelationsModel | FilterRelationsModelNode | undefined, filters: Filter[]): FilterRelationsRules;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
export declare function isRelationsRuleIdNode(node: FilterRelationsRuleNode): node is FilterRelationsRuleIdNode;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
export declare function isRelationsRule(node: FilterRelationsRuleNode): node is FilterRelationsRule;
|
|
96
|
+
/**
|
|
97
|
+
* Converts internal CSDK filter relations rules to filter relations model for Fusion.
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export declare function filterRelationRulesToFilterRelationsModel(filterRelationRules: FilterRelationsRules, filters: Filter[]): FilterRelationsModel | FilterRelationsModelNode | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
export declare function findFilterByGuid(filters: Filter[], guid: string): Filter | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Error thrown when an unknown node type is encountered in filter relations.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export declare class UnknownRelationsNodeError extends Error {
|
|
110
|
+
constructor();
|
|
111
|
+
}
|
|
112
|
+
/** @internal */
|
|
113
|
+
export declare type FilterRelationsDescription = FilterRelationsDescriptionNode[];
|
|
114
|
+
/** @internal */
|
|
115
|
+
export declare type FilterRelationsDescriptionNode = OpenBracketDescriptionNode | CloseBracketDescriptionNode | AttributeDescriptionNode | OperatorDescriptionNode;
|
|
116
|
+
/** @internal */
|
|
117
|
+
export declare type OpenBracketDescriptionNode = {
|
|
118
|
+
nodeType: 'openBracket';
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
export declare function isOpenBracketDescriptionNode(node: FilterRelationsDescriptionNode): node is OpenBracketDescriptionNode;
|
|
124
|
+
/** @internal */
|
|
125
|
+
export declare type CloseBracketDescriptionNode = {
|
|
126
|
+
nodeType: 'closeBracket';
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
export declare function isCloseBracketDescriptionNode(node: FilterRelationsDescriptionNode): node is CloseBracketDescriptionNode;
|
|
132
|
+
/** @internal */
|
|
133
|
+
export declare type AttributeDescriptionNode = {
|
|
134
|
+
nodeType: 'attribute';
|
|
135
|
+
attribute: string;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
export declare function isAttributeDescriptionNode(node: FilterRelationsDescriptionNode): node is AttributeDescriptionNode;
|
|
141
|
+
/** @internal */
|
|
142
|
+
export declare type OperatorDescriptionNode = {
|
|
143
|
+
nodeType: 'operator';
|
|
144
|
+
operator: 'AND' | 'OR';
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
export declare function isOperatorDescriptionNode(node: FilterRelationsDescriptionNode): node is OperatorDescriptionNode;
|
|
150
|
+
/**
|
|
151
|
+
* Gets a unique identifier for a filter, combining its attribute expression and granularity if available.
|
|
152
|
+
*
|
|
153
|
+
* @param {Filter} filter - The filter object to generate the unique identifier for.
|
|
154
|
+
* @returns {string} - The unique identifier for the filter.
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
export declare function getFilterCompareId(filter: Filter): string;
|
|
158
|
+
/**
|
|
159
|
+
* Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
|
|
160
|
+
* and removes duplicates based on filter compare id.
|
|
161
|
+
*
|
|
162
|
+
* Saves the 'sourceFilters' filters order, while adds new filters to the end of the array.
|
|
163
|
+
*
|
|
164
|
+
* @param {Filter[]} [sourceFilters=[]] - The source array of filter objects.
|
|
165
|
+
* @param {Filter[]} [targetFilters=[]] - The target array of filter objects.
|
|
166
|
+
* @returns {Filter[]} - The merged array of filter objects.
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
export declare function mergeFilters(sourceFilters?: Filter[], targetFilters?: Filter[]): Filter[];
|
|
170
|
+
/**
|
|
171
|
+
* Replaces nodes of filter reations tree with fetched filters by instance id.
|
|
172
|
+
*
|
|
173
|
+
* @param filters - The filters.
|
|
174
|
+
* @param highlights - The highlights
|
|
175
|
+
* @param filterRelations - Fetched filter relations.
|
|
176
|
+
* @returns Filter relations with filters in nodes.
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
export declare function getFilterRelationsFromJaql(filters: Filter[], highlights: Filter[], filterRelations: FilterRelationsJaql | undefined): FilterRelations | Filter[];
|
|
180
|
+
/**
|
|
181
|
+
* Converts filter relations model to filter relations jaql.
|
|
182
|
+
*
|
|
183
|
+
* @param filterRelations - Filter relations model.
|
|
184
|
+
* @returns Filter relations jaql.
|
|
185
|
+
* @internal
|
|
186
|
+
*/
|
|
187
|
+
export declare function convertFilterRelationsModelToJaql(filterRelations: FilterRelationsModel | FilterRelationsModelNode | undefined): FilterRelationsJaql | undefined;
|