@sumaris-net/ngx-components 18.21.14 → 18.22.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/doc/changelog.md +3 -0
- package/esm2022/src/app/admin/users/person.filter.mjs +7 -3
- package/esm2022/src/app/core/services/model/filter.model.mjs +87 -11
- package/fesm2022/sumaris-net.ngx-components.mjs +92 -12
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/admin/users/person.filter.d.ts +5 -1
- package/src/app/core/services/model/filter.model.d.ts +30 -1
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -6,7 +6,11 @@ import { FilterFn } from '../../shared/types';
|
|
|
6
6
|
export declare class PersonFilter extends EntityFilter<PersonFilter, Person> {
|
|
7
7
|
static FIELDS: (keyof PersonFilter)[];
|
|
8
8
|
static fromObject: (source: any, opts?: any) => PersonFilter;
|
|
9
|
-
static
|
|
9
|
+
static asFilterFn(source: any): FilterFn<Person>;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `PersonFilter.asFilterFn` instead
|
|
12
|
+
*/
|
|
13
|
+
static searchFilter: typeof PersonFilter.asFilterFn;
|
|
10
14
|
email: string;
|
|
11
15
|
pubkey: string;
|
|
12
16
|
searchText: string;
|
|
@@ -5,21 +5,31 @@ export interface IEntityFilter<F extends IEntityFilter<F, T, ID, AO, FO>, T exte
|
|
|
5
5
|
asFilterFn(): FilterFn<T>;
|
|
6
6
|
isEmpty(): boolean;
|
|
7
7
|
countNotEmptyCriteria(): number;
|
|
8
|
+
and(...filters: EntityFilter<any, T>[]): AndFilter<T>;
|
|
9
|
+
or(...filters: EntityFilter<any, T>[]): OrFilter<T>;
|
|
10
|
+
not(): NotFilter<T>;
|
|
8
11
|
}
|
|
9
12
|
export declare abstract class EntityFilter<F extends IEntityFilter<F, T, ID, AO, FO>, T extends IEntity<T, any>, ID = number, AO extends EntityAsObjectOptions = EntityAsObjectOptions, FO = any> extends Entity<F, ID, AO, FO> implements IEntityFilter<F, T, ID, AO, FO> {
|
|
10
13
|
/**
|
|
14
|
+
* @deprecated Use `EntityFilterUtils.composeFns()`
|
|
11
15
|
* Compose some filter functions: all should return true
|
|
12
16
|
*
|
|
13
17
|
* @param filterFns
|
|
14
18
|
*/
|
|
15
19
|
static composeFilters<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
16
|
-
static compose<F extends EntityFilter<F, T>, T extends IEntity<T, any>>(filters: F[]): FilterFn<T>;
|
|
17
20
|
/**
|
|
18
21
|
* Compose some filter functions: all should return true
|
|
19
22
|
*
|
|
20
23
|
* @param filterFns
|
|
21
24
|
*/
|
|
22
25
|
static composeFns<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `EntityFilter.and()`
|
|
28
|
+
*/
|
|
29
|
+
static compose<F extends EntityFilter<F, T>, T extends IEntity<T, any>>(filters: F[]): FilterFn<T>;
|
|
30
|
+
static or<T extends IEntity<T, any>>(...filters: EntityFilter<any, T>[]): OrFilter<T>;
|
|
31
|
+
static and<T extends IEntity<T, any>>(...filters: EntityFilter<any, T>[]): AndFilter<T>;
|
|
32
|
+
static not<T extends IEntity<T, any>>(filter: EntityFilter<any, T>): NotFilter<T>;
|
|
23
33
|
constructor(__typename?: string);
|
|
24
34
|
/**
|
|
25
35
|
* Clean a filter, before sending to the pod (e.g convert dates, remove internal properties, etc.)
|
|
@@ -28,9 +38,28 @@ export declare abstract class EntityFilter<F extends IEntityFilter<F, T, ID, AO,
|
|
|
28
38
|
isEmpty(): boolean;
|
|
29
39
|
countNotEmptyCriteria(): number;
|
|
30
40
|
asFilterFn(): FilterFn<T>;
|
|
41
|
+
and(...filters: EntityFilter<any, T>[]): AndFilter<T>;
|
|
42
|
+
or(...filters: EntityFilter<any, T>[]): OrFilter<T>;
|
|
43
|
+
not(): NotFilter<T>;
|
|
31
44
|
protected buildFilter(): FilterFn<T>[];
|
|
32
45
|
protected isCriteriaNotEmpty(key: string, value: any): boolean;
|
|
33
46
|
}
|
|
47
|
+
export declare class OrFilter<T extends IEntity<T, any>> extends EntityFilter<OrFilter<T>, T> {
|
|
48
|
+
protected filters: EntityFilter<any, T>[];
|
|
49
|
+
constructor(...filters: EntityFilter<any, T>[]);
|
|
50
|
+
protected buildFilter(): FilterFn<T>[];
|
|
51
|
+
}
|
|
52
|
+
export declare class NotFilter<T extends IEntity<T, any>> extends EntityFilter<NotFilter<T>, T> {
|
|
53
|
+
protected filter: EntityFilter<any, T>;
|
|
54
|
+
constructor(filter: EntityFilter<any, T>);
|
|
55
|
+
protected buildFilter(): FilterFn<T>[];
|
|
56
|
+
}
|
|
57
|
+
export declare class AndFilter<T extends IEntity<T, any>> extends EntityFilter<AndFilter<T>, T> {
|
|
58
|
+
protected filters: EntityFilter<any, T>[];
|
|
59
|
+
constructor(...filters: EntityFilter<any, T>[]);
|
|
60
|
+
and(...filters: EntityFilter<any, T>[]): AndFilter<T>;
|
|
61
|
+
protected buildFilter(): FilterFn<T>[];
|
|
62
|
+
}
|
|
34
63
|
export declare abstract class EntityFilterUtils {
|
|
35
64
|
static isEntityFilter<F extends EntityFilter<F, any>>(obj: Partial<F>): obj is F;
|
|
36
65
|
static fromObject<F>(source: any, filterType: new () => F): F;
|
package/src/assets/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ngx-sumaris-components",
|
|
3
3
|
"short_name": "ngx-sumaris-components",
|
|
4
4
|
"manifest_version": 1,
|
|
5
|
-
"version": "18.
|
|
5
|
+
"version": "18.22.0",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|