react-open-source-grid 1.3.9 → 1.4.0

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/dist/404.html CHANGED
@@ -4,16 +4,17 @@
4
4
  <meta charset="utf-8">
5
5
  <title>Redirecting...</title>
6
6
  <script>
7
- // Only redirect if not already at index.html or root
8
- var path = window.location.pathname;
9
- var isRoot = path === '/' || path.endsWith('/index.html');
10
- if (!isRoot) {
11
- // Redirect to root, preserving path, query, and hash for React Router
12
- var search = window.location.search;
13
- var hash = window.location.hash;
14
- var redirectUrl = '/' + path.replace(/^\//, '') + search + hash;
15
- window.location.replace(redirectUrl);
16
- }
7
+ (function () {
8
+ var l = window.location;
9
+ // If we already came through the redirect, don't loop
10
+ if (l.search.indexOf('from404=1') !== -1) {
11
+ return;
12
+ }
13
+ var path = l.pathname + l.search + l.hash;
14
+ // Always go to root, encoding the original path
15
+ var redirectUrl = '/?from404=1&path=' + encodeURIComponent(path);
16
+ l.replace(redirectUrl);
17
+ })();
17
18
  </script>
18
19
  </head>
19
20
  <body>
package/dist/index.html CHANGED
@@ -45,28 +45,16 @@
45
45
  <!-- Theme Color -->
46
46
  <meta name="theme-color" content="#1e293b" />
47
47
 
48
- <!-- GitHub Pages SPA redirect script -->
49
- <script type="text/javascript">
50
- // Single Page Apps for GitHub Pages
51
- // MIT License
52
- // https://github.com/rafgraph/spa-github-pages
53
- // This script checks to see if a redirect is present in the query string,
54
- // converts it back into the correct url and adds it to the
55
- // browser's history using window.history.replaceState(...),
56
- // which won't cause the browser to attempt to load the new url.
57
- // When the single page app is loaded further down in this file,
58
- // the correct url will be waiting in the browser's history for
59
- // the single page app to route accordingly.
60
- (function(l) {
61
- if (l.search[1] === '/' ) {
62
- var decoded = l.search.slice(1).split('&').map(function(s) {
63
- return s.replace(/~and~/g, '&')
64
- }).join('?');
65
- window.history.replaceState(null, null,
66
- l.pathname + decoded + l.hash
67
- );
48
+ <!-- GitHub Pages SPA redirect fix -->
49
+ <script>
50
+ (function () {
51
+ var l = window.location;
52
+ var params = new URLSearchParams(l.search);
53
+ if (params.get('from404') === '1') {
54
+ var path = params.get('path') || '/';
55
+ window.history.replaceState(null, '', path);
68
56
  }
69
- }(window.location))
57
+ })();
70
58
  </script>
71
59
  <script type="module" crossorigin src="/assets/index-C7Pq1adu.js"></script>
72
60
  <link rel="stylesheet" crossorigin href="/assets/index-DqLWhpvP.css">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-open-source-grid",
3
3
  "private": false,
4
- "version": "1.3.9",
4
+ "version": "1.4.0",
5
5
  "type": "module",
6
6
  "description": "A high-performance React DataGrid component with advanced features like virtual scrolling, infinite scrolling, tree data, market data mode, and more",
7
7
  "main": "./dist/assets/index.js",