@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.
@@ -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 measures} for how to create measures.
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 filters} for how to create filters.
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
+ };