@firestitch/filter 12.12.13 → 12.13.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/app/components/filter/filter.component.d.ts +2 -1
- package/app/components/filter-chip/filter-chip.component.d.ts +1 -1
- package/app/components/filter-chips/filter-chips.component.d.ts +1 -1
- package/app/components/filter-drawer/filter-drawer.component.d.ts +8 -6
- package/app/components/filters-item/autocomplete/autocomplete.component.d.ts +1 -1
- package/app/components/filters-item/autocompletechips/autocompletechips.component.d.ts +1 -1
- package/app/components/filters-item/base-item/base-item.component.d.ts +5 -3
- package/app/components/filters-item/filter-item.component.d.ts +11 -9
- package/app/fs-filter.module.d.ts +1 -1
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/models/items/autocomplete/base-autocomplete-item.d.ts +3 -3
- package/app/models/items/base-item.d.ts +7 -6
- package/app/services/filter-overlay.service.d.ts +7 -5
- package/app/services/items-store.service.d.ts +3 -1
- package/bundles/firestitch-filter.umd.js +138 -137
- package/bundles/firestitch-filter.umd.js.map +1 -1
- package/esm2015/app/components/filter/filter.component.js +9 -8
- package/esm2015/app/components/filter-chip/filter-chip.component.js +4 -4
- package/esm2015/app/components/filter-chips/filter-chips.component.js +1 -1
- package/esm2015/app/components/filter-drawer/filter-drawer.component.js +15 -14
- package/esm2015/app/components/filters-item/autocomplete/autocomplete.component.js +3 -3
- package/esm2015/app/components/filters-item/autocompletechips/autocompletechips.component.js +2 -2
- package/esm2015/app/components/filters-item/base-item/base-item.component.js +6 -10
- package/esm2015/app/components/filters-item/filter-item.component.js +5 -3
- package/esm2015/app/fs-filter.module.js +11 -9
- package/esm2015/app/models/items/autocomplete/base-autocomplete-item.js +2 -1
- package/esm2015/app/models/items/base-item.js +6 -8
- package/esm2015/app/models/items/select/multiple-select-item.js +4 -6
- package/esm2015/app/models/items/select/simple-select-item.js +8 -10
- package/esm2015/app/pipes/remove-isolate-value.pipe.js +5 -7
- package/esm2015/app/services/filter-overlay.service.js +19 -15
- package/esm2015/app/services/items-store.service.js +13 -13
- package/fesm2015/firestitch-filter.js +128 -129
- package/fesm2015/firestitch-filter.js.map +1 -1
- package/package.json +1 -1
|
@@ -146,6 +146,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
146
146
|
change(): void;
|
|
147
147
|
/**
|
|
148
148
|
* Update filter actions config
|
|
149
|
+
*
|
|
149
150
|
* @param actions
|
|
150
151
|
*/
|
|
151
152
|
updateActions(actions: FsFilterAction[]): void;
|
|
@@ -174,12 +175,12 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
174
175
|
*/
|
|
175
176
|
updateDisabledState(): void;
|
|
176
177
|
setItems(items: IFilterConfigItem[]): void;
|
|
178
|
+
keywordChange(keyword: any): void;
|
|
177
179
|
private _initFilterWithConfig;
|
|
178
180
|
private _destroyFilterDrawer;
|
|
179
181
|
private _updateWindowWidth;
|
|
180
182
|
private _listenEscButton;
|
|
181
183
|
private _listenWindowResize;
|
|
182
|
-
keywordChange(keyword: any): void;
|
|
183
184
|
private _listenInputChanges;
|
|
184
185
|
private _syncSearchInputWithKeyword;
|
|
185
186
|
private _listenInternalItemsChange;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { BaseItem } from '../../models/items/base-item';
|
|
4
3
|
import { IFilterConfigItem } from '../../interfaces/config.interface';
|
|
4
|
+
import { BaseItem } from '../../models/items/base-item';
|
|
5
5
|
import { FocusControllerService } from '../../services/focus-controller.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FsFilterChipComponent implements OnInit, OnDestroy {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseItem } from '../../models/items/base-item';
|
|
2
1
|
import { ItemType } from '../../enums';
|
|
2
|
+
import { BaseItem } from '../../models/items/base-item';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class FsFilterChipsComponent {
|
|
5
5
|
filters: BaseItem<any>[];
|
|
@@ -2,22 +2,24 @@ import { ChangeDetectorRef } from '@angular/core';
|
|
|
2
2
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { BaseItem } from '../../models/items/base-item';
|
|
5
|
-
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
6
5
|
import { ExternalParamsController } from '../../services/external-params-controller.service';
|
|
6
|
+
import { FsFilterItemsStore } from '../../services/items-store.service';
|
|
7
|
+
import type { FilterComponent } from '../filter/filter.component';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
declare type Item = BaseItem<any>;
|
|
9
10
|
export declare class FilterDrawerComponent {
|
|
10
11
|
externalParams: ExternalParamsController;
|
|
11
12
|
protected _cd: ChangeDetectorRef;
|
|
12
13
|
protected _itemsStore: FsFilterItemsStore;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
updateWindowWidth(): void;
|
|
14
|
+
private _overlayRef;
|
|
15
|
+
private _data;
|
|
16
16
|
inline: boolean;
|
|
17
|
+
windowDesktop: boolean;
|
|
18
|
+
filter: FilterComponent;
|
|
17
19
|
protected _clear: Function;
|
|
18
20
|
protected _done: Function;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
constructor(externalParams: ExternalParamsController, _cd: ChangeDetectorRef, _itemsStore: FsFilterItemsStore, _overlayRef: OverlayRef, _data: any);
|
|
22
|
+
updateWindowWidth(): void;
|
|
21
23
|
get items$(): Observable<Item[]>;
|
|
22
24
|
get sortItem(): Item;
|
|
23
25
|
get sortDirectionItem(): Item;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, KeyValueDiffers } from '@angular/core';
|
|
2
|
-
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
2
|
import { AutocompleteItem } from '../../../models/items/autocomplete-item';
|
|
3
|
+
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AutocompleteComponent extends BaseItemComponent<AutocompleteItem> {
|
|
6
6
|
protected _kvDiffers: KeyValueDiffers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectorRef, KeyValueDiffers } from '@angular/core';
|
|
2
|
-
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
3
2
|
import { AutocompleteChipsItem } from '../../../models/items/autocomplete-chips-item';
|
|
3
|
+
import { BaseItemComponent } from '../base-item/base-item.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AutocompletechipsComponent extends BaseItemComponent<AutocompleteChipsItem> {
|
|
6
6
|
protected _kvDiffers: KeyValueDiffers;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { ChangeDetectorRef, DoCheck, KeyValueDiffer, KeyValueDiffers, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { BaseItem } from '../../../models/items/base-item';
|
|
4
3
|
import { IFilterConfigItem } from '../../../interfaces/config.interface';
|
|
4
|
+
import { BaseItem } from '../../../models/items/base-item';
|
|
5
|
+
import type { FilterComponent } from '../../filter/filter.component';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class BaseItemComponent<T extends BaseItem<IFilterConfigItem>> implements DoCheck, OnChanges, OnDestroy {
|
|
7
8
|
protected _kvDiffers: KeyValueDiffers;
|
|
8
9
|
protected _cd: ChangeDetectorRef;
|
|
9
10
|
set item(value: T);
|
|
11
|
+
get item(): T;
|
|
10
12
|
inline: boolean;
|
|
13
|
+
filter: FilterComponent;
|
|
11
14
|
label: string;
|
|
12
15
|
protected _item: T;
|
|
13
16
|
protected _kvDiffer: KeyValueDiffer<string, any>;
|
|
14
17
|
protected _destroy$: Subject<unknown>;
|
|
15
18
|
private _debouncer$;
|
|
16
19
|
constructor(_kvDiffers: KeyValueDiffers, _cd: ChangeDetectorRef);
|
|
17
|
-
get item(): T;
|
|
18
20
|
ngDoCheck(): void;
|
|
19
21
|
ngOnChanges(changes: SimpleChanges): void;
|
|
20
22
|
ngOnDestroy(): void;
|
|
21
23
|
listenWithDebounce(): void;
|
|
22
24
|
itemChange(): void;
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseItemComponent<any>, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseItemComponent<any>, "base-item", never, { "item": "item"; "inline": "inline"; }, {}, never, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseItemComponent<any>, "base-item", never, { "item": "item"; "inline": "inline"; "filter": "filter"; }, {}, never, never>;
|
|
25
27
|
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ItemType } from '../../enums/item-type.enum';
|
|
3
|
+
import { AutocompleteChipsItem } from '../../models/items/autocomplete-chips-item';
|
|
4
|
+
import { AutocompleteItem } from '../../models/items/autocomplete-item';
|
|
3
5
|
import { BaseItem } from '../../models/items/base-item';
|
|
6
|
+
import { CheckboxItem } from '../../models/items/checkbox-item';
|
|
4
7
|
import { ChipsItem } from '../../models/items/chips-item';
|
|
5
|
-
import { RangeItem } from '../../models/items/range-item';
|
|
6
|
-
import { TextItem } from '../../models/items/text-item';
|
|
7
|
-
import { AutocompleteItem } from '../../models/items/autocomplete-item';
|
|
8
|
-
import { AutocompleteChipsItem } from '../../models/items/autocomplete-chips-item';
|
|
9
8
|
import { DateItem } from '../../models/items/date-item';
|
|
10
|
-
import { DateTimeItem } from '../../models/items/date-time-item';
|
|
11
9
|
import { DateRangeItem } from '../../models/items/date-range-item';
|
|
10
|
+
import { DateTimeItem } from '../../models/items/date-time-item';
|
|
12
11
|
import { DateTimeRangeItem } from '../../models/items/date-time-range-item';
|
|
13
|
-
import {
|
|
14
|
-
import { CheckboxItem } from '../../models/items/checkbox-item';
|
|
12
|
+
import { RangeItem } from '../../models/items/range-item';
|
|
15
13
|
import { BaseSelectItem } from '../../models/items/select/base-select-item';
|
|
14
|
+
import { TextItem } from '../../models/items/text-item';
|
|
15
|
+
import { WeekItem } from '../../models/items/week-item';
|
|
16
|
+
import type { FilterComponent } from '../filter/filter.component';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
export declare class FilterItemComponent implements OnInit, OnDestroy {
|
|
18
19
|
private _cdRef;
|
|
19
20
|
item: BaseItem<any>;
|
|
21
|
+
filter: FilterComponent;
|
|
22
|
+
itemType: typeof ItemType;
|
|
20
23
|
get textItem(): TextItem;
|
|
21
24
|
get chipsItem(): ChipsItem;
|
|
22
25
|
get baseSelectItem(): BaseSelectItem;
|
|
@@ -33,7 +36,6 @@ export declare class FilterItemComponent implements OnInit, OnDestroy {
|
|
|
33
36
|
constructor(_cdRef: ChangeDetectorRef);
|
|
34
37
|
ngOnInit(): void;
|
|
35
38
|
ngOnDestroy(): void;
|
|
36
|
-
itemType: typeof ItemType;
|
|
37
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterItemComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FilterItemComponent, "filter-item", never, { "item": "item"; }, {}, never, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FilterItemComponent, "filter-item", never, { "item": "item"; "filter": "filter"; }, {}, never, never>;
|
|
39
41
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FilterConfig } from './interfaces/config.interface';
|
|
2
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { FilterConfig } from './interfaces/config.interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "./components/filters-item/base-item/base-item.component";
|
|
5
5
|
import * as i2 from "./components/filter/filter.component";
|
|
@@ -10,4 +10,4 @@ import { AutocompleteChipsItem } from '../models/items/autocomplete-chips-item';
|
|
|
10
10
|
import { CheckboxItem } from '../models/items/checkbox-item';
|
|
11
11
|
import { TextItem } from '../models/items/text-item';
|
|
12
12
|
import { WeekItem } from '../models/items/week-item';
|
|
13
|
-
export declare function createFilterItem(item: IFilterConfigItem, config: any): import("../models/items/select/multiple-select-item").MultipleSelectItem |
|
|
13
|
+
export declare function createFilterItem(item: IFilterConfigItem, config: any): RangeItem | DateRangeItem | DateTimeRangeItem | WeekItem | import("../models/items/select/multiple-select-item").MultipleSelectItem | import("../models/items/select/simple-select-item").SimpleSelectItem | ChipsItem | DateItem | DateTimeItem | AutocompleteItem | AutocompleteChipsItem | CheckboxItem | TextItem;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseItem } from '../base-item';
|
|
2
|
-
import { IFilterConfigAutocompleteItem } from '../../../interfaces/items/autocomplete.interface';
|
|
3
1
|
import { IFilterConfigAutocompleteChipsItem } from '../../../interfaces/items/autocomplete-chips.interface';
|
|
2
|
+
import { IFilterConfigAutocompleteItem } from '../../../interfaces/items/autocomplete.interface';
|
|
3
|
+
import { BaseItem } from '../base-item';
|
|
4
4
|
declare type AutoCompleteItem = IFilterConfigAutocompleteItem | IFilterConfigAutocompleteChipsItem;
|
|
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) => unknown;
|
|
8
|
+
get valuesFn(): (query?: string, filter?: import("@firestitch/filter").FilterComponent) => unknown;
|
|
9
9
|
protected _validateModel(): void;
|
|
10
10
|
protected _parseConfig(item: T): void;
|
|
11
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
2
|
+
import type { FilterComponent } from '../../components/filter/filter.component';
|
|
2
3
|
import { IFilterConfigItem } from '../../interfaces/config.interface';
|
|
3
4
|
import { IFilterDefaultFn } from '../../interfaces/items/base.interface';
|
|
4
5
|
import { IFilterItemDefaultRange } from '../../interfaces/items/range.interface';
|
|
@@ -9,7 +10,7 @@ export declare abstract class BaseItem<T extends IFilterConfigItem> {
|
|
|
9
10
|
chipLabel: string | string[];
|
|
10
11
|
hide: boolean;
|
|
11
12
|
defaultValue: any | IFilterItemDefaultRange;
|
|
12
|
-
defaultValueFn: IFilterDefaultFn
|
|
13
|
+
defaultValueFn: IFilterDefaultFn;
|
|
13
14
|
persistedValue: unknown;
|
|
14
15
|
showClear: boolean;
|
|
15
16
|
persistanceDisabled: boolean;
|
|
@@ -24,7 +25,7 @@ export declare abstract class BaseItem<T extends IFilterConfigItem> {
|
|
|
24
25
|
protected _value$: BehaviorSubject<any>;
|
|
25
26
|
protected _valueChange$: Subject<void>;
|
|
26
27
|
protected _values$: BehaviorSubject<any>;
|
|
27
|
-
protected _valuesFn: (query?: string) => Observable<unknown> | unknown;
|
|
28
|
+
protected _valuesFn: (query?: string, filter?: FilterComponent) => Observable<unknown> | unknown;
|
|
28
29
|
protected _destroy$: Subject<void>;
|
|
29
30
|
private _clear$;
|
|
30
31
|
constructor(itemConfig: T, _additionalConfig: unknown);
|
|
@@ -62,15 +63,15 @@ export declare abstract class BaseItem<T extends IFilterConfigItem> {
|
|
|
62
63
|
get queryObject(): Record<string, unknown>;
|
|
63
64
|
get persistanceObject(): Record<string, unknown>;
|
|
64
65
|
loadDefaultValue(): Observable<any>;
|
|
65
|
-
initValues(persistedValue: unknown): void;
|
|
66
|
-
loadAsyncValues(reload?: boolean): void;
|
|
66
|
+
initValues(filter: FilterComponent, persistedValue: unknown): void;
|
|
67
|
+
loadAsyncValues(filter: FilterComponent, reload?: boolean): void;
|
|
67
68
|
clear(defaultValue?: unknown): void;
|
|
68
69
|
getChipsContent(type: any): string;
|
|
69
70
|
destroy(): void;
|
|
70
|
-
protected abstract _init(): any;
|
|
71
|
-
protected abstract _validateModel(): any;
|
|
72
71
|
protected _setModel(value: any): void;
|
|
73
72
|
protected _parseConfig(item: T): void;
|
|
74
73
|
protected _initDefaultModel(): void;
|
|
75
74
|
protected _clearValue(defaultValue?: unknown): void;
|
|
75
|
+
protected abstract _init(): any;
|
|
76
|
+
protected abstract _validateModel(): any;
|
|
76
77
|
}
|
|
@@ -2,21 +2,23 @@ import { Injector, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { Overlay } from '@angular/cdk/overlay';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { FilterDrawerComponent } from '../components/filter-drawer/filter-drawer.component';
|
|
5
|
+
import { FilterComponent } from '../components/filter/filter.component';
|
|
5
6
|
import { FsFilterMeta } from '../providers/filter-meta';
|
|
6
7
|
import { FocusControllerService } from './focus-controller.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class FsFilterOverlayService implements OnDestroy {
|
|
9
|
-
private _injector;
|
|
10
10
|
private _filterMeta;
|
|
11
|
+
private _injector;
|
|
11
12
|
private _overlay;
|
|
12
13
|
private _focusController;
|
|
13
14
|
detach$: Subject<unknown>;
|
|
14
15
|
attach$: Subject<unknown>;
|
|
16
|
+
filter: FilterComponent;
|
|
15
17
|
private _clearFn;
|
|
16
18
|
private _doneFn;
|
|
17
19
|
private _destroy$;
|
|
18
20
|
private _overlayRef;
|
|
19
|
-
constructor(
|
|
21
|
+
constructor(_filterMeta: FsFilterMeta, _injector: Injector, _overlay: Overlay, _focusController: FocusControllerService);
|
|
20
22
|
get isOpened(): boolean;
|
|
21
23
|
setClearFn(fn: Function): void;
|
|
22
24
|
setDoneFn(fn: Function): void;
|
|
@@ -24,10 +26,10 @@ export declare class FsFilterOverlayService implements OnDestroy {
|
|
|
24
26
|
open(): FilterDrawerComponent;
|
|
25
27
|
ngOnDestroy(): void;
|
|
26
28
|
private _createOverlay;
|
|
27
|
-
private
|
|
29
|
+
private _openPortalPreview;
|
|
28
30
|
private _createInjector;
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
+
private _removeFilterClass;
|
|
32
|
+
private _addFilterClass;
|
|
31
33
|
private _openWhenChipClicked;
|
|
32
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterOverlayService, never>;
|
|
33
35
|
static ɵprov: i0.ɵɵInjectableDeclaration<FsFilterOverlayService>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import type { FilterComponent } from '../components/filter/filter.component';
|
|
3
4
|
import { FilterSort, IFilterConfigItem } from '../interfaces/config.interface';
|
|
4
5
|
import { IFilterExternalParams } from '../interfaces/external-params.interface';
|
|
5
6
|
import { ISortingChangeEvent } from '../interfaces/filter.interface';
|
|
@@ -15,6 +16,7 @@ export declare class FsFilterItemsStore implements OnDestroy {
|
|
|
15
16
|
sortByItem: BaseItem<IFilterConfigItem>;
|
|
16
17
|
sortDirectionItem: BaseItem<IFilterConfigItem>;
|
|
17
18
|
keywordItem: TextItem;
|
|
19
|
+
filter: FilterComponent;
|
|
18
20
|
private _ready$;
|
|
19
21
|
private _items;
|
|
20
22
|
private _visibleItems$;
|
|
@@ -27,8 +29,8 @@ export declare class FsFilterItemsStore implements OnDestroy {
|
|
|
27
29
|
constructor();
|
|
28
30
|
get items(): BaseItem<IFilterConfigItem>[];
|
|
29
31
|
get visibleItems(): BaseItem<IFilterConfigItem>[];
|
|
30
|
-
get visibleItems$(): Observable<BaseItem<IFilterConfigItem>[]>;
|
|
31
32
|
set visibleItems(items: BaseItem<IFilterConfigItem>[]);
|
|
33
|
+
get visibleItems$(): Observable<BaseItem<IFilterConfigItem>[]>;
|
|
32
34
|
get hasKeyword(): boolean;
|
|
33
35
|
get itemsChange$(): Observable<unknown>;
|
|
34
36
|
get ready$(): Observable<boolean>;
|