@dgui/react-router-shared 1.0.0 → 1.1.0-beta.1
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.
|
@@ -7,7 +7,7 @@ const E404 = ({ defaultTab }) => {
|
|
|
7
7
|
const hasRendered = (0, react_1.useRef)(false);
|
|
8
8
|
const navigate = (0, react_router_1.useNavigate)();
|
|
9
9
|
const location = (0, react_router_1.useLocation)();
|
|
10
|
-
const {
|
|
10
|
+
const { tabOrder, tabs } = (0, react_1.useContext)(react_shared_1.TabContext);
|
|
11
11
|
(0, react_1.useEffect)(() => {
|
|
12
12
|
if (hasRendered.current &&
|
|
13
13
|
!Object.values(tabs).some((tab) => {
|
|
@@ -5,7 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const react_router_1 = require("react-router");
|
|
6
6
|
const BackControl = ({ tabId }) => {
|
|
7
7
|
const { tabId: routeId } = (0, react_router_1.useParams)();
|
|
8
|
-
const {
|
|
8
|
+
const { tabOrder, tabs } = (0, react_1.useContext)(react_shared_1.TabContext);
|
|
9
9
|
const { selectTab, tabIndex } = (0, react_1.useContext)(react_shared_1.TabIndexContext);
|
|
10
10
|
const { tabId: selectedTabId } = (0, react_1.useMemo)(() => {
|
|
11
11
|
return tabs[tabOrder[tabIndex]] || {};
|
|
@@ -8,7 +8,7 @@ const RouteControl = ({ tabId }) => {
|
|
|
8
8
|
const { tabId: routeId } = (0, react_router_1.useParams)();
|
|
9
9
|
const navigate = (0, react_router_1.useNavigate)();
|
|
10
10
|
const location = (0, react_router_1.useLocation)();
|
|
11
|
-
const {
|
|
11
|
+
const { tabOrder, tabs } = (0, react_1.useContext)(react_shared_1.TabContext);
|
|
12
12
|
const { tabIndex } = (0, react_1.useContext)(react_shared_1.TabIndexContext);
|
|
13
13
|
const { tabId: selectedTabId, tabPath: selectedTabPath } = (0, react_1.useMemo)(() => {
|
|
14
14
|
return tabs[tabOrder[tabIndex]] || {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dgui/react-router-shared",
|
|
3
3
|
"title": "Digested React GUI Shared Router Components",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.1.0-beta.1",
|
|
6
6
|
"private": false,
|
|
7
7
|
"description": "Shared Router Components for a boilerplate React GUI",
|
|
8
8
|
"author": "wallzero @wallzeroblog (http://wallzero.com)",
|
|
@@ -39,31 +39,30 @@
|
|
|
39
39
|
"lint:es": "eslint --resolve-plugins-relative-to . 'src/**/*.[jt]s?(x)' --ignore-pattern 'src/**/*.(d.ts|json)'",
|
|
40
40
|
"clean": "run-s clean:dist clean:node_modules",
|
|
41
41
|
"clean:node_modules": "rimraf node_modules yarn.lock package-lock.json",
|
|
42
|
-
"clean:dist": "rimraf dist"
|
|
43
|
-
"set:version": "npm version --allow-same-version --no-commit-hooks --no-git-tag-version --no-workspaces-update $(npm --silent view $(node -p \"require('./package.json').name\") version)"
|
|
42
|
+
"clean:dist": "rimraf dist"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
|
-
"@digest/eslint-config-jest": "^4.
|
|
47
|
-
"@digest/eslint-config-react": "^4.
|
|
48
|
-
"@digest/eslint-config-typescript": "^4.
|
|
49
|
-
"@digest/jest-junit": "^4.
|
|
50
|
-
"@digest/jest-react": "^4.
|
|
51
|
-
"@digest/jest-typescript": "^4.
|
|
52
|
-
"@digest/typescript": "^4.
|
|
53
|
-
"@types/jest": "^29.5.
|
|
54
|
-
"@types/react": "^18.2.
|
|
55
|
-
"@types/react-test-renderer": "^18.0.
|
|
45
|
+
"@digest/eslint-config-jest": "^4.3.0",
|
|
46
|
+
"@digest/eslint-config-react": "^4.3.0",
|
|
47
|
+
"@digest/eslint-config-typescript": "^4.3.0",
|
|
48
|
+
"@digest/jest-junit": "^4.3.0",
|
|
49
|
+
"@digest/jest-react": "^4.3.0",
|
|
50
|
+
"@digest/jest-typescript": "^4.3.0",
|
|
51
|
+
"@digest/typescript": "^4.3.0",
|
|
52
|
+
"@types/jest": "^29.5.12",
|
|
53
|
+
"@types/react": "^18.2.55",
|
|
54
|
+
"@types/react-test-renderer": "^18.0.7",
|
|
56
55
|
"cross-env": "^7.0.3",
|
|
57
|
-
"jest-environment-jsdom": "^29.
|
|
56
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
58
57
|
"jest-environment-jsdom-global": "^4.0.0",
|
|
59
58
|
"npm-run-all": "^4.1.5",
|
|
60
59
|
"react": "^18.2.0",
|
|
61
|
-
"react-router": "^6.
|
|
60
|
+
"react-router": "^6.22.0",
|
|
62
61
|
"react-test-renderer": "^18.2.0",
|
|
63
|
-
"rimraf": "^5.0.
|
|
62
|
+
"rimraf": "^5.0.5"
|
|
64
63
|
},
|
|
65
64
|
"dependencies": {
|
|
66
|
-
"@dgui/react-shared": "^
|
|
65
|
+
"@dgui/react-shared": "^0.8.0"
|
|
67
66
|
},
|
|
68
67
|
"peerDependencies": {
|
|
69
68
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -77,5 +76,5 @@
|
|
|
77
76
|
"react-router",
|
|
78
77
|
"typescript"
|
|
79
78
|
],
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "29925392dfd790c7844dcfea551b2ecb640c089e"
|
|
81
80
|
}
|