@sumaris-net/ngx-components 1.23.26 → 1.23.28

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "1.23.26",
4
+ "version": "1.23.28",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -18,7 +18,12 @@ export declare function arrayGroupBy<T = any, K extends keyof T = any, M extends
18
18
  } = {
19
19
  [key: string]: T[];
20
20
  }>(obj: T[], key: keyof T): M;
21
- export declare function arrayDistinct<T = any>(obj: T[], properties?: string[]): T[];
21
+ /**
22
+ * Remove duplicated value, in array. Will compute a unique key (from given properties, or given function)
23
+ * @param values
24
+ * @param propertiesOrKeyFn
25
+ */
26
+ export declare function arrayDistinct<T = any>(values: T[], propertiesOrKeyFn?: string | string[] | ((obj: T) => string)): T[];
22
27
  export declare function nullIfUndefined<T>(obj: T | null | undefined): T | null;
23
28
  export declare function trimEmptyToNull<T>(str: string | null | undefined): string | null;
24
29
  export declare function toBoolean(obj: boolean | null | undefined | string, defaultValue?: boolean): boolean;
@@ -51,7 +56,7 @@ export declare function suggestFromStringArray(values: string[], value: any, opt
51
56
  }): string[];
52
57
  export declare function joinPropertiesPath<T = any>(obj: T, properties: string[], separator?: string): string | undefined;
53
58
  export declare function joinProperties<T = any, K extends keyof T = any>(obj: T, keys: K[], separator?: string): string | undefined;
54
- export declare function propertyPathComparator<T = any>(path: string): (a: T, b: T) => number;
59
+ export declare function propertyPathComparator<T = any>(path: string | string[]): (a: T, b: T) => number;
55
60
  export declare function propertyComparator<T = any, K extends keyof T = any>(key: K, defaultValue?: any): (a: T, b: T) => number;
56
61
  export declare function propertiesPathComparator<T = any>(keys: string[], defaultValues?: any[]): (a: T, b: T) => number;
57
62
  export declare function sort<T>(array: T[], attribute: string, opts?: Intl.CollatorOptions): T[];
@@ -60,7 +65,7 @@ export declare function isNumber(value: string): boolean;
60
65
  export declare function isNumberRange(value: string): boolean;
61
66
  export declare function getPropertyByPath(obj: any, path: string | string[], defaultValue?: any): any;
62
67
  export declare function getProperty<T = any, K extends keyof T = any>(obj: T, key: K): T[K];
63
- export declare function getPropertyByPathAsString(obj: any, path: string): string | undefined;
68
+ export declare function getPropertyByPathAsString(obj: any, path: string | string[]): string | undefined;
64
69
  export declare function sleep(ms: number): Promise<void>;
65
70
  export declare function round(value: number | undefined | null): number;
66
71
  export declare function equalsOrNil(value1: any, value2: any): boolean;