@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/doc/changelog.md +13 -3
- package/esm2022/src/app/core/table/async-table.class.mjs +1 -1
- package/esm2022/src/app/core/table/table.class.mjs +2 -2
- package/esm2022/src/app/shared/functions.mjs +36 -13
- package/esm2022/src/app/shared/rx-state/rx-state.decorators.mjs +4 -4
- package/fesm2022/sumaris-net.ngx-components.mjs +39 -16
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/functions.d.ts +6 -5
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
|
@@ -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
|
|
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',
|
|
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
|
|
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',
|
|
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
|
*
|
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.7",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|