@recursyve/nice-data-filter-kit 14.0.6 → 14.1.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/components/base-list/base-list.module.mjs +1 -1
- package/esm2020/lib/components/multi-state-list/multi-state-list.module.mjs +10 -6
- package/esm2020/lib/components/nice-filter-view/components/common/data.directive.mjs +14 -0
- package/esm2020/lib/components/nice-filter-view/components/custom-data-view/custom-data-view.component.mjs +22 -0
- package/esm2020/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.mjs +85 -0
- package/esm2020/lib/components/nice-filter-view/components/export-buttons/export.directive.mjs +27 -0
- package/esm2020/lib/components/nice-filter-view/components/infinite-scroll-data-view/infinite-scroll-data-view.component.mjs +33 -0
- package/esm2020/lib/components/nice-filter-view/components/search/search.component.mjs +54 -0
- package/esm2020/lib/components/nice-filter-view/directives/mat-paginator.mjs +48 -0
- package/esm2020/lib/components/nice-filter-view/directives/mat-sort.mjs +58 -0
- package/esm2020/lib/components/nice-filter-view/directives/mat-tables.mjs +22 -0
- package/esm2020/lib/components/nice-filter-view/directives/query-params.directive.mjs +81 -0
- package/esm2020/lib/components/nice-filter-view/nice-base-filter-view.component.mjs +89 -0
- package/esm2020/lib/components/nice-filter-view/nice-filter-view.component.mjs +34 -0
- package/esm2020/lib/components/nice-filter-view/nice-filter-view.constant.mjs +5 -0
- package/esm2020/lib/components/nice-filter-view/nice-filter-view.module.mjs +143 -0
- package/esm2020/lib/components/nice-filter-view/public-api.mjs +16 -0
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.query.mjs +29 -0
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +229 -0
- package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +119 -0
- package/esm2020/lib/components/public-api.mjs +2 -1
- package/esm2020/lib/utils/query-params.utils.mjs +5 -1
- package/fesm2015/recursyve-nice-data-filter-kit.mjs +967 -22
- package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/fesm2020/recursyve-nice-data-filter-kit.mjs +980 -20
- package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
- package/lib/components/multi-state-list/multi-state-list.module.d.ts +2 -0
- package/lib/components/nice-filter-view/components/common/data.directive.d.ts +8 -0
- package/lib/components/nice-filter-view/components/custom-data-view/custom-data-view.component.d.ts +11 -0
- package/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.d.ts +25 -0
- package/lib/components/nice-filter-view/components/export-buttons/export.directive.d.ts +11 -0
- package/lib/components/nice-filter-view/components/infinite-scroll-data-view/infinite-scroll-data-view.component.d.ts +14 -0
- package/lib/components/nice-filter-view/components/search/search.component.d.ts +20 -0
- package/lib/components/nice-filter-view/directives/mat-paginator.d.ts +16 -0
- package/lib/components/nice-filter-view/directives/mat-sort.d.ts +16 -0
- package/lib/components/nice-filter-view/directives/mat-tables.d.ts +12 -0
- package/lib/components/nice-filter-view/directives/query-params.directive.d.ts +21 -0
- package/lib/components/nice-filter-view/nice-base-filter-view.component.d.ts +55 -0
- package/lib/components/nice-filter-view/nice-filter-view.component.d.ts +12 -0
- package/lib/components/nice-filter-view/nice-filter-view.constant.d.ts +4 -0
- package/lib/components/nice-filter-view/nice-filter-view.module.d.ts +40 -0
- package/lib/components/nice-filter-view/public-api.d.ts +15 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.query.d.ts +15 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +36 -0
- package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +31 -0
- package/lib/components/public-api.d.ts +1 -0
- package/lib/utils/query-params.utils.d.ts +3 -0
- package/package.json +1 -1
- package/src/lib/nice-data-filter.theme.scss +25 -0
|
@@ -29,6 +29,8 @@ export interface MultiStateListOptions {
|
|
|
29
29
|
states: ListStates;
|
|
30
30
|
layout?: BaseListLayout;
|
|
31
31
|
exports?: ExportSettings;
|
|
32
|
+
disableQueryBuilder?: boolean;
|
|
33
|
+
disableQueryParams?: boolean;
|
|
32
34
|
queryBuilder?: {
|
|
33
35
|
filterGroupService: Type<NiceFilterGroupService<any>>;
|
|
34
36
|
savedReportService?: Type<NiceSavedReportService>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NiceFilterDataDirective {
|
|
4
|
+
template: TemplateRef<any>;
|
|
5
|
+
constructor(template: TemplateRef<any>);
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterDataDirective, never>;
|
|
7
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterDataDirective, "[niceFilterData]", never, {}, {}, never, never, false>;
|
|
8
|
+
}
|
package/lib/components/nice-filter-view/components/custom-data-view/custom-data-view.component.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NiceFilterCustomDataViewComponent {
|
|
5
|
+
private query;
|
|
6
|
+
content: TemplateRef<any>;
|
|
7
|
+
data$: import("rxjs").Observable<any[]>;
|
|
8
|
+
constructor(query: NiceFilterViewQuery);
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterCustomDataViewComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceFilterCustomDataViewComponent, "nice-filter-custom-data-view, div[nice-filter-custom-data-view]", never, {}, {}, ["content"], never, false>;
|
|
11
|
+
}
|
package/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MatBottomSheet } from "@angular/material/bottom-sheet";
|
|
2
|
+
import { ExportStrategy } from "@recursyve/nice-ui-kit.v2";
|
|
3
|
+
import { ExportSettings } from "../../../base-list/models/export.model";
|
|
4
|
+
import { NiceBaseIconOptions } from "../../../base-list/models/icons.model";
|
|
5
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
6
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class NiceFilterExportButtonsComponent {
|
|
9
|
+
icons: NiceBaseIconOptions;
|
|
10
|
+
private readonly exportsSettings;
|
|
11
|
+
private query;
|
|
12
|
+
private service;
|
|
13
|
+
private readonly bottomSheet;
|
|
14
|
+
customExport: ExportStrategy[];
|
|
15
|
+
downloadFileName: string;
|
|
16
|
+
loading$: import("rxjs").Observable<boolean>;
|
|
17
|
+
constructor(icons: NiceBaseIconOptions, exportsSettings: ExportSettings, query: NiceFilterViewQuery, service: NiceFilterViewService, bottomSheet: MatBottomSheet);
|
|
18
|
+
clickExport(): void;
|
|
19
|
+
clickXlsx(): void;
|
|
20
|
+
clickCsv(): void;
|
|
21
|
+
clickPrint(): void;
|
|
22
|
+
clickPdf(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterExportButtonsComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceFilterExportButtonsComponent, "nice-filter-export-buttons, div[nice-filter-export-buttons]", never, { "customExport": "customExport"; "downloadFileName": "downloadFileName"; }, {}, never, never, false>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NiceFilterExportDirective {
|
|
4
|
+
private service;
|
|
5
|
+
type: string;
|
|
6
|
+
downloadFileName: string;
|
|
7
|
+
constructor(service: NiceFilterViewService);
|
|
8
|
+
onClick(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterExportDirective, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterExportDirective, "[niceFilterExport]", never, { "type": "type"; "downloadFileName": "downloadFileName"; }, {}, never, never, false>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
3
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceFilterInfiniteScrollDataViewComponent {
|
|
6
|
+
private query;
|
|
7
|
+
private service;
|
|
8
|
+
content: TemplateRef<any>;
|
|
9
|
+
data$: import("rxjs").Observable<any[]>;
|
|
10
|
+
constructor(query: NiceFilterViewQuery, service: NiceFilterViewService);
|
|
11
|
+
loadNextPage(): Promise<void>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterInfiniteScrollDataViewComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceFilterInfiniteScrollDataViewComponent, "nice-filter-infinite-scroll-data-view, div[nice-filter-infinite-scroll-data-view]", never, {}, {}, ["content"], never, false>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { NiceBaseIconOptions } from "../../../base-list/models/icons.model";
|
|
3
|
+
import { NiceFilterViewQuery } from "../../store/nice-filter-view.query";
|
|
4
|
+
import { NiceFilterViewService } from "../../store/nice-filter-view.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceFilterSearchComponent implements OnInit, OnDestroy {
|
|
7
|
+
icons: NiceBaseIconOptions;
|
|
8
|
+
private query;
|
|
9
|
+
private service;
|
|
10
|
+
appearance: "default" | "outlined" | "legacy" | "custom";
|
|
11
|
+
searchQuery$: import("rxjs").Observable<string>;
|
|
12
|
+
private unsubscribeAll$;
|
|
13
|
+
private searchText$;
|
|
14
|
+
constructor(icons: NiceBaseIconOptions, query: NiceFilterViewQuery, service: NiceFilterViewService);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
onUpdateSearch(search: string): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterSearchComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceFilterSearchComponent, "nice-filter-search", never, { "appearance": "appearance"; }, {}, never, ["[niceFilterSearchButtons]"], false>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { MatPaginator } from "@angular/material/paginator";
|
|
3
|
+
import { NiceFilterViewQuery } from "../store/nice-filter-view.query";
|
|
4
|
+
import { NiceFilterViewService } from "../store/nice-filter-view.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceFilterMatPaginatorPaginationDirective implements OnInit, OnDestroy {
|
|
7
|
+
private query;
|
|
8
|
+
private service;
|
|
9
|
+
private paginator;
|
|
10
|
+
private unsubscribeAll$;
|
|
11
|
+
constructor(query: NiceFilterViewQuery, service: NiceFilterViewService, paginator: MatPaginator);
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterMatPaginatorPaginationDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterMatPaginatorPaginationDirective, "mat-paginator[niceFilterPagination]", never, {}, {}, never, never, false>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { MatSort } from "@angular/material/sort";
|
|
3
|
+
import { NiceFilterViewQuery } from "../store/nice-filter-view.query";
|
|
4
|
+
import { NiceFilterViewService } from "../store/nice-filter-view.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceFilterMatSortSortingDirective implements OnInit, OnDestroy {
|
|
7
|
+
private query;
|
|
8
|
+
private service;
|
|
9
|
+
private sort;
|
|
10
|
+
private unsubscribeAll$;
|
|
11
|
+
constructor(query: NiceFilterViewQuery, service: NiceFilterViewService, sort: MatSort);
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterMatSortSortingDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterMatSortSortingDirective, "mat-table[matSort][niceFilterSorting]", never, {}, {}, never, never, false>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { MatTable } from "@angular/material/table";
|
|
3
|
+
import { NiceFilterViewQuery } from "../store/nice-filter-view.query";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceFilterMatTableViewDirective implements OnInit {
|
|
6
|
+
private query;
|
|
7
|
+
private table;
|
|
8
|
+
constructor(query: NiceFilterViewQuery, table: MatTable<any>);
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterMatTableViewDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterMatTableViewDirective, "mat-table[niceFilterDataView]", never, {}, {}, never, never, false>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from "@angular/core";
|
|
2
|
+
import { ActivatedRoute, Router } from "@angular/router";
|
|
3
|
+
import { NiceFilterViewQuery } from "../store/nice-filter-view.query";
|
|
4
|
+
import { NiceFilterViewService } from "../store/nice-filter-view.service";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceFilterQueryParamsDirective implements OnInit, OnDestroy {
|
|
7
|
+
private query;
|
|
8
|
+
private service;
|
|
9
|
+
private route;
|
|
10
|
+
private router;
|
|
11
|
+
init: EventEmitter<any>;
|
|
12
|
+
private unsubscribeAll$;
|
|
13
|
+
private initialized;
|
|
14
|
+
constructor(query: NiceFilterViewQuery, service: NiceFilterViewService, route: ActivatedRoute, router: Router);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
private updateQueryParams;
|
|
18
|
+
private loadQueryParams;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterQueryParamsDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NiceFilterQueryParamsDirective, "nice-filter-view[niceFilterQueryParams]", never, {}, { "init": "init"; }, never, never, false>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { QueryParams } from "../../api/filter.api";
|
|
4
|
+
import { QueryModel, QueryRuleModel, RuleModel } from "../../models/query.model";
|
|
5
|
+
import { NiceFilterViewQuery } from "./store/nice-filter-view.query";
|
|
6
|
+
import { NiceFilterViewService } from "./store/nice-filter-view.service";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export interface NiceBaseFilterViewInitOptions {
|
|
9
|
+
mode?: "paginated" | "accumulated";
|
|
10
|
+
loadConfig?: boolean;
|
|
11
|
+
configQueryParams?: QueryParams;
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class NiceBaseFilterViewComponent implements OnInit {
|
|
14
|
+
protected filterViewService: NiceFilterViewService;
|
|
15
|
+
protected filterViewQuery: NiceFilterViewQuery;
|
|
16
|
+
filterViewLoading$: Observable<boolean>;
|
|
17
|
+
ngOnInit(autoLoad?: boolean, { mode, loadConfig, configQueryParams }?: NiceBaseFilterViewInitOptions): void;
|
|
18
|
+
/**
|
|
19
|
+
* Call the filter endpoint with the current filter parameters.
|
|
20
|
+
*/
|
|
21
|
+
loadData(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Disable the filter view. This will stop calling any api routes.
|
|
24
|
+
*/
|
|
25
|
+
disable(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Enable the filter view. This will resume calling any api routes.
|
|
28
|
+
*/
|
|
29
|
+
enable(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Update the loading state
|
|
32
|
+
*/
|
|
33
|
+
setLoading(loading: boolean): void;
|
|
34
|
+
/**
|
|
35
|
+
* Set a set of rules that won't be saved in the current filterParameters config.
|
|
36
|
+
* NOTE: These rules will be injected in each filter request.
|
|
37
|
+
*/
|
|
38
|
+
setBaseRules(rule: (QueryRuleModel | QueryModel)[], reload?: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Reset all rules with a new set of rules.
|
|
41
|
+
*/
|
|
42
|
+
setRules(rules: QueryModel | QueryModel[], reload?: boolean): void;
|
|
43
|
+
/**
|
|
44
|
+
* Add or update a rule.
|
|
45
|
+
* NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
|
|
46
|
+
*/
|
|
47
|
+
upsertRule(id: string, newRule: RuleModel, reload?: boolean): void;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a rule.
|
|
50
|
+
* NOTE: This will only check for rules in the first element of the rules array in the current filterParameters.
|
|
51
|
+
*/
|
|
52
|
+
removeRule(id: string, reload?: boolean): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseFilterViewComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceBaseFilterViewComponent, "ng-component", never, {}, {}, never, never, false>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { QueryParams } from "../../api/filter.api";
|
|
3
|
+
import { NiceFilterViewService } from "./store/nice-filter-view.service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NiceFilterViewComponent implements OnChanges {
|
|
6
|
+
private service;
|
|
7
|
+
queryParams: QueryParams;
|
|
8
|
+
constructor(service: NiceFilterViewService);
|
|
9
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NiceFilterViewComponent, "nice-filter-view", never, { "queryParams": "queryParams"; }, {}, never, ["*"], false>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ModuleWithProviders, Provider, Type } from "@angular/core";
|
|
2
|
+
import { ExportSettings } from "../base-list/models/export.model";
|
|
3
|
+
import { NiceBaseIconOptions } from "../base-list/models/icons.model";
|
|
4
|
+
import { NiceFilterService } from "../base-list/providers/base-filter.service";
|
|
5
|
+
import { NiceFilterViewState } from "./store/nice-filter-view.store";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "./nice-filter-view.component";
|
|
8
|
+
import * as i2 from "./components/custom-data-view/custom-data-view.component";
|
|
9
|
+
import * as i3 from "./components/export-buttons/export-buttons.component";
|
|
10
|
+
import * as i4 from "./components/infinite-scroll-data-view/infinite-scroll-data-view.component";
|
|
11
|
+
import * as i5 from "./components/search/search.component";
|
|
12
|
+
import * as i6 from "./components/common/data.directive";
|
|
13
|
+
import * as i7 from "./components/export-buttons/export.directive";
|
|
14
|
+
import * as i8 from "./directives/mat-tables";
|
|
15
|
+
import * as i9 from "./directives/mat-sort";
|
|
16
|
+
import * as i10 from "./directives/mat-paginator";
|
|
17
|
+
import * as i11 from "./directives/query-params.directive";
|
|
18
|
+
import * as i12 from "@ngx-translate/core";
|
|
19
|
+
import * as i13 from "@angular/material/icon";
|
|
20
|
+
import * as i14 from "@angular/forms";
|
|
21
|
+
import * as i15 from "@angular/common";
|
|
22
|
+
import * as i16 from "@angular/material/tooltip";
|
|
23
|
+
import * as i17 from "@angular/material/button";
|
|
24
|
+
import * as i18 from "@angular/material/bottom-sheet";
|
|
25
|
+
import * as i19 from "@recursyve/nice-ui-kit.v2";
|
|
26
|
+
export interface NiceFilterViewOptions<T> {
|
|
27
|
+
filterService: Type<NiceFilterService<T>>;
|
|
28
|
+
exports?: ExportSettings;
|
|
29
|
+
state?: Partial<NiceFilterViewState>;
|
|
30
|
+
}
|
|
31
|
+
export interface NiceFilterViewGlobalOptions {
|
|
32
|
+
icons?: NiceBaseIconOptions;
|
|
33
|
+
}
|
|
34
|
+
export declare class NiceFilterViewModule {
|
|
35
|
+
static forRoot(options?: NiceFilterViewGlobalOptions): ModuleWithProviders<NiceFilterViewModule>;
|
|
36
|
+
static providerFactory<T>(options: NiceFilterViewOptions<T>): Provider[];
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewModule, never>;
|
|
38
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NiceFilterViewModule, [typeof i1.NiceFilterViewComponent, typeof i2.NiceFilterCustomDataViewComponent, typeof i3.NiceFilterExportButtonsComponent, typeof i4.NiceFilterInfiniteScrollDataViewComponent, typeof i5.NiceFilterSearchComponent, typeof i6.NiceFilterDataDirective, typeof i7.NiceFilterExportDirective, typeof i8.NiceFilterMatTableViewDirective, typeof i9.NiceFilterMatSortSortingDirective, typeof i10.NiceFilterMatPaginatorPaginationDirective, typeof i11.NiceFilterQueryParamsDirective], [typeof i12.TranslateModule, typeof i13.MatIconModule, typeof i14.FormsModule, typeof i15.AsyncPipe, typeof i15.NgIf, typeof i15.NgTemplateOutlet, typeof i16.MatTooltipModule, typeof i17.MatButtonModule, typeof i18.MatBottomSheetModule, typeof i19.NiceExportBottomSheetModule], [typeof i1.NiceFilterViewComponent, typeof i2.NiceFilterCustomDataViewComponent, typeof i3.NiceFilterExportButtonsComponent, typeof i4.NiceFilterInfiniteScrollDataViewComponent, typeof i5.NiceFilterSearchComponent, typeof i6.NiceFilterDataDirective, typeof i7.NiceFilterExportDirective, typeof i8.NiceFilterMatTableViewDirective, typeof i9.NiceFilterMatSortSortingDirective, typeof i10.NiceFilterMatPaginatorPaginationDirective, typeof i11.NiceFilterQueryParamsDirective]>;
|
|
39
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NiceFilterViewModule>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./components/common/data.directive";
|
|
2
|
+
export * from "./components/custom-data-view/custom-data-view.component";
|
|
3
|
+
export * from "./components/export-buttons/export-buttons.component";
|
|
4
|
+
export * from "./components/export-buttons/export.directive";
|
|
5
|
+
export * from "./components/infinite-scroll-data-view/infinite-scroll-data-view.component";
|
|
6
|
+
export * from "./components/search/search.component";
|
|
7
|
+
export * from "./directives/mat-paginator";
|
|
8
|
+
export * from "./directives/mat-sort";
|
|
9
|
+
export * from "./directives/mat-tables";
|
|
10
|
+
export * from "./directives/query-params.directive";
|
|
11
|
+
export * from "./store/nice-filter-view.service";
|
|
12
|
+
export * from "./store/nice-filter-view.query";
|
|
13
|
+
export * from "./nice-base-filter-view.component";
|
|
14
|
+
export * from "./nice-filter-view.component";
|
|
15
|
+
export * from "./nice-filter-view.module";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { QueryEntity } from "@datorama/akita";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { FilterConfigurationModel, FilterParametersModel, FilterResultModel } from "../../../models/filter.model";
|
|
4
|
+
import { NiceFilterViewState, NiceFilterViewStore } from "./nice-filter-view.store";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NiceFilterViewQuery extends QueryEntity<NiceFilterViewState> {
|
|
7
|
+
protected store: NiceFilterViewStore;
|
|
8
|
+
constructor(store: NiceFilterViewStore);
|
|
9
|
+
selectFilterConfigLoading(): Observable<boolean>;
|
|
10
|
+
selectFilterConfig(): Observable<FilterConfigurationModel[]>;
|
|
11
|
+
selectFilterParameters(): Observable<FilterParametersModel>;
|
|
12
|
+
selectFilterResult(): Observable<FilterResultModel | null>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewQuery, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewQuery>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AddEntitiesOptions } from "@datorama/akita/src/lib/addEntities";
|
|
2
|
+
import { QueryParams } from "../../../api/filter.api";
|
|
3
|
+
import { FilterParametersModel } from "../../../models/filter.model";
|
|
4
|
+
import { QueryModel, QueryRuleModel, RuleModel } from "../../../models/query.model";
|
|
5
|
+
import { NiceFilterService } from "../../base-list/providers/base-filter.service";
|
|
6
|
+
import { NiceFilterViewStore } from "./nice-filter-view.store";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class NiceFilterViewService<Filter extends NiceFilterService<any> = NiceFilterService<any>> {
|
|
9
|
+
private store;
|
|
10
|
+
protected filterService: Filter;
|
|
11
|
+
constructor(store: NiceFilterViewStore, filterService: Filter);
|
|
12
|
+
reset(): void;
|
|
13
|
+
disable(): void;
|
|
14
|
+
enable(): void;
|
|
15
|
+
setAutoLoad(autoLoad: boolean): void;
|
|
16
|
+
setLoading(loading: boolean): void;
|
|
17
|
+
setMode(mode: "paginated" | "accumulated"): void;
|
|
18
|
+
loadConfig(configQueryParams?: QueryParams): Promise<void>;
|
|
19
|
+
filter(): Promise<void>;
|
|
20
|
+
downloadData(type: string, downloadFileName: string): Promise<void>;
|
|
21
|
+
printData(): Promise<void>;
|
|
22
|
+
setParameters(filterParameters: FilterParametersModel, reload?: boolean): void;
|
|
23
|
+
resetPaging(): void;
|
|
24
|
+
setQueryParams(queryParams: QueryParams): void;
|
|
25
|
+
setBaseRules(rule: (QueryRuleModel | QueryModel)[], reload: boolean): void;
|
|
26
|
+
setRules(rules: QueryModel | QueryModel[], reload: boolean): void;
|
|
27
|
+
upsertRule(id: string, newRule: RuleModel, reload: boolean): void;
|
|
28
|
+
removeRule(id: string, reload: boolean): void;
|
|
29
|
+
addValue(value: any, opts?: AddEntitiesOptions): void;
|
|
30
|
+
upsertValue(value: any, key?: string): void;
|
|
31
|
+
removeValue(value: any, key?: string): void;
|
|
32
|
+
resetResult(waitForNextFilter: boolean): void;
|
|
33
|
+
getParameters(filterParameters?: FilterParametersModel): FilterParametersModel;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewService<any>, never>;
|
|
35
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewService<any>>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EntityState, EntityStore, HashMap } from "@datorama/akita";
|
|
2
|
+
import { AddEntitiesOptions } from "@datorama/akita/src/lib/addEntities";
|
|
3
|
+
import { QueryParams } from "../../../api/filter.api";
|
|
4
|
+
import { FilterConfigurationModel, FilterParametersModel, FilterResultModel } from "../../../models/filter.model";
|
|
5
|
+
import { QueryModel, QueryRuleModel } from "../../../models/query.model";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export interface NiceFilterViewState extends EntityState {
|
|
8
|
+
subStates: HashMap<any>;
|
|
9
|
+
mode: "paginated" | "accumulated";
|
|
10
|
+
autoLoad: boolean;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
filterConfigLoading: boolean;
|
|
13
|
+
filterConfig: FilterConfigurationModel[];
|
|
14
|
+
filterResult: FilterResultModel | null;
|
|
15
|
+
filterParameters: FilterParametersModel;
|
|
16
|
+
baseRules: (QueryRuleModel | QueryModel)[];
|
|
17
|
+
queryParams: QueryParams;
|
|
18
|
+
resetResult: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const initialValue: NiceFilterViewState;
|
|
21
|
+
export declare class NiceFilterViewStore extends EntityStore<NiceFilterViewState> {
|
|
22
|
+
constructor(state: Partial<NiceFilterViewState>);
|
|
23
|
+
setFilterConfigLoading(loading: boolean): void;
|
|
24
|
+
setParameters(filterParameters: FilterParametersModel): void;
|
|
25
|
+
setResult(filterResult: FilterResultModel): void;
|
|
26
|
+
addValue(value: any, opts?: AddEntitiesOptions): void;
|
|
27
|
+
upsertValue(value: any, key?: string): void;
|
|
28
|
+
removeValue(value: any, key?: string): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewStore, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NiceFilterViewStore>;
|
|
31
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FilterParametersModel } from "../models/filter.model";
|
|
2
2
|
export declare class QueryParamsUtils {
|
|
3
|
+
static hasFilterParameters(params: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}): boolean;
|
|
3
6
|
static extractFilterParameters(params: {
|
|
4
7
|
[key: string]: any;
|
|
5
8
|
}): FilterParametersModel;
|
package/package.json
CHANGED
|
@@ -4,4 +4,29 @@
|
|
|
4
4
|
@mixin nice-data-filter-kit-theme($theme) {
|
|
5
5
|
@include nice-base-list-theme($theme);
|
|
6
6
|
@include nice-query-builder-theme($theme);
|
|
7
|
+
|
|
8
|
+
// TODO: Figure out a better way ot use tailwind
|
|
9
|
+
nice-filter-search {
|
|
10
|
+
.search-wrapper {
|
|
11
|
+
&.nice-search-legacy, &.nice-search-default {
|
|
12
|
+
@apply bg-card;
|
|
13
|
+
|
|
14
|
+
.search {
|
|
15
|
+
input {
|
|
16
|
+
@apply bg-card text-default;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.nice-search-outlined {
|
|
22
|
+
@apply border;
|
|
23
|
+
|
|
24
|
+
.search {
|
|
25
|
+
input {
|
|
26
|
+
@apply bg-transparent text-default;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
7
32
|
}
|