@firestitch/filter 12.13.0 → 12.13.1

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.
@@ -0,0 +1 @@
1
+ export * from './filter.component';
@@ -1,5 +1,7 @@
1
- import { FilterNameValue, IFilterConfigBaseItem, IFilterDefaultFn } from './base.interface';
1
+ import { Observable } from 'rxjs';
2
+ import type { FilterComponent } from '../../components/filter';
2
3
  import { ItemType } from '../../enums/item-type.enum';
4
+ import { FilterNameValue, IFilterConfigBaseItem, IFilterDefaultFn } from './base.interface';
3
5
  export interface IFilterConfigAutocompleteChipsItem extends IFilterConfigBaseItem<ItemType.AutoCompleteChips> {
4
6
  fetchOnFocus?: boolean;
5
7
  chipImage?: string;
@@ -9,4 +11,5 @@ export interface IFilterConfigAutocompleteChipsItem extends IFilterConfigBaseIte
9
11
  chipIcon?: string;
10
12
  chipClass?: string;
11
13
  default?: IFilterDefaultFn<FilterNameValue[]> | FilterNameValue[];
14
+ values?: (keyword?: string, filter?: FilterComponent) => Observable<any[]>;
12
15
  }
@@ -1,6 +1,9 @@
1
- import { FilterNameValue, IFilterConfigBaseItem, IFilterDefaultFn } from './base.interface';
1
+ import { Observable } from 'rxjs';
2
+ import type { FilterComponent } from '../../components/filter';
2
3
  import { ItemType } from '../../enums/item-type.enum';
4
+ import { FilterNameValue, IFilterConfigBaseItem, IFilterDefaultFn } from './base.interface';
3
5
  export interface IFilterConfigAutocompleteItem extends IFilterConfigBaseItem<ItemType.AutoComplete> {
4
6
  fetchOnFocus?: boolean;
5
7
  default?: IFilterDefaultFn<FilterNameValue> | FilterNameValue;
8
+ values?: (keyword?: string, filter?: FilterComponent) => Observable<any[]>;
6
9
  }
@@ -4,10 +4,10 @@ import { BaseItem } from '../../models/items/base-item';
4
4
  export declare type FilterConfigDateType = ItemType.Date | ItemType.DateTime | ItemType.DateRange | ItemType.DateTimeRange;
5
5
  export declare type FilterDateRangeType = ItemType.DateRange | ItemType.DateTimeRange;
6
6
  export declare type IFilterDefaultFn<T extends unknown = unknown> = () => Observable<T>;
7
- export declare type FilterNameValue = {
7
+ export interface FilterNameValue {
8
8
  name: string;
9
9
  value: unknown;
10
- };
10
+ }
11
11
  declare type DefaultItemType = ItemType.Date | ItemType.DateTime | ItemType.Week | ItemType.Keyword;
12
12
  export interface IFilterConfigBaseItem<T = DefaultItemType, U = string> {
13
13
  name: string;
@@ -5,7 +5,7 @@ declare type AutoCompleteItem = IFilterConfigAutocompleteItem | IFilterConfigAut
5
5
  export declare abstract class BaseAutocompleteItem<T extends AutoCompleteItem> extends BaseItem<T> {
6
6
  search: string;
7
7
  fetchOnFocus: boolean;
8
- get valuesFn(): (query?: string, filter?: import("@firestitch/filter").FilterComponent) => unknown;
8
+ get valuesFn(): (keyword?: string, filter?: import("@firestitch/filter").FilterComponent) => unknown;
9
9
  protected _validateModel(): void;
10
10
  protected _parseConfig(item: T): void;
11
11
  }
@@ -25,7 +25,7 @@ export declare abstract class BaseItem<T extends IFilterConfigItem> {
25
25
  protected _value$: BehaviorSubject<any>;
26
26
  protected _valueChange$: Subject<void>;
27
27
  protected _values$: BehaviorSubject<any>;
28
- protected _valuesFn: (query?: string, filter?: FilterComponent) => Observable<unknown> | unknown;
28
+ protected _valuesFn: (keyword?: string, filter?: FilterComponent) => Observable<unknown> | unknown;
29
29
  protected _destroy$: Subject<void>;
30
30
  private _clear$;
31
31
  constructor(itemConfig: T, _additionalConfig: unknown);