diff --git a/.pnp.cjs b/.pnp.cjs index 4bdcba3ac..90d64fd65 100644 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -39,8 +39,8 @@ const RAW_RUNTIME_STATE = ["@mui/x-date-pickers", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#patch:@mui/x-date-pickers@npm%3A6.19.0#./.yarn/patches/@mui-x-date-pickers-npm-6.19.0-d448743c52.patch::version=6.19.0&hash=76320b&locator=operationsgateway%40workspace%3A."],\ ["@playwright/test", "npm:1.41.0"],\ ["@reduxjs/toolkit", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:2.1.0"],\ - ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.5"],\ - ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.6"],\ + ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ + ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ ["@tanstack/react-table", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:8.11.6"],\ ["@tanstack/react-virtual", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:3.0.0-beta.68"],\ ["@testing-library/cypress", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:10.0.1"],\ @@ -5432,85 +5432,69 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["@tanstack/match-sorter-utils", [\ - ["npm:8.11.3", {\ - "packageLocation": "./.yarn/cache/@tanstack-match-sorter-utils-npm-8.11.3-170f90ae68-9bd1b5ee09.zip/node_modules/@tanstack/match-sorter-utils/",\ + ["@tanstack/query-core", [\ + ["npm:5.18.1", {\ + "packageLocation": "./.yarn/cache/@tanstack-query-core-npm-5.18.1-9145343368-e832388e20.zip/node_modules/@tanstack/query-core/",\ "packageDependencies": [\ - ["@tanstack/match-sorter-utils", "npm:8.11.3"],\ - ["remove-accents", "npm:0.4.2"]\ + ["@tanstack/query-core", "npm:5.18.1"]\ ],\ "linkType": "HARD"\ }]\ ]],\ - ["@tanstack/query-core", [\ - ["npm:4.29.5", {\ - "packageLocation": "./.yarn/cache/@tanstack-query-core-npm-4.29.5-9dcad5d405-f9f28009c9.zip/node_modules/@tanstack/query-core/",\ + ["@tanstack/query-devtools", [\ + ["npm:5.18.1", {\ + "packageLocation": "./.yarn/cache/@tanstack-query-devtools-npm-5.18.1-9c6902de16-7514ad0eb5.zip/node_modules/@tanstack/query-devtools/",\ "packageDependencies": [\ - ["@tanstack/query-core", "npm:4.29.5"]\ + ["@tanstack/query-devtools", "npm:5.18.1"]\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@tanstack/react-query", [\ - ["npm:4.29.5", {\ - "packageLocation": "./.yarn/cache/@tanstack-react-query-npm-4.29.5-75cf2205c7-ab256896f0.zip/node_modules/@tanstack/react-query/",\ + ["npm:5.18.1", {\ + "packageLocation": "./.yarn/cache/@tanstack-react-query-npm-5.18.1-616445cd08-6129af25c9.zip/node_modules/@tanstack/react-query/",\ "packageDependencies": [\ - ["@tanstack/react-query", "npm:4.29.5"]\ + ["@tanstack/react-query", "npm:5.18.1"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.5", {\ - "packageLocation": "./.yarn/__virtual__/@tanstack-react-query-virtual-87a665f685/0/cache/@tanstack-react-query-npm-4.29.5-75cf2205c7-ab256896f0.zip/node_modules/@tanstack/react-query/",\ + ["virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1", {\ + "packageLocation": "./.yarn/__virtual__/@tanstack-react-query-virtual-3945c4cad2/0/cache/@tanstack-react-query-npm-5.18.1-616445cd08-6129af25c9.zip/node_modules/@tanstack/react-query/",\ "packageDependencies": [\ - ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.5"],\ - ["@tanstack/query-core", "npm:4.29.5"],\ + ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ + ["@tanstack/query-core", "npm:5.18.1"],\ ["@types/react", "npm:18.2.48"],\ - ["@types/react-dom", "npm:18.2.18"],\ - ["@types/react-native", null],\ - ["react", "npm:18.2.0"],\ - ["react-dom", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:18.2.0"],\ - ["react-native", null],\ - ["use-sync-external-store", "virtual:41c6267eef4c7b511959468a8aa9d244cfa11e13594dca2bd09b75b0492ba34407baaff4921f724afb7b551b1e7d38973ef1de9123e58e3ddd6aeacb2f2193b8#npm:1.2.0"]\ + ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ - "@types/react-dom",\ - "@types/react-native",\ "@types/react",\ - "react-dom",\ - "react-native",\ "react"\ ],\ "linkType": "HARD"\ }]\ ]],\ ["@tanstack/react-query-devtools", [\ - ["npm:4.29.6", {\ - "packageLocation": "./.yarn/cache/@tanstack-react-query-devtools-npm-4.29.6-b701fa51c7-8725741380.zip/node_modules/@tanstack/react-query-devtools/",\ + ["npm:5.18.1", {\ + "packageLocation": "./.yarn/cache/@tanstack-react-query-devtools-npm-5.18.1-ddc6075802-2941c7d0dd.zip/node_modules/@tanstack/react-query-devtools/",\ "packageDependencies": [\ - ["@tanstack/react-query-devtools", "npm:4.29.6"]\ + ["@tanstack/react-query-devtools", "npm:5.18.1"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.6", {\ - "packageLocation": "./.yarn/__virtual__/@tanstack-react-query-devtools-virtual-41c6267eef/0/cache/@tanstack-react-query-devtools-npm-4.29.6-b701fa51c7-8725741380.zip/node_modules/@tanstack/react-query-devtools/",\ + ["virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1", {\ + "packageLocation": "./.yarn/__virtual__/@tanstack-react-query-devtools-virtual-89518bc19f/0/cache/@tanstack-react-query-devtools-npm-5.18.1-ddc6075802-2941c7d0dd.zip/node_modules/@tanstack/react-query-devtools/",\ "packageDependencies": [\ - ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.6"],\ - ["@tanstack/match-sorter-utils", "npm:8.11.3"],\ - ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.5"],\ + ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ + ["@tanstack/query-devtools", "npm:5.18.1"],\ + ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ ["@types/react", "npm:18.2.48"],\ - ["@types/react-dom", "npm:18.2.18"],\ ["@types/tanstack__react-query", null],\ - ["react", "npm:18.2.0"],\ - ["react-dom", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:18.2.0"],\ - ["superjson", "npm:1.13.3"],\ - ["use-sync-external-store", "virtual:41c6267eef4c7b511959468a8aa9d244cfa11e13594dca2bd09b75b0492ba34407baaff4921f724afb7b551b1e7d38973ef1de9123e58e3ddd6aeacb2f2193b8#npm:1.2.0"]\ + ["react", "npm:18.2.0"]\ ],\ "packagePeers": [\ "@tanstack/react-query",\ - "@types/react-dom",\ "@types/react",\ "@types/tanstack__react-query",\ - "react-dom",\ "react"\ ],\ "linkType": "HARD"\ @@ -9164,16 +9148,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["copy-anything", [\ - ["npm:3.0.5", {\ - "packageLocation": "./.yarn/cache/copy-anything-npm-3.0.5-562d15fb3f-4c41385a94.zip/node_modules/copy-anything/",\ - "packageDependencies": [\ - ["copy-anything", "npm:3.0.5"],\ - ["is-what", "npm:4.1.16"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["core-js", [\ ["npm:3.35.0", {\ "packageLocation": "./.yarn/unplugged/core-js-npm-3.35.0-33b20bc10e/node_modules/core-js/",\ @@ -13678,15 +13652,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["is-what", [\ - ["npm:4.1.16", {\ - "packageLocation": "./.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip/node_modules/is-what/",\ - "packageDependencies": [\ - ["is-what", "npm:4.1.16"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["is-wsl", [\ ["npm:2.2.0", {\ "packageLocation": "./.yarn/cache/is-wsl-npm-2.2.0-2ba10d6393-20849846ae.zip/node_modules/is-wsl/",\ @@ -16188,8 +16153,8 @@ const RAW_RUNTIME_STATE = ["@mui/x-date-pickers", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#patch:@mui/x-date-pickers@npm%3A6.19.0#./.yarn/patches/@mui-x-date-pickers-npm-6.19.0-d448743c52.patch::version=6.19.0&hash=76320b&locator=operationsgateway%40workspace%3A."],\ ["@playwright/test", "npm:1.41.0"],\ ["@reduxjs/toolkit", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:2.1.0"],\ - ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.5"],\ - ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:4.29.6"],\ + ["@tanstack/react-query", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ + ["@tanstack/react-query-devtools", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:5.18.1"],\ ["@tanstack/react-table", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:8.11.6"],\ ["@tanstack/react-virtual", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:3.0.0-beta.68"],\ ["@testing-library/cypress", "virtual:c9244accb1038960b8bd2ad679a4254224d40b15df01d8c1ca49bdc22d22637447d555aee5f07b768c5deaa012fb66b3da954479d1ae1181e2bbdad9a15b5496#npm:10.0.1"],\ @@ -19064,7 +19029,7 @@ const RAW_RUNTIME_STATE = ["react-is", "npm:18.2.0"],\ ["react-native", null],\ ["redux", null],\ - ["use-sync-external-store", "virtual:41c6267eef4c7b511959468a8aa9d244cfa11e13594dca2bd09b75b0492ba34407baaff4921f724afb7b551b1e7d38973ef1de9123e58e3ddd6aeacb2f2193b8#npm:1.2.0"]\ + ["use-sync-external-store", "virtual:4a109b7c833c46cd123018a9a5ea593f8dc3b01119aa7b14ec7612844efe4efb052b7629082f3784d2e0c401d69130c9545b90c6c41cffeffdb1f360097c2c41#npm:1.2.0"]\ ],\ "packagePeers": [\ "@types/react-dom",\ @@ -19488,15 +19453,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["remove-accents", [\ - ["npm:0.4.2", {\ - "packageLocation": "./.yarn/cache/remove-accents-npm-0.4.2-7cb341092a-25d5c84f13.zip/node_modules/remove-accents/",\ - "packageDependencies": [\ - ["remove-accents", "npm:0.4.2"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["renderkid", [\ ["npm:3.0.0", {\ "packageLocation": "./.yarn/cache/renderkid-npm-3.0.0-acb028643f-434bd56d99.zip/node_modules/renderkid/",\ @@ -20927,16 +20883,6 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ - ["superjson", [\ - ["npm:1.13.3", {\ - "packageLocation": "./.yarn/cache/superjson-npm-1.13.3-25a5e9e483-71a186c513.zip/node_modules/superjson/",\ - "packageDependencies": [\ - ["superjson", "npm:1.13.3"],\ - ["copy-anything", "npm:3.0.5"]\ - ],\ - "linkType": "HARD"\ - }]\ - ]],\ ["supports-color", [\ ["npm:5.5.0", {\ "packageLocation": "./.yarn/cache/supports-color-npm-5.5.0-183ac537bc-5f505c6fa3.zip/node_modules/supports-color/",\ @@ -21925,10 +21871,10 @@ const RAW_RUNTIME_STATE = ],\ "linkType": "SOFT"\ }],\ - ["virtual:41c6267eef4c7b511959468a8aa9d244cfa11e13594dca2bd09b75b0492ba34407baaff4921f724afb7b551b1e7d38973ef1de9123e58e3ddd6aeacb2f2193b8#npm:1.2.0", {\ - "packageLocation": "./.yarn/__virtual__/use-sync-external-store-virtual-f310e3ec73/0/cache/use-sync-external-store-npm-1.2.0-44f75d2564-a676216aff.zip/node_modules/use-sync-external-store/",\ + ["virtual:4a109b7c833c46cd123018a9a5ea593f8dc3b01119aa7b14ec7612844efe4efb052b7629082f3784d2e0c401d69130c9545b90c6c41cffeffdb1f360097c2c41#npm:1.2.0", {\ + "packageLocation": "./.yarn/__virtual__/use-sync-external-store-virtual-10d75f4e08/0/cache/use-sync-external-store-npm-1.2.0-44f75d2564-a676216aff.zip/node_modules/use-sync-external-store/",\ "packageDependencies": [\ - ["use-sync-external-store", "virtual:41c6267eef4c7b511959468a8aa9d244cfa11e13594dca2bd09b75b0492ba34407baaff4921f724afb7b551b1e7d38973ef1de9123e58e3ddd6aeacb2f2193b8#npm:1.2.0"],\ + ["use-sync-external-store", "virtual:4a109b7c833c46cd123018a9a5ea593f8dc3b01119aa7b14ec7612844efe4efb052b7629082f3784d2e0c401d69130c9545b90c6c41cffeffdb1f360097c2c41#npm:1.2.0"],\ ["@types/react", "npm:18.2.48"],\ ["react", "npm:18.2.0"]\ ],\ diff --git a/.yarn/cache/@tanstack-match-sorter-utils-npm-8.11.3-170f90ae68-9bd1b5ee09.zip b/.yarn/cache/@tanstack-match-sorter-utils-npm-8.11.3-170f90ae68-9bd1b5ee09.zip deleted file mode 100644 index 7f13e0caf..000000000 Binary files a/.yarn/cache/@tanstack-match-sorter-utils-npm-8.11.3-170f90ae68-9bd1b5ee09.zip and /dev/null differ diff --git a/.yarn/cache/@tanstack-query-core-npm-4.29.5-9dcad5d405-f9f28009c9.zip b/.yarn/cache/@tanstack-query-core-npm-4.29.5-9dcad5d405-f9f28009c9.zip deleted file mode 100644 index c957bbab3..000000000 Binary files a/.yarn/cache/@tanstack-query-core-npm-4.29.5-9dcad5d405-f9f28009c9.zip and /dev/null differ diff --git a/.yarn/cache/@tanstack-query-core-npm-5.18.1-9145343368-e832388e20.zip b/.yarn/cache/@tanstack-query-core-npm-5.18.1-9145343368-e832388e20.zip new file mode 100644 index 000000000..01dae767e Binary files /dev/null and b/.yarn/cache/@tanstack-query-core-npm-5.18.1-9145343368-e832388e20.zip differ diff --git a/.yarn/cache/@tanstack-query-devtools-npm-5.18.1-9c6902de16-7514ad0eb5.zip b/.yarn/cache/@tanstack-query-devtools-npm-5.18.1-9c6902de16-7514ad0eb5.zip new file mode 100644 index 000000000..e9e5e98a0 Binary files /dev/null and b/.yarn/cache/@tanstack-query-devtools-npm-5.18.1-9c6902de16-7514ad0eb5.zip differ diff --git a/.yarn/cache/@tanstack-react-query-devtools-npm-4.29.6-b701fa51c7-8725741380.zip b/.yarn/cache/@tanstack-react-query-devtools-npm-4.29.6-b701fa51c7-8725741380.zip deleted file mode 100644 index 590493227..000000000 Binary files a/.yarn/cache/@tanstack-react-query-devtools-npm-4.29.6-b701fa51c7-8725741380.zip and /dev/null differ diff --git a/.yarn/cache/@tanstack-react-query-devtools-npm-5.18.1-ddc6075802-2941c7d0dd.zip b/.yarn/cache/@tanstack-react-query-devtools-npm-5.18.1-ddc6075802-2941c7d0dd.zip new file mode 100644 index 000000000..511026ead Binary files /dev/null and b/.yarn/cache/@tanstack-react-query-devtools-npm-5.18.1-ddc6075802-2941c7d0dd.zip differ diff --git a/.yarn/cache/@tanstack-react-query-npm-4.29.5-75cf2205c7-ab256896f0.zip b/.yarn/cache/@tanstack-react-query-npm-4.29.5-75cf2205c7-ab256896f0.zip deleted file mode 100644 index 867a8a78e..000000000 Binary files a/.yarn/cache/@tanstack-react-query-npm-4.29.5-75cf2205c7-ab256896f0.zip and /dev/null differ diff --git a/.yarn/cache/@tanstack-react-query-npm-5.18.1-616445cd08-6129af25c9.zip b/.yarn/cache/@tanstack-react-query-npm-5.18.1-616445cd08-6129af25c9.zip new file mode 100644 index 000000000..74c09c812 Binary files /dev/null and b/.yarn/cache/@tanstack-react-query-npm-5.18.1-616445cd08-6129af25c9.zip differ diff --git a/.yarn/cache/copy-anything-npm-3.0.5-562d15fb3f-4c41385a94.zip b/.yarn/cache/copy-anything-npm-3.0.5-562d15fb3f-4c41385a94.zip deleted file mode 100644 index 7780c2cd2..000000000 Binary files a/.yarn/cache/copy-anything-npm-3.0.5-562d15fb3f-4c41385a94.zip and /dev/null differ diff --git a/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip b/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip deleted file mode 100644 index d09d43025..000000000 Binary files a/.yarn/cache/is-what-npm-4.1.16-1622ed8fd8-f6400634ba.zip and /dev/null differ diff --git a/.yarn/cache/remove-accents-npm-0.4.2-7cb341092a-25d5c84f13.zip b/.yarn/cache/remove-accents-npm-0.4.2-7cb341092a-25d5c84f13.zip deleted file mode 100644 index c8a33b015..000000000 Binary files a/.yarn/cache/remove-accents-npm-0.4.2-7cb341092a-25d5c84f13.zip and /dev/null differ diff --git a/.yarn/cache/superjson-npm-1.13.3-25a5e9e483-71a186c513.zip b/.yarn/cache/superjson-npm-1.13.3-25a5e9e483-71a186c513.zip deleted file mode 100644 index 65e8ed7fc..000000000 Binary files a/.yarn/cache/superjson-npm-1.13.3-25a5e9e483-71a186c513.zip and /dev/null differ diff --git a/package.json b/package.json index 4e0f87bb7..bf92d8089 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "@mui/system": "5.15.6", "@mui/x-date-pickers": "^6.19.0", "@reduxjs/toolkit": "2.1.0", - "@tanstack/react-query": "4.29.5", - "@tanstack/react-query-devtools": "4.29.6", + "@tanstack/react-query": "5.18.1", + "@tanstack/react-query-devtools": "5.18.1", "@tanstack/react-table": "8.11.6", "@tanstack/react-virtual": "beta", "@types/jest": "29.5.2", diff --git a/src/App.tsx b/src/App.tsx index 8a7fd8961..3dced5e73 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,10 @@ import React from 'react'; import ViewTabs from './views/viewTabs.component'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { + QueryClient, + QueryClientProvider, + QueryCache, +} from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { configureApp } from './state/slices/configSlice'; import { requestPluginRerender } from './state/scigateway.actions'; @@ -20,6 +24,12 @@ const queryClient = new QueryClient({ staleTime: 300000, }, }, + // TODO: implement proper error handling + queryCache: new QueryCache({ + onError: (error) => { + console.log('Got error ' + error.message); + }, + }), }); function mapPreloaderStateToProps(state: RootState): { loading: boolean } { diff --git a/src/api/channels.test.tsx b/src/api/channels.test.tsx index 65be345a5..9f5b75ea3 100644 --- a/src/api/channels.test.tsx +++ b/src/api/channels.test.tsx @@ -227,13 +227,13 @@ describe('channels api functions', () => { ); expect(result.current.isFetching).toBeFalsy(); - expect(result.current.isLoading).toBeTruthy(); + expect(result.current.isPending).toBeTruthy(); expect(requestSent).toBe(false); rerender('timestamp'); expect(result.current.isFetching).toBeFalsy(); - expect(result.current.isLoading).toBeTruthy(); + expect(result.current.isPending).toBeTruthy(); expect(requestSent).toBe(false); }); diff --git a/src/api/channels.tsx b/src/api/channels.tsx index 338a27382..809c937e2 100644 --- a/src/api/channels.tsx +++ b/src/api/channels.tsx @@ -105,22 +105,21 @@ const fetchChannelSummary = ( // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint export const useChannels = ( - options?: UseQueryOptions + options?: Omit< + UseQueryOptions, + 'queryKey' + > ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['channels'], - (params) => { + return useQuery({ + queryKey: ['channels'], + queryFn: (params) => { return fetchChannels(apiUrl); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - ...(options ?? {}), - } - ); + + ...(options ?? {}), + }); }; export const useChannelSummary = ( @@ -132,18 +131,15 @@ export const useChannelSummary = ( ? channel : ''; - return useQuery( - ['channelSummary', dataChannel], - (params) => { + return useQuery({ + queryKey: ['channelSummary', dataChannel], + + queryFn: (params) => { return fetchChannelSummary(apiUrl, dataChannel); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - enabled: dataChannel.length !== 0, - } - ); + + enabled: dataChannel.length !== 0, + }); }; export const constructColumnDefs = ( diff --git a/src/api/experiment.tsx b/src/api/experiment.tsx index cbeaeb24d..a832f8d32 100644 --- a/src/api/experiment.tsx +++ b/src/api/experiment.tsx @@ -23,15 +23,11 @@ export const useExperiment = (): UseQueryResult< > => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['experiments'], - (params) => { + return useQuery({ + queryKey: ['experiments'], + + queryFn: (params) => { return fetchExperiment(apiUrl); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; diff --git a/src/api/images.tsx b/src/api/images.tsx index bf8a4fd29..a17e23dd3 100644 --- a/src/api/images.tsx +++ b/src/api/images.tsx @@ -1,4 +1,8 @@ -import { UseQueryResult, useQuery } from '@tanstack/react-query'; +import { + UseQueryResult, + useQuery, + keepPreviousData, +} from '@tanstack/react-query'; import axios, { AxiosError } from 'axios'; import { readSciGatewayToken } from '../parseTokens'; import { useAppSelector } from '../state/hooks'; @@ -94,24 +98,16 @@ export const useImage = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery< - string, - AxiosError, - string, - [string, string, string, FalseColourParams?] - >( - ['images', recordId, channelName, falseColourParams], - (params) => { + return useQuery({ + queryKey: ['images', recordId, channelName, falseColourParams], + + queryFn: (params) => { return fetchImage(apiUrl, recordId, channelName, falseColourParams); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - // set to display old image whilst new one is loading - keepPreviousData: true, - } - ); + + // set to display old image whilst new one is loading + placeholderData: keepPreviousData, + }); }; export const useColourBar = ( @@ -119,19 +115,16 @@ export const useColourBar = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['colourbar', falseColourParams], - (params) => { + return useQuery({ + queryKey: ['colourbar', falseColourParams], + + queryFn: (params) => { return fetchColourBar(apiUrl, falseColourParams); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - // set to display old colour bar whilst new one is loading - keepPreviousData: true, - } - ); + + // set to display old colour bar whilst new one is loading + placeholderData: keepPreviousData, + }); }; export const useColourMaps = (): UseQueryResult< @@ -140,15 +133,11 @@ export const useColourMaps = (): UseQueryResult< > => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['colourmaps'], - (params) => { + return useQuery({ + queryKey: ['colourmaps'], + + queryFn: (params) => { return fetchColourMaps(apiUrl); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; diff --git a/src/api/records.test.tsx b/src/api/records.test.tsx index 0f610b453..e7435d319 100644 --- a/src/api/records.test.tsx +++ b/src/api/records.test.tsx @@ -202,7 +202,7 @@ describe('records api functions', () => { ); expect(result.current.data).toEqual(undefined); - expect(result.current.isLoading).toBe(true); + expect(result.current.isPending).toBe(true); expect(result.current.fetchStatus).toBe('idle'); }); it.todo( @@ -241,7 +241,7 @@ describe('records api functions', () => { ); expect(result.current.data).toEqual(undefined); - expect(result.current.isLoading).toBe(true); + expect(result.current.isPending).toBe(true); expect(result.current.fetchStatus).toBe('idle'); }); it.todo( diff --git a/src/api/records.tsx b/src/api/records.tsx index b1b9d830b..c3a3d32f5 100644 --- a/src/api/records.tsx +++ b/src/api/records.tsx @@ -237,9 +237,10 @@ export const useDateToShotnumConverter = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['dateToShotnumConverter', { fromDate, toDate }], - (params) => { + return useQuery({ + queryKey: ['dateToShotnumConverter', { fromDate, toDate }], + + queryFn: (params) => { return fetchRangeRecordConverterQuery( apiUrl, fromDate, @@ -248,13 +249,9 @@ export const useDateToShotnumConverter = ( undefined ); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - enabled, - } - ); + + enabled, + }); }; export const useShotnumToDateConverter = ( @@ -264,9 +261,10 @@ export const useShotnumToDateConverter = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['shotnumToDateConverter', { shotnumMin, shotnumMax }], - (params) => { + return useQuery({ + queryKey: ['shotnumToDateConverter', { shotnumMin, shotnumMax }], + + queryFn: (params) => { return fetchRangeRecordConverterQuery( apiUrl, undefined, @@ -275,13 +273,9 @@ export const useShotnumToDateConverter = ( shotnumMax ); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - enabled, - } - ); + + enabled, + }); }; export const useRecordsPaginated = (): UseQueryResult< RecordRow[], @@ -292,23 +286,8 @@ export const useRecordsPaginated = (): UseQueryResult< const { apiUrl } = useAppSelector(selectUrls); const projection = useAppSelector(selectSelectedIdsIgnoreOrder); - return useQuery< - Record[], - AxiosError, - RecordRow[], - [ - string, - { - page: number; - resultsPerPage: number; - sort: SortType; - searchParams: SearchParams; - filters: string[]; - projection: string[]; - }, - ] - >( - [ + return useQuery({ + queryKey: [ 'records', { page, @@ -319,9 +298,18 @@ export const useRecordsPaginated = (): UseQueryResult< projection, }, ], - (params) => { + + queryFn: ({ queryKey }) => { const { page, resultsPerPage, sort, searchParams, filters } = - params.queryKey[1]; + queryKey[1] as { + page: number; + resultsPerPage: number; + sort: SortType; + searchParams: SearchParams; + filters: string[]; + projection: string[]; + }; + // React Table pagination is zero-based const startIndex = page * resultsPerPage; const stopIndex = startIndex + resultsPerPage; @@ -337,46 +325,39 @@ export const useRecordsPaginated = (): UseQueryResult< projection ); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - select: (data: Record[]) => - data.map((record: Record) => { - const timestampString = record.metadata.timestamp; - const formattedDate = renderTimestamp(timestampString); - const recordRow: RecordRow = { - _id: record._id, - timestamp: formattedDate, - shotnum: record.metadata.shotnum, - activeArea: record.metadata.activeArea, - activeExperiment: record.metadata.activeExperiment, - }; - - const keys = Object.keys(record.channels ?? {}); - keys.forEach((key: string) => { - const channel = record.channels?.[key]; - - if (channel) { - let channelData; - - if (isChannelScalar(channel)) { - channelData = channel.data; - } else if ( - isChannelImage(channel) || - isChannelWaveform(channel) - ) { - channelData = channel.thumbnail; - } - - recordRow[key] = channelData; + + select: (data: Record[]) => + data.map((record: Record) => { + const timestampString = record.metadata.timestamp; + const formattedDate = renderTimestamp(timestampString); + const recordRow: RecordRow = { + _id: record._id, + timestamp: formattedDate, + shotnum: record.metadata.shotnum, + activeArea: record.metadata.activeArea, + activeExperiment: record.metadata.activeExperiment, + }; + + const keys = Object.keys(record.channels ?? {}); + keys.forEach((key: string) => { + const channel = record.channels?.[key]; + + if (channel) { + let channelData; + + if (isChannelScalar(channel)) { + channelData = channel.data; + } else if (isChannelImage(channel) || isChannelWaveform(channel)) { + channelData = channel.thumbnail; } - }); - return recordRow; - }), - } - ); + recordRow[key] = channelData; + } + }); + + return recordRow; + }), + }); }; export const getFormattedAxisData = ( @@ -428,26 +409,25 @@ export const usePlotRecords = ( ...selectedPlotChannels.map((channel) => channel.name), ]; - return useQuery< - Record[], - AxiosError, - PlotDataset[], - [ - string, + return useQuery({ + queryKey: [ + 'records', { - sort: SortType; + sort: { [parsedXAxis]: 'asc' }, + searchParams, + filters, + projection, + }, + ], + + queryFn: ({ queryKey }) => { + const { sort, filters, searchParams } = queryKey[1] as { + sort: { [x: string]: string }; searchParams: SearchParams; filters: string[]; projection: string[]; - }, - ] - >( - [ - 'records', - { sort: { [parsedXAxis]: 'asc' }, searchParams, filters, projection }, - ], - (params) => { - const { sort, filters, searchParams } = params.queryKey[1]; + }; + const { maxShots } = searchParams; let offsetParams = undefined; if (maxShots !== Infinity) { @@ -458,52 +438,45 @@ export const usePlotRecords = ( } return fetchRecords( apiUrl, - sort, + sort as SortType, searchParams, filters, offsetParams, projection ); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - select: (records: Record[]) => { - const plotDatasets = selectedPlotChannels.map((plotChannel) => { - const plotChannelName = plotChannel.name; - - // Add the initial entry for dataset called plotChannelName - // data field is currently empty, the below loop populates it - const newDataset: PlotDataset = { - name: plotChannelName, - data: [], - }; - - // Populate the above data field - records.forEach((record) => { - const formattedXAxis = getFormattedAxisData(record, parsedXAxis); - const formattedYAxis = getFormattedAxisData( - record, - plotChannelName - ); - - if (formattedXAxis && formattedYAxis) { - const currentData = newDataset.data; - currentData.push({ - [parsedXAxis]: formattedXAxis, - [plotChannelName]: formattedYAxis, - }); - } - }); - return newDataset; + select: (records: Record[]) => { + const plotDatasets = selectedPlotChannels.map((plotChannel) => { + const plotChannelName = plotChannel.name; + + // Add the initial entry for dataset called plotChannelName + // data field is currently empty, the below loop populates it + const newDataset: PlotDataset = { + name: plotChannelName, + data: [], + }; + + // Populate the above data field + records.forEach((record) => { + const formattedXAxis = getFormattedAxisData(record, parsedXAxis); + const formattedYAxis = getFormattedAxisData(record, plotChannelName); + + if (formattedXAxis && formattedYAxis) { + const currentData = newDataset.data; + currentData.push({ + [parsedXAxis]: formattedXAxis, + [plotChannelName]: formattedYAxis, + }); + } }); - return plotDatasets; - }, - } - ); + return newDataset; + }); + + return plotDatasets; + }, + }); }; export const useThumbnails = ( @@ -514,30 +487,23 @@ export const useThumbnails = ( const { searchParams, sort, filters } = useAppSelector(selectQueryParams); const { apiUrl } = useAppSelector(selectUrls); - return useQuery< - Record[], - AxiosError, - Record[], - [ - string, - string, - { + return useQuery({ + queryKey: [ + 'thumbnails', + channel, + { page, resultsPerPage, sort, searchParams, filters }, + ], + + queryFn: (params) => { + const { page, resultsPerPage, sort, searchParams, filters } = params + .queryKey[2] as { page: number; resultsPerPage: number; sort: SortType; searchParams: SearchParams; filters: string[]; - }, - ] - >( - [ - 'thumbnails', - channel, - { page, resultsPerPage, sort, searchParams, filters }, - ], - (params) => { - const { page, resultsPerPage, sort, searchParams, filters } = - params.queryKey[2]; + }; + // React Table pagination is zero-based const startIndex = page * resultsPerPage; const stopIndex = startIndex + resultsPerPage; @@ -553,12 +519,7 @@ export const useThumbnails = ( [channel, timeChannelName] ); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; export const useRecordCount = (): UseQueryResult => { @@ -567,35 +528,28 @@ export const useRecordCount = (): UseQueryResult => { const queryClient = useQueryClient(); const projection = useAppSelector(selectSelectedIdsIgnoreOrder); - return useQuery< - number, - AxiosError, - number, - [ - string, - { searchParams: SearchParams; filters: string[]; projection: string[] }, - ] - >( - ['recordCount', { searchParams, filters, projection }], - (params) => { - const { searchParams, filters, projection } = params.queryKey[1]; + return useQuery({ + queryKey: ['recordCount', { searchParams, filters, projection }], + + queryFn: (params) => { + const { searchParams, filters, projection } = params.queryKey[1] as { + searchParams: SearchParams; + filters: string[]; + projection: string[]; + }; return fetchRecordCountQuery(apiUrl, searchParams, filters, projection); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - initialData: () => - queryClient.getQueryData([ - 'incomingRecordCount', - { - searchParams, - filters, - projection, - }, - ]), - } - ); + + initialData: () => + queryClient.getQueryData([ + 'incomingRecordCount', + { + searchParams, + filters, + projection, + }, + ]), + }); }; export const useIncomingRecordCount = ( @@ -620,16 +574,8 @@ export const useIncomingRecordCount = ( finalisedSearchParams = storeSearchParams; } - return useQuery< - number, - AxiosError, - number, - [ - string, - { searchParams: SearchParams; filters: string[]; projection: string[] }, - ] - >( - [ + return useQuery({ + queryKey: [ 'incomingRecordCount', { searchParams: finalisedSearchParams, @@ -637,14 +583,15 @@ export const useIncomingRecordCount = ( projection: [timeChannelName], }, ], - (params) => { - const { searchParams, filters, projection } = params.queryKey[1]; + + queryFn: (params) => { + const { searchParams, filters, projection } = params.queryKey[1] as { + searchParams: SearchParams; + filters: string[]; + projection: string[]; + }; + return fetchRecordCountQuery(apiUrl, searchParams, filters, projection); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; diff --git a/src/api/sessions.test.tsx b/src/api/sessions.test.tsx index 7192ea13d..749116693 100644 --- a/src/api/sessions.test.tsx +++ b/src/api/sessions.test.tsx @@ -125,7 +125,7 @@ describe('session api functions', () => { }); expect(result.current.data).toEqual(undefined); - expect(result.current.isLoading).toBe(true); + expect(result.current.isPending).toBe(true); expect(result.current.fetchStatus).toBe('idle'); }); diff --git a/src/api/sessions.tsx b/src/api/sessions.tsx index 980a82d5f..e74b4267f 100644 --- a/src/api/sessions.tsx +++ b/src/api/sessions.tsx @@ -34,7 +34,8 @@ export const useSaveSession = (): UseMutationResult< > => { const { apiUrl } = useAppSelector(selectUrls); const queryClient = useQueryClient(); - return useMutation((session: Session) => saveSession(apiUrl, session), { + return useMutation({ + mutationFn: (session: Session) => saveSession(apiUrl, session), onError: (error) => { console.log('Got error ' + error.message); }, @@ -71,18 +72,16 @@ export const useEditSession = (): UseMutationResult< > => { const { apiUrl } = useAppSelector(selectUrls); const queryClient = useQueryClient(); - return useMutation( - (session: SessionResponse) => editSession(apiUrl, session), - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['sessionList'] }); - queryClient.invalidateQueries({ queryKey: ['session'] }); - }, - } - ); + return useMutation({ + mutationFn: (session: SessionResponse) => editSession(apiUrl, session), + onError: (error) => { + console.log('Got error ' + error.message); + }, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['sessionList'] }); + queryClient.invalidateQueries({ queryKey: ['session'] }); + }, + }); }; const deleteSession = ( @@ -105,17 +104,15 @@ export const useDeleteSession = (): UseMutationResult< > => { const { apiUrl } = useAppSelector(selectUrls); const queryClient = useQueryClient(); - return useMutation( - (session: SessionResponse) => deleteSession(apiUrl, session), - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - onSuccess: () => { - queryClient.invalidateQueries({ queryKey: ['sessionList'] }); - }, - } - ); + return useMutation({ + mutationFn: (session: SessionResponse) => deleteSession(apiUrl, session), + onError: (error) => { + console.log('Got error ' + error.message); + }, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['sessionList'] }); + }, + }); }; const fetchSessionList = (apiUrl: string): Promise => { @@ -136,17 +133,13 @@ export const useSessionList = (): UseQueryResult< > => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['sessionList'], - (params) => { + return useQuery({ + queryKey: ['sessionList'], + + queryFn: (params) => { return fetchSessionList(apiUrl); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; const fetchSession = ( @@ -169,16 +162,13 @@ export const useSession = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['session', session_id], - (params) => { + return useQuery({ + queryKey: ['session', session_id], + + queryFn: (params) => { return fetchSession(apiUrl, session_id); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - enabled: typeof session_id !== 'undefined', - } - ); + + enabled: typeof session_id !== 'undefined', + }); }; diff --git a/src/api/userPreferences.tsx b/src/api/userPreferences.tsx index f70a363c6..dfacd80d4 100644 --- a/src/api/userPreferences.tsx +++ b/src/api/userPreferences.tsx @@ -40,17 +40,13 @@ export const useUserPreference = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['userPreference', name], - (params) => { + return useQuery({ + queryKey: ['userPreference', name], + + queryFn: (params) => { return fetchUserPreference(apiUrl, name); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; export const updateUserPreference = async ( @@ -94,21 +90,19 @@ export const useUpdateUserPreference = ( const queryClient = useQueryClient(); const { apiUrl } = useAppSelector(selectUrls); - return useMutation( - ({ value }: { value: T }) => { + return useMutation({ + mutationFn: ({ value }: { value: T }) => { if (value !== null) { return updateUserPreference(apiUrl, name, value); } else { return deleteUserPreference(apiUrl, name); } }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - onSuccess: (data, vars) => { - queryClient.setQueryData(['userPreference', name], vars.value); - }, - } - ); + onError: (error) => { + console.log('Got error ' + error.message); + }, + onSuccess: (data, vars) => { + queryClient.setQueryData(['userPreference', name], vars.value); + }, + }); }; diff --git a/src/api/waveforms.tsx b/src/api/waveforms.tsx index 478a10249..5e3598455 100644 --- a/src/api/waveforms.tsx +++ b/src/api/waveforms.tsx @@ -27,15 +27,11 @@ export const useWaveform = ( ): UseQueryResult => { const { apiUrl } = useAppSelector(selectUrls); - return useQuery( - ['waveforms', recordId, channelName], - (params) => { + return useQuery({ + queryKey: ['waveforms', recordId, channelName], + + queryFn: (params) => { return fetchWaveform(apiUrl, recordId, channelName); }, - { - onError: (error) => { - console.log('Got error ' + error.message); - }, - } - ); + }); }; diff --git a/src/filtering/filterDialogue.component.test.tsx b/src/filtering/filterDialogue.component.test.tsx index d8711d977..416969b0d 100644 --- a/src/filtering/filterDialogue.component.test.tsx +++ b/src/filtering/filterDialogue.component.test.tsx @@ -276,6 +276,11 @@ describe('Filter dialogue component', () => { // Tooltip warning should be present await user.hover(screen.getByText('Apply')); + + // for some strange reason, the tooltip is not being found on the first hover + // re-trying the hover makes the test pass + await user.hover(screen.getByText('Apply')); + expect(await screen.findByRole('tooltip')).toBeInTheDocument(); // // Store should not be updated, indicating search is yet to initiate @@ -336,6 +341,11 @@ describe('Filter dialogue component', () => { // Tooltip warning should be present await user.hover(screen.getByText('Apply')); + + // for some strange reason, the tooltip is not being found on the first hover + // re-trying the hover makes the test pass + await user.hover(screen.getByText('Apply')); + expect(await screen.findByRole('tooltip')).toBeInTheDocument(); }); diff --git a/src/search/searchBar.component.test.tsx b/src/search/searchBar.component.test.tsx index 879c3ea90..574ef87df 100644 --- a/src/search/searchBar.component.test.tsx +++ b/src/search/searchBar.component.test.tsx @@ -453,6 +453,11 @@ describe('searchBar component', () => { // Tooltip warning should be present await user.hover(screen.getByRole('button', { name: 'Search' })); + + // for some strange reason, the tooltip is not being found on the first hover + // re-trying the hover makes the test pass + await user.hover(screen.getByRole('button', { name: 'Search' })); + expect(await screen.findByRole('tooltip')).toBeInTheDocument(); // Store should not be updated, indicating search is yet to initiate @@ -537,6 +542,7 @@ describe('searchBar component', () => { // Tooltip warning should not be present await user.hover(screen.getByRole('button', { name: 'Search' })); + expect(screen.queryByRole('tooltip')).not.toBeInTheDocument(); // Mock the returned count query response @@ -553,6 +559,11 @@ describe('searchBar component', () => { // Tooltip warning should be present await user.hover(screen.getByRole('button', { name: 'Search' })); + + // for some strange reason, the tooltip is not being found on the first hover + // re-trying the hover makes the test pass + await user.hover(screen.getByRole('button', { name: 'Search' })); + expect(await screen.findByRole('tooltip')).toBeInTheDocument(); }); diff --git a/src/views/recordTable.component.test.tsx b/src/views/recordTable.component.test.tsx index 440a632a6..ab0d0c21e 100644 --- a/src/views/recordTable.component.test.tsx +++ b/src/views/recordTable.component.test.tsx @@ -123,7 +123,7 @@ describe('Record Table', () => { expect(screen.queryByTestId('sort shotnum')).not.toBeInTheDocument(); }); - act(() => { + await act(async () => { store.dispatch(selectColumn('shotnum')); }); diff --git a/yarn.lock b/yarn.lock index 9cb9bc502..6f0c0dae9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3320,53 +3320,40 @@ __metadata: languageName: node linkType: hard -"@tanstack/match-sorter-utils@npm:^8.7.0": - version: 8.11.3 - resolution: "@tanstack/match-sorter-utils@npm:8.11.3" - dependencies: - remove-accents: "npm:0.4.2" - checksum: 9bd1b5ee09a0a4993ce6194702d7a15177774a1ae6d9dc9486c6ffbcdcbbf75431126568b305c497f257709c0d2f924ee8d5b75c5de029f98a2aac59794a5c9b +"@tanstack/query-core@npm:5.18.1": + version: 5.18.1 + resolution: "@tanstack/query-core@npm:5.18.1" + checksum: e832388e2033d6ae16eb9b9343e3d7a6f304f74ec74b16e4154417d2771aa9aa3f2659046223731d4eacb4e1ee125d98de330dd4208d9369fe0a81f5436c4847 languageName: node linkType: hard -"@tanstack/query-core@npm:4.29.5": - version: 4.29.5 - resolution: "@tanstack/query-core@npm:4.29.5" - checksum: f9f28009c96d56cd04abbfa9d661945b5496033fbd28fca2b9fc53fa1717f3b0fbd255b878486ef163b2866bb7f32c65caad5d066a6c739adbd492ab65a05a46 +"@tanstack/query-devtools@npm:5.18.1": + version: 5.18.1 + resolution: "@tanstack/query-devtools@npm:5.18.1" + checksum: 7514ad0eb5516bed6b96e42590639e529a4585181205001dfc5c3fc096bfc48a583d8570c756539eca742b3c6946ee06439b4791c31102496878f0efe908fa6b languageName: node linkType: hard -"@tanstack/react-query-devtools@npm:4.29.6": - version: 4.29.6 - resolution: "@tanstack/react-query-devtools@npm:4.29.6" +"@tanstack/react-query-devtools@npm:5.18.1": + version: 5.18.1 + resolution: "@tanstack/react-query-devtools@npm:5.18.1" dependencies: - "@tanstack/match-sorter-utils": "npm:^8.7.0" - superjson: "npm:^1.10.0" - use-sync-external-store: "npm:^1.2.0" + "@tanstack/query-devtools": "npm:5.18.1" peerDependencies: - "@tanstack/react-query": 4.29.5 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 87257413807eb63a157af03fe3994bb5bec40e5c22aa3d3b60d4407116117b4e973293d61edd2a929c17821ac717cab08057aab01678fca867df7dd76fa764a0 + "@tanstack/react-query": ^5.18.1 + react: ^18.0.0 + checksum: 2941c7d0dd149bb88b5bf7d404920e81376ab705bc555e048311ec1cc2d67c655e3e28b1b091122909435e7e12ea222bc4b060abdd1f776a5f34f611feeeb7f9 languageName: node linkType: hard -"@tanstack/react-query@npm:4.29.5": - version: 4.29.5 - resolution: "@tanstack/react-query@npm:4.29.5" +"@tanstack/react-query@npm:5.18.1": + version: 5.18.1 + resolution: "@tanstack/react-query@npm:5.18.1" dependencies: - "@tanstack/query-core": "npm:4.29.5" - use-sync-external-store: "npm:^1.2.0" + "@tanstack/query-core": "npm:5.18.1" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-native: "*" - peerDependenciesMeta: - react-dom: - optional: true - react-native: - optional: true - checksum: ab256896f09dfefdf80ea3a34edd9d7492e9b2057abaa69a6acfb0eb4cb652507931d01a32c70e509024ee086748812b98fc16e5f1aa3ed357cf151954885672 + react: ^18.0.0 + checksum: 6129af25c91768fc208fd4d52940b682988bcb90f1dd65baf241f474cd8a89b948a37736e57afb50ecfd5fa5a204870e02c9078b2d5fa3c44b7e94790d6085e5 languageName: node linkType: hard @@ -6281,15 +6268,6 @@ __metadata: languageName: node linkType: hard -"copy-anything@npm:^3.0.2": - version: 3.0.5 - resolution: "copy-anything@npm:3.0.5" - dependencies: - is-what: "npm:^4.1.8" - checksum: 4c41385a94a1cff6352a954f9b1c05b6bb1b70713a2d31f4c7b188ae7187ce00ddcc9c09bd58d24cd35b67fc6dd84df5954c0be86ea10700ff74e677db3cb09c - languageName: node - linkType: hard - "core-js-compat@npm:^3.31.0, core-js-compat@npm:^3.33.1": version: 3.35.0 resolution: "core-js-compat@npm:3.35.0" @@ -10026,13 +10004,6 @@ __metadata: languageName: node linkType: hard -"is-what@npm:^4.1.8": - version: 4.1.16 - resolution: "is-what@npm:4.1.16" - checksum: f6400634bae77be6903365dc53817292e1c4d8db1b467515d0c842505b8388ee8e558326d5e6952cb2a9d74116eca2af0c6adb8aa7e9d5c845a130ce9328bf13 - languageName: node - linkType: hard - "is-wsl@npm:^2.2.0": version: 2.2.0 resolution: "is-wsl@npm:2.2.0" @@ -12282,8 +12253,8 @@ __metadata: "@mui/x-date-pickers": "npm:^6.19.0" "@playwright/test": "npm:1.41.0" "@reduxjs/toolkit": "npm:2.1.0" - "@tanstack/react-query": "npm:4.29.5" - "@tanstack/react-query-devtools": "npm:4.29.6" + "@tanstack/react-query": "npm:5.18.1" + "@tanstack/react-query-devtools": "npm:5.18.1" "@tanstack/react-table": "npm:8.11.6" "@tanstack/react-virtual": "npm:beta" "@testing-library/cypress": "npm:10.0.1" @@ -14435,13 +14406,6 @@ __metadata: languageName: node linkType: hard -"remove-accents@npm:0.4.2": - version: 0.4.2 - resolution: "remove-accents@npm:0.4.2" - checksum: 25d5c84f1355be60b42f8ad8a1ba29c2413dead138a9e2a88633e4fc94a1b953afe306dd27479125aef231d267482c54d292e558b04ec100fb9adf063ccbf75a - languageName: node - linkType: hard - "renderkid@npm:^3.0.0": version: 3.0.0 resolution: "renderkid@npm:3.0.0" @@ -15730,15 +15694,6 @@ __metadata: languageName: node linkType: hard -"superjson@npm:^1.10.0": - version: 1.13.3 - resolution: "superjson@npm:1.13.3" - dependencies: - copy-anything: "npm:^3.0.2" - checksum: 71a186c513a9821e58264c0563cd1b3cf07d3b5ba53a09cc5c1a604d8ffeacac976a6ba1b5d5b3c71b6ab5a1941dfba5a15e3f106ad3ef22fe8d5eee3e2be052 - languageName: node - linkType: hard - "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -16567,7 +16522,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.2.0": +"use-sync-external-store@npm:^1.0.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: