@sumaris-net/ngx-components 18.22.1 → 18.22.3
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/esm2022/src/app/core/services/model/filter.model.mjs +38 -101
- package/fesm2022/sumaris-net.ngx-components.mjs +38 -101
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/filter.model.d.ts +9 -27
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -5,17 +5,18 @@ 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
|
|
9
|
-
or
|
|
10
|
-
not
|
|
8
|
+
and?: F[];
|
|
9
|
+
or?: F[];
|
|
10
|
+
not?: F;
|
|
11
11
|
}
|
|
12
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> {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
static
|
|
17
|
-
static
|
|
13
|
+
and?: F[];
|
|
14
|
+
or?: F[];
|
|
15
|
+
not?: F;
|
|
16
|
+
static composeAnd<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
17
|
+
static composeOr<T extends IEntity<T, any>>(filterFns: FilterFn<T>[]): FilterFn<T>;
|
|
18
18
|
constructor(__typename?: string);
|
|
19
|
+
create(): F;
|
|
19
20
|
/**
|
|
20
21
|
* Clean a filter, before sending to the pod (e.g convert dates, remove internal properties, etc.)
|
|
21
22
|
*/
|
|
@@ -23,30 +24,11 @@ export declare abstract class EntityFilter<F extends IEntityFilter<F, T, ID, AO,
|
|
|
23
24
|
isEmpty(): boolean;
|
|
24
25
|
countNotEmptyCriteria(): number;
|
|
25
26
|
asFilterFn(): FilterFn<T>;
|
|
26
|
-
and(...filters: F[]): F;
|
|
27
|
-
or(...filters: F[]): F;
|
|
28
|
-
not(): F;
|
|
29
27
|
asObject(opts?: AO): any;
|
|
30
28
|
fromObject(source: any, opts?: FO): void;
|
|
31
29
|
protected buildFilter(): FilterFn<T>[];
|
|
32
30
|
protected isCriteriaNotEmpty(key: string, value: any): boolean;
|
|
33
31
|
}
|
|
34
|
-
export declare class OrFilter<T extends IEntity<T, any>> extends EntityFilter<OrFilter<T>, T> {
|
|
35
|
-
protected filters: EntityFilter<any, T>[];
|
|
36
|
-
constructor(...filters: EntityFilter<any, T>[]);
|
|
37
|
-
protected buildFilter(): FilterFn<T>[];
|
|
38
|
-
}
|
|
39
|
-
export declare class NotFilter<T extends IEntity<T, any>> extends EntityFilter<NotFilter<T>, T> {
|
|
40
|
-
protected filter: EntityFilter<any, T>;
|
|
41
|
-
constructor(filter: EntityFilter<any, T>);
|
|
42
|
-
protected buildFilter(): FilterFn<T>[];
|
|
43
|
-
}
|
|
44
|
-
export declare class AndFilter<T extends IEntity<T, any>> extends EntityFilter<AndFilter<T>, T> {
|
|
45
|
-
protected filters: EntityFilter<any, T>[];
|
|
46
|
-
constructor(...filters: EntityFilter<any, T>[]);
|
|
47
|
-
and(...filters: EntityFilter<any, T>[]): AndFilter<T>;
|
|
48
|
-
protected buildFilter(): FilterFn<T>[];
|
|
49
|
-
}
|
|
50
32
|
export declare abstract class EntityFilterUtils {
|
|
51
33
|
static isEntityFilter<F extends EntityFilter<F, any>>(obj: Partial<F>): obj is F;
|
|
52
34
|
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.22.
|
|
5
|
+
"version": "18.22.3",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|