@recursyve/nice-data-filter-kit 13.0.4 → 13.0.8

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.
@@ -1,5 +1,6 @@
1
1
  import { InjectionToken } from "@angular/core";
2
2
  export declare const BASE_LIST_LAYOUT: InjectionToken<unknown>;
3
+ export declare const DEFAULT_RULES: InjectionToken<unknown>;
3
4
  export declare const DEFAULT_PARAMETERS: InjectionToken<unknown>;
4
5
  export declare const LIST_TABLE: InjectionToken<unknown>;
5
6
  export declare const TABLE_COLUMNS: InjectionToken<unknown>;
@@ -1,5 +1,6 @@
1
1
  import { ModuleWithProviders, Provider, Type } from "@angular/core";
2
2
  import { FilterParametersModel } from "../../models/filter.model";
3
+ import { QueryModel } from "../../models/query.model";
3
4
  import { NiceFilterGroupService } from "../query-builder/providers/filter-group.service";
4
5
  import { TableColumns } from "./models/columns.model";
5
6
  import { ExportSettings } from "./models/export.model";
@@ -29,6 +30,7 @@ export interface BaseListOptions<T> {
29
30
  table: string;
30
31
  columns: TableColumns[];
31
32
  filterService: Type<NiceFilterService<T>>;
33
+ defaultRules?: QueryModel[];
32
34
  defaultParameters?: FilterParametersModel;
33
35
  layout?: BaseListLayout;
34
36
  exports?: ExportSettings;
@@ -5,5 +5,6 @@ export interface TableColumnsModel {
5
5
  export declare class TableColumns implements TableColumnsModel {
6
6
  id: string;
7
7
  sortable: boolean;
8
- constructor(id: string, sortable?: boolean);
8
+ nullLast: boolean;
9
+ constructor(id: string, sortable?: boolean, nullLast?: boolean);
9
10
  }
@@ -16,10 +16,10 @@ export interface NiceBaseListState {
16
16
  }
17
17
  export declare const initialBaseListState: NiceBaseListState;
18
18
  export declare class NiceBaseListStore<T extends NiceBaseListState = NiceBaseListState> extends Store<T> {
19
- constructor(parameters: FilterParametersModel);
19
+ constructor(parameters: FilterParametersModel, defaultRules: QueryModel[]);
20
20
  setFilterConfigLoading(loading: boolean): void;
21
21
  setResult(filterResult: FilterResultModel, reset?: boolean): void;
22
22
  setParameters(filterParameters: FilterParametersModel): void;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseListStore<any>, [{ optional: true; }]>;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceBaseListStore<any>, [{ optional: true; }, { optional: true; }]>;
24
24
  static ɵprov: i0.ɵɵInjectableDeclaration<NiceBaseListStore<any>>;
25
25
  }
@@ -2,6 +2,7 @@ import { QueryModel } from "./query.model";
2
2
  export interface OrderFilterParameterModel {
3
3
  column?: string;
4
4
  direction?: "asc" | "desc";
5
+ nullLast?: boolean;
5
6
  }
6
7
  export interface FilterParametersModel {
7
8
  start?: number;
@@ -3,6 +3,10 @@ export declare class StringUtils {
3
3
  }
4
4
  declare global {
5
5
  interface String {
6
- toTableColumn(sortable?: boolean): TableColumns;
6
+ toTableColumn(sortable?: boolean, nullLast?: boolean): TableColumns;
7
+ toTableColumn({ sortable, nullLast }: {
8
+ sortable?: boolean;
9
+ nullLast?: boolean;
10
+ }): TableColumns;
7
11
  }
8
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-data-filter-kit",
3
- "version": "13.0.4",
3
+ "version": "13.0.8",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",