@recursyve/nice-data-filter-kit 14.1.6 → 14.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/esm2020/lib/components/nice-filter-view/store/nice-filter-view.query.mjs +4 -1
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +4 -18
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +15 -1
- package/esm2020/lib/directive/public-api.mjs +2 -0
- package/esm2020/lib/directive/selectable-list/model/load-all-entities-options.model.mjs +2 -0
- package/esm2020/lib/directive/selectable-list/model/selectable-list-options.model.mjs +2 -0
- package/esm2020/lib/directive/selectable-list/providers/preload-selected-entities.provider.mjs +10 -0
- package/esm2020/lib/directive/selectable-list/providers/selectable-list-content.service.mjs +26 -0
- package/esm2020/lib/directive/selectable-list/public-api.mjs +10 -0
- package/esm2020/lib/directive/selectable-list/selectable-list-checkbox.directive.mjs +122 -0
- package/esm2020/lib/directive/selectable-list/selectable-list-select-all.directive.mjs +48 -0
- package/esm2020/lib/directive/selectable-list/selectable-list.constant.mjs +3 -0
- package/esm2020/lib/directive/selectable-list/selectable-list.directive.mjs +48 -0
- package/esm2020/lib/directive/selectable-list/selectable-list.module.mjs +32 -0
- package/esm2020/lib/directive/selectable-list/store/selectable-list-state.service.mjs +181 -0
- package/esm2020/lib/directive/selectable-list/store/selectable-list.service.mjs +49 -0
- package/esm2020/lib/directive/selectable-list/store/selectable-list.state.mjs +2 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +525 -17
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +500 -20
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/components/nice-filter-view/store/nice-filter-view.query.d.ts +1 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +0 -1
- package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +1 -0
- package/lib/directive/public-api.d.ts +1 -0
- package/lib/directive/selectable-list/model/load-all-entities-options.model.d.ts +4 -0
- package/lib/directive/selectable-list/model/selectable-list-options.model.d.ts +4 -0
- package/lib/directive/selectable-list/providers/preload-selected-entities.provider.d.ts +12 -0
- package/lib/directive/selectable-list/providers/selectable-list-content.service.d.ts +13 -0
- package/lib/directive/selectable-list/public-api.d.ts +9 -0
- package/lib/directive/selectable-list/selectable-list-checkbox.directive.d.ts +24 -0
- package/lib/directive/selectable-list/selectable-list-select-all.directive.d.ts +18 -0
- package/lib/directive/selectable-list/selectable-list.constant.d.ts +2 -0
- package/lib/directive/selectable-list/selectable-list.directive.d.ts +18 -0
- package/lib/directive/selectable-list/selectable-list.module.d.ts +12 -0
- package/lib/directive/selectable-list/store/selectable-list-state.service.d.ts +32 -0
- package/lib/directive/selectable-list/store/selectable-list.service.d.ts +23 -0
- package/lib/directive/selectable-list/store/selectable-list.state.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -10,6 +10,7 @@ export declare class NiceFilterViewQuery extends QueryEntity<NiceFilterViewState
|
|
|
10
10
|
selectFilterConfig(): Observable<FilterConfigurationModel[]>;
|
|
11
11
|
selectFilterParameters(): Observable<FilterParametersModel>;
|
|
12
12
|
selectFilterResult(): Observable<FilterResultModel | null>;
|
|
13
|
+
getParameters(): FilterParametersModel;
|
|
13
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewQuery, never>;
|
|
14
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewQuery>;
|
|
15
16
|
}
|
|
@@ -30,7 +30,6 @@ export declare class NiceFilterViewService<Filter extends NiceFilterService<any>
|
|
|
30
30
|
upsertValue(value: any, key?: string): void;
|
|
31
31
|
removeValue(value: any, key?: string): void;
|
|
32
32
|
resetResult(waitForNextFilter: boolean): void;
|
|
33
|
-
getParameters(filterParameters?: FilterParametersModel): FilterParametersModel;
|
|
34
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewService<any>, never>;
|
|
35
34
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewService<any>>;
|
|
36
35
|
}
|
|
@@ -27,6 +27,7 @@ export declare class NiceFilterViewStore extends EntityStore<NiceFilterViewState
|
|
|
27
27
|
addValue(value: any, opts?: AddEntitiesOptions): void;
|
|
28
28
|
upsertValue(value: any, key?: string): void;
|
|
29
29
|
removeValue(value: any, key?: string): void;
|
|
30
|
+
getParameters(filterParameters?: FilterParametersModel): FilterParametersModel;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewStore, never>;
|
|
31
32
|
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewStore>;
|
|
32
33
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./selectable-list/public-api";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NiceSelectableListLoadAllEntitiesOptions } from "../model/load-all-entities-options.model";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare abstract class NicePreloadSelectedEntitiesProvider<T, ID = number> {
|
|
4
|
+
abstract state: string;
|
|
5
|
+
abstract reloadEntity(entity: T): Promise<T>;
|
|
6
|
+
abstract reloadEntities(entities: T[]): Promise<T[]>;
|
|
7
|
+
abstract loadEntityById(id: ID): Promise<T>;
|
|
8
|
+
abstract loadEntitiesById(ids: ID[]): Promise<T[]>;
|
|
9
|
+
abstract loadAllEntities(options?: NiceSelectableListLoadAllEntitiesOptions): Promise<ID[]>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NicePreloadSelectedEntitiesProvider<any, any>, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NicePreloadSelectedEntitiesProvider<any, any>>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { QueryList } from "@angular/core";
|
|
2
|
+
import { NiceSelectableListCheckboxDirective } from "../selectable-list-checkbox.directive";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class SelectableListContentService {
|
|
5
|
+
private _state;
|
|
6
|
+
private _checkboxes;
|
|
7
|
+
get state(): string | null;
|
|
8
|
+
get checkboxes(): QueryList<NiceSelectableListCheckboxDirective>;
|
|
9
|
+
setState(state: string): void;
|
|
10
|
+
setCheckboxes(checkboxes: QueryList<NiceSelectableListCheckboxDirective>): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectableListContentService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectableListContentService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./model/selectable-list-options.model";
|
|
2
|
+
export * from "./model/load-all-entities-options.model";
|
|
3
|
+
export * from "./providers/preload-selected-entities.provider";
|
|
4
|
+
export * from "./store/selectable-list.service";
|
|
5
|
+
export * from "./store/selectable-list-state.service";
|
|
6
|
+
export * from "./selectable-list.module";
|
|
7
|
+
export * from "./selectable-list.directive";
|
|
8
|
+
export * from "./selectable-list-checkbox.directive";
|
|
9
|
+
export * from "./selectable-list-select-all.directive";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { MatCheckbox } from "@angular/material/checkbox";
|
|
3
|
+
import { SelectableListContentService } from "./providers/selectable-list-content.service";
|
|
4
|
+
import { SelectableListService } from "./store/selectable-list.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceSelectableListCheckboxDirective implements OnInit, OnDestroy {
|
|
7
|
+
readonly checkbox: MatCheckbox;
|
|
8
|
+
private service;
|
|
9
|
+
private selectableListService;
|
|
10
|
+
selectableEntity?: any;
|
|
11
|
+
selectPage?: boolean;
|
|
12
|
+
private selectableListStateService;
|
|
13
|
+
private selectableListStateQuery;
|
|
14
|
+
private unsubscribeAll$;
|
|
15
|
+
private get currentId();
|
|
16
|
+
constructor(checkbox: MatCheckbox, service: SelectableListContentService, selectableListService: SelectableListService);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
private handleSelectableEntity;
|
|
20
|
+
private handleSelectPage;
|
|
21
|
+
private updateCheckboxState;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceSelectableListCheckboxDirective, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceSelectableListCheckboxDirective, "mat-checkbox[niceSelectableListCheckbox]", never, { "selectableEntity": "selectableEntity"; "selectPage": "selectPage"; }, {}, never, never, false>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { NiceFilterViewQuery } from "../../components/nice-filter-view/store/nice-filter-view.query";
|
|
3
|
+
import { SelectableListContentService } from "./providers/selectable-list-content.service";
|
|
4
|
+
import { SelectableListService } from "./store/selectable-list.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceSelectableListSelectAllDirective implements OnInit {
|
|
7
|
+
private niceFilterViewQuery;
|
|
8
|
+
private service;
|
|
9
|
+
private selectableListService;
|
|
10
|
+
action: "select" | "unselect";
|
|
11
|
+
private selectableListStateService;
|
|
12
|
+
private selectableListStateQuery;
|
|
13
|
+
constructor(niceFilterViewQuery: NiceFilterViewQuery | null, service: SelectableListContentService, selectableListService: SelectableListService);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
onClick(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceSelectableListSelectAllDirective, [{ optional: true; }, null, null]>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceSelectableListSelectAllDirective, "button[niceSelectableListSelectAll]", never, { "action": "action"; }, {}, never, never, false>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AfterContentInit, OnChanges, OnInit, QueryList, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { NiceSelectableListOptions } from "./model/selectable-list-options.model";
|
|
3
|
+
import { SelectableListContentService } from "./providers/selectable-list-content.service";
|
|
4
|
+
import { NiceSelectableListCheckboxDirective } from "./selectable-list-checkbox.directive";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceSelectableListDirective implements OnInit, OnChanges, AfterContentInit {
|
|
7
|
+
private service;
|
|
8
|
+
state: string;
|
|
9
|
+
options: NiceSelectableListOptions;
|
|
10
|
+
readonly checkboxes: QueryList<NiceSelectableListCheckboxDirective>;
|
|
11
|
+
private defaultOptions;
|
|
12
|
+
constructor(service: SelectableListContentService);
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
15
|
+
ngAfterContentInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceSelectableListDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceSelectableListDirective, "[niceSelectableList]", never, { "state": "state"; "options": "options"; }, {}, ["checkboxes"], never, false>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ModuleWithProviders, Type } from "@angular/core";
|
|
2
|
+
import { NicePreloadSelectedEntitiesProvider } from "./providers/preload-selected-entities.provider";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./selectable-list.directive";
|
|
5
|
+
import * as i2 from "./selectable-list-checkbox.directive";
|
|
6
|
+
import * as i3 from "./selectable-list-select-all.directive";
|
|
7
|
+
export declare class NiceSelectableListModule {
|
|
8
|
+
static register(...providers: Type<NicePreloadSelectedEntitiesProvider<any, any>>[]): ModuleWithProviders<NiceSelectableListModule>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceSelectableListModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceSelectableListModule, [typeof i1.NiceSelectableListDirective, typeof i2.NiceSelectableListCheckboxDirective, typeof i3.NiceSelectableListSelectAllDirective], never, [typeof i1.NiceSelectableListDirective, typeof i2.NiceSelectableListCheckboxDirective, typeof i3.NiceSelectableListSelectAllDirective]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NiceSelectableListModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EntityStore } from "@datorama/akita";
|
|
2
|
+
import { NiceSelectableListLoadAllEntitiesOptions } from "../model/load-all-entities-options.model";
|
|
3
|
+
import { NiceSelectableListOptions } from "../model/selectable-list-options.model";
|
|
4
|
+
import { NicePreloadSelectedEntitiesProvider } from "../providers/preload-selected-entities.provider";
|
|
5
|
+
import { SelectableListState } from "./selectable-list.state";
|
|
6
|
+
export declare class SelectableListStateService<T, ID = any> {
|
|
7
|
+
private store;
|
|
8
|
+
private preloadService?;
|
|
9
|
+
private options?;
|
|
10
|
+
get idKey(): string;
|
|
11
|
+
get preloadedWindow(): number;
|
|
12
|
+
constructor(store: EntityStore<SelectableListState<any>>, preloadService?: NicePreloadSelectedEntitiesProvider<T>, options?: NiceSelectableListOptions);
|
|
13
|
+
setActive(entity: T): void;
|
|
14
|
+
getIndex(identifier: number): number;
|
|
15
|
+
selectAll(options?: NiceSelectableListLoadAllEntitiesOptions): Promise<void>;
|
|
16
|
+
select(id: ID): Promise<void>;
|
|
17
|
+
selectEntity(entity: T): Promise<void>;
|
|
18
|
+
selectManyEntities(entities: T[]): Promise<void>;
|
|
19
|
+
unselectAll(): void;
|
|
20
|
+
unselect(id: ID): void;
|
|
21
|
+
unselectEntity(entity: T): void;
|
|
22
|
+
unselectManyEntities(entities: T[]): void;
|
|
23
|
+
setEntities(ids: ID[], activeId: ID): Promise<void>;
|
|
24
|
+
next(): Promise<void>;
|
|
25
|
+
previous(): Promise<void>;
|
|
26
|
+
first(): Promise<void>;
|
|
27
|
+
last(): Promise<void>;
|
|
28
|
+
removeActive(): Promise<void>;
|
|
29
|
+
loadActiveEntity(id: number, direction: number): Promise<void>;
|
|
30
|
+
loadEntities(loadExtremity: any): Promise<void>;
|
|
31
|
+
getListIdToLoad(loadExtremity: boolean): number[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EntityStore, QueryEntity } from "@datorama/akita";
|
|
2
|
+
import { NiceSelectableListOptions } from "../model/selectable-list-options.model";
|
|
3
|
+
import { NicePreloadSelectedEntitiesProvider } from "../providers/preload-selected-entities.provider";
|
|
4
|
+
import { SelectableListStateService } from "./selectable-list-state.service";
|
|
5
|
+
import { SelectableListState } from "./selectable-list.state";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class SelectableListService {
|
|
8
|
+
private providers;
|
|
9
|
+
private stores;
|
|
10
|
+
constructor(providers: NicePreloadSelectedEntitiesProvider<any>[]);
|
|
11
|
+
createState(name: string, options?: NiceSelectableListOptions): {
|
|
12
|
+
store: EntityStore<SelectableListState<any>, any, number>;
|
|
13
|
+
query: QueryEntity<SelectableListState<any>, any, number>;
|
|
14
|
+
};
|
|
15
|
+
getState(name: string): {
|
|
16
|
+
store: EntityStore<SelectableListState<any>, any, number>;
|
|
17
|
+
query: QueryEntity<SelectableListState<any>, any, number>;
|
|
18
|
+
};
|
|
19
|
+
withState<T, ID = any>(stateName: string, options?: NiceSelectableListOptions): SelectableListStateService<T, ID>;
|
|
20
|
+
query<T>(stateName: string): QueryEntity<SelectableListState<T>>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectableListService, [{ optional: true; }]>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SelectableListService>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActiveState, EntityState } from "@datorama/akita";
|
|
2
|
+
export declare type SelectableListEntity<T> = T & {
|
|
3
|
+
loaded?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export interface SelectableListState<T> extends EntityState<SelectableListEntity<T>, number>, ActiveState<any> {
|
|
6
|
+
allSelected: boolean;
|
|
7
|
+
unselectedEntity: any[];
|
|
8
|
+
}
|
package/package.json
CHANGED