@singularsystems/neo-react 1.6.4 → 1.6.5
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,15 @@
|
|
|
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.5 (3 August 2026)
|
|
6
|
+
|
|
7
|
+
- Routing fix
|
|
8
|
+
- Fixed params not updating when a view is referenced by 2 different routes.
|
|
9
|
+
- Breadcrumb
|
|
10
|
+
- Fixed breadcrumb item showing with blank description.
|
|
11
|
+
- Sticky table headers
|
|
12
|
+
- Fixed heading snapping to app header when grid is in a modal.
|
|
13
|
+
|
|
5
14
|
## Version 1.6.4 (20 July 2026)
|
|
6
15
|
|
|
7
16
|
- Neo.Card
|
|
@@ -14,9 +14,7 @@ export declare class StickyTableHeader {
|
|
|
14
14
|
private domObserver;
|
|
15
15
|
private originalWidths;
|
|
16
16
|
/** Parent element that may scroll, requiring a position update. */
|
|
17
|
-
private
|
|
18
|
-
/** Fixed height parent element that the grid scrolls within. */
|
|
19
|
-
private relativeParent?;
|
|
17
|
+
private scrollParent?;
|
|
20
18
|
private header;
|
|
21
19
|
private headerCopy?;
|
|
22
20
|
private headerHeight;
|
|
@@ -21,17 +21,12 @@ var StickyTableHeader = /** @class */ (function () {
|
|
|
21
21
|
throw Error("Table must have a header section.");
|
|
22
22
|
}
|
|
23
23
|
this.header = table.tHead;
|
|
24
|
-
this.
|
|
25
|
-
if (this.scrollElement) {
|
|
26
|
-
if (this.scrollElement.style.height || this.scrollElement.style.maxHeight) {
|
|
27
|
-
this.relativeParent = this.scrollElement;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
24
|
+
this.scrollParent = StickyTableHeader.getParentScrollElement(table);
|
|
30
25
|
this.handleScroll = this.handleScroll.bind(this);
|
|
31
26
|
this.onPossibleContentChange = this.onPossibleContentChange.bind(this);
|
|
32
27
|
document.addEventListener("scroll", this.handleScroll);
|
|
33
|
-
if (this.
|
|
34
|
-
this.
|
|
28
|
+
if (this.scrollParent) {
|
|
29
|
+
this.scrollParent.addEventListener("scroll", this.handleScroll);
|
|
35
30
|
}
|
|
36
31
|
table.addEventListener("keydown", this.onPossibleContentChange);
|
|
37
32
|
table.addEventListener("mouseup", this.onPossibleContentChange);
|
|
@@ -41,10 +36,11 @@ var StickyTableHeader = /** @class */ (function () {
|
|
|
41
36
|
// otherwise if there is a fixed (non scrolling) element at the top of the page, then the headers must appear below that.
|
|
42
37
|
// otherwise the headers will stick to the top of the screen.
|
|
43
38
|
var fixedElement = null;
|
|
44
|
-
if (
|
|
39
|
+
if (this.fixedElement && getComputedStyle(this.fixedElement).position === "fixed") {
|
|
45
40
|
fixedElement = this.fixedElement;
|
|
46
41
|
}
|
|
47
|
-
var
|
|
42
|
+
var headerBottom = fixedElement ? fixedElement.getBoundingClientRect().bottom : 0;
|
|
43
|
+
var topBoundary = this.scrollParent ? Math.max(this.scrollParent.getBoundingClientRect().top, headerBottom) : headerBottom;
|
|
48
44
|
var tableBounds = this.table.getBoundingClientRect();
|
|
49
45
|
var tbodyBounds = this.table.tBodies[this.table.tBodies.length - 1].getBoundingClientRect();
|
|
50
46
|
if (tableBounds.top < topBoundary && tbodyBounds.bottom - this.headerHeight > topBoundary) {
|
|
@@ -62,9 +58,9 @@ var StickyTableHeader = /** @class */ (function () {
|
|
|
62
58
|
}
|
|
63
59
|
this.header.style.left = tableBounds.left + "px";
|
|
64
60
|
this.header.style.top = topBoundary + "px";
|
|
65
|
-
if (this.
|
|
66
|
-
var left = this.
|
|
67
|
-
var width = this.
|
|
61
|
+
if (this.scrollParent) {
|
|
62
|
+
var left = this.scrollParent.scrollLeft;
|
|
63
|
+
var width = this.scrollParent.clientWidth + left - 1;
|
|
68
64
|
this.header.style.clipPath = "rect(0px ".concat(width, "px 100% ").concat(left, "px)");
|
|
69
65
|
}
|
|
70
66
|
}
|
|
@@ -128,8 +124,8 @@ var StickyTableHeader = /** @class */ (function () {
|
|
|
128
124
|
};
|
|
129
125
|
StickyTableHeader.prototype.dispose = function () {
|
|
130
126
|
document.removeEventListener("scroll", this.handleScroll);
|
|
131
|
-
if (this.
|
|
132
|
-
this.
|
|
127
|
+
if (this.scrollParent) {
|
|
128
|
+
this.scrollParent.removeEventListener("scroll", this.handleScroll);
|
|
133
129
|
}
|
|
134
130
|
this.table.removeEventListener("keydown", this.onPossibleContentChange);
|
|
135
131
|
this.table.removeEventListener("mouseup", this.onPossibleContentChange);
|
|
@@ -140,8 +136,7 @@ var StickyTableHeader = /** @class */ (function () {
|
|
|
140
136
|
*/
|
|
141
137
|
StickyTableHeader.getParentScrollElement = function (element) {
|
|
142
138
|
var current = element.parentElement;
|
|
143
|
-
|
|
144
|
-
while (current && depth < 5) {
|
|
139
|
+
while (current) {
|
|
145
140
|
var computedStyle = window.getComputedStyle(current);
|
|
146
141
|
if (computedStyle.overflowX === "auto" || computedStyle.overflowX === "scroll" || computedStyle.overflowY === "auto" || computedStyle.overflowY === "scroll") {
|
|
147
142
|
return current;
|
|
@@ -33,18 +33,18 @@ var RoutingState = /** @class */ (function () {
|
|
|
33
33
|
/** @internal */
|
|
34
34
|
RoutingState.prototype.updateRoute = function (match) {
|
|
35
35
|
var _this = this;
|
|
36
|
-
var _a, _b;
|
|
36
|
+
var _a, _b, _c;
|
|
37
37
|
var prevRoute = (_a = this.currentRoute) === null || _a === void 0 ? void 0 : _a.route;
|
|
38
38
|
runInAction(function () {
|
|
39
39
|
var _a;
|
|
40
40
|
_this.currentRoute = match;
|
|
41
41
|
_this.currentRouteBase = (_a = match === null || match === void 0 ? void 0 : match.route) !== null && _a !== void 0 ? _a : null;
|
|
42
42
|
});
|
|
43
|
-
if (prevRoute !== (match === null || match === void 0 ? void 0 : match.route)) {
|
|
43
|
+
if ((prevRoute === null || prevRoute === void 0 ? void 0 : prevRoute.component) !== ((_b = match === null || match === void 0 ? void 0 : match.route) === null || _b === void 0 ? void 0 : _b.component)) {
|
|
44
44
|
var prevIndex = prevRoute ? this.appRouteProvider.allRoutes.indexOf(prevRoute) : -1;
|
|
45
45
|
var newIndex = match ? this.appRouteProvider.allRoutes.indexOf(match.route) : -1;
|
|
46
46
|
this.direction = newIndex - prevIndex;
|
|
47
|
-
if (((
|
|
47
|
+
if (((_c = this.currentView) === null || _c === void 0 ? void 0 : _c.constructor) !== (match === null || match === void 0 ? void 0 : match.route.component)) {
|
|
48
48
|
this.currentView = null;
|
|
49
49
|
}
|
|
50
50
|
// Scroll back to top as if the browser had actually loaded a new page.
|
|
@@ -30,6 +30,7 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
30
30
|
var queryPath = RouteHelper.getQueryString(this._processedRoute, values);
|
|
31
31
|
var paramPath;
|
|
32
32
|
var selectablePath;
|
|
33
|
+
var queryDescription = "";
|
|
33
34
|
for (var _c = 0, _d = this.params; _c < _d.length; _c++) {
|
|
34
35
|
var viewParam = _d[_c];
|
|
35
36
|
if (!viewParam.routeParameter.isQuery) {
|
|
@@ -53,10 +54,18 @@ var ViewParameterList = /** @class */ (function () {
|
|
|
53
54
|
if (((_a = viewParam.routeParameter.selection) !== null && _a !== void 0 ? _a : BreadCrumbSelectMode.Default) === BreadCrumbSelectMode.Default) {
|
|
54
55
|
selectablePath = paramPath;
|
|
55
56
|
}
|
|
56
|
-
if (viewParam.description
|
|
57
|
+
if (viewParam.description) {
|
|
57
58
|
breadCrumbs.push(new BreadCrumbItem(viewParam.description, (viewParam.routeParameter.selection === BreadCrumbSelectMode.None) ? "" : (selectablePath + queryPath)));
|
|
58
59
|
}
|
|
59
60
|
}
|
|
61
|
+
else {
|
|
62
|
+
if (!queryDescription && viewParam.description) {
|
|
63
|
+
queryDescription = viewParam.description;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (queryDescription) {
|
|
68
|
+
breadCrumbs.push(new BreadCrumbItem(queryDescription, RouteHelper.hydrateRoute(this._processedRoute, values, false)));
|
|
60
69
|
}
|
|
61
70
|
return breadCrumbs;
|
|
62
71
|
};
|