Filtering

Generics

<T> represents the object's shape coming from the data source.

<R> represents the column data type: string, number, Date, or boolean.

<V> represents the filter values.

<M> represents the filter selection model: DikeSelectionModel.

DikeFilterCondition<T, R, V>

abstract class DikeFilterCondition<T extends object, R extends string | number | Date | boolean, V> {
  protected indexConditions: FilterCondition<T, R, V>;

  constructor();

  get conditions(): Condition<T, R, V>[];

  assign(filterConditions: DikeFilterCondition<T, R, V>): this;  
  addCondition(condition: Condition<T, R, V>): this;
  removeCondition(name: string): Condition<T, R, V>;
  getCondition(name: string): Condition<T, R, V>;
}

DikeSelectionFilterCondition<M, T, R, V>

abstract class DikeSelectionFilterCondition<M, T extends object, R extends string | number | Date | boolean, V> extends DikeFilterCondition<T, R, V> {
  protected dikeFilterOptions: M[];

  constructor();

  abstract set options(options: M[]);
  abstract get options(): M[];

  assign(value: DikeSelectionFilterCondition<M, T, R, V>): this;
  addCondition(condition: Condition<T, R, V>): this;

  protected isValidCondition(name: string): boolean;
}

DikeBinarySelectionFilterCondition<M, T, V>

abstract class DikeBinarySelectionFilterCondition<M, T extends object, V> extends DikeSelectionFilterCondition<M, T, string | number | boolean, V> {
  private MAX_OPTIONS: number = 2;

  constructor();

  set options(options: M[]);
  get options(): M[];

  assign(value: DikeBinarySelectionFilterCondition<M, T, V>): this;
}

CustomBinaryFilterCondition<T>

class CustomBinaryFilterCondition<T extends object> extends DikeBinarySelectionFilterCondition<DikeBinarySelectionModel, T, DikeBinaryFilter> {
  constructor();

  addExistingCondition(name: string): this;
}

DikeMultipleSelectionFilterCondition<M, T, R, V>

abstract class DikeMultipleSelectionFilterCondition<M, T extends object, R extends string | number | boolean | Date, V> extends DikeSelectionFilterCondition<M, T, R, V> {
  constructor();

  set options(options: M[]);
  get options(): M[];
  
  assign(value: DikeSelectionFilterCondition<M, T, R, V>): this;
}

CustomTextCaseFilterCondition<T>

class CustomTextCaseFilterCondition<T extends object> extends DikeFilterCondition<T, string, DikeTextCaseFilter> {
  constructor();

  addExistingCondition(name: string): this;
  protected isValidCondition(name: string): boolean;
}

CustomRowTextCaseFilterCondition<T>

class CustomRowTextCaseFilterCondition<T extends object> extends CustomTextCaseFilterCondition<T> {
  constructor();

  addCondition(condition: Condition<T, string, DikeTextCaseFilter>): this;
}

CustomNumericFilterCondition<T>

class CustomNumericFilterCondition<T extends object> extends DikeFilterCondition<T, number, DikeNumericFilter> {
  constructor();

  addExistingCondition(name: string): this;
  protected isValidCondition(name: string): boolean;
}

CustomRowNumericFilterCondition<T>

class CustomRowNumericFilterCondition<T extends object> extends CustomNumericFilterCondition<T> {
  constructor();

  addCondition(condition: Condition<T, number, DikeNumericFilter>): this;
  protected isValidCondition(name: string): boolean;
}

CustomDateFilterCondition<T>

class CustomDateFilterCondition<T extends object> extends DikeFilterCondition<T, string | number | Date, DikeDateFilter> {
  constructor();

  addExistingCondition(name: string): this;
  protected isValidCondition(name: string): boolean;
}

CustomRowDateFilterCondition<T>

class CustomRowDateFilterCondition<T extends object> extends CustomDateFilterCondition<T> {
  constructor();

  addCondition(condition: Condition<T, string | number | Date, DikeDateFilter>): this;
  protected isValidCondition(name: string): boolean;
}

CustomMultipleTextFilterCondition<T>

class CustomMultipleTextFilterCondition<T extends object> extends DikeMultipleSelectionFilterCondition<DikeTextSelectionModel, T, string, DikeTextFilter>  {
  constructor();
    
  addExistingCondition(name: string): this
}

CustomMultipleNumericFilterCondition<T>

class CustomMultipleNumericFilterCondition<T extends object> extends DikeMultipleSelectionFilterCondition<DikeNumericSelectionModel, T, number, DikeNumericFilter>  {

  constructor();
  
  addExistingCondition(name: string): this;
}

Last updated