@firestitch/filter 18.1.0 → 18.2.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.
- package/app/components/filter/filter.component.d.ts +9 -13
- package/app/components/filter-chip/filter-chip.component.d.ts +7 -7
- package/app/components/filter-drawer/filter-drawer.component.d.ts +7 -7
- package/app/components/filter-drawer-actions/filter-drawer-actions.component.d.ts +2 -2
- package/app/components/saved-filter/index.d.ts +0 -1
- package/app/components/saved-filter/saved-filter-autocomplete-chips/saved-filter-autocomplete-chips.component.d.ts +6 -5
- package/app/components/saved-filter/saved-filter-manage/components/saved-filter-chips/index.d.ts +1 -0
- package/app/components/saved-filter/saved-filter-manage/components/saved-filter-chips/saved-filter-chips.component.d.ts +13 -0
- package/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.d.ts +6 -2
- package/app/fs-filter.module.d.ts +7 -8
- package/app/helpers/build-query-params.d.ts +2 -2
- package/app/helpers/create-filter-item.d.ts +1 -1
- package/app/interfaces/external-params.interface.d.ts +1 -1
- package/app/interfaces/saved-filters.interface.d.ts +2 -2
- package/app/models/items/autocomplete-chips-item.d.ts +1 -1
- package/app/models/items/base-item.d.ts +1 -1
- package/app/models/items/chips-item.d.ts +1 -1
- package/app/models/items/date/base-date-item.d.ts +1 -1
- package/app/models/items/date-range/base-date-range-item.d.ts +1 -1
- package/app/models/items/select/multiple-select-item.d.ts +3 -3
- package/app/models/items/select/simple-select-item.d.ts +2 -2
- package/app/models/items/week-item.d.ts +1 -1
- package/app/services/index.d.ts +5 -5
- package/app/services/{items-store.service.d.ts → item-store.service.d.ts} +9 -9
- package/app/services/{external-params-controller.service.d.ts → param-controller.service.d.ts} +9 -10
- package/app/services/{query-persistance-controller.service.d.ts → persistance-controller.service.d.ts} +3 -3
- package/app/services/query-param-controller.service.d.ts +21 -0
- package/app/services/{saved-filters-controller.service.d.ts → saved-filter-controller.service.d.ts} +6 -10
- package/esm2022/app/components/filter/filter.component.mjs +68 -77
- package/esm2022/app/components/filter-chip/filter-chip.component.mjs +22 -16
- package/esm2022/app/components/filter-chips/filter-chips.component.mjs +3 -3
- package/esm2022/app/components/filter-drawer/filter-drawer.component.mjs +18 -18
- package/esm2022/app/components/filter-drawer-actions/filter-drawer-actions.component.mjs +1 -1
- package/esm2022/app/components/filters-item/autocompletechips/autocompletechips.component.mjs +5 -5
- package/esm2022/app/components/saved-filter/index.mjs +1 -2
- package/esm2022/app/components/saved-filter/saved-filter-autocomplete-chips/saved-filter-autocomplete-chips.component.mjs +17 -16
- package/esm2022/app/components/saved-filter/saved-filter-manage/components/saved-filter-chips/index.mjs +2 -0
- package/esm2022/app/components/saved-filter/saved-filter-manage/components/saved-filter-chips/saved-filter-chips.component.mjs +28 -0
- package/esm2022/app/components/saved-filter/saved-filter-manage/saved-filter-manage.component.mjs +24 -17
- package/esm2022/app/fs-filter.module.mjs +1 -5
- package/esm2022/app/helpers/build-query-params.mjs +1 -1
- package/esm2022/app/interfaces/external-params.interface.mjs +1 -1
- package/esm2022/app/interfaces/saved-filters.interface.mjs +1 -1
- package/esm2022/app/models/items/autocomplete-chips-item.mjs +4 -4
- package/esm2022/app/models/items/base-item.mjs +4 -4
- package/esm2022/app/models/items/chips-item.mjs +5 -5
- package/esm2022/app/models/items/date/base-date-item.mjs +9 -9
- package/esm2022/app/models/items/date-range/base-date-range-item.mjs +12 -12
- package/esm2022/app/models/items/select/multiple-select-item.mjs +17 -17
- package/esm2022/app/models/items/select/simple-select-item.mjs +10 -10
- package/esm2022/app/models/items/week-item.mjs +11 -9
- package/esm2022/app/services/index.mjs +6 -6
- package/esm2022/app/services/item-store.service.mjs +356 -0
- package/esm2022/app/services/param-controller.service.mjs +149 -0
- package/esm2022/app/services/persistance-controller.service.mjs +65 -0
- package/esm2022/app/services/query-param-controller.service.mjs +65 -0
- package/esm2022/app/services/saved-filter-controller.service.mjs +169 -0
- package/esm2022/public_api.mjs +2 -3
- package/fesm2022/firestitch-filter.mjs +1714 -1787
- package/fesm2022/firestitch-filter.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -2
- package/app/components/saved-filter/saved-filter-edit/index.d.ts +0 -1
- package/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.d.ts +0 -18
- package/app/services/query-params-controller.service.d.ts +0 -21
- package/esm2022/app/components/saved-filter/saved-filter-edit/index.mjs +0 -2
- package/esm2022/app/components/saved-filter/saved-filter-edit/saved-filter-edit.component.mjs +0 -72
- package/esm2022/app/services/external-params-controller.service.mjs +0 -154
- package/esm2022/app/services/items-store.service.mjs +0 -356
- package/esm2022/app/services/query-params-controller.service.mjs +0 -65
- package/esm2022/app/services/query-persistance-controller.service.mjs +0 -65
- package/esm2022/app/services/saved-filters-controller.service.mjs +0 -210
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { MatInput } from '@angular/material/input';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { IFilterSavedFilter, ISortingChangeEvent, KeyValue } from '../../interfaces';
|
|
5
5
|
import { FsFilterAction } from '../../interfaces/action.interface';
|
|
6
6
|
import { IFilterConfigItem, SortItem } from '../../interfaces/config.interface';
|
|
7
7
|
import { IUpdateFilterItemConfig } from '../../interfaces/update-filter-item.interface';
|
|
8
8
|
import { FsFilterConfig } from '../../models/filter-config';
|
|
9
9
|
import { BaseItem } from '../../models/items/base-item';
|
|
10
10
|
import { TextItem } from '../../models/items/text-item';
|
|
11
|
-
import {
|
|
11
|
+
import { SavedFilterController } from '../../services/saved-filter-controller.service';
|
|
12
12
|
import { FilterStatusBarDirective } from './../../directives/status-bar/status-bar.directive';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare class FilterComponent implements OnInit, OnDestroy {
|
|
@@ -39,16 +39,16 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
39
39
|
private _defaultConfig;
|
|
40
40
|
private _filterOverlay;
|
|
41
41
|
private _zone;
|
|
42
|
-
private
|
|
43
|
-
private
|
|
44
|
-
private
|
|
42
|
+
private _paramController;
|
|
43
|
+
private _persistanceController;
|
|
44
|
+
private _itemStore;
|
|
45
45
|
private _actions;
|
|
46
|
-
private
|
|
46
|
+
private _savedFilterController;
|
|
47
47
|
constructor();
|
|
48
48
|
get config(): FsFilterConfig;
|
|
49
49
|
get filterParams(): Record<string, unknown>;
|
|
50
50
|
get inDialog(): boolean;
|
|
51
|
-
get filterParamsQuery():
|
|
51
|
+
get filterParamsQuery(): KeyValue;
|
|
52
52
|
get items(): BaseItem<IFilterConfigItem>[];
|
|
53
53
|
get visibleItems(): BaseItem<IFilterConfigItem>[];
|
|
54
54
|
get keywordItem(): TextItem | null;
|
|
@@ -64,7 +64,7 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
64
64
|
set activeSavedFilter(savedFilter: IFilterSavedFilter);
|
|
65
65
|
get activeSavedFilter(): IFilterSavedFilter;
|
|
66
66
|
get savedFilters(): IFilterSavedFilter[];
|
|
67
|
-
get savedFiltersController():
|
|
67
|
+
get savedFiltersController(): SavedFilterController;
|
|
68
68
|
ngOnInit(): void;
|
|
69
69
|
ngOnDestroy(): void;
|
|
70
70
|
focus(): void;
|
|
@@ -142,10 +142,6 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
142
142
|
changeVisibility(state: boolean): void;
|
|
143
143
|
init(): void;
|
|
144
144
|
clear(event?: any): void;
|
|
145
|
-
/**
|
|
146
|
-
* Close filter window and do change callback
|
|
147
|
-
*/
|
|
148
|
-
search(event: any): void;
|
|
149
145
|
reload(event?: any): void;
|
|
150
146
|
getItem(name: any): BaseItem<any>;
|
|
151
147
|
fetchQueryParams(): void;
|
|
@@ -193,11 +189,11 @@ export declare class FilterComponent implements OnInit, OnDestroy {
|
|
|
193
189
|
private _listenWindowResize;
|
|
194
190
|
private _initAutoReload;
|
|
195
191
|
private _listenInputChanges;
|
|
196
|
-
private _syncSearchInputWithKeyword;
|
|
197
192
|
private _initKeywordVisibility;
|
|
198
193
|
private _listenInternalItemsChange;
|
|
199
194
|
private _initOverlay;
|
|
200
195
|
private _listenWhenFilterReady;
|
|
196
|
+
private _updateKeyword;
|
|
201
197
|
private _updateChipsVisibility;
|
|
202
198
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
|
|
203
199
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "fs-filter", never, { "setConfig": { "alias": "config"; "required": false; }; "setFilter": { "alias": "filter"; "required": false; }; "showSortBy": { "alias": "showSortBy"; "required": false; }; }, { "closed": "closed"; "opened": "opened"; "ready": "ready"; }, ["statusBar"], never, true, never>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IFilterConfigItem } from '../../interfaces/config.interface';
|
|
4
4
|
import { BaseItem } from '../../models/items/base-item';
|
|
5
|
-
import { FocusControllerService } from '../../services/focus-controller.service';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class FsFilterChipComponent implements OnInit, OnDestroy {
|
|
8
|
-
private _cdRef;
|
|
9
|
-
private _focusController;
|
|
10
7
|
item: BaseItem<IFilterConfigItem>;
|
|
8
|
+
removable: boolean;
|
|
9
|
+
clickable: boolean;
|
|
11
10
|
rangeItem: boolean;
|
|
12
11
|
chipDelayedRender$: Observable<boolean>;
|
|
13
12
|
private _chipRenderTimer$;
|
|
14
13
|
private _destroy$;
|
|
15
|
-
|
|
14
|
+
private _cdRef;
|
|
15
|
+
private _focusController;
|
|
16
16
|
ngOnInit(): void;
|
|
17
17
|
ngOnDestroy(): void;
|
|
18
|
-
|
|
18
|
+
click(type?: any): void;
|
|
19
19
|
removeItem(event: MouseEvent, type?: any): void;
|
|
20
20
|
listenValueChangesForRanges(): void;
|
|
21
21
|
private _initDelayRender;
|
|
22
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterChipComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FsFilterChipComponent, "fs-filter-chip", never, { "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsFilterChipComponent, "fs-filter-chip", never, { "item": { "alias": "item"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { BaseItem } from '../../models/items/base-item';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ParamController } from '../../services/param-controller.service';
|
|
5
|
+
import { SavedFilterController } from '../../services/saved-filter-controller.service';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
type Item = BaseItem<any>;
|
|
8
8
|
export declare class FilterDrawerComponent implements OnInit {
|
|
@@ -12,17 +12,17 @@ export declare class FilterDrawerComponent implements OnInit {
|
|
|
12
12
|
protected _clear: () => void;
|
|
13
13
|
protected _done: () => void;
|
|
14
14
|
protected _destroyRef: DestroyRef;
|
|
15
|
-
private
|
|
15
|
+
private _savedFilterController;
|
|
16
16
|
private _message;
|
|
17
|
-
private
|
|
17
|
+
private _itemStore;
|
|
18
18
|
private _overlayRef;
|
|
19
19
|
private _data;
|
|
20
|
-
private
|
|
20
|
+
private _paramController;
|
|
21
21
|
constructor();
|
|
22
22
|
updateWindowWidth(): void;
|
|
23
23
|
get items$(): Observable<Item[]>;
|
|
24
|
-
get
|
|
25
|
-
get savedFiltersController():
|
|
24
|
+
get paramCointroller(): ParamController;
|
|
25
|
+
get savedFiltersController(): SavedFilterController;
|
|
26
26
|
ngOnInit(): void;
|
|
27
27
|
clear(): void;
|
|
28
28
|
done(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SavedFilterController } from '../../services/saved-filter-controller.service';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class FsFilterDrawerActionsComponent {
|
|
4
|
-
savedFiltersController:
|
|
4
|
+
savedFiltersController: SavedFilterController;
|
|
5
5
|
private _clear;
|
|
6
6
|
private _done;
|
|
7
7
|
private _message;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IFilterSavedFilter } from '../../../interfaces/saved-filters.interface';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SavedFilterController } from '../../../services/saved-filter-controller.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class FsSavedFilterAutocompleteChipsComponent implements OnInit {
|
|
7
|
-
savedFiltersController:
|
|
7
|
+
savedFiltersController: SavedFilterController;
|
|
8
8
|
selectedFilter: IFilterSavedFilter;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
9
|
+
private _itemStore;
|
|
10
|
+
private _paramController;
|
|
11
11
|
private _dialog;
|
|
12
12
|
private _destroyRef;
|
|
13
13
|
private _injector;
|
|
@@ -18,6 +18,8 @@ export declare class FsSavedFilterAutocompleteChipsComponent implements OnInit {
|
|
|
18
18
|
get activeFilter$(): Observable<IFilterSavedFilter>;
|
|
19
19
|
get pluralLabelLower(): string;
|
|
20
20
|
get pluralLabel(): string;
|
|
21
|
+
get labelIcon(): string;
|
|
22
|
+
compareWith: (o1: IFilterSavedFilter, o2: IFilterSavedFilter) => boolean;
|
|
21
23
|
selectFilter(savedFilter: IFilterSavedFilter): void;
|
|
22
24
|
selectedFilterChange(savedFilter: IFilterSavedFilter): void;
|
|
23
25
|
ngOnInit(): void;
|
|
@@ -25,7 +27,6 @@ export declare class FsSavedFilterAutocompleteChipsComponent implements OnInit {
|
|
|
25
27
|
create(): void;
|
|
26
28
|
saveAs(): void;
|
|
27
29
|
fetch: (query: string) => Observable<IFilterSavedFilter[]>;
|
|
28
|
-
saveFilters(): void;
|
|
29
30
|
manageFilters(): void;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsSavedFilterAutocompleteChipsComponent, never>;
|
|
31
32
|
static ɵcmp: i0.ɵɵComponentDeclaration<FsSavedFilterAutocompleteChipsComponent, "fs-saved-filter-autocomplete-chips", never, { "savedFiltersController": { "alias": "savedFiltersController"; "required": false; }; }, {}, never, never, true, never>;
|
package/app/components/saved-filter/saved-filter-manage/components/saved-filter-chips/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './saved-filter-chips.component';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { IFilterConfigItem } from '../../../../../interfaces';
|
|
3
|
+
import { IFilterSavedFilter } from '../../../../../interfaces/saved-filters.interface';
|
|
4
|
+
import { BaseItem } from '../../../../../models/items';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class FsFilterSavedFilterChipsComponent implements OnInit {
|
|
7
|
+
savedFilter: IFilterSavedFilter;
|
|
8
|
+
items: BaseItem<IFilterConfigItem>[];
|
|
9
|
+
private _itemStore;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterSavedFilterChipsComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FsFilterSavedFilterChipsComponent, "fs-saved-filter-chips", never, { "savedFilter": { "alias": "savedFilter"; "required": false; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { IFilterConfigItem } from '../../../interfaces';
|
|
2
3
|
import { IFilterSavedFilter } from '../../../interfaces/saved-filters.interface';
|
|
4
|
+
import { BaseItem } from '../../../models/items';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export declare class FsFilterSavedFilterManageComponent implements OnInit {
|
|
5
7
|
savedFilters: IFilterSavedFilter[];
|
|
6
|
-
private
|
|
8
|
+
private _savedFilterController;
|
|
7
9
|
private _cdRef;
|
|
8
|
-
private
|
|
10
|
+
private _paramController;
|
|
11
|
+
private _itemStore;
|
|
9
12
|
private _dialogRef;
|
|
10
13
|
private _filterOverlayService;
|
|
11
14
|
ngOnInit(): void;
|
|
15
|
+
get items(): BaseItem<IFilterConfigItem>[];
|
|
12
16
|
get pluralLabelLower(): string;
|
|
13
17
|
get sortable(): boolean;
|
|
14
18
|
selectFilter(savedFilter: IFilterSavedFilter): void;
|
|
@@ -24,16 +24,15 @@ import * as i20 from "./components/filters-item/select/backdrop/backdrop.compone
|
|
|
24
24
|
import * as i21 from "./components/filter-chip/filter-chip.component";
|
|
25
25
|
import * as i22 from "./components/filter-chip-content/filter-chip-content.component";
|
|
26
26
|
import * as i23 from "./components/filter-drawer-actions/filter-drawer-actions.component";
|
|
27
|
-
import * as i24 from "./components/
|
|
28
|
-
import * as i25 from "./components/
|
|
29
|
-
import * as i26 from "./components/action-
|
|
30
|
-
import * as i27 from "./
|
|
31
|
-
import * as i28 from "./directives/
|
|
32
|
-
import * as i29 from "./
|
|
33
|
-
import * as i30 from "./pipes/remove-isolate-value.pipe";
|
|
27
|
+
import * as i24 from "./components/actions/actions.component";
|
|
28
|
+
import * as i25 from "./components/action-button/action-button.component";
|
|
29
|
+
import * as i26 from "./components/action-kebab-actions/action-kebab-actions.component";
|
|
30
|
+
import * as i27 from "./directives/status-bar/status-bar.directive";
|
|
31
|
+
import * as i28 from "./directives/focus-to-item/focus-to-item.directive";
|
|
32
|
+
import * as i29 from "./pipes/remove-isolate-value.pipe";
|
|
34
33
|
export declare class FsFilterModule {
|
|
35
34
|
static forRoot(config?: FilterConfig): ModuleWithProviders<FsFilterModule>;
|
|
36
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsFilterModule, never>;
|
|
37
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFilterModule, never, [typeof i1.FsSavedFilterAutocompleteChipsComponent, typeof i2.BaseItemComponent, typeof i3.FilterComponent, typeof i4.FilterItemComponent, typeof i5.FsFilterChipsComponent, typeof i6.SelectComponent, typeof i7.SelectGroupsComponent, typeof i8.SelectSimpleComponent, typeof i9.SelectMultipleComponent, typeof i10.ChipsComponent, typeof i11.TextComponent, typeof i12.WeekComponent, typeof i13.RangeComponent, typeof i14.AutocompleteComponent, typeof i15.AutocompletechipsComponent, typeof i16.DateComponent, typeof i17.DateRangeComponent, typeof i18.CheckboxComponent, typeof i19.FilterDrawerComponent, typeof i20.SelectBackdropComponent, typeof i21.FsFilterChipComponent, typeof i22.FsFilterChipContentComponent, typeof i23.FsFilterDrawerActionsComponent, typeof i24.
|
|
36
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsFilterModule, never, [typeof i1.FsSavedFilterAutocompleteChipsComponent, typeof i2.BaseItemComponent, typeof i3.FilterComponent, typeof i4.FilterItemComponent, typeof i5.FsFilterChipsComponent, typeof i6.SelectComponent, typeof i7.SelectGroupsComponent, typeof i8.SelectSimpleComponent, typeof i9.SelectMultipleComponent, typeof i10.ChipsComponent, typeof i11.TextComponent, typeof i12.WeekComponent, typeof i13.RangeComponent, typeof i14.AutocompleteComponent, typeof i15.AutocompletechipsComponent, typeof i16.DateComponent, typeof i17.DateRangeComponent, typeof i18.CheckboxComponent, typeof i19.FilterDrawerComponent, typeof i20.SelectBackdropComponent, typeof i21.FsFilterChipComponent, typeof i22.FsFilterChipContentComponent, typeof i23.FsFilterDrawerActionsComponent, typeof i24.FsFilterActionsComponent, typeof i25.FsFilterActionButtonComponent, typeof i26.FsFilterActionKebabActionsComponent, typeof i27.FilterStatusBarDirective, typeof i28.FocusToItemDirective, typeof i29.FsFilterIsolateValues], [typeof i3.FilterComponent, typeof i27.FilterStatusBarDirective]>;
|
|
38
37
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsFilterModule>;
|
|
39
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyValue } from '../interfaces';
|
|
2
2
|
import { IFilterConfigItem } from '../interfaces/config.interface';
|
|
3
3
|
import { BaseItem } from '../models/items/base-item';
|
|
4
|
-
export declare function buildQueryParams(flattenedParams:
|
|
4
|
+
export declare function buildQueryParams(flattenedParams: KeyValue, items: BaseItem<IFilterConfigItem>[]): KeyValue;
|
|
@@ -11,4 +11,4 @@ import { DateTimeRangeItem } from '../models/items/date-time-range-item';
|
|
|
11
11
|
import { RangeItem } from '../models/items/range-item';
|
|
12
12
|
import { TextItem } from '../models/items/text-item';
|
|
13
13
|
import { WeekItem } from '../models/items/week-item';
|
|
14
|
-
export declare function createFilterItem(item: IFilterConfigItem, config: any, filter: FilterComponent):
|
|
14
|
+
export declare function createFilterItem(item: IFilterConfigItem, config: any, filter: FilterComponent): TextItem | AutocompleteChipsItem | AutocompleteItem | CheckboxItem | ChipsItem | DateItem | DateRangeItem | DateTimeItem | DateTimeRangeItem | RangeItem | import("../models/items").MultipleSelectItem | import("../models/items").SimpleSelectItem | WeekItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import {
|
|
2
|
+
import { KeyValue } from './external-params.interface';
|
|
3
3
|
export interface IFilterSavedFiltersConfig {
|
|
4
4
|
load: FilterRemoteLoad;
|
|
5
5
|
save: FilterRemoteSave;
|
|
@@ -15,7 +15,7 @@ export interface IFilterSavedFilter {
|
|
|
15
15
|
id?: string | number;
|
|
16
16
|
name?: string;
|
|
17
17
|
active?: boolean;
|
|
18
|
-
filters?:
|
|
18
|
+
filters?: KeyValue;
|
|
19
19
|
}
|
|
20
20
|
export type FilterRemoteLoad = () => Observable<IFilterSavedFilter[]>;
|
|
21
21
|
export type FilterRemoteSave = (savedFilter: IFilterSavedFilter) => Observable<IFilterSavedFilter>;
|
|
@@ -16,7 +16,7 @@ export declare class AutocompleteChipsItem extends BaseAutocompleteItem<IFilterC
|
|
|
16
16
|
get queryObject(): Record<string, unknown>;
|
|
17
17
|
get isChipVisible(): boolean;
|
|
18
18
|
getChipsContent(): any;
|
|
19
|
+
setModel(value: any): void;
|
|
19
20
|
protected _init(): void;
|
|
20
21
|
protected _clearValue(defaultValue?: unknown): void;
|
|
21
|
-
protected _setModel(value: any): void;
|
|
22
22
|
}
|
|
@@ -69,7 +69,7 @@ export declare abstract class BaseItem<T extends IFilterConfigItem> {
|
|
|
69
69
|
loadAsyncValues(reload?: boolean): void;
|
|
70
70
|
clear(defaultValue?: unknown): void;
|
|
71
71
|
destroy(): void;
|
|
72
|
-
|
|
72
|
+
setModel(value: any): void;
|
|
73
73
|
protected _initDefaultModel(): void;
|
|
74
74
|
protected _clearValue(defaultValue?: unknown): void;
|
|
75
75
|
protected get _initialized(): boolean;
|
|
@@ -13,8 +13,8 @@ export declare class ChipsItem extends BaseItem<IFilterConfigChipsItem> {
|
|
|
13
13
|
get queryObject(): Record<string, unknown>;
|
|
14
14
|
get persistanceObject(): Record<string, string>;
|
|
15
15
|
getChipsContent(): any;
|
|
16
|
+
setModel(value: any): void;
|
|
16
17
|
protected _validateModel(): void;
|
|
17
|
-
protected _setModel(value: any): void;
|
|
18
18
|
protected _init(): void;
|
|
19
19
|
protected _clearValue(defaultValue?: unknown): void;
|
|
20
20
|
}
|
|
@@ -10,8 +10,8 @@ export declare abstract class BaseDateItem extends BaseItem<IFilterConfigDateIte
|
|
|
10
10
|
constructor(itemConfig: any, _additionalConfig: unknown, _filter: FilterComponent);
|
|
11
11
|
get value(): Date;
|
|
12
12
|
get queryObject(): Record<string, Date>;
|
|
13
|
+
setModel(value: any): void;
|
|
13
14
|
get persistanceObject(): Record<string, string>;
|
|
14
15
|
protected _validateModel(): void;
|
|
15
|
-
protected _setModel(value: any): void;
|
|
16
16
|
protected _init(): void;
|
|
17
17
|
}
|
|
@@ -8,10 +8,10 @@ export declare abstract class BaseDateRangeItem extends BaseItem<IFilterConfigDa
|
|
|
8
8
|
get queryObject(): Record<string, Date>;
|
|
9
9
|
get persistanceObject(): Record<string, string>;
|
|
10
10
|
getChipsContent(type?: any): string;
|
|
11
|
+
setModel(value: any): void;
|
|
11
12
|
clearDateRange(type?: 'from' | 'to', defaultValue?: IFilterItemDefaultDateRange): void;
|
|
12
13
|
protected _validateModel(): void;
|
|
13
14
|
get hasModelValue(): any;
|
|
14
|
-
protected _setModel(value: any): void;
|
|
15
15
|
protected _init(): void;
|
|
16
16
|
protected _clearValue(defaultValue?: unknown): void;
|
|
17
17
|
}
|
|
@@ -5,10 +5,10 @@ export declare class MultipleSelectItem extends BaseSelectItem {
|
|
|
5
5
|
constructor(itemConfig: IFilterConfigSelectItem, _persistedValues: any, _filter: FilterComponent);
|
|
6
6
|
get value(): any;
|
|
7
7
|
get isChipVisible(): boolean;
|
|
8
|
-
get
|
|
9
|
-
|
|
8
|
+
get _isolateOptionNotSelected(): boolean;
|
|
9
|
+
setModel(value: any): void;
|
|
10
|
+
getChipsContent(): string;
|
|
10
11
|
protected _init(): void;
|
|
11
|
-
protected _setModel(value: any): void;
|
|
12
12
|
protected _validateModel(): void;
|
|
13
13
|
protected _clearValue(defaultValue?: unknown): void;
|
|
14
14
|
}
|
|
@@ -6,9 +6,9 @@ export declare class SimpleSelectItem extends BaseSelectItem {
|
|
|
6
6
|
get value(): any;
|
|
7
7
|
getChipsContent(type?: any): string;
|
|
8
8
|
get isChipVisible(): boolean;
|
|
9
|
+
setModel(value: any): void;
|
|
9
10
|
protected _init(): void;
|
|
10
|
-
protected get
|
|
11
|
-
protected _setModel(value: any): void;
|
|
11
|
+
protected get _isolateOptionNotSelected(): boolean;
|
|
12
12
|
protected _validateModel(): void;
|
|
13
13
|
protected _clearValue(defaultValue?: unknown): void;
|
|
14
14
|
}
|
|
@@ -12,9 +12,9 @@ export declare class WeekItem extends BaseItem<IFilterConfigWeekItem> {
|
|
|
12
12
|
[x: string]: any;
|
|
13
13
|
};
|
|
14
14
|
get persistanceObject(): Record<string, string>;
|
|
15
|
+
setModel(value: any): void;
|
|
15
16
|
getChipsContent(type?: any): string;
|
|
16
17
|
protected _validateModel(): void;
|
|
17
|
-
protected _setModel(value: any): void;
|
|
18
18
|
protected _init(): void;
|
|
19
19
|
protected _clearValue(defaultValue?: unknown): void;
|
|
20
20
|
}
|
package/app/services/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './external-params-controller.service';
|
|
2
1
|
export * from './filter-overlay.service';
|
|
3
2
|
export * from './focus-controller.service';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
3
|
+
export * from './item-store.service';
|
|
4
|
+
export * from './param-controller.service';
|
|
5
|
+
export * from './persistance-controller.service';
|
|
6
|
+
export * from './query-param-controller.service';
|
|
7
|
+
export * from './saved-filter-controller.service';
|
|
@@ -2,7 +2,7 @@ import { OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import type { FilterComponent } from '../components/filter/filter.component';
|
|
4
4
|
import { FilterSort, IFilterConfigItem, SortItem } from '../interfaces/config.interface';
|
|
5
|
-
import {
|
|
5
|
+
import { KeyValue } from '../interfaces/external-params.interface';
|
|
6
6
|
import { ISortingChangeEvent } from '../interfaces/filter.interface';
|
|
7
7
|
import { BaseItem } from '../models/items/base-item';
|
|
8
8
|
import { TextItem } from '../models/items/text-item';
|
|
@@ -12,7 +12,7 @@ interface IValueAsQuery {
|
|
|
12
12
|
items?: BaseItem<IFilterConfigItem>[];
|
|
13
13
|
persisted?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare class
|
|
15
|
+
export declare class ItemStore implements OnDestroy {
|
|
16
16
|
sortByItem: BaseItem<IFilterConfigItem>;
|
|
17
17
|
sortDirectionItem: BaseItem<IFilterConfigItem>;
|
|
18
18
|
keywordItem: TextItem;
|
|
@@ -38,7 +38,7 @@ export declare class FsFilterItemsStore implements OnDestroy {
|
|
|
38
38
|
setConfig(config: any): void;
|
|
39
39
|
getItemByName(name: string): BaseItem<IFilterConfigItem>;
|
|
40
40
|
initItems(items: IFilterConfigItem[]): void;
|
|
41
|
-
queryParams():
|
|
41
|
+
queryParams(): KeyValue;
|
|
42
42
|
filtersClear(): void;
|
|
43
43
|
loadAsyncValues(): void;
|
|
44
44
|
loadAsyncDefaults(): void;
|
|
@@ -47,10 +47,10 @@ export declare class FsFilterItemsStore implements OnDestroy {
|
|
|
47
47
|
getSortDirectionValue(): any;
|
|
48
48
|
updateSort(sort: ISortingChangeEvent): void;
|
|
49
49
|
values(onlyPresented?: boolean): Record<string, unknown>;
|
|
50
|
-
models():
|
|
51
|
-
valuesAsQuery({ onlyPresented, items, persisted, }?: IValueAsQuery):
|
|
52
|
-
init(p:
|
|
53
|
-
updateItemsWithValues(values:
|
|
50
|
+
models(): KeyValue;
|
|
51
|
+
valuesAsQuery({ onlyPresented, items, persisted, }?: IValueAsQuery): KeyValue;
|
|
52
|
+
init(p: KeyValue): void;
|
|
53
|
+
updateItemsWithValues(values: KeyValue): void;
|
|
54
54
|
updateSortingItemsValues(items: SortItem[]): void;
|
|
55
55
|
destroyItems(): void;
|
|
56
56
|
/**
|
|
@@ -64,7 +64,7 @@ export declare class FsFilterItemsStore implements OnDestroy {
|
|
|
64
64
|
private _initSortingItems;
|
|
65
65
|
private _createSortingItems;
|
|
66
66
|
private _setKeywordItem;
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
68
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItemStore, never>;
|
|
68
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ItemStore>;
|
|
69
69
|
}
|
|
70
70
|
export {};
|
package/app/services/{external-params-controller.service.d.ts → param-controller.service.d.ts}
RENAMED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { IFilterSavedFilter, KeyValue } from '../interfaces';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
6
|
-
protected _init: any;
|
|
5
|
+
export declare class ParamController implements OnDestroy {
|
|
7
6
|
private _pending$;
|
|
8
7
|
private _config;
|
|
9
8
|
private _destroy$;
|
|
10
|
-
private
|
|
11
|
-
private
|
|
9
|
+
private _itemStore;
|
|
10
|
+
private _persistanceController;
|
|
12
11
|
private _queryParams;
|
|
13
|
-
private
|
|
14
|
-
get params():
|
|
12
|
+
private _savedFilterController;
|
|
13
|
+
get params(): KeyValue;
|
|
15
14
|
get pending(): boolean;
|
|
16
15
|
get pending$(): Observable<boolean>;
|
|
17
16
|
ngOnDestroy(): void;
|
|
18
17
|
setConfig(config: any): void;
|
|
19
18
|
setActiveSavedFilter(savedFilter: IFilterSavedFilter): void;
|
|
20
|
-
reloadFiltersWithValues(params:
|
|
19
|
+
reloadFiltersWithValues(params: KeyValue): void;
|
|
21
20
|
initItems(): void;
|
|
22
21
|
_initItemsValues(): void;
|
|
23
22
|
fetchQueryParams(): void;
|
|
@@ -26,6 +25,6 @@ export declare class ExternalParamsController implements OnDestroy {
|
|
|
26
25
|
private _listenItemsChange;
|
|
27
26
|
private _saveQueryParams;
|
|
28
27
|
private _savePersistedParams;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
30
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ParamController, never>;
|
|
29
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ParamController>;
|
|
31
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FsFilterConfig } from '../models/filter-config';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class PersistanceController {
|
|
4
4
|
queryEnabled: boolean;
|
|
5
5
|
private _store;
|
|
6
6
|
private _name;
|
|
@@ -14,6 +14,6 @@ export declare class QueryPersistanceController {
|
|
|
14
14
|
private _get;
|
|
15
15
|
private _initConfig;
|
|
16
16
|
private _getConfig;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PersistanceController, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PersistanceController>;
|
|
19
19
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActivatedRoute } from '@angular/router';
|
|
2
|
+
import { ItemStore } from './item-store.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class QueryParamController {
|
|
5
|
+
private _route;
|
|
6
|
+
private _itemStore;
|
|
7
|
+
private _enabled;
|
|
8
|
+
private _params;
|
|
9
|
+
constructor(_route: ActivatedRoute, _itemStore: ItemStore);
|
|
10
|
+
get enabled(): boolean;
|
|
11
|
+
get params(): Record<string, any>;
|
|
12
|
+
init(enabled: boolean): void;
|
|
13
|
+
writeStateToQueryParams(params: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Parse query and update filter values
|
|
16
|
+
*/
|
|
17
|
+
fetchFromQueryParams(): void;
|
|
18
|
+
private _replaceState;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryParamController, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QueryParamController>;
|
|
21
|
+
}
|
package/app/services/{saved-filters-controller.service.d.ts → saved-filter-controller.service.d.ts}
RENAMED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { KeyValue } from '../interfaces/external-params.interface';
|
|
4
4
|
import { IFilterSavedFilter, IFilterSavedFiltersConfig } from '../interfaces/saved-filters.interface';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class SavedFilterController implements OnDestroy {
|
|
7
7
|
private _config;
|
|
8
8
|
private _savedFilters$;
|
|
9
9
|
private _activeFilter$;
|
|
10
10
|
private _enabled$;
|
|
11
11
|
private _destroy$;
|
|
12
|
-
private
|
|
13
|
-
private _dialog;
|
|
12
|
+
private _itemStore;
|
|
14
13
|
private _prompt;
|
|
15
|
-
private _message;
|
|
16
14
|
get singularLabel(): string;
|
|
17
15
|
get singularLabelLower(): string;
|
|
18
16
|
get labelIcon(): string;
|
|
@@ -25,7 +23,7 @@ export declare class SavedFiltersController implements OnDestroy {
|
|
|
25
23
|
get savedFilters$(): Observable<IFilterSavedFilter[]>;
|
|
26
24
|
get activeFilter(): IFilterSavedFilter;
|
|
27
25
|
get activeFilter$(): Observable<IFilterSavedFilter>;
|
|
28
|
-
get activeFilterData():
|
|
26
|
+
get activeFilterData(): KeyValue;
|
|
29
27
|
ngOnDestroy(): void;
|
|
30
28
|
init(filterSavedFiltersConfig: IFilterSavedFiltersConfig): void;
|
|
31
29
|
initSavedFilters(filters: IFilterSavedFilter[]): void;
|
|
@@ -36,10 +34,8 @@ export declare class SavedFiltersController implements OnDestroy {
|
|
|
36
34
|
order(savedFilters: IFilterSavedFilter[]): Observable<IFilterSavedFilter[]>;
|
|
37
35
|
delete(savedFilter: IFilterSavedFilter): Observable<IFilterSavedFilter>;
|
|
38
36
|
setActiveFilter(savedFilter: IFilterSavedFilter): void;
|
|
39
|
-
openSavedFilterEditDialog(): void;
|
|
40
37
|
updateActiveFilter(): void;
|
|
41
|
-
resetActiveFilter(): void;
|
|
42
38
|
private _setEnabledStatus;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
44
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SavedFilterController, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SavedFilterController>;
|
|
45
41
|
}
|