@recursyve/nice-data-filter-kit 15.2.0 → 15.3.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.
Files changed (20) hide show
  1. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.mjs +13 -3
  2. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/button/advanced-filters-button.component.mjs +2 -4
  3. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/filter-selection/filter-selection.component.mjs +1 -1
  4. package/esm2020/lib/components/nice-filter-view/components/advanced-filters/utils/advanced-filters.utils.mjs +1 -1
  5. package/esm2020/lib/components/nice-filter-view/components/export-buttons/export-buttons.component.mjs +1 -1
  6. package/esm2020/lib/components/nice-filter-view/directives/mat-paginator.mjs +1 -1
  7. package/esm2020/lib/components/nice-filter-view/directives/mat-sort.mjs +6 -3
  8. package/esm2020/lib/components/nice-filter-view/models/order-options.model.mjs +2 -0
  9. package/esm2020/lib/components/nice-filter-view/nice-filter-view.component.mjs +1 -1
  10. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.service.mjs +1 -1
  11. package/esm2020/lib/components/nice-filter-view/store/nice-filter-view.store.mjs +2 -1
  12. package/fesm2015/recursyve-nice-data-filter-kit.mjs +86 -72
  13. package/fesm2015/recursyve-nice-data-filter-kit.mjs.map +1 -1
  14. package/fesm2020/recursyve-nice-data-filter-kit.mjs +96 -83
  15. package/fesm2020/recursyve-nice-data-filter-kit.mjs.map +1 -1
  16. package/lib/components/nice-filter-view/components/advanced-filters/advanced-filters.component.d.ts +6 -3
  17. package/lib/components/nice-filter-view/models/order-options.model.d.ts +7 -0
  18. package/lib/components/nice-filter-view/store/nice-filter-view.service.d.ts +1 -1
  19. package/lib/components/nice-filter-view/store/nice-filter-view.store.d.ts +3 -1
  20. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, OnInit } from "@angular/core";
1
+ import { ChangeDetectorRef, OnDestroy, OnInit } from "@angular/core";
2
2
  import { GeneratedFormArray, GeneratedFormGroup } from "@recursyve/ngx-form-generator";
3
3
  import { Observable } from "rxjs";
4
4
  import { FilterConfigurationModel } from "../../../../models/filter.model";
@@ -7,7 +7,7 @@ import { NiceFilterViewService } from "../../store/nice-filter-view.service";
7
7
  import { AdvancedFiltersForm, FilterForm } from "./advanced-filters.form";
8
8
  import { NiceAdvancedFilterIconOptions } from "./models/icons.model";
9
9
  import * as i0 from "@angular/core";
10
- export declare class NiceAdvancedFiltersComponent implements OnInit {
10
+ export declare class NiceAdvancedFiltersComponent implements OnInit, OnDestroy {
11
11
  icons: NiceAdvancedFilterIconOptions;
12
12
  formGroup: GeneratedFormGroup<AdvancedFiltersForm>;
13
13
  private query;
@@ -18,11 +18,14 @@ export declare class NiceAdvancedFiltersComponent implements OnInit {
18
18
  rulesFormArray: GeneratedFormArray<FilterForm>;
19
19
  constructor(icons: NiceAdvancedFilterIconOptions, formGroup: GeneratedFormGroup<AdvancedFiltersForm>, query: NiceFilterViewQuery, service: NiceFilterViewService, changeDetectorRef: ChangeDetectorRef);
20
20
  ngOnInit(): void;
21
+ ngOnDestroy(): void;
21
22
  onClickAddRule(filterConfigurationModel: FilterConfigurationModel): void;
22
23
  onClickDeleteRule(index: number): void;
23
24
  onClose(): void;
24
25
  onRefresh(): void;
25
- removeEmptyRules(): void;
26
+ removeEmptyRules({ reload }?: {
27
+ reload: boolean;
28
+ }): void;
26
29
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAdvancedFiltersComponent, [{ optional: true; }, null, null, null, null]>;
27
30
  static ɵcmp: i0.ɵɵComponentDeclaration<NiceAdvancedFiltersComponent, "nice-advanced-filters", never, {}, {}, never, never, false, never>;
28
31
  }
@@ -0,0 +1,7 @@
1
+ export interface OrderColumnOptions {
2
+ column?: string;
3
+ nullLast?: boolean;
4
+ }
5
+ export interface OrderOptions {
6
+ [order: string]: OrderColumnOptions;
7
+ }
@@ -39,7 +39,7 @@ export declare class NiceFilterViewService<Filter extends NiceFilterService<any>
39
39
  addValues(value: any[], opts?: AddEntitiesOptions): void;
40
40
  upsertValue(value: any, key?: string): void;
41
41
  upsertValues(values: any[], key?: string): void;
42
- removeValue(value: any[], key?: string): void;
42
+ removeValue(value: any, key?: string): void;
43
43
  removeValues(values: any[], key?: string): void;
44
44
  resetResult(waitForNextFilter: boolean): void;
45
45
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceFilterViewService<any>, never>;
@@ -4,6 +4,7 @@ import { StoreConfigOptions } from "@datorama/akita/src/lib/storeConfig";
4
4
  import { QueryParams } from "../../../api/filter.api";
5
5
  import { FilterConfigurationModel, FilterParametersModel, FilterResultModel } from "../../../models/filter.model";
6
6
  import { QueryModel, QueryRuleModel } from "../../../models/query.model";
7
+ import { OrderOptions } from "../models/order-options.model";
7
8
  import * as i0 from "@angular/core";
8
9
  export interface NiceFilterViewState extends EntityState {
9
10
  subStates: HashMap<any>;
@@ -16,7 +17,8 @@ export interface NiceFilterViewState extends EntityState {
16
17
  filterResult: FilterResultModel | null;
17
18
  filterParameters: FilterParametersModel;
18
19
  baseRules: (QueryRuleModel | QueryModel)[];
19
- queryParams: QueryParams;
20
+ queryParams: QueryParams | null;
21
+ orderColumns: OrderOptions | null;
20
22
  resetResult: boolean;
21
23
  }
22
24
  export declare const initialValue: NiceFilterViewState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-data-filter-kit",
3
- "version": "15.2.0",
3
+ "version": "15.3.1",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",