@singularsystems/neo-core 1.6.0 → 1.6.2
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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Neo core changelog
|
|
2
2
|
|
|
3
|
-
## Version 1.6.
|
|
3
|
+
## Version 1.6.2 (10 July 2026)
|
|
4
|
+
|
|
5
|
+
- PageManager
|
|
6
|
+
- Specifying single `sortAscending` value will now work if multiple `sortBy` properties are provided.
|
|
7
|
+
|
|
8
|
+
## Version 1.6.1 (23 June 2026)
|
|
4
9
|
|
|
5
10
|
- Minor routing changes to support changes in neo-react.
|
|
6
11
|
|
|
@@ -297,11 +297,12 @@ var PageManager = /** @class */ (function (_super) {
|
|
|
297
297
|
};
|
|
298
298
|
/** Sets a single or multiple sort operations. Does not refresh data. */
|
|
299
299
|
PageManager.prototype.setSortOperations = function (sortBy, sortAscending) {
|
|
300
|
+
var _a;
|
|
300
301
|
this.sortInfo = [];
|
|
301
302
|
var metaData = this.modelType.neo.meta;
|
|
302
303
|
if (sortBy instanceof Array) {
|
|
303
304
|
for (var i = 0; i < sortBy.length; i++) {
|
|
304
|
-
this.sortInfo.push(new SortOperation(metaData[sortBy[i]].propertyInfo, sortAscending === undefined || sortAscending[i] !== false));
|
|
305
|
+
this.sortInfo.push(new SortOperation(metaData[sortBy[i]].propertyInfo, sortAscending === undefined || ((_a = sortAscending[i]) !== null && _a !== void 0 ? _a : sortAscending) !== false));
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
else {
|
|
@@ -23,11 +23,16 @@ type TransformLists<T> = {
|
|
|
23
23
|
type RemoveChildren<T> = Pick<T, {
|
|
24
24
|
[P in keyof T]: T[P] extends List<infer I> ? never : T[P] extends IModelBase ? never : P;
|
|
25
25
|
}[keyof T]>;
|
|
26
|
+
type TransformDeep<T> = {
|
|
27
|
+
[P in keyof T]: T[P] extends Array<infer I> ? (I extends object ? PlainObject<I>[] : I[]) : T[P] extends IModelBase ? PlainObject<T[P]> : T[P];
|
|
28
|
+
};
|
|
26
29
|
export type PartialOrNull<T> = {
|
|
27
30
|
[P in keyof T]?: T[P] | null;
|
|
28
31
|
};
|
|
29
32
|
/** Removes ModelBase properties (isNew, isDirty etc), removes methods, and changes list types to arrays. */
|
|
30
33
|
export type PlainObject<T> = TransformLists<NoModelBase<T>>;
|
|
34
|
+
/** Like PlainObject, but also recursively transforms nested lists and child model objects into plain objects. */
|
|
35
|
+
export type DeepPlainObject<T> = TransformDeep<PlainObject<T>>;
|
|
31
36
|
/** PlainObject plus tracking state and entity identifier. */
|
|
32
37
|
export type PlainTrackedObject<T> = PlainObject<T> & {
|
|
33
38
|
trackingState?: Misc.TrackingState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate, __metadata, __param } from "tslib";
|
|
1
|
+
import { __assign, __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { injectable, inject } from 'inversify';
|
|
3
3
|
import NeoTypes from '../AppServices/NeoTypes';
|
|
4
4
|
var MenuItemProvider = /** @class */ (function () {
|
|
@@ -15,7 +15,8 @@ var MenuItemProvider = /** @class */ (function () {
|
|
|
15
15
|
if (defaults === void 0) { defaults = { hideWhenEmpty: true, collapseSingle: true }; }
|
|
16
16
|
var filtered = [];
|
|
17
17
|
for (var _i = 0, routeItems_1 = routeItems; _i < routeItems_1.length; _i++) {
|
|
18
|
-
var
|
|
18
|
+
var route = routeItems_1[_i];
|
|
19
|
+
var menuItem = (route.clone ? route.clone() : __assign({}, route));
|
|
19
20
|
var canShow = this.canShowItem(menuItem);
|
|
20
21
|
if (canShow) {
|
|
21
22
|
if (menuItem.children) {
|