@recursyve/nice-data-filter-kit 13.1.2 → 13.1.5
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/api/filter.api.mjs +3 -3
- package/esm2020/lib/components/base-list/base-list.component.mjs +24 -4
- package/esm2020/lib/components/base-list/providers/base-filter.service.mjs +3 -3
- package/esm2020/lib/components/base-list/store/base-list.service.mjs +18 -13
- package/esm2020/lib/components/base-list/store/base-list.store.mjs +3 -2
- package/esm2020/lib/components/multi-state-list/multi-state-list.component.mjs +2 -2
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +48 -22
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +47 -21
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/api/filter.api.d.ts +13 -2
- package/lib/components/base-list/base-list.component.d.ts +4 -2
- package/lib/components/base-list/providers/base-filter.service.d.ts +2 -2
- package/lib/components/base-list/store/base-list.service.d.ts +2 -1
- package/lib/components/base-list/store/base-list.store.d.ts +1 -0
- package/package.json +1 -1
package/lib/api/filter.api.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { HttpClient } from "@angular/common/http";
|
|
1
|
+
import { HttpClient, HttpContext, HttpHeaders, HttpParams } from "@angular/common/http";
|
|
2
2
|
import { Observable } from "rxjs";
|
|
3
3
|
import { FilterConfigurationModel, FilterQueryModel, FilterResultModel, SelectFilterValue } from "../models/filter.model";
|
|
4
|
+
export interface NiceHttpOptions {
|
|
5
|
+
headers?: HttpHeaders | {
|
|
6
|
+
[header: string]: string | string[];
|
|
7
|
+
};
|
|
8
|
+
context?: HttpContext;
|
|
9
|
+
params?: HttpParams | {
|
|
10
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
11
|
+
};
|
|
12
|
+
reportProgress?: boolean;
|
|
13
|
+
withCredentials?: boolean;
|
|
14
|
+
}
|
|
4
15
|
export declare class NiceFilterApi<T> {
|
|
5
16
|
private filterApiUrl;
|
|
6
17
|
private path;
|
|
7
18
|
protected http: HttpClient;
|
|
8
19
|
constructor(filterApiUrl: string, path: string, http: HttpClient);
|
|
9
|
-
filter(queryModel: FilterQueryModel): Observable<FilterResultModel>;
|
|
20
|
+
filter(queryModel: FilterQueryModel, option?: NiceHttpOptions): Observable<FilterResultModel>;
|
|
10
21
|
filterCount(queryModel: FilterQueryModel): Observable<number>;
|
|
11
22
|
downloadData(type: string, queryModel: FilterQueryModel): Observable<Blob>;
|
|
12
23
|
getPrintableHtml(queryModel: FilterQueryModel): Observable<string>;
|
|
@@ -47,6 +47,7 @@ export declare class NiceBaseListComponent<Filter extends NiceFilterService<any>
|
|
|
47
47
|
canExport: boolean;
|
|
48
48
|
disableRouting: boolean;
|
|
49
49
|
customExport: ExportStrategy[];
|
|
50
|
+
queryParams: any;
|
|
50
51
|
newPage: EventEmitter<PageEvent>;
|
|
51
52
|
defaultPageSizeOptions: number[];
|
|
52
53
|
columnNames: string[];
|
|
@@ -96,7 +97,8 @@ export declare class NiceBaseListComponent<Filter extends NiceFilterService<any>
|
|
|
96
97
|
clickCsv(): void;
|
|
97
98
|
clickPrint(): void;
|
|
98
99
|
clickPdf(): void;
|
|
99
|
-
|
|
100
|
+
setColumns(columns: TableColumns[]): void;
|
|
101
|
+
addColumns(columns: TableColumns[], prepend?: boolean): void;
|
|
100
102
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseListComponent<any>, [{ optional: true; }, null, null, null, null, null, null, null, null, null, null]>;
|
|
101
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NiceBaseListComponent<any>, "nice-base-list", never, { "mode": "mode"; "layout": "layout"; "layoutContent": "layoutContent"; "autoChangeLayout": "autoChangeLayout"; "baseRoute": "baseRoute"; "routeFn": "routeFn"; "navigateFn": "navigateFn"; "autoLoad": "autoLoad"; "pageTitle": "pageTitle"; "canExport": "canExport"; "disableRouting": "disableRouting"; "customExport": "customExport"; }, { "newPage": "newPage"; }, ["title", "table", "cards", "customContent", "filters", "emptyState", "buttons"], never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceBaseListComponent<any>, "nice-base-list", never, { "mode": "mode"; "layout": "layout"; "layoutContent": "layoutContent"; "autoChangeLayout": "autoChangeLayout"; "baseRoute": "baseRoute"; "routeFn": "routeFn"; "navigateFn": "navigateFn"; "autoLoad": "autoLoad"; "pageTitle": "pageTitle"; "canExport": "canExport"; "disableRouting": "disableRouting"; "customExport": "customExport"; "queryParams": "queryParams"; }, { "newPage": "newPage"; }, ["title", "table", "cards", "customContent", "filters", "emptyState", "buttons"], never>;
|
|
102
104
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { NiceFilterApi } from "../../../api/filter.api";
|
|
2
|
+
import { NiceFilterApi, NiceHttpOptions } from "../../../api/filter.api";
|
|
3
3
|
import { FilterConfigurationModel, FilterParametersModel, FilterResultModel, SelectFilterValue } from "../../../models/filter.model";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface INiceFilterService<T> {
|
|
@@ -11,7 +11,7 @@ export interface INiceFilterService<T> {
|
|
|
11
11
|
export declare class NiceFilterService<T> implements INiceFilterService<T> {
|
|
12
12
|
protected api?: NiceFilterApi<T>;
|
|
13
13
|
constructor(api?: NiceFilterApi<T>);
|
|
14
|
-
filter(params: FilterParametersModel): Observable<FilterResultModel<T>>;
|
|
14
|
+
filter(params: FilterParametersModel, option?: NiceHttpOptions): Observable<FilterResultModel<T>>;
|
|
15
15
|
getFile(type: string, parameters: FilterParametersModel): Observable<Blob>;
|
|
16
16
|
getPrintableHtml(parameters: FilterParametersModel): Observable<string>;
|
|
17
17
|
getFilterConfig(): Observable<FilterConfigurationModel[]>;
|
|
@@ -27,6 +27,7 @@ export declare class NiceBaseListService<Filter extends NiceFilterService<any> =
|
|
|
27
27
|
enableList(): void;
|
|
28
28
|
setLoading(loading: boolean): void;
|
|
29
29
|
setMode(mode: "normal" | "infinite-scroll"): void;
|
|
30
|
+
setQueryParams(queryParams: any): void;
|
|
30
31
|
loadQueryParams(autoLoad: boolean): void;
|
|
31
32
|
resetAndLoadData(parameters?: FilterParametersModel, updateQueryParams?: boolean): Promise<void>;
|
|
32
33
|
loadData(parameters?: FilterParametersModel, updateQueryParams?: boolean, reset?: boolean): Promise<void>;
|
|
@@ -45,8 +46,8 @@ export declare class NiceBaseListService<Filter extends NiceFilterService<any> =
|
|
|
45
46
|
addListValue(value: any, opts?: AddEntitiesOptions): void;
|
|
46
47
|
updateListValue(value: any, key?: string): void;
|
|
47
48
|
removeListValue(value: any, key?: string): void;
|
|
49
|
+
getParameters(filterParameters?: FilterParametersModel): FilterParametersModel;
|
|
48
50
|
protected updateQueryParams(queryParams: any): Promise<void>;
|
|
49
|
-
private getParameters;
|
|
50
51
|
private mergeParameters;
|
|
51
52
|
private setParameters;
|
|
52
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseListService<any>, never>;
|
|
@@ -13,6 +13,7 @@ export interface NiceBaseListState {
|
|
|
13
13
|
filterConfig: FilterConfigurationModel[];
|
|
14
14
|
showQueryBuilder: boolean;
|
|
15
15
|
defaultRules: (QueryRuleModel | QueryModel)[];
|
|
16
|
+
queryParams: any;
|
|
16
17
|
}
|
|
17
18
|
export declare const initialBaseListState: NiceBaseListState;
|
|
18
19
|
export declare class NiceBaseListStore<T extends NiceBaseListState = NiceBaseListState> extends Store<T> {
|