@sumaris-net/ngx-components 18.6.57 → 18.6.59
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 +7 -0
- package/esm2022/src/app/core/services/model/entity.model.mjs +14 -5
- package/fesm2022/sumaris-net.ngx-components.mjs +13 -4
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/entity.model.d.ts +5 -3
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -44,8 +44,8 @@ export declare abstract class Entity<T extends Entity<T, ID, AO, FO>, ID = numbe
|
|
|
44
44
|
export declare function isInstanceOf<T>(obj: any, constructor: new (...args: any[]) => T): obj is T;
|
|
45
45
|
export declare abstract class EntityUtils {
|
|
46
46
|
static isEntity<T extends IEntity<any>>(obj: T | any): obj is T;
|
|
47
|
-
static isNotEmpty<T extends IEntity<any> | any>(obj: T, checkedAttribute
|
|
48
|
-
static isEmpty<T extends IEntity<any> | any>(obj: T, checkedAttribute
|
|
47
|
+
static isNotEmpty<T extends IEntity<any> | any>(obj: T, checkedAttribute?: keyof T): boolean;
|
|
48
|
+
static isEmpty<T extends IEntity<any> | any>(obj: T, checkedAttribute?: keyof T): boolean;
|
|
49
49
|
static equals<T extends IEntity<any> | any>(o1: T, o2: T, checkAttribute?: keyof T): boolean;
|
|
50
50
|
static getPropertyByPath: typeof getPropertyByPath;
|
|
51
51
|
static getArrayAsMap<T = any>(source?: ObjectMapEntry<T>[]): ObjectMap<T>;
|
|
@@ -81,7 +81,8 @@ export declare abstract class EntityUtils {
|
|
|
81
81
|
static isLocalId(id: number): boolean;
|
|
82
82
|
static isRemoteId(id: number): boolean;
|
|
83
83
|
static getId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(entity: T): ID;
|
|
84
|
-
static hasId<T extends IEntity<
|
|
84
|
+
static hasId<T extends IEntity<any, any> = IEntity<any, any>>(entity: T): boolean;
|
|
85
|
+
static hasNilId<T extends IEntity<any, any> = IEntity<any, any>>(entity: T): boolean;
|
|
85
86
|
/**
|
|
86
87
|
* Splits an array of entities into a key-value map using an entity ID as the key.
|
|
87
88
|
*
|
|
@@ -101,4 +102,5 @@ export declare abstract class EntityUtils {
|
|
|
101
102
|
*/
|
|
102
103
|
static collectById<T extends IEntity<T, ID>, ID = any>(entities: T[]): ID[];
|
|
103
104
|
static arrayDistinctFilterFn<E extends IEntity<any, any>>(item: E, index: number, values: E[]): boolean;
|
|
105
|
+
static findById<E extends IEntity<any, ID> = IEntity<any, any>, ID = number>(items: E[], id: ID): E | undefined;
|
|
104
106
|
}
|
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.6.
|
|
5
|
+
"version": "18.6.59",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|