diff --git a/assets/App.tsx b/assets/App.tsx index a9775473..0ef5b9eb 100644 --- a/assets/App.tsx +++ b/assets/App.tsx @@ -6,13 +6,7 @@ import RouterRenderer from "./router/RouterRenderer"; import { RouteProvider } from "./router/router"; import { FC } from "react"; -const queryClient = new QueryClient({ - defaultOptions: { - queries: { - useErrorBoundary: false, - }, - }, -}); +const queryClient = new QueryClient(); const App: FC = () => { return ( diff --git a/assets/hooks/useCapabilities.tsx b/assets/hooks/useCapabilities.tsx index 2de9c7b1..090a42a4 100644 --- a/assets/hooks/useCapabilities.tsx +++ b/assets/hooks/useCapabilities.tsx @@ -21,7 +21,6 @@ const useCapabilities = (key = "cartes") => { return capabilities; }, staleTime: Infinity, - cacheTime: Infinity, }); }; diff --git a/assets/pages/datasheet/DatasheetNew/DatasheetNewIntegration/DatasheetNewIntegrationDialog.tsx b/assets/pages/datasheet/DatasheetNew/DatasheetNewIntegration/DatasheetNewIntegrationDialog.tsx index 66dcebd2..36c8ffe4 100644 --- a/assets/pages/datasheet/DatasheetNew/DatasheetNewIntegration/DatasheetNewIntegrationDialog.tsx +++ b/assets/pages/datasheet/DatasheetNew/DatasheetNewIntegration/DatasheetNewIntegrationDialog.tsx @@ -79,7 +79,9 @@ const DatasheetNewIntegrationDialog: FC = ({ setShouldPingIntProg(false); if (uploadQuery?.data?.tags?.datasheet_name) { - queryClient.invalidateQueries(RQKeys.datastore_datasheet(datastoreId, uploadQuery?.data?.tags?.datasheet_name)); + queryClient.invalidateQueries({ + queryKey: RQKeys.datastore_datasheet(datastoreId, uploadQuery?.data?.tags?.datasheet_name), + }); routes.datastore_datasheet_view({ datastoreId, datasheetName: uploadQuery?.data?.tags?.datasheet_name }).push(); } } diff --git a/assets/pages/datasheet/DatasheetView/DatasheetView.tsx b/assets/pages/datasheet/DatasheetView/DatasheetView.tsx index 4e465cdd..792e4f5a 100644 --- a/assets/pages/datasheet/DatasheetView/DatasheetView.tsx +++ b/assets/pages/datasheet/DatasheetView/DatasheetView.tsx @@ -55,7 +55,7 @@ const DatasheetView: FC = ({ datastoreId, datasheetName }) = staleTime: 20000, refetchInterval: 20000, retry: false, - enabled: !datasheetDeleteMutation.isLoading, + enabled: !datasheetDeleteMutation.isPending, }); return ( @@ -132,7 +132,7 @@ const DatasheetView: FC = ({ datastoreId, datasheetName }) = )} - {datasheetDeleteMutation.isLoading && ( + {datasheetDeleteMutation.isPending && (
diff --git a/assets/pages/service/view/ServiceView.tsx b/assets/pages/service/view/ServiceView.tsx index dde30ae3..5205cdad 100644 --- a/assets/pages/service/view/ServiceView.tsx +++ b/assets/pages/service/view/ServiceView.tsx @@ -65,16 +65,16 @@ const ServiceView: FC = ({ datastoreId, offeringId, datasheetN <>
{getBackBtn(datasheetName)} - {serviceQuery.data.layer_name} - - {serviceQuery.data.type} - + {serviceQuery?.data?.layer_name} + {serviceQuery?.data?.type && ( + + {serviceQuery?.data?.type} + + )}
-
- -
+
{serviceQuery.data && }
Diffuser le service @@ -106,7 +106,9 @@ const ServiceView: FC = ({ datastoreId, offeringId, datasheetN Adresse du service de données
- url.url).join(",")} className="fr-mb-4w" /> + {serviceQuery?.data?.urls && ( + url.url).join(",")} className="fr-mb-4w" /> + )}
diff --git a/assets/pages/service/wms-vector/WmsVectorServiceNew.tsx b/assets/pages/service/wms-vector/WmsVectorServiceNew.tsx index 939a39fc..dbad364f 100644 --- a/assets/pages/service/wms-vector/WmsVectorServiceNew.tsx +++ b/assets/pages/service/wms-vector/WmsVectorServiceNew.tsx @@ -246,7 +246,7 @@ const WmsVectorServiceNew: FC = ({ datastoreId, vector /> )} - {createServiceMutation.isLoading && ( + {createServiceMutation.isPaused && (
diff --git a/package.json b/package.json index e6d3d2de..15da8af3 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "@hookform/resolvers": "^3.1.1", "@mui/material": "^5.14.9", "@symfony/webpack-encore": "^4.4.0", - "@tanstack/react-query": "^4.29.25", - "@tanstack/react-query-devtools": "^4.29.25", + "@tanstack/react-query": "^5.0.0", + "@tanstack/react-query-devtools": "^5.0.0", "@uiw/react-md-editor": "^3.23.5", "autoprefixer": "^10.4.14", "core-js": "^3.31.1", diff --git a/yarn.lock b/yarn.lock index 7fdf28c2..283548d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1554,34 +1554,29 @@ webpack-dev-server "^4.8.0" yargs-parser "^21.0.0" -"@tanstack/match-sorter-utils@^8.7.0": - version "8.8.4" - resolved "https://registry.yarnpkg.com/@tanstack/match-sorter-utils/-/match-sorter-utils-8.8.4.tgz#0b2864d8b7bac06a9f84cb903d405852cc40a457" - integrity sha512-rKH8LjZiszWEvmi01NR72QWZ8m4xmXre0OOwlRGnjU01Eqz/QnN+cqpty2PJ0efHblq09+KilvyR7lsbzmXVEw== - dependencies: - remove-accents "0.4.2" +"@tanstack/query-core@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.0.0.tgz#b37a50bb3a4f54336b6131db00b72cd29e79b480" + integrity sha512-Y1BpiA6BblJd/UlVqxEVeAG7IACn568YJuTTItAiecBI7En+33g780kg+/8lhgl+BzcUPN7o+NjBrSRGJoemyQ== -"@tanstack/query-core@4.35.3": - version "4.35.3" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.35.3.tgz#1c127e66b4ad1beeac052db83a812d7cb67369e1" - integrity sha512-PS+WEjd9wzKTyNjjQymvcOe1yg8f3wYc6mD+vb6CKyZAKvu4sIJwryfqfBULITKCla7P9C4l5e9RXePHvZOZeQ== +"@tanstack/query-devtools@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@tanstack/query-devtools/-/query-devtools-5.0.0.tgz#bed467c2a8055ceaaf5e582d30ef46df039d94c8" + integrity sha512-WATg9+nreAmtTRHzxvCFN6j4ucUVbkJNd8ErcYmf7Y6GsJw/BGscd4rWS7cdAP7zfTcPjHjGaRB041pcv8dNvA== -"@tanstack/react-query-devtools@^4.29.25": - version "4.35.3" - resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-4.35.3.tgz#f03b39b613782a97794a42798d979c02ba51a7df" - integrity sha512-UvLT7qPzCuCZ3NfjwsOqDUVN84JvSOuW6ukrjZmSqgjPqVxD6ra/HUp1CEOatQY2TRvKCp8y1lTVu+trXM30fg== +"@tanstack/react-query-devtools@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-5.0.0.tgz#2f9b1aa6372f8bc42d8c5144392db92b8fa5d9ca" + integrity sha512-4yw29d89eOqUmliRKGmEOjuq2AGSM3i4jjw/YFMrErg0neVITy2bkoU3fPXZ339czlupqq0b4e20uFVtqkEqGQ== dependencies: - "@tanstack/match-sorter-utils" "^8.7.0" - superjson "^1.10.0" - use-sync-external-store "^1.2.0" + "@tanstack/query-devtools" "5.0.0" -"@tanstack/react-query@^4.29.25": - version "4.35.3" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.35.3.tgz#03d726ef6a19d426166427c6539b003dd9606d1b" - integrity sha512-UgTPioip/rGG3EQilXfA2j4BJkhEQsR+KAbF+KIuvQ7j4MkgnTCJF01SfRpIRNtQTlEfz/+IL7+jP8WA8bFbsw== +"@tanstack/react-query@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.0.0.tgz#707fecb71cf53ae098f682f45520d7b1640bcaa9" + integrity sha512-diQoC8FNBcO5Uf5yuaJlXthTtbO1xM8kzOX+pSBUMT9n/cqQ/u1wJGCtukvhDWA+6j07WmIj4bfqNbd2KOB6jQ== dependencies: - "@tanstack/query-core" "4.35.3" - use-sync-external-store "^1.2.0" + "@tanstack/query-core" "5.0.0" "@trysound/sax@0.2.0": version "0.2.0" @@ -2983,13 +2978,6 @@ cookie@0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -copy-anything@^3.0.2: - version "3.0.5" - resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-3.0.5.tgz#2d92dce8c498f790fa7ad16b01a1ae5a45b020a0" - integrity sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w== - dependencies: - is-what "^4.1.8" - core-js-compat@^3.31.0, core-js-compat@^3.32.2: version "3.32.2" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.32.2.tgz#8047d1a8b3ac4e639f0d4f66d4431aa3b16e004c" @@ -5137,11 +5125,6 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" -is-what@^4.1.8: - version "4.1.15" - resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.15.tgz#de43a81090417a425942d67b1ae86e7fae2eee0e" - integrity sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA== - is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -7275,11 +7258,6 @@ remark-rehype@^10.0.0: mdast-util-to-hast "^12.1.0" unified "^10.0.0" -remove-accents@0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5" - integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA== - renderkid@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-3.0.0.tgz#5fd823e4d6951d37358ecc9a58b1f06836b6268a" @@ -7899,13 +7877,6 @@ stylis@4.2.0: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== -superjson@^1.10.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/superjson/-/superjson-1.13.1.tgz#a0b6ab5d22876f6207fcb9d08b0cb2acad8ee5cd" - integrity sha512-AVH2eknm9DEd3qvxM4Sq+LTCkSXE2ssfh1t11MHMXyYXFQyQ1HLgVvV+guLTsaQnJU3gnaVo34TohHPulY/wLg== - dependencies: - copy-anything "^3.0.2" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8347,11 +8318,6 @@ use-deep-compare-effect@^1.8.1: "@babel/runtime" "^7.12.5" dequal "^2.0.2" -use-sync-external-store@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" - integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== - util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"