diff --git a/package-lock.json b/package-lock.json
index a1f742ca1e..9f731eaeb8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,16 +22,17 @@
"framer-motion": "^4.1.17",
"polished": "3.4.1",
"pretty-bytes": "^5.6.0",
- "react": "^17.0.2",
+ "react": "^18.3.1",
"react-debounce-input": "3.2.2",
- "react-dom": "^17.0.2",
+ "react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.49.2",
"react-query": "^3.34.0",
- "react-router": "5.2.0",
- "react-router-dom": "5.2.0",
+ "react-router": "7.0.1",
+ "react-router-dom": "7.0.1",
"react-select": "4.3.1",
"react-table": "^7.7.0",
+ "react-test-renderer": "^18.3.1",
"react-virtualized": "9.22.3",
"react-virtualized-auto-sizer": "^1.0.24",
"react-window": "^1.8.6",
@@ -62,12 +63,12 @@
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^8.3.6",
"@testing-library/jest-dom": "^5.14.1",
- "@testing-library/react": "^11.2.7",
+ "@testing-library/react": "^15.0.7",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.0",
- "@types/react": "^17.0.39",
- "@types/react-dom": "^17.0.11",
+ "@types/react": "^18.3.12",
+ "@types/react-dom": "^18.3.1",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.11",
@@ -4939,35 +4940,31 @@
}
},
"node_modules/@testing-library/dom": {
- "version": "7.31.2",
- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz",
- "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==",
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
+ "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.10.4",
"@babel/runtime": "^7.12.5",
- "@types/aria-query": "^4.2.0",
- "aria-query": "^4.2.2",
+ "@types/aria-query": "^5.0.1",
+ "aria-query": "5.3.0",
"chalk": "^4.1.0",
- "dom-accessibility-api": "^0.5.6",
- "lz-string": "^1.4.4",
- "pretty-format": "^26.6.2"
+ "dom-accessibility-api": "^0.5.9",
+ "lz-string": "^1.5.0",
+ "pretty-format": "^27.0.2"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
}
},
"node_modules/@testing-library/dom/node_modules/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
"dev": true,
"dependencies": {
- "@babel/runtime": "^7.10.2",
- "@babel/runtime-corejs3": "^7.10.2"
- },
- "engines": {
- "node": ">=6.0"
+ "dequal": "^2.0.3"
}
},
"node_modules/@testing-library/dom/node_modules/chalk": {
@@ -4986,6 +4983,32 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
+ "node_modules/@testing-library/dom/node_modules/pretty-format": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
+ "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1",
+ "ansi-styles": "^5.0.0",
+ "react-is": "^17.0.1"
+ },
+ "engines": {
+ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+ }
+ },
+ "node_modules/@testing-library/dom/node_modules/pretty-format/node_modules/ansi-styles": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+ "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
"node_modules/@testing-library/jest-dom": {
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.17.0.tgz",
@@ -5009,20 +5032,27 @@
}
},
"node_modules/@testing-library/react": {
- "version": "11.2.7",
- "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.2.7.tgz",
- "integrity": "sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==",
+ "version": "15.0.7",
+ "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-15.0.7.tgz",
+ "integrity": "sha512-cg0RvEdD1TIhhkm1IeYMQxrzy0MtUNfa3minv4MjbgcYzJAZ7yD0i0lwoPOTPr+INtiXFezt2o8xMSnyHhEn2Q==",
"dev": true,
"dependencies": {
"@babel/runtime": "^7.12.5",
- "@testing-library/dom": "^7.28.1"
+ "@testing-library/dom": "^10.0.0",
+ "@types/react-dom": "^18.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"peerDependencies": {
- "react": "*",
- "react-dom": "*"
+ "@types/react": "^18.0.0",
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
}
},
"node_modules/@testing-library/react-hooks": {
@@ -5081,9 +5111,9 @@
}
},
"node_modules/@types/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==",
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
+ "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true
},
"node_modules/@types/babel__core": {
@@ -5151,6 +5181,11 @@
"@types/node": "*"
}
},
+ "node_modules/@types/cookie": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
+ "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
+ },
"node_modules/@types/debug": {
"version": "4.1.12",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
@@ -5464,23 +5499,22 @@
"dev": true
},
"node_modules/@types/react": {
- "version": "17.0.83",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.83.tgz",
- "integrity": "sha512-l0m4ArKJvmFtR4e8UmKrj1pB4tUgOhJITf+mADyF/p69Ts1YAR/E+G9XEM0mHXKVRa1dQNHseyyDNzeuAXfXQw==",
+ "version": "18.3.12",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz",
+ "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==",
"dev": true,
"dependencies": {
"@types/prop-types": "*",
- "@types/scheduler": "^0.16",
"csstype": "^3.0.2"
}
},
"node_modules/@types/react-dom": {
- "version": "17.0.25",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.25.tgz",
- "integrity": "sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA==",
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.1.tgz",
+ "integrity": "sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==",
"dev": true,
"dependencies": {
- "@types/react": "^17"
+ "@types/react": "*"
}
},
"node_modules/@types/react-router": {
@@ -5537,12 +5571,6 @@
"integrity": "sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==",
"dev": true
},
- "node_modules/@types/scheduler": {
- "version": "0.16.8",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.8.tgz",
- "integrity": "sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==",
- "dev": true
- },
"node_modules/@types/semver": {
"version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
@@ -12464,19 +12492,6 @@
"resolved": "https://registry.npmjs.org/hey-listen/-/hey-listen-1.0.8.tgz",
"integrity": "sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q=="
},
- "node_modules/history": {
- "version": "4.10.1",
- "resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
- "integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
- "dependencies": {
- "@babel/runtime": "^7.1.2",
- "loose-envify": "^1.2.0",
- "resolve-pathname": "^3.0.0",
- "tiny-invariant": "^1.0.2",
- "tiny-warning": "^1.0.0",
- "value-equal": "^1.0.1"
- }
- },
"node_modules/hoist-non-react-statics": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
@@ -13796,7 +13811,8 @@
"node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ=="
+ "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
+ "dev": true
},
"node_modules/isbinaryfile": {
"version": "4.0.10",
@@ -16801,20 +16817,6 @@
"node": ">=4"
}
},
- "node_modules/mini-create-react-context": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz",
- "integrity": "sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==",
- "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
- "dependencies": {
- "@babel/runtime": "^7.12.1",
- "tiny-warning": "^1.0.3"
- },
- "peerDependencies": {
- "prop-types": "^15.0.0",
- "react": "^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
- }
- },
"node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
@@ -18677,12 +18679,11 @@
}
},
"node_modules/react": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
+ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
@@ -18756,16 +18757,15 @@
}
},
"node_modules/react-dom": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
+ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"dependencies": {
"loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "scheduler": "^0.20.2"
+ "scheduler": "^0.23.2"
},
"peerDependencies": {
- "react": "17.0.2"
+ "react": "^18.3.1"
}
},
"node_modules/react-dropzone": {
@@ -18892,55 +18892,51 @@
}
},
"node_modules/react-router": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
- "integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
- "dependencies": {
- "@babel/runtime": "^7.1.2",
- "history": "^4.9.0",
- "hoist-non-react-statics": "^3.1.0",
- "loose-envify": "^1.3.1",
- "mini-create-react-context": "^0.4.0",
- "path-to-regexp": "^1.7.0",
- "prop-types": "^15.6.2",
- "react-is": "^16.6.0",
- "tiny-invariant": "^1.0.2",
- "tiny-warning": "^1.0.0"
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.1.tgz",
+ "integrity": "sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw==",
+ "dependencies": {
+ "@types/cookie": "^0.6.0",
+ "cookie": "^1.0.1",
+ "set-cookie-parser": "^2.6.0",
+ "turbo-stream": "2.4.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
},
"peerDependencies": {
- "react": ">=15"
+ "react": ">=18",
+ "react-dom": ">=18"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ }
}
},
"node_modules/react-router-dom": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
- "integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.0.1.tgz",
+ "integrity": "sha512-duBzwAAiIabhFPZfDjcYpJ+f08TMbPMETgq254GWne2NW1ZwRHhZLj7tpSp8KGb7JvZzlLcjGUnqLxpZQVEPng==",
"dependencies": {
- "@babel/runtime": "^7.1.2",
- "history": "^4.9.0",
- "loose-envify": "^1.3.1",
- "prop-types": "^15.6.2",
- "react-router": "5.2.0",
- "tiny-invariant": "^1.0.2",
- "tiny-warning": "^1.0.0"
+ "react-router": "7.0.1"
+ },
+ "engines": {
+ "node": ">=20.0.0"
},
"peerDependencies": {
- "react": ">=15"
+ "react": ">=18",
+ "react-dom": ">=18"
}
},
- "node_modules/react-router/node_modules/path-to-regexp": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz",
- "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==",
- "dependencies": {
- "isarray": "0.0.1"
+ "node_modules/react-router/node_modules/cookie": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz",
+ "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==",
+ "engines": {
+ "node": ">=18"
}
},
- "node_modules/react-router/node_modules/react-is": {
- "version": "16.13.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
- },
"node_modules/react-select": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-select/-/react-select-4.3.1.tgz",
@@ -18959,6 +18955,18 @@
"react-dom": "^16.8.0 || ^17.0.0"
}
},
+ "node_modules/react-shallow-renderer": {
+ "version": "16.15.0",
+ "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz",
+ "integrity": "sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==",
+ "dependencies": {
+ "object-assign": "^4.1.1",
+ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependencies": {
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
"node_modules/react-table": {
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/react-table/-/react-table-7.8.0.tgz",
@@ -18971,6 +18979,24 @@
"react": "^16.8.3 || ^17.0.0-0 || ^18.0.0"
}
},
+ "node_modules/react-test-renderer": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.3.1.tgz",
+ "integrity": "sha512-KkAgygexHUkQqtvvx/otwxtuFu5cVjfzTCtjXLH9boS19/Nbtg84zS7wIQn39G8IlrhThBpQsMKkq5ZHZIYFXA==",
+ "dependencies": {
+ "react-is": "^18.3.1",
+ "react-shallow-renderer": "^16.15.0",
+ "scheduler": "^0.23.2"
+ },
+ "peerDependencies": {
+ "react": "^18.3.1"
+ }
+ },
+ "node_modules/react-test-renderer/node_modules/react-is": {
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="
+ },
"node_modules/react-transition-group": {
"version": "4.4.5",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
@@ -19603,11 +19629,6 @@
"node": ">=4"
}
},
- "node_modules/resolve-pathname": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz",
- "integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng=="
- },
"node_modules/resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@@ -20016,12 +20037,11 @@
}
},
"node_modules/scheduler": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
+ "version": "0.23.2",
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
+ "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
"dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
+ "loose-envify": "^1.1.0"
}
},
"node_modules/schema-utils": {
@@ -20171,6 +20191,11 @@
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"dev": true
},
+ "node_modules/set-cookie-parser": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz",
+ "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="
+ },
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -21146,17 +21171,17 @@
}
},
"node_modules/styled-components/node_modules/@emotion/is-prop-valid": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz",
- "integrity": "sha512-/ACwoqx7XQi9knQs/G0qKvv5teDMhD7bXYns9N/wM8ah8iNb8jZ2uNO0YOgiq2o2poIvVtJS2YALasQuMSQ7Kw==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz",
+ "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==",
"dependencies": {
- "@emotion/memoize": "^0.9.0"
+ "@emotion/memoize": "^0.8.1"
}
},
"node_modules/styled-components/node_modules/@emotion/memoize": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz",
- "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ=="
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz",
+ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA=="
},
"node_modules/styled-components/node_modules/@emotion/unitless": {
"version": "0.7.5",
@@ -21564,12 +21589,8 @@
"node_modules/tiny-invariant": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
- "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="
- },
- "node_modules/tiny-warning": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
- "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
+ "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
+ "dev": true
},
"node_modules/title-case": {
"version": "2.1.1",
@@ -21826,6 +21847,11 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
+ "node_modules/turbo-stream": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
+ "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g=="
+ },
"node_modules/tween-functions": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz",
@@ -22566,11 +22592,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "node_modules/value-equal": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz",
- "integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw=="
- },
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
diff --git a/package.json b/package.json
index 6399625b7d..22a64dbeea 100644
--- a/package.json
+++ b/package.json
@@ -49,12 +49,12 @@
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/theming": "^8.3.6",
"@testing-library/jest-dom": "^5.14.1",
- "@testing-library/react": "^11.2.7",
+ "@testing-library/react": "^15.0.7",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.0",
- "@types/react": "^17.0.39",
- "@types/react-dom": "^17.0.11",
+ "@types/react": "^18.3.12",
+ "@types/react-dom": "^18.3.1",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.11",
@@ -110,16 +110,17 @@
"framer-motion": "^4.1.17",
"polished": "3.4.1",
"pretty-bytes": "^5.6.0",
- "react": "^17.0.2",
+ "react": "^18.3.1",
"react-debounce-input": "3.2.2",
- "react-dom": "^17.0.2",
+ "react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-hook-form": "^7.49.2",
"react-query": "^3.34.0",
- "react-router": "5.2.0",
- "react-router-dom": "5.2.0",
+ "react-router": "7.0.1",
+ "react-router-dom": "7.0.1",
"react-select": "4.3.1",
"react-table": "^7.7.0",
+ "react-test-renderer": "^18.3.1",
"react-virtualized": "9.22.3",
"react-virtualized-auto-sizer": "^1.0.24",
"react-window": "^1.8.6",
diff --git a/setupTests.js b/setupTests.js
index 4f3673548b..c3eb51cee0 100644
--- a/setupTests.js
+++ b/setupTests.js
@@ -1,3 +1,7 @@
import 'jest-canvas-mock';
import '@testing-library/jest-dom/extend-expect';
import 'regenerator-runtime/runtime';
+
+import { TextEncoder, TextDecoder } from 'util';
+
+Object.assign(global, { TextDecoder, TextEncoder });
diff --git a/src/lib/components/emptystate/Emptystate.component.tsx b/src/lib/components/emptystate/Emptystate.component.tsx
index 41c95b8e7a..a39e412593 100644
--- a/src/lib/components/emptystate/Emptystate.component.tsx
+++ b/src/lib/components/emptystate/Emptystate.component.tsx
@@ -4,7 +4,7 @@ import { Button } from '../buttonv2/Buttonv2.component';
import { Icon, IconName } from '../icon/Icon.component';
import { LargeText } from '../text/Text.component';
import { CoreUITheme } from '../../style/theme';
-import { useHistory } from 'react-router';
+import { useNavigate } from 'react-router';
export type Props = {
listedResource: {
@@ -48,7 +48,7 @@ export const ActionWrapper = styled.div`
function EmptyState(props: Props) {
const { icon, listedResource, link, resourceToCreate, backgroundColor } =
props;
- const history = useHistory();
+ const navigate = useNavigate();
return (
}
type="button"
variant="primary"
- onClick={() => history.push(link)}
+ onClick={() => navigate(link)}
/>
)}
diff --git a/src/lib/components/inputlist/InputList.component.tsx b/src/lib/components/inputlist/InputList.component.tsx
index 783cdbf6aa..0977bf1a72 100644
--- a/src/lib/components/inputlist/InputList.component.tsx
+++ b/src/lib/components/inputlist/InputList.component.tsx
@@ -5,7 +5,7 @@ import { Input } from '../inputv2/inputv2';
import { AddButton, SubButton } from './InputButtons';
export type InputListProps = Omit, 'size'> & {
- ref: RefCallBack;
+ ref?: RefCallBack;
min?: string | number;
max?: string | number;
maxLength?: number;
diff --git a/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx b/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx
index 8dde187940..0152989597 100644
--- a/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx
+++ b/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx
@@ -1,19 +1,19 @@
-import React from 'react';
-import { useEffect, useState, createContext, useContext } from 'react';
-import { useLocation } from 'react-router-dom';
-import { QueryTimeSpan } from '../constants';
-import { queryTimeSpansCodes } from '../constants';
+import { createContext, useContext, useEffect, useState } from 'react';
+import { QueryTimeSpan, queryTimeSpansCodes } from '../constants';
+import { useLocation } from 'react-router';
export const MetricsTimeSpanContext = createContext(null);
export const MetricsTimeSpanProvider = ({
children,
+ location,
}: {
children: JSX.Element;
+ location?: ReturnType;
}) => {
// the default timespan is the last 24h
const [queryTimeSpanCode, setQueryTimeSpanCode] = useState(
queryTimeSpansCodes[1],
);
- const urlSearchParams = new URLSearchParams(useLocation().search);
+ const urlSearchParams = new URLSearchParams(location?.search);
const queryTimeSpan = urlSearchParams.get('from');
// Sync url timespan to local timespan
useEffect(() => {
diff --git a/src/lib/components/tablev2/SearchWithQueryParams.tsx b/src/lib/components/tablev2/SearchWithQueryParams.tsx
index 12890c4ab7..a6ce787b88 100644
--- a/src/lib/components/tablev2/SearchWithQueryParams.tsx
+++ b/src/lib/components/tablev2/SearchWithQueryParams.tsx
@@ -1,5 +1,5 @@
import { useState } from 'react';
-import { useLocation, useHistory } from 'react-router-dom';
+import { useLocation, useNavigate } from 'react-router';
import { TableSearch as Search, SearchProps } from './Search';
export type SearchWithQueryParamsProps = {
@@ -10,7 +10,7 @@ export type SearchWithQueryParamsProps = {
export function SearchWithQueryParams(props: SearchWithQueryParamsProps) {
const { queryParams = 'search', onChange, ...rest } = props;
const { search, pathname } = useLocation();
- const history = useHistory();
+ const navigate = useNavigate();
const params = new URLSearchParams(search);
const initialValue = params.get(queryParams) || '';
const [value, setValue] = useState(initialValue);
@@ -18,7 +18,7 @@ export function SearchWithQueryParams(props: SearchWithQueryParamsProps) {
function handleOnChange(value: string) {
const { onChange } = props;
params.set(queryParams, value);
- history.replace(`${pathname}?${params.toString()}`);
+ navigate(`${pathname}?${params.toString()}`, { replace: true });
setValue(value);
if (typeof onChange === 'function') {
diff --git a/src/lib/components/tablev2/TableCommon.tsx b/src/lib/components/tablev2/TableCommon.tsx
index a3e29c653c..fe9ce0a3f7 100644
--- a/src/lib/components/tablev2/TableCommon.tsx
+++ b/src/lib/components/tablev2/TableCommon.tsx
@@ -22,7 +22,9 @@ type VirtualizedRowsType<
DATA_ROW extends Record = Record,
> = {
rows: Row[];
- RenderRow: ComponentType[]>>;
+ RenderRow: ComponentType<
+ React.PropsWithChildren[]>>
+ >;
rowHeight: TableHeightKeyType;
setHasScrollbar: React.Dispatch>;
hasScrollbar?: boolean;
diff --git a/src/lib/components/tablev2/Tablev2.component.tsx b/src/lib/components/tablev2/Tablev2.component.tsx
index 286348d10d..bb372dafbb 100644
--- a/src/lib/components/tablev2/Tablev2.component.tsx
+++ b/src/lib/components/tablev2/Tablev2.component.tsx
@@ -156,8 +156,8 @@ const DefaultRenderer = ({ value }) => {
rowHeight === 'h32'
? 1
: rowHeight === 'h40' || rowHeight === 'h48'
- ? 2
- : 3;
+ ? 2
+ : 3;
return (
diff --git a/src/lib/components/tabsv2/Tabsv2.component.tsx b/src/lib/components/tabsv2/Tabsv2.component.tsx
index f7ff371c3a..8ace5769ab 100644
--- a/src/lib/components/tabsv2/Tabsv2.component.tsx
+++ b/src/lib/components/tabsv2/Tabsv2.component.tsx
@@ -1,33 +1,33 @@
import React, {
createContext,
+ ReactElement,
+ useCallback,
useEffect,
useState,
- useCallback,
- ReactElement,
} from 'react';
import {
- TabBar,
+ matchPath,
+ Outlet,
+ Route,
+ Routes,
+ useLocation,
+ useNavigate,
+ useRoutes,
+} from 'react-router';
+import styled from 'styled-components';
+import { ButtonIcon } from '../buttonv2/Buttonv2.component';
+import { BasicText, EmphaseText, SecondaryText } from '../text/Text.component';
+import { ScrollButton } from './ScrollButton';
+import {
ScrollableContainer,
+ TabBar,
TabContent,
TabItem,
TabsContainer,
TabsScroller,
} from './StyledTabs';
-import {
- useHistory,
- useLocation,
- useRouteMatch,
- matchPath,
- Route,
- Switch,
-} from 'react-router-dom';
-import { SecondaryText, BasicText, EmphaseText } from '../text/Text.component';
-import { ScrollButton } from './ScrollButton';
-import { Tab } from './Tab';
-import { TabProps, Query } from './Tab';
+import { Query, Tab, TabProps } from './Tab';
import { useScrollingTabs } from './useScrollingTabs';
-import { ButtonIcon } from '../buttonv2/Buttonv2.component';
-import styled from 'styled-components';
type TabsProps = {
activeTabColor?: string;
@@ -59,8 +59,8 @@ function Tabs({
...rest
}: TabsProps) {
const location = useLocation();
- const history = useHistory();
- const { url } = useRouteMatch();
+ const navigate = useNavigate();
+ const url = location.pathname;
const [selectedTabIndex, setSelectedTabIndex] = useState<
number | null | undefined
>(null);
@@ -101,24 +101,26 @@ function Tabs({
};
const getPushHistoryPath = (path: string, query?: Query): string => {
+ const sanitizedSegment = path.replace(/^\/+/, '');
+ const replaceUrl = location.pathname.replace(/[^/]+$/, sanitizedSegment);
+
if (path.startsWith('/')) {
- return `${path}${serialize(query)}`;
+ return `${replaceUrl}${serialize(query)}`;
}
- return `${url}/${path}${serialize(query)}`;
+
+ return `${path}${serialize(query)}`;
};
useEffect(() => {
let hasSelectedTab = false;
filteredTabsChildren.forEach((child, index) => {
const isSelected =
- !!matchPath(location.pathname, {
- path: child.props.path.startsWith('/')
+ !!matchPath(
+ (child.props.path.startsWith('/')
? child.props.path
- : url + '/' + child.props.path,
- exact: child.props.exact,
- strict: child.props.strict,
- sensitive: child.props.sensitive,
- }) && (child.props.query ? matchQuery(child.props.query) : true);
+ : url + '/' + child.props.path) + '*',
+ location.pathname,
+ ) && (child.props.query ? matchQuery(child.props.query) : true);
if (isSelected) {
setSelectedTabIndex(index);
@@ -127,6 +129,7 @@ function Tabs({
});
if (!hasSelectedTab) setSelectedTabIndex(null);
}, [location.pathname, filteredTabsChildren, matchQuery]);
+
const {
scrollButtonEndRef,
scrollButtonStartRef,
@@ -138,6 +141,7 @@ function Tabs({
handleKeyDown,
displayScroll,
} = useScrollingTabs(selectedTabIndex);
+
const tabItems = filteredTabsChildren.map((child, index) => {
const {
path,
@@ -149,12 +153,13 @@ function Tabs({
...childRest
}: TabProps = child.props;
const isSelected = selectedTabIndex === index;
+ const realPath = path.startsWith('/') ? `/${path.split('/').pop()}` : path;
return (
history.push(getPushHistoryPath(path, query))}
+ onClick={() => navigate(getPushHistoryPath(realPath, query))}
selected={isSelected}
tabHoverColor={tabHoverColor}
inactiveTabColor={inactiveTabColor}
@@ -168,7 +173,7 @@ function Tabs({
event.key === 'Spacebar'
) {
event.preventDefault();
- history.push(getPushHistoryPath(path, query));
+ navigate(getPushHistoryPath(realPath, query));
}
}}
{...childRest}
@@ -218,33 +223,36 @@ function Tabs({
/>
)}
+
+ {filteredTabsChildren.map((tab, index) => {
+ const path = tab.props.path.split('/').pop();
- {filteredTabsChildren.map((tab, index) => (
- >;
}
- key={index}
- >
- {!tab.props.query ||
- (tab.props.query && matchQuery(tab.props.query)) ? (
-
- {tab.props.children}
-
- ) : (
- <>>
- )}
-
- ))}
+
+ return (
+
+
+ {tab.props.children}
+
+
+ >
+ }
+ />
+ );
+ })}
+
);
@@ -252,4 +260,4 @@ function Tabs({
Tabs.Tab = Tab;
// re-export Tab
-export { Tabs, Tab };
+export { Tab, Tabs };
diff --git a/src/lib/components/toast/ToastProvider.tsx b/src/lib/components/toast/ToastProvider.tsx
index 420d5efddb..340d246e1d 100644
--- a/src/lib/components/toast/ToastProvider.tsx
+++ b/src/lib/components/toast/ToastProvider.tsx
@@ -14,7 +14,7 @@ export const ToastContext = createContext(
interface ToastProviderProps {
children: ReactNode;
}
-export const ToastProvider: React.FC = ({ children }) => {
+export const ToastProvider: React.FC> = ({ children }) => {
const [toastProps, setToastProps] = useState(null);
const showToast = (toastProps: ToastContextState) => {
diff --git a/src/lib/organisms/attachments/AttachmentConfirmationModal.tsx b/src/lib/organisms/attachments/AttachmentConfirmationModal.tsx
index 7e15e46f61..54f2cc4aed 100644
--- a/src/lib/organisms/attachments/AttachmentConfirmationModal.tsx
+++ b/src/lib/organisms/attachments/AttachmentConfirmationModal.tsx
@@ -1,11 +1,11 @@
import { ComponentType, useState } from 'react';
-import { Column, Table } from '../../components/tablev2/Tablev2.component';
-import { Box, Button } from '../../next';
import { useMutation, UseMutationOptions } from 'react-query';
-import { AttachmentOperation, AttachmentAction } from './AttachmentTypes';
+import { useNavigate } from 'react-router';
import { useTheme } from 'styled-components';
-import { useHistory } from 'react-router';
import { Icon, LargerText, Modal, SecondaryText, Stack, Wrap } from '../..';
+import { Column, Table } from '../../components/tablev2/Tablev2.component';
+import { Box, Button } from '../../next';
+import { AttachmentAction, AttachmentOperation } from './AttachmentTypes';
type AttachmentStatus = 'Waiting for confirmation' | 'Error' | 'Success';
@@ -40,7 +40,9 @@ export function AttachmentConfirmationModal<
resourceName: string;
resourceType: RESOURCE_TYPE;
redirectUrl: string;
- EntityIcon: ComponentType<{ type: ENTITY_TYPE | RESOURCE_TYPE }>;
+ EntityIcon: ComponentType<
+ React.PropsWithChildren<{ type: ENTITY_TYPE | RESOURCE_TYPE }>
+ >;
cancelButtonDisabled?: boolean;
onCancel?: () => void;
onExit?: (
@@ -48,7 +50,7 @@ export function AttachmentConfirmationModal<
failedOperations: AttachmentOperation[],
) => void;
}) {
- const history = useHistory();
+ const navigate = useNavigate();
const [isModalOpen, setIsModalOpen] = useState(false);
@@ -133,7 +135,7 @@ export function AttachmentConfirmationModal<
onExit(successfulOperations, failedOperations);
}
handleClose();
- history.push(redirectUrl);
+ navigate(redirectUrl);
};
const modalFooter = () => {
return (
@@ -282,7 +284,7 @@ export function AttachmentConfirmationModal<
disabled={cancelButtonDisabled}
onClick={() => {
if (onCancel) onCancel();
- history.push(redirectUrl);
+ navigate(redirectUrl);
}}
/>