@sisense/sdk-data 0.16.0 → 1.1.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/dimensional-model/analytics/factory.d.ts +47 -0
- package/dist/dimensional-model/analytics/factory.js +140 -0
- package/dist/dimensional-model/factory.js +1 -1
- package/dist/dimensional-model/filters/factory.d.ts +508 -123
- package/dist/dimensional-model/filters/factory.js +526 -118
- package/dist/dimensional-model/filters/filters.d.ts +4 -0
- package/dist/dimensional-model/filters/filters.js +2 -0
- package/dist/dimensional-model/interfaces.d.ts +15 -2
- package/dist/dimensional-model/measures/factory.d.ts +547 -177
- package/dist/dimensional-model/measures/factory.js +547 -177
- package/dist/index.d.ts +47 -41
- package/dist/index.js +47 -41
- package/dist/translation/resources/en.d.ts +1 -1
- package/dist/translation/resources/en.js +1 -1
- package/dist/translation/resources/index.d.ts +2 -2
- package/dist/translation/resources/uk.js +1 -1
- package/dist/utils.d.ts +16 -0
- package/dist/utils.js +63 -0
- package/package.json +14 -3
|
@@ -88,6 +88,10 @@ declare abstract class AbstractFilter extends DimensionalElement implements Filt
|
|
|
88
88
|
* Filter type
|
|
89
89
|
*/
|
|
90
90
|
readonly filterType: string;
|
|
91
|
+
/**
|
|
92
|
+
* Global filter identifier
|
|
93
|
+
*/
|
|
94
|
+
readonly guid: string;
|
|
91
95
|
constructor(att: Attribute, filterType: string);
|
|
92
96
|
get name(): string;
|
|
93
97
|
/**
|
|
@@ -14,6 +14,7 @@ import { DateLevels, MetadataTypes } from '../types.js';
|
|
|
14
14
|
import { create } from '../factory.js';
|
|
15
15
|
import { DimensionalBaseMeasure } from '../measures/measures.js';
|
|
16
16
|
import { TranslatableError } from '../../translation/translatable-error.js';
|
|
17
|
+
import { guidFast } from '../../utils.js';
|
|
17
18
|
/**
|
|
18
19
|
* Different text operators that can be used with text filters
|
|
19
20
|
*
|
|
@@ -100,6 +101,7 @@ class AbstractFilter extends DimensionalElement {
|
|
|
100
101
|
this.filterType = filterType;
|
|
101
102
|
AbstractFilter.checkAttributeSupport(att);
|
|
102
103
|
this.attribute = att;
|
|
104
|
+
this.guid = guidFast(13);
|
|
103
105
|
}
|
|
104
106
|
get name() {
|
|
105
107
|
return hash(this.jaql());
|
|
@@ -62,7 +62,7 @@ export interface Element {
|
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Base interface for measure, which is typically numeric aggregation over {@link Attribute}(s).
|
|
65
|
-
* See {@link
|
|
65
|
+
* See {@link measureFactory} for how to create measures.
|
|
66
66
|
*
|
|
67
67
|
*/
|
|
68
68
|
export interface Measure extends Element {
|
|
@@ -321,9 +321,13 @@ export interface LevelAttribute extends Attribute {
|
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
324
|
-
* Base interface for filter. See {@link
|
|
324
|
+
* Base interface for filter. See {@link filterFactory} for how to create filters.
|
|
325
325
|
*/
|
|
326
326
|
export interface Filter extends Element {
|
|
327
|
+
/**
|
|
328
|
+
* Global filter identifier
|
|
329
|
+
*/
|
|
330
|
+
readonly guid: string;
|
|
327
331
|
/**
|
|
328
332
|
* Attribute this filter instance is filtering
|
|
329
333
|
*/
|
|
@@ -342,3 +346,12 @@ export interface Filter extends Element {
|
|
|
342
346
|
export interface CustomFormulaContext {
|
|
343
347
|
[key: string]: Attribute | Measure;
|
|
344
348
|
}
|
|
349
|
+
export declare type FilterRelationNode = Filter | Filter[] | FilterRelation | FilterRelationJaqlNode;
|
|
350
|
+
export interface FilterRelation {
|
|
351
|
+
left: FilterRelationNode;
|
|
352
|
+
right: FilterRelationNode;
|
|
353
|
+
operator: 'AND' | 'OR';
|
|
354
|
+
}
|
|
355
|
+
export declare type FilterRelationJaqlNode = {
|
|
356
|
+
instanceid: string;
|
|
357
|
+
};
|