@sumaris-net/ngx-components 18.22.5 → 18.22.7

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": "18.22.5",
4
+ "version": "18.22.7",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -102,9 +102,10 @@ export declare function compareValuesDesc<T>(a: T, b: T): number;
102
102
  * @typeParam T - Type of compared objects.
103
103
  * @param path - Property path or array path (e.g. "a.b[0].c").
104
104
  * @param direction - Sort direction, 'asc' by default.
105
+ * @param nullsFirst
105
106
  * @returns A comparator compatible with `Array.prototype.sort`.
106
107
  */
107
- export declare function propertyPathComparator<T = any>(path: string | string[], direction?: 'asc' | 'desc'): (a: T, b: T) => number;
108
+ export declare function propertyPathComparator<T = any>(path: string | string[], direction?: 'asc' | 'desc', nullsFirst?: boolean): (a: T, b: T) => number;
108
109
  /**
109
110
  * Build a comparator based on a direct property of the compared objects.
110
111
  *
@@ -114,10 +115,10 @@ export declare function propertyPathComparator<T = any>(path: string | string[],
114
115
  * @typeParam K - Key of the property in `T`.
115
116
  * @param property - Property name to compare.
116
117
  * @param direction - Sort direction, 'asc' by default.
117
- * @param defaultValue - Value used when the property is undefined.
118
+ * @param nullsFirst - If true, nil values are placed first, else last. By default, 'false' if direction='asc', 'true' if direction='desc'
118
119
  * @returns A comparator compatible with `Array.prototype.sort`.
119
120
  */
120
- export declare function propertyComparator<T = any, K extends keyof T = any>(property: K, direction?: 'asc' | 'desc', defaultValue?: any): (a: T, b: T) => number;
121
+ export declare function propertyComparator<T = any, K extends keyof T = any>(property: K, direction?: 'asc' | 'desc', nullsFirst?: boolean): (a: T, b: T) => number;
121
122
  /**
122
123
  * Build a comparator using multiple property paths as tie-breakers.
123
124
  *
@@ -128,11 +129,11 @@ export declare function propertyComparator<T = any, K extends keyof T = any>(pro
128
129
  * @typeParam T - Type of compared objects.
129
130
  * @param keys - Ordered list of property paths to compare.
130
131
  * @param direction - Sort direction applied to each key, 'asc' by default.
131
- * @param defaultValues - Optional default values, aligned with `keys`.
132
+ * @param nullsFirst - Optional
132
133
  * @throws Error when `keys` is empty or when `defaultValues` length is invalid.
133
134
  * @returns A comparator compatible with `Array.prototype.sort`.
134
135
  */
135
- export declare function propertiesPathComparator<T = any>(keys: string[], direction?: 'asc' | 'desc', defaultValues?: any[]): (a: T, b: T) => number;
136
+ export declare function propertiesPathComparator<T = any>(keys: string[], direction?: 'asc' | 'desc', nullsFirst?: boolean): (a: T, b: T) => number;
136
137
  /**
137
138
  * Compose a comparator from multiple comparators (multi-level sort).
138
139
  *
@@ -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",
5
+ "version": "18.22.7",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{