@sumaris-net/ngx-components 18.0.9 → 18.0.10
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 +5 -0
- package/esm2022/src/app/core/services/model/entity.model.mjs +28 -1
- package/esm2022/src/app/shared/platforms.mjs +4 -1
- package/fesm2022/sumaris-net.ngx-components.mjs +31 -1
- 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 +18 -1
- package/src/app/shared/platforms.d.ts +3 -0
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Moment } from 'moment';
|
|
2
2
|
import { getPropertyByPath } from '../../../shared/functions';
|
|
3
|
-
import { FilterFn, ObjectMap, ObjectMapEntry } from '../../../shared/types';
|
|
3
|
+
import { FilterFn, KeyValueType, ObjectMap, ObjectMapEntry } from '../../../shared/types';
|
|
4
4
|
import { StoreObject } from '@apollo/client/core';
|
|
5
5
|
import { TreeItemEntityUtils } from './tree-item-entity.model';
|
|
6
6
|
import { SortDirection } from '@angular/material/sort';
|
|
@@ -82,6 +82,23 @@ export declare abstract class EntityUtils {
|
|
|
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
84
|
static hasId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(entity: T): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Splits an array of entities into a key-value map using an entity ID as the key.
|
|
87
|
+
*
|
|
88
|
+
* @param {Array<T>} entities - The array of entities to be split by their ID.
|
|
89
|
+
* @return {KeyValueType<T>} A key-value map with entity IDs as keys and entities as values.
|
|
90
|
+
*/
|
|
91
|
+
static splitById<T extends IEntity<T, ID>, ID = any>(entities: T[]): KeyValueType<T>;
|
|
92
|
+
/**
|
|
93
|
+
* Collects the IDs from an array of entities and returns them as an array.
|
|
94
|
+
*
|
|
95
|
+
* @param {T[]} entities - An array of entities from which to collect IDs.
|
|
96
|
+
* @return {ID[]} An array of IDs collected from the entities.
|
|
97
|
+
*/
|
|
98
|
+
static collectIds<T extends IEntity<T, ID>, ID = any>(entities: T[]): ID[];
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Use collectIds() instead - will be remove in next major release
|
|
101
|
+
*/
|
|
85
102
|
static collectById<T extends IEntity<T, ID>, ID = any>(entities: T[]): ID[];
|
|
86
103
|
static arrayDistinctFilterFn<E extends IEntity<any, any>>(item: E, index: number, values: E[]): boolean;
|
|
87
104
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const matchMedia: (win: Window, query: string) => boolean;
|
|
2
2
|
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
|
3
3
|
export declare const isWindows: (win?: Window) => boolean;
|
|
4
|
+
export declare const isFirefox: (win?: Window) => boolean;
|
|
5
|
+
export declare const isSafari: (win?: Window) => boolean;
|
|
6
|
+
export declare const isEdge: (win?: Window) => boolean;
|
|
4
7
|
export declare const isTouchUi: (win?: Window) => boolean;
|
|
5
8
|
export declare const isIpad: (win: Window) => boolean;
|
|
6
9
|
export declare const isMac: (win: Window) => boolean;
|
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.0.
|
|
5
|
+
"version": "18.0.10",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|