@recursyve/nice-data-filter-kit 13.1.6 → 13.1.7
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 +42 -1
- package/esm2020/lib/components/base-list/providers/base-filter.service.mjs +7 -5
- package/esm2020/lib/components/multi-state-list/providers/multi-state-filter.service.mjs +1 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +49 -3
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +47 -3
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/api/filter.api.d.ts +27 -2
- package/lib/components/base-list/providers/base-filter.service.d.ts +3 -3
- package/lib/components/multi-state-list/providers/multi-state-filter.service.d.ts +3 -3
- package/package.json +3 -3
package/lib/api/filter.api.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { HttpClient, HttpContext, HttpHeaders, HttpParams } from "@angular/common/http";
|
|
2
|
+
import { HttpOptions, NiceHttpExceptionFactory } from "@recursyve/nice-ui-kit.v2";
|
|
3
|
+
import { AbstractConstructor, Constructor } from "@recursyve/nice-ui-kit.v2/lib/types/constructor";
|
|
2
4
|
import { Observable } from "rxjs";
|
|
3
5
|
import { FilterConfigurationModel, FilterQueryModel, FilterResultModel, SelectFilterValue } from "../models/filter.model";
|
|
4
6
|
export interface NiceHttpOptions {
|
|
@@ -15,12 +17,21 @@ export interface NiceHttpOptions {
|
|
|
15
17
|
export interface QueryParams {
|
|
16
18
|
[param: string]: any;
|
|
17
19
|
}
|
|
18
|
-
export
|
|
20
|
+
export interface NiceFilterApiDefinition {
|
|
21
|
+
filter(queryModel: FilterQueryModel, option?: HttpOptions): Observable<FilterResultModel>;
|
|
22
|
+
filterCount(queryModel: FilterQueryModel): Observable<number>;
|
|
23
|
+
downloadData(type: string, queryModel: FilterQueryModel): Observable<Blob>;
|
|
24
|
+
getPrintableHtml(queryModel: FilterQueryModel): Observable<string>;
|
|
25
|
+
getFilterConfig(option?: HttpOptions): Observable<FilterConfigurationModel[]>;
|
|
26
|
+
searchFilterValue(id: string, value: string): Observable<SelectFilterValue[]>;
|
|
27
|
+
searchFilterResourceValue(id: string, resourceId: number): Observable<SelectFilterValue>;
|
|
28
|
+
}
|
|
29
|
+
export declare class NiceFilterApi<T> implements NiceFilterApiDefinition {
|
|
19
30
|
private filterApiUrl;
|
|
20
31
|
private path;
|
|
21
32
|
protected http: HttpClient;
|
|
22
33
|
constructor(filterApiUrl: string, path: string, http: HttpClient);
|
|
23
|
-
filter(queryModel: FilterQueryModel, option?: NiceHttpOptions): Observable<FilterResultModel
|
|
34
|
+
filter(queryModel: FilterQueryModel, option?: NiceHttpOptions): Observable<FilterResultModel<T>>;
|
|
24
35
|
filterCount(queryModel: FilterQueryModel): Observable<number>;
|
|
25
36
|
downloadData(type: string, queryModel: FilterQueryModel): Observable<Blob>;
|
|
26
37
|
getPrintableHtml(queryModel: FilterQueryModel): Observable<string>;
|
|
@@ -31,3 +42,17 @@ export declare class NiceFilterApi<T> {
|
|
|
31
42
|
protected url(queryParams: object): string;
|
|
32
43
|
private transformUrlArgs;
|
|
33
44
|
}
|
|
45
|
+
export interface HasNiceFilterApiDefinition {
|
|
46
|
+
exceptionFactory: NiceHttpExceptionFactory;
|
|
47
|
+
httpClient: HttpClient;
|
|
48
|
+
apiUrl: string;
|
|
49
|
+
path: string;
|
|
50
|
+
url(route?: string): string;
|
|
51
|
+
delete<T>(route?: string, options?: HttpOptions): Observable<T>;
|
|
52
|
+
get<T>(route?: string, options?: HttpOptions): Observable<T>;
|
|
53
|
+
patch<T>(route?: string, body?: any, options?: HttpOptions): Observable<T>;
|
|
54
|
+
post<T>(route?: string, body?: any, options?: HttpOptions): Observable<T>;
|
|
55
|
+
put<T>(route?: string, body?: any, options?: HttpOptions): Observable<T>;
|
|
56
|
+
}
|
|
57
|
+
export declare type NiceFilterApiDefinitionCtor = Constructor<NiceFilterApiDefinition> & AbstractConstructor<NiceFilterApiDefinition>;
|
|
58
|
+
export declare function mixinNiceFilterApi<C extends AbstractConstructor<HasNiceFilterApiDefinition>>(base: C): NiceFilterApiDefinitionCtor & C;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import {
|
|
2
|
+
import { NiceFilterApiDefinition, 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> {
|
|
@@ -9,8 +9,8 @@ export interface INiceFilterService<T> {
|
|
|
9
9
|
getPrintableHtml(parameters: FilterParametersModel): Observable<string>;
|
|
10
10
|
}
|
|
11
11
|
export declare class NiceFilterService<T> implements INiceFilterService<T> {
|
|
12
|
-
protected api?:
|
|
13
|
-
constructor(api?:
|
|
12
|
+
protected api?: NiceFilterApiDefinition;
|
|
13
|
+
constructor(api?: NiceFilterApiDefinition);
|
|
14
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>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NiceFilterApiDefinition } from "../../../api/filter.api";
|
|
2
2
|
import { NiceFilterService } from "../../base-list/providers/base-filter.service";
|
|
3
3
|
export declare class NiceMultiStateFilterService extends NiceFilterService<any> {
|
|
4
4
|
protected filters: {
|
|
5
|
-
[state: string]:
|
|
5
|
+
[state: string]: NiceFilterApiDefinition;
|
|
6
6
|
};
|
|
7
7
|
protected constructor(filters: {
|
|
8
|
-
[state: string]:
|
|
8
|
+
[state: string]: NiceFilterApiDefinition;
|
|
9
9
|
});
|
|
10
10
|
switchState(state: string): void;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recursyve/nice-data-filter-kit",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.7",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"sass": "./_index.scss",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"@angular/material": "^13.0.0",
|
|
24
24
|
"@datorama/akita": "^7.0.0",
|
|
25
25
|
"@ngx-translate/core": "^14.0.0",
|
|
26
|
-
"@recursyve/nice-ui-kit.v2": "
|
|
27
|
-
"@recursyve/ngx-form-generator": "
|
|
26
|
+
"@recursyve/nice-ui-kit.v2": ">= 13.1.0-beta.88",
|
|
27
|
+
"@recursyve/ngx-form-generator": ">= 13.0.0-beta.27"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.0.0"
|