@recursyve/nice-data-filter-kit 13.1.6 → 13.2.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/esm2020/lib/api/filter.api.mjs +42 -1
- package/esm2020/lib/components/base-list/base-list.component.mjs +4 -4
- package/esm2020/lib/components/base-list/directives/base-list-table.directive.mjs +7 -4
- package/esm2020/lib/components/base-list/models/icons.model.mjs +1 -1
- package/esm2020/lib/components/base-list/providers/base-filter.service.mjs +7 -5
- package/esm2020/lib/components/multi-state-list/multi-state-list.component.mjs +3 -3
- package/esm2020/lib/components/multi-state-list/providers/multi-state-filter.service.mjs +1 -1
- package/esm2020/lib/components/query-builder/filter-selection/filter-selection.component.mjs +8 -7
- package/esm2020/lib/components/query-builder/pipes/filter-group-icon.pipe.mjs +8 -2
- package/esm2020/lib/components/query-builder/providers/filter-group.service.mjs +1 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +80 -25
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +78 -25
- 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/base-list.component.d.ts +2 -1
- package/lib/components/base-list/directives/base-list-table.directive.d.ts +2 -1
- package/lib/components/base-list/models/icons.model.d.ts +4 -0
- 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/lib/components/query-builder/pipes/filter-group-icon.pipe.d.ts +2 -1
- package/lib/components/query-builder/providers/filter-group.service.d.ts +2 -1
- 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;
|
|
@@ -9,6 +9,7 @@ import { QueryParams } from "../../api/filter.api";
|
|
|
9
9
|
import { FilterConfigurationModel } from "../../models/filter.model";
|
|
10
10
|
import { QueryModel, QueryRuleModel } from "../../models/query.model";
|
|
11
11
|
import { NiceBaseListButtonsDirective } from "./directives/base-list-buttons.directive";
|
|
12
|
+
import { NiceBaseListTableDirective } from "./directives/base-list-table.directive";
|
|
12
13
|
import { TableColumns } from "./models/columns.model";
|
|
13
14
|
import { ExportSettings } from "./models/export.model";
|
|
14
15
|
import { NiceBaseIconOptions } from "./models/icons.model";
|
|
@@ -31,7 +32,7 @@ export declare class NiceBaseListComponent<Filter extends NiceFilterService<any>
|
|
|
31
32
|
private readonly mediaWatcher;
|
|
32
33
|
title: TemplateRef<any>;
|
|
33
34
|
buttons: NiceBaseListButtonsDirective[];
|
|
34
|
-
table:
|
|
35
|
+
table: NiceBaseListTableDirective;
|
|
35
36
|
cards: TemplateRef<any>;
|
|
36
37
|
customContent: TemplateRef<any>;
|
|
37
38
|
filters: TemplateRef<any>;
|
|
@@ -2,7 +2,8 @@ import { TemplateRef } from "@angular/core";
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class NiceBaseListTableDirective {
|
|
4
4
|
template: TemplateRef<any>;
|
|
5
|
+
stickyHeader: boolean;
|
|
5
6
|
constructor(template: TemplateRef<any>);
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseListTableDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceBaseListTableDirective, "[niceListTable]", never, {}, {}, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceBaseListTableDirective, "[niceListTable]", never, { "stickyHeader": "stickyHeader"; }, {}, never>;
|
|
8
9
|
}
|
|
@@ -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
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { PipeTransform } from "@angular/core";
|
|
2
|
+
import { NiceBaseListIcons } from "../../base-list/models/icons.model";
|
|
2
3
|
import { NiceFilterGroupService } from "../providers/filter-group.service";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class FilterGroupIconPipe implements PipeTransform {
|
|
5
6
|
private service;
|
|
6
7
|
constructor(service: NiceFilterGroupService<any>);
|
|
7
|
-
transform(value: string):
|
|
8
|
+
transform(value: string): NiceBaseListIcons;
|
|
8
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterGroupIconPipe, never>;
|
|
9
10
|
static ɵpipe: i0.ɵɵPipeDeclaration<FilterGroupIconPipe, "filterGroupIcon">;
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recursyve/nice-data-filter-kit",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.2.0",
|
|
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"
|