@singularsystems/neo-react 1.6.1 → 1.6.3
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
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
This file details all new features and changes to functionality. If you only need to see changes that require updates to your project, see the [breaking changes](./Breaking.md) readme.
|
|
4
4
|
|
|
5
|
+
## Version 1.6.3 (14 July 2026)
|
|
6
|
+
|
|
7
|
+
- Allow `ICardProps` to be referenced.
|
|
8
|
+
|
|
9
|
+
## Version 1.6.2 (10 July 2026)
|
|
10
|
+
|
|
11
|
+
- Routing fix
|
|
12
|
+
- Fixed static routes not being preferred to parameterised routes.
|
|
13
|
+
- Grid Column
|
|
14
|
+
- Added `invertSortIcon` prop to allow the sort icon to be inverted. Can be used on a computed property that is the inverse value of the underlying sort column.
|
|
15
|
+
|
|
5
16
|
## Version 1.6.1 (23 June 2026)
|
|
6
17
|
|
|
7
18
|
- Routing changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
2
|
import { Model } from '@singularsystems/neo-core';
|
|
3
|
-
interface ICardProps {
|
|
3
|
+
export interface ICardProps {
|
|
4
4
|
/** Icon to show next to title in header. */
|
|
5
5
|
icon?: string;
|
|
6
6
|
/** Title to show in header. */
|
|
@@ -25,4 +25,3 @@ export default class Card extends React.Component<ICardProps & React.HTMLProps<H
|
|
|
25
25
|
private expandState;
|
|
26
26
|
render(): JSX.Element;
|
|
27
27
|
}
|
|
28
|
-
export {};
|
|
@@ -13,6 +13,8 @@ export interface INeoColumnProps<TData> extends INeoCommonColumnProps, IEditorCo
|
|
|
13
13
|
cellTooltip?: string;
|
|
14
14
|
/** Allows you to override the default allow sorting setting of the datasource, or make clicking a column heading sort a specific property. */
|
|
15
15
|
sort?: Model.IPropertyInstance | boolean;
|
|
16
|
+
/** If true, will invert the sort icon. May be necessary when a different property is used as the sort value. */
|
|
17
|
+
invertSortIcon?: boolean;
|
|
16
18
|
/** True if this column must have a total cell. */
|
|
17
19
|
sum?: boolean;
|
|
18
20
|
/** Content callback to show in the footer. The filtered list of the grid is passed into the callback. */
|
|
@@ -143,7 +143,8 @@ var Column = /** @class */ (function (_super) {
|
|
|
143
143
|
if (sortProperty && !this.suppressSort) {
|
|
144
144
|
var sortInfo = this.context.dataView.sortInfo.find(function (c) { return c.column === sortProperty.propertyInfo; });
|
|
145
145
|
if (sortInfo) {
|
|
146
|
-
|
|
146
|
+
var sortAscending = this.props.invertSortIcon ? !sortInfo.sortAscending : sortInfo.sortAscending;
|
|
147
|
+
sortIcon = sortAscending ? Misc.Settings.icons.sortAsc : Misc.Settings.icons.sortDesc;
|
|
147
148
|
domProps.className = Utils.joinWithSpaces(domProps.className, "column-is-sorted");
|
|
148
149
|
}
|
|
149
150
|
domProps.className = Utils.joinWithSpaces(domProps.className, "column-sortable");
|
|
@@ -49,21 +49,22 @@ var RouteProvider = /** @class */ (function () {
|
|
|
49
49
|
var params = [];
|
|
50
50
|
for (var i = 0; i < providedSegments.length; i++) {
|
|
51
51
|
var segmentValue = providedSegments[i];
|
|
52
|
-
var
|
|
52
|
+
var staticMatches = [];
|
|
53
|
+
var paramMatches = [];
|
|
53
54
|
for (var _i = 0, currentRoutes_1 = currentRoutes; _i < currentRoutes_1.length; _i++) {
|
|
54
55
|
var route = currentRoutes_1[_i];
|
|
55
56
|
var routeSegment = route.segments.length > i ? route.segments[i] : undefined;
|
|
56
57
|
if (segmentValue.toLowerCase() === ((_a = routeSegment === null || routeSegment === void 0 ? void 0 : routeSegment.value) !== null && _a !== void 0 ? _a : "")) {
|
|
57
|
-
|
|
58
|
+
staticMatches.push(route);
|
|
58
59
|
}
|
|
59
60
|
else if (routeSegment && routeSegment.param) {
|
|
60
61
|
params.push({ param: routeSegment.param, value: segmentValue, index: i });
|
|
61
62
|
if (!routeSegment.param.required || segmentValue) {
|
|
62
|
-
|
|
63
|
+
paramMatches.push(route);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
currentRoutes =
|
|
67
|
+
currentRoutes = __spreadArray(__spreadArray([], staticMatches, true), paramMatches, true);
|
|
67
68
|
}
|
|
68
69
|
if (currentRoutes.length > 0) {
|
|
69
70
|
var route = currentRoutes[0];
|