diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 65bb3754c..2f0528a22 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { pushStateLocationPlugin, UIRouter } from '@uirouter/react'; import { initialize as initMSW, mswLoader } from 'msw-storybook-addon'; import { handlers } from '../app/setup-tests/server-handlers'; -import { QueryClient, QueryClientProvider } from 'react-query'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; initMSW( { diff --git a/app/portainer/tags/queries.ts b/app/portainer/tags/queries.ts index b71411e91..fe4bac346 100644 --- a/app/portainer/tags/queries.ts +++ b/app/portainer/tags/queries.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery, useQueryClient } from 'react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { mutationOptions, diff --git a/app/portainer/users/queries.ts b/app/portainer/users/queries.ts index ab7c0d246..96fd5f5eb 100644 --- a/app/portainer/users/queries.ts +++ b/app/portainer/users/queries.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { TeamRole, TeamMembership } from '@/react/portainer/users/teams/types'; import { useCurrentUser, useIsEdgeAdmin } from '@/react/hooks/useUser'; diff --git a/app/portainer/users/queries/useLoadCurrentUser.ts b/app/portainer/users/queries/useLoadCurrentUser.ts index e3cce9d3d..bd47fbee9 100644 --- a/app/portainer/users/queries/useLoadCurrentUser.ts +++ b/app/portainer/users/queries/useLoadCurrentUser.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/portainer/users/queries/useUser.ts b/app/portainer/users/queries/useUser.ts index c43a7310e..01e069829 100644 --- a/app/portainer/users/queries/useUser.ts +++ b/app/portainer/users/queries/useUser.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react-tools/react-query.ts b/app/react-tools/react-query.ts index 1e9ae125b..795557751 100644 --- a/app/react-tools/react-query.ts +++ b/app/react-tools/react-query.ts @@ -5,7 +5,7 @@ import { QueryClient, QueryKey, QueryOptions, -} from 'react-query'; +} from '@tanstack/react-query'; import { notifyError } from '@/portainer/services/notifications'; diff --git a/app/react-tools/withControlledInput.tsx b/app/react-tools/withControlledInput.tsx index f42a19f6b..33b821ee5 100644 --- a/app/react-tools/withControlledInput.tsx +++ b/app/react-tools/withControlledInput.tsx @@ -99,7 +99,11 @@ export function withControlledInput( (value: T[keyof T]) => { // update the state with the value coming from WrappedComponent setControlledValues( - (c) => ({ ...c, [valueKey]: value }) as KeyRecord + (c) => + ({ + ...c, + [valueKey]: value, + }) as KeyRecord ); // call the bound handler func to update the value outside of React diff --git a/app/react-tools/withReactQuery.tsx b/app/react-tools/withReactQuery.tsx index b73091ff7..e574a5fd1 100644 --- a/app/react-tools/withReactQuery.tsx +++ b/app/react-tools/withReactQuery.tsx @@ -1,5 +1,5 @@ import { ComponentType } from 'react'; -import { QueryClientProvider } from 'react-query'; +import { QueryClientProvider } from '@tanstack/react-query'; import { queryClient as defaultQueryClient } from './react-query'; diff --git a/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx b/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx index 9796321e7..74c78f41d 100644 --- a/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx +++ b/app/react/azure/container-instances/CreateView/useCreateInstanceMutation.tsx @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { createContainerGroup } from '@/react/azure/services/container-groups.service'; import { queryKeys } from '@/react/azure/queries/query-keys'; diff --git a/app/react/azure/container-instances/ItemView/ItemView.tsx b/app/react/azure/container-instances/ItemView/ItemView.tsx index a64883ca6..6e5d02139 100644 --- a/app/react/azure/container-instances/ItemView/ItemView.tsx +++ b/app/react/azure/container-instances/ItemView/ItemView.tsx @@ -1,5 +1,5 @@ import { useCurrentStateAndParams } from '@uirouter/react'; -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import { AccessControlPanel } from '@/react/portainer/access-control/AccessControlPanel/AccessControlPanel'; diff --git a/app/react/azure/container-instances/ListView/ListView.tsx b/app/react/azure/container-instances/ListView/ListView.tsx index 27210f281..78ac058f4 100644 --- a/app/react/azure/container-instances/ListView/ListView.tsx +++ b/app/react/azure/container-instances/ListView/ListView.tsx @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { deleteContainerGroup } from '@/react/azure/services/container-groups.service'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; diff --git a/app/react/azure/queries/useContainerGroup.ts b/app/react/azure/queries/useContainerGroup.ts index 8baedb37e..7b82fa6e0 100644 --- a/app/react/azure/queries/useContainerGroup.ts +++ b/app/react/azure/queries/useContainerGroup.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/azure/queries/useContainerGroups.ts b/app/react/azure/queries/useContainerGroups.ts index 80a02806d..2c5ed4c00 100644 --- a/app/react/azure/queries/useContainerGroups.ts +++ b/app/react/azure/queries/useContainerGroups.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { useMemo } from 'react'; -import { useQueries } from 'react-query'; +import { useQueries } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; @@ -16,8 +16,8 @@ export function useContainerGroups( subscriptions: Subscription[] = [], enabled?: boolean ) { - const queries = useQueries( - useMemo( + const queries = useQueries({ + queries: useMemo( () => subscriptions.map((subscription) => ({ queryKey: queryKeys.containerGroups( @@ -30,8 +30,8 @@ export function useContainerGroups( enabled, })), [subscriptions, enabled, environmentId] - ) - ); + ), + }); return useMemo( () => ({ diff --git a/app/react/azure/queries/useProvider.ts b/app/react/azure/queries/useProvider.ts index 497a2910d..27d34966b 100644 --- a/app/react/azure/queries/useProvider.ts +++ b/app/react/azure/queries/useProvider.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { useQueries } from 'react-query'; +import { useQueries } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; @@ -14,9 +14,10 @@ export function useProvider( environmentId: EnvironmentId, subscriptions: Subscription[] = [] ) { - const queries = useQueries( - subscriptions.map((subscription) => ({ + const queries = useQueries({ + queries: subscriptions.map((subscription) => ({ queryKey: queryKeys.provider(environmentId, subscription.subscriptionId), + queryFn: async () => { const provider = await getContainerInstanceProvider( environmentId, @@ -24,9 +25,10 @@ export function useProvider( ); return [subscription.subscriptionId, provider] as const; }, + ...withError('Unable to retrieve Azure providers'), - })) - ); + })), + }); return { providers: Object.fromEntries( diff --git a/app/react/azure/queries/useResourceGroup.ts b/app/react/azure/queries/useResourceGroup.ts index 0a7e0eba9..80c9c2ec7 100644 --- a/app/react/azure/queries/useResourceGroup.ts +++ b/app/react/azure/queries/useResourceGroup.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/azure/queries/useResourceGroups.ts b/app/react/azure/queries/useResourceGroups.ts index 33832e628..b37ddb202 100644 --- a/app/react/azure/queries/useResourceGroups.ts +++ b/app/react/azure/queries/useResourceGroups.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { useQueries } from 'react-query'; +import { useQueries } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; @@ -15,12 +15,13 @@ export function useResourceGroups( environmentId: EnvironmentId, subscriptions: Subscription[] = [] ) { - const queries = useQueries( - subscriptions.map((subscription) => ({ + const queries = useQueries({ + queries: subscriptions.map((subscription) => ({ queryKey: queryKeys.resourceGroups( environmentId, subscription.subscriptionId ), + queryFn: async () => { const groups = await getResourceGroups( environmentId, @@ -28,9 +29,10 @@ export function useResourceGroups( ); return [subscription.subscriptionId, groups] as const; }, + ...withError('Unable to retrieve Azure resource groups'), - })) - ); + })), + }); return { resourceGroups: Object.fromEntries( diff --git a/app/react/azure/queries/useSubscription.ts b/app/react/azure/queries/useSubscription.ts index 5cfe9cb0c..7b8d7571e 100644 --- a/app/react/azure/queries/useSubscription.ts +++ b/app/react/azure/queries/useSubscription.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/azure/queries/useSubscriptions.ts b/app/react/azure/queries/useSubscriptions.ts index 323fe27be..e0124c09d 100644 --- a/app/react/azure/queries/useSubscriptions.ts +++ b/app/react/azure/queries/useSubscriptions.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/common/stacks/ItemView/StackContainersDatatable.tsx b/app/react/common/stacks/ItemView/StackContainersDatatable.tsx index 39c4e7d18..8c12f92c5 100644 --- a/app/react/common/stacks/ItemView/StackContainersDatatable.tsx +++ b/app/react/common/stacks/ItemView/StackContainersDatatable.tsx @@ -86,7 +86,7 @@ export function StackContainersDatatable({ environment, stackName }: Props) { )} dataset={containersQuery.data || []} - isLoading={containersQuery.isLoading} + isLoading={!containersQuery.data} emptyContentLabel="No containers found" /> diff --git a/app/react/common/stacks/queries/useCreateStack/useCreateStack.ts b/app/react/common/stacks/queries/useCreateStack/useCreateStack.ts index 7d774f9cd..b06c79966 100644 --- a/app/react/common/stacks/queries/useCreateStack/useCreateStack.ts +++ b/app/react/common/stacks/queries/useCreateStack/useCreateStack.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { Pair } from '@/react/portainer/settings/types'; diff --git a/app/react/common/stacks/queries/useStacks.ts b/app/react/common/stacks/queries/useStacks.ts index a347ca49d..b72791ead 100644 --- a/app/react/common/stacks/queries/useStacks.ts +++ b/app/react/common/stacks/queries/useStacks.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/common/stacks/stack.service.ts b/app/react/common/stacks/stack.service.ts index 8321e8e28..89eb31b5c 100644 --- a/app/react/common/stacks/stack.service.ts +++ b/app/react/common/stacks/stack.service.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/components/HubspotForm.tsx b/app/react/components/HubspotForm.tsx index be2efd8be..74ac8dea6 100644 --- a/app/react/components/HubspotForm.tsx +++ b/app/react/components/HubspotForm.tsx @@ -1,5 +1,5 @@ import { ReactNode, useRef } from 'react'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; let globalId = 0; diff --git a/app/react/components/ImageConfigFieldset/RateLimits.tsx b/app/react/components/ImageConfigFieldset/RateLimits.tsx index e7d42bbef..6bd88fb43 100644 --- a/app/react/components/ImageConfigFieldset/RateLimits.tsx +++ b/app/react/components/ImageConfigFieldset/RateLimits.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { useEffect } from 'react'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/components/ReactQueryDevtoolsWrapper.tsx b/app/react/components/ReactQueryDevtoolsWrapper.tsx index 134f7ca96..386bd216c 100644 --- a/app/react/components/ReactQueryDevtoolsWrapper.tsx +++ b/app/react/components/ReactQueryDevtoolsWrapper.tsx @@ -1,4 +1,4 @@ -import { ReactQueryDevtools } from 'react-query/devtools'; +import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; export function ReactQueryDevtoolsWrapper() { const showReactQueryDevtools = diff --git a/app/react/components/datatables/Datatable.tsx b/app/react/components/datatables/Datatable.tsx index 081023f2e..e572b8892 100644 --- a/app/react/components/datatables/Datatable.tsx +++ b/app/react/components/datatables/Datatable.tsx @@ -110,7 +110,7 @@ export function Datatable({ const allColumns = useMemo( () => _.compact([!disableSelect && createSelectColumn(dataCy), ...columns]), - [disableSelect, columns] + [disableSelect, dataCy, columns] ); const tableInstance = useReactTable( diff --git a/app/react/docker/agent/queries/useAgentNodes.ts b/app/react/docker/agent/queries/useAgentNodes.ts index a6bc0b7d8..4acae6a98 100644 --- a/app/react/docker/agent/queries/useAgentNodes.ts +++ b/app/react/docker/agent/queries/useAgentNodes.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/agent/queries/useApiVersion.ts b/app/react/docker/agent/queries/useApiVersion.ts index 1154d82f7..df2719ee7 100644 --- a/app/react/docker/agent/queries/useApiVersion.ts +++ b/app/react/docker/agent/queries/useApiVersion.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { isAxiosError, diff --git a/app/react/docker/components/ImageStatus/useImageNotification.ts b/app/react/docker/components/ImageStatus/useImageNotification.ts index 0286623cf..b432ddbca 100644 --- a/app/react/docker/components/ImageStatus/useImageNotification.ts +++ b/app/react/docker/components/ImageStatus/useImageNotification.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios from '@/portainer/services/axios'; diff --git a/app/react/docker/containers/CreateView/ResourcesTab/EditResourceForm.tsx b/app/react/docker/containers/CreateView/ResourcesTab/EditResourceForm.tsx index 6591d8903..0892b7441 100644 --- a/app/react/docker/containers/CreateView/ResourcesTab/EditResourceForm.tsx +++ b/app/react/docker/containers/CreateView/ResourcesTab/EditResourceForm.tsx @@ -1,5 +1,5 @@ import { Formik } from 'formik'; -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { useCurrentStateAndParams } from '@uirouter/react'; import { useState } from 'react'; import { FormikHelpers } from 'formik/dist/types'; diff --git a/app/react/docker/containers/CreateView/useCreateMutation.tsx b/app/react/docker/containers/CreateView/useCreateMutation.tsx index 664e9a451..2c7bb167c 100644 --- a/app/react/docker/containers/CreateView/useCreateMutation.tsx +++ b/app/react/docker/containers/CreateView/useCreateMutation.tsx @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { RawAxiosRequestHeaders } from 'axios'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/containers/queries/container.ts b/app/react/docker/containers/queries/container.ts index 8084f673f..5ecb38df2 100644 --- a/app/react/docker/containers/queries/container.ts +++ b/app/react/docker/containers/queries/container.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { ContainerConfig, ContainerState, diff --git a/app/react/docker/containers/queries/containers.ts b/app/react/docker/containers/queries/containers.ts index 1c6c2b6ba..020b7749e 100644 --- a/app/react/docker/containers/queries/containers.ts +++ b/app/react/docker/containers/queries/containers.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { diff --git a/app/react/docker/containers/queries/gpus.tsx b/app/react/docker/containers/queries/gpus.tsx index 8b4a513ab..c342a688b 100644 --- a/app/react/docker/containers/queries/gpus.tsx +++ b/app/react/docker/containers/queries/gpus.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/containers/queries/useContainerInspect.ts b/app/react/docker/containers/queries/useContainerInspect.ts index 6b30efc8e..d8f7a9ffc 100644 --- a/app/react/docker/containers/queries/useContainerInspect.ts +++ b/app/react/docker/containers/queries/useContainerInspect.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/images/queries/useImages.ts b/app/react/docker/images/queries/useImages.ts index fbde8ce1e..a1f01f9bf 100644 --- a/app/react/docker/images/queries/useImages.ts +++ b/app/react/docker/images/queries/useImages.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/networks/ItemView/ItemView.tsx b/app/react/docker/networks/ItemView/ItemView.tsx index a50f34251..b3d47b29c 100644 --- a/app/react/docker/networks/ItemView/ItemView.tsx +++ b/app/react/docker/networks/ItemView/ItemView.tsx @@ -1,5 +1,5 @@ import { useRouter, useCurrentStateAndParams } from '@uirouter/react'; -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import { AccessControlPanel } from '@/react/portainer/access-control/AccessControlPanel/AccessControlPanel'; diff --git a/app/react/docker/networks/ItemView/NetworkDetailsTable.test.tsx b/app/react/docker/networks/ItemView/NetworkDetailsTable.test.tsx index a2d778a65..494fbb503 100644 --- a/app/react/docker/networks/ItemView/NetworkDetailsTable.test.tsx +++ b/app/react/docker/networks/ItemView/NetworkDetailsTable.test.tsx @@ -1,5 +1,5 @@ import { HttpResponse, http } from 'msw'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import { UserViewModel } from '@/portainer/models/user'; import { server } from '@/setup-tests/server'; @@ -38,19 +38,17 @@ test('Network details values should be visible', async () => { test(`System networks shouldn't show a delete button`, async () => { const systemNetwork = getNetwork('bridge'); - const { queryByText } = await renderComponent(true, systemNetwork); + await renderComponent(true, systemNetwork); - const deleteButton = queryByText('Delete this network'); - expect(deleteButton).toBeNull(); + expect(screen.queryByText('Delete this network')).toBeNull(); }); test('Non system networks should have a delete button', async () => { const nonSystemNetwork = getNetwork('non system network'); - const { queryByText } = await renderComponent(true, nonSystemNetwork); + await renderComponent(true, nonSystemNetwork); - const button = queryByText('Delete this network'); - expect(button).toBeVisible(); + await expect(screen.findByText('Delete this network')).resolves.toBeVisible(); }); async function renderComponent(isAdmin: boolean, network: DockerNetwork) { diff --git a/app/react/docker/networks/queries.ts b/app/react/docker/networks/queries.ts index e6a25666b..3a08a3f86 100644 --- a/app/react/docker/networks/queries.ts +++ b/app/react/docker/networks/queries.ts @@ -1,4 +1,4 @@ -import { useQuery, useMutation, useQueryClient } from 'react-query'; +import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { diff --git a/app/react/docker/networks/queries/useConnectContainer.ts b/app/react/docker/networks/queries/useConnectContainer.ts index f9733effd..ad68bc90e 100644 --- a/app/react/docker/networks/queries/useConnectContainer.ts +++ b/app/react/docker/networks/queries/useConnectContainer.ts @@ -1,6 +1,6 @@ import { EndpointSettings } from 'docker-types/generated/1.41'; import { RawAxiosRequestHeaders } from 'axios'; -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/networks/queries/useNetworks.ts b/app/react/docker/networks/queries/useNetworks.ts index 64a42d255..b0c3483d4 100644 --- a/app/react/docker/networks/queries/useNetworks.ts +++ b/app/react/docker/networks/queries/useNetworks.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/proxy/queries/images/useImages.ts b/app/react/docker/proxy/queries/images/useImages.ts index 60ddd194e..711d9d562 100644 --- a/app/react/docker/proxy/queries/images/useImages.ts +++ b/app/react/docker/proxy/queries/images/useImages.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { ImageSummary } from 'docker-types/generated/1.41'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/proxy/queries/nodes/useNodes.ts b/app/react/docker/proxy/queries/nodes/useNodes.ts index cc52ffae1..965d52457 100644 --- a/app/react/docker/proxy/queries/nodes/useNodes.ts +++ b/app/react/docker/proxy/queries/nodes/useNodes.ts @@ -1,5 +1,5 @@ import { Node } from 'docker-types/generated/1.41'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/proxy/queries/useInfo.ts b/app/react/docker/proxy/queries/useInfo.ts index b8e1311d1..7b71cdb11 100644 --- a/app/react/docker/proxy/queries/useInfo.ts +++ b/app/react/docker/proxy/queries/useInfo.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { SystemInfo } from 'docker-types/generated/1.41'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/proxy/queries/useServicePlugins.ts b/app/react/docker/proxy/queries/useServicePlugins.ts index 0887de9fb..2b74440c7 100644 --- a/app/react/docker/proxy/queries/useServicePlugins.ts +++ b/app/react/docker/proxy/queries/useServicePlugins.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { Plugin, PluginInterfaceType, diff --git a/app/react/docker/proxy/queries/useSwarm.ts b/app/react/docker/proxy/queries/useSwarm.ts index 9fdeb3f8b..b4efbaf2e 100644 --- a/app/react/docker/proxy/queries/useSwarm.ts +++ b/app/react/docker/proxy/queries/useSwarm.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { Swarm } from 'docker-types/generated/1.41'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/proxy/queries/useVersion.ts b/app/react/docker/proxy/queries/useVersion.ts index bcdbc738e..ded79282c 100644 --- a/app/react/docker/proxy/queries/useVersion.ts +++ b/app/react/docker/proxy/queries/useVersion.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { SystemVersion } from 'docker-types/generated/1.41'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/services/ListView/ServicesDatatable/useForceUpdateServicesMutation.ts b/app/react/docker/services/ListView/ServicesDatatable/useForceUpdateServicesMutation.ts index 73718e418..813bb79d1 100644 --- a/app/react/docker/services/ListView/ServicesDatatable/useForceUpdateServicesMutation.ts +++ b/app/react/docker/services/ListView/ServicesDatatable/useForceUpdateServicesMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/docker/services/ListView/ServicesDatatable/useRemoveServicesMutation.ts b/app/react/docker/services/ListView/ServicesDatatable/useRemoveServicesMutation.ts index c2a6edb98..4c5b80076 100644 --- a/app/react/docker/services/ListView/ServicesDatatable/useRemoveServicesMutation.ts +++ b/app/react/docker/services/ListView/ServicesDatatable/useRemoveServicesMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/docker/services/queries/useUpdateServiceMutation.ts b/app/react/docker/services/queries/useUpdateServiceMutation.ts index da98e8b1f..ffe5af442 100644 --- a/app/react/docker/services/queries/useUpdateServiceMutation.ts +++ b/app/react/docker/services/queries/useUpdateServiceMutation.ts @@ -3,7 +3,7 @@ import { ServiceSpec, ServiceUpdateResponse, } from 'docker-types/generated/1.41'; -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/stacks/ListView/StacksDatatable/columns/StackImageStatus.tsx b/app/react/docker/stacks/ListView/StacksDatatable/columns/StackImageStatus.tsx index e08c5a865..3ef4f86fb 100644 --- a/app/react/docker/stacks/ListView/StacksDatatable/columns/StackImageStatus.tsx +++ b/app/react/docker/stacks/ListView/StacksDatatable/columns/StackImageStatus.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { Loader2 } from 'lucide-react'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/docker/volumes/queries/useVolumes.ts b/app/react/docker/volumes/queries/useVolumes.ts index edc3e1911..35b09410f 100644 --- a/app/react/docker/volumes/queries/useVolumes.ts +++ b/app/react/docker/volumes/queries/useVolumes.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { Volume } from 'docker-types/generated/1.41'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-devices/WaitingRoomView/queries.ts b/app/react/edge/edge-devices/WaitingRoomView/queries.ts index 2705ee4aa..47dd82ee0 100644 --- a/app/react/edge/edge-devices/WaitingRoomView/queries.ts +++ b/app/react/edge/edge-devices/WaitingRoomView/queries.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { EdgeTypes, EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-devices/open-amt/useAMTDevices.tsx b/app/react/edge/edge-devices/open-amt/useAMTDevices.tsx index 0b57379d6..d23e3b375 100644 --- a/app/react/edge/edge-devices/open-amt/useAMTDevices.tsx +++ b/app/react/edge/edge-devices/open-amt/useAMTDevices.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/edge/edge-devices/open-amt/useActivateDevicesMutation.ts b/app/react/edge/edge-devices/open-amt/useActivateDevicesMutation.ts index 79e78a30c..4e9f94d45 100644 --- a/app/react/edge/edge-devices/open-amt/useActivateDevicesMutation.ts +++ b/app/react/edge/edge-devices/open-amt/useActivateDevicesMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import { mutationOptions, withError } from '@/react-tools/react-query'; diff --git a/app/react/edge/edge-devices/open-amt/useExecuteAMTDeviceActionMutation.tsx b/app/react/edge/edge-devices/open-amt/useExecuteAMTDeviceActionMutation.tsx index c1ed8c547..76dd1ef2d 100644 --- a/app/react/edge/edge-devices/open-amt/useExecuteAMTDeviceActionMutation.tsx +++ b/app/react/edge/edge-devices/open-amt/useExecuteAMTDeviceActionMutation.tsx @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/edge/edge-groups/ListView/useDeleteEdgeGroupMutation.ts b/app/react/edge/edge-groups/ListView/useDeleteEdgeGroupMutation.ts index 8cb262a3b..04169b609 100644 --- a/app/react/edge/edge-groups/ListView/useDeleteEdgeGroupMutation.ts +++ b/app/react/edge/edge-groups/ListView/useDeleteEdgeGroupMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-groups/queries/useCreateEdgeGroupMutation.ts b/app/react/edge/edge-groups/queries/useCreateEdgeGroupMutation.ts index 8ec0941dd..0fd0f21d5 100644 --- a/app/react/edge/edge-groups/queries/useCreateEdgeGroupMutation.ts +++ b/app/react/edge/edge-groups/queries/useCreateEdgeGroupMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { TagId } from '@/portainer/tags/types'; diff --git a/app/react/edge/edge-groups/queries/useEdgeGroups.ts b/app/react/edge/edge-groups/queries/useEdgeGroups.ts index 5c6d3952d..8d60dbe96 100644 --- a/app/react/edge/edge-groups/queries/useEdgeGroups.ts +++ b/app/react/edge/edge-groups/queries/useEdgeGroups.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { diff --git a/app/react/edge/edge-jobs/ListView/useDeleteEdgeJobsMutation.ts b/app/react/edge/edge-jobs/ListView/useDeleteEdgeJobsMutation.ts index ee300eda3..96601348b 100644 --- a/app/react/edge/edge-jobs/ListView/useDeleteEdgeJobsMutation.ts +++ b/app/react/edge/edge-jobs/ListView/useDeleteEdgeJobsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-jobs/queries/useEdgeJobs.ts b/app/react/edge/edge-jobs/queries/useEdgeJobs.ts index a9236a250..df6dac04b 100644 --- a/app/react/edge/edge-jobs/queries/useEdgeJobs.ts +++ b/app/react/edge/edge-jobs/queries/useEdgeJobs.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/GitForm/useUpdateEdgeStackGitMutation.ts b/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/GitForm/useUpdateEdgeStackGitMutation.ts index aea5ccf74..5f7431b5c 100644 --- a/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/GitForm/useUpdateEdgeStackGitMutation.ts +++ b/app/react/edge/edge-stacks/ItemView/EditEdgeStackForm/GitForm/useUpdateEdgeStackGitMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { mutationOptions, withError } from '@/react-tools/react-query'; diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useCollectLogsMutation.ts b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useCollectLogsMutation.ts index 0ec28c461..5872e81aa 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useCollectLogsMutation.ts +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useCollectLogsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDeleteLogsMutation.ts b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDeleteLogsMutation.ts index af5191d86..870cf5ff2 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDeleteLogsMutation.ts +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDeleteLogsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDownloadLogsMutation.ts b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDownloadLogsMutation.ts index 56304eef9..b0b2ccce9 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDownloadLogsMutation.ts +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useDownloadLogsMutation.ts @@ -1,5 +1,5 @@ import { saveAs } from 'file-saver'; -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useLogsStatus.ts b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useLogsStatus.ts index 68642e9df..5e8457f87 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useLogsStatus.ts +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/useLogsStatus.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/useDeleteEdgeStacksMutation.ts b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/useDeleteEdgeStacksMutation.ts index 1c07d1c53..089848cc9 100644 --- a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/useDeleteEdgeStacksMutation.ts +++ b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/useDeleteEdgeStacksMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/ListView/ListView.tsx b/app/react/edge/edge-stacks/ListView/ListView.tsx index a57110b49..c82caae1f 100644 --- a/app/react/edge/edge-stacks/ListView/ListView.tsx +++ b/app/react/edge/edge-stacks/ListView/ListView.tsx @@ -1,4 +1,4 @@ -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { PageHeader } from '@@/PageHeader'; diff --git a/app/react/edge/edge-stacks/queries/useCreateEdgeStack/useCreateEdgeStack.ts b/app/react/edge/edge-stacks/queries/useCreateEdgeStack/useCreateEdgeStack.ts index 159797986..fe54e8fb1 100644 --- a/app/react/edge/edge-stacks/queries/useCreateEdgeStack/useCreateEdgeStack.ts +++ b/app/react/edge/edge-stacks/queries/useCreateEdgeStack/useCreateEdgeStack.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { EdgeGroup } from '@/react/edge/edge-groups/types'; import { RegistryId } from '@/react/portainer/registries/types/registry'; diff --git a/app/react/edge/edge-stacks/queries/useEdgeStack.ts b/app/react/edge/edge-stacks/queries/useEdgeStack.ts index 53ef6660c..7df568707 100644 --- a/app/react/edge/edge-stacks/queries/useEdgeStack.ts +++ b/app/react/edge/edge-stacks/queries/useEdgeStack.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/queries/useEdgeStacks.ts b/app/react/edge/edge-stacks/queries/useEdgeStacks.ts index e03da2b15..6ab5a0cf1 100644 --- a/app/react/edge/edge-stacks/queries/useEdgeStacks.ts +++ b/app/react/edge/edge-stacks/queries/useEdgeStacks.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/edge/edge-stacks/queries/useParseRegistries.ts b/app/react/edge/edge-stacks/queries/useParseRegistries.ts index 3d334453d..85a067403 100644 --- a/app/react/edge/edge-stacks/queries/useParseRegistries.ts +++ b/app/react/edge/edge-stacks/queries/useParseRegistries.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import { RegistryId } from '@/react/portainer/registries/types/registry'; diff --git a/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathForm.tsx b/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathForm.tsx index 44ed2aaa7..c427b7bec 100644 --- a/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathForm.tsx +++ b/app/react/kubernetes/applications/CreateView/application-services/ingress/AppIngressPathForm.tsx @@ -1,6 +1,6 @@ import { RefreshCw, Trash2 } from 'lucide-react'; import { useEffect, useMemo, useState } from 'react'; -import { UseQueryResult } from 'react-query'; +import { UseQueryResult } from '@tanstack/react-query'; import { FormikErrors } from 'formik'; import { Ingress } from '@/react/kubernetes/ingresses/types'; diff --git a/app/react/kubernetes/applications/CreateView/application-services/kubeServicesValidation.ts b/app/react/kubernetes/applications/CreateView/application-services/kubeServicesValidation.ts index cb6aab951..c9bf2bf5c 100644 --- a/app/react/kubernetes/applications/CreateView/application-services/kubeServicesValidation.ts +++ b/app/react/kubernetes/applications/CreateView/application-services/kubeServicesValidation.ts @@ -163,8 +163,10 @@ export function kubeServicesValidation( .flatMap((formService) => formService.Ports) .map((formServicePorts) => formServicePorts.nodePort); return ( - !clusterNodePortsWithoutFormServices.includes(nodePort) && // node port is not in the cluster services that aren't in the application form - !formNodePortsWithoutCurrentService.includes(nodePort) // and the node port is not in the current form, excluding the current service + // and the node port is not in the current form, excluding the current service + // node port is not in the cluster services that aren't in the application form + !clusterNodePortsWithoutFormServices.includes(nodePort) && + !formNodePortsWithoutCurrentService.includes(nodePort) ); } ) diff --git a/app/react/kubernetes/applications/DetailsView/useNamespaceEventsQuery.ts b/app/react/kubernetes/applications/DetailsView/useNamespaceEventsQuery.ts index 978fc1d72..56a711b77 100644 --- a/app/react/kubernetes/applications/DetailsView/useNamespaceEventsQuery.ts +++ b/app/react/kubernetes/applications/DetailsView/useNamespaceEventsQuery.ts @@ -1,5 +1,5 @@ import { EventList } from 'kubernetes-types/core/v1'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/applications/application.queries.ts b/app/react/kubernetes/applications/application.queries.ts index 5496f86cf..4ea154000 100644 --- a/app/react/kubernetes/applications/application.queries.ts +++ b/app/react/kubernetes/applications/application.queries.ts @@ -1,4 +1,4 @@ -import { UseQueryResult, useMutation, useQuery } from 'react-query'; +import { UseQueryResult, useMutation, useQuery } from '@tanstack/react-query'; import { Pod } from 'kubernetes-types/core/v1'; import { queryClient, withError } from '@/react-tools/react-query'; @@ -18,103 +18,105 @@ import { getNamespaceHorizontalPodAutoscalers } from './autoscaling.service'; import { applicationIsKind, matchLabelsToLabelSelectorValue } from './utils'; const queryKeys = { - applicationsForCluster: (environmentId: EnvironmentId) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - ], + applicationsForCluster: (environmentId: EnvironmentId) => + ['environments', environmentId, 'kubernetes', 'applications'] as const, application: ( environmentId: EnvironmentId, namespace: string, name: string, yaml?: boolean - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - yaml, - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + yaml, + ] as const, applicationRevisions: ( environmentId: EnvironmentId, namespace: string, name: string, labelSelector?: string - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - 'revisions', - labelSelector, - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + 'revisions', + labelSelector, + ] as const, applicationServices: ( environmentId: EnvironmentId, namespace: string, name: string - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - 'services', - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + 'services', + ] as const, ingressesForApplication: ( environmentId: EnvironmentId, namespace: string, name: string - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - 'ingresses', - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + 'ingresses', + ] as const, applicationHorizontalPodAutoscalers: ( environmentId: EnvironmentId, namespace: string, name: string - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - 'horizontalpodautoscalers', - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + 'horizontalpodautoscalers', + ] as const, applicationPods: ( environmentId: EnvironmentId, namespace: string, name: string - ) => [ - 'environments', - environmentId, - 'kubernetes', - 'applications', - namespace, - name, - 'pods', - ], + ) => + [ + 'environments', + environmentId, + 'kubernetes', + 'applications', + namespace, + name, + 'pods', + ] as const, }; // useQuery to get a list of all applications from an array of namespaces export function useApplicationsQuery( - environemtId: EnvironmentId, + environmentId: EnvironmentId, namespaces?: string[] ) { return useQuery( - queryKeys.applicationsForCluster(environemtId), - () => getApplicationsForCluster(environemtId, namespaces), + queryKeys.applicationsForCluster(environmentId), + () => getApplicationsForCluster(environmentId, namespaces), { ...withError('Unable to retrieve applications'), enabled: !!namespaces?.length, diff --git a/app/react/kubernetes/applications/autoscaling.service.ts b/app/react/kubernetes/applications/autoscaling.service.ts index 7733ffab2..37aed7d56 100644 --- a/app/react/kubernetes/applications/autoscaling.service.ts +++ b/app/react/kubernetes/applications/autoscaling.service.ts @@ -2,7 +2,7 @@ import { HorizontalPodAutoscaler, HorizontalPodAutoscalerList, } from 'kubernetes-types/autoscaling/v1'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/handleSubmitConfigureCluster.ts b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/handleSubmitConfigureCluster.ts index 1c608da70..84abaf73b 100644 --- a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/handleSubmitConfigureCluster.ts +++ b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/handleSubmitConfigureCluster.ts @@ -1,7 +1,7 @@ import { FormikHelpers } from 'formik'; import { StorageClass } from 'kubernetes-types/storage/v1'; import { compare } from 'fast-json-patch'; -import { UseMutationResult } from 'react-query'; +import { UseMutationResult } from '@tanstack/react-query'; import { notifyError, notifySuccess } from '@/portainer/services/notifications'; import { UpdateEnvironmentPayload } from '@/react/portainer/environments/queries/useUpdateEnvironmentMutation'; diff --git a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useConfigureClusterMutation.ts b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useConfigureClusterMutation.ts index deb0cbfdc..7a77326b7 100644 --- a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useConfigureClusterMutation.ts +++ b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useConfigureClusterMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Operation } from 'fast-json-patch'; import _ from 'lodash'; diff --git a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useStorageClasses.ts b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useStorageClasses.ts index 8d8c6b935..87bce55cc 100644 --- a/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useStorageClasses.ts +++ b/app/react/kubernetes/cluster/ConfigureView/ConfigureForm/useStorageClasses.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { StorageClass, StorageClassList } from 'kubernetes-types/storage/v1'; import axios from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/cluster/HomeView/nodes.service.ts b/app/react/kubernetes/cluster/HomeView/nodes.service.ts index 45582612f..fdbd670c4 100644 --- a/app/react/kubernetes/cluster/HomeView/nodes.service.ts +++ b/app/react/kubernetes/cluster/HomeView/nodes.service.ts @@ -1,5 +1,5 @@ import { NodeList, Node } from 'kubernetes-types/core/v1'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/kubernetes/cluster/getIsRBACEnabled.ts b/app/react/kubernetes/cluster/getIsRBACEnabled.ts index c36783a67..e6f9e5963 100644 --- a/app/react/kubernetes/cluster/getIsRBACEnabled.ts +++ b/app/react/kubernetes/cluster/getIsRBACEnabled.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/useIngressControllerClassMap.ts b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/useIngressControllerClassMap.ts index 40a347843..e6d76df34 100644 --- a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/useIngressControllerClassMap.ts +++ b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/useIngressControllerClassMap.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import PortainerError from '@/portainer/error'; diff --git a/app/react/kubernetes/cluster/ingressClass/useIngressControllerClassMap.ts b/app/react/kubernetes/cluster/ingressClass/useIngressControllerClassMap.ts index 145b5c422..4e2f93295 100644 --- a/app/react/kubernetes/cluster/ingressClass/useIngressControllerClassMap.ts +++ b/app/react/kubernetes/cluster/ingressClass/useIngressControllerClassMap.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/cluster/kubernetesEndpoint.service.ts b/app/react/kubernetes/cluster/kubernetesEndpoint.service.ts index 7658443e6..91b311055 100644 --- a/app/react/kubernetes/cluster/kubernetesEndpoint.service.ts +++ b/app/react/kubernetes/cluster/kubernetesEndpoint.service.ts @@ -1,5 +1,5 @@ import { EndpointsList } from 'kubernetes-types/core/v1'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/kubernetes/configs/configmap.service.ts b/app/react/kubernetes/configs/configmap.service.ts index 2f71ed6cc..f40c291c2 100644 --- a/app/react/kubernetes/configs/configmap.service.ts +++ b/app/react/kubernetes/configs/configmap.service.ts @@ -1,5 +1,5 @@ import { ConfigMap, ConfigMapList } from 'kubernetes-types/core/v1'; -import { useMutation, useQuery } from 'react-query'; +import { useMutation, useQuery } from '@tanstack/react-query'; import { queryClient, withError } from '@/react-tools/react-query'; import axios from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/configs/secret.service.ts b/app/react/kubernetes/configs/secret.service.ts index efd3188e7..232714a8e 100644 --- a/app/react/kubernetes/configs/secret.service.ts +++ b/app/react/kubernetes/configs/secret.service.ts @@ -1,5 +1,5 @@ import { Secret, SecretList } from 'kubernetes-types/core/v1'; -import { useMutation, useQuery } from 'react-query'; +import { useMutation, useQuery } from '@tanstack/react-query'; import { queryClient, withError } from '@/react-tools/react-query'; import axios from '@/portainer/services/axios'; diff --git a/app/react/kubernetes/dashboard/DashboardView.tsx b/app/react/kubernetes/dashboard/DashboardView.tsx index 5f459af2d..ac5e5b1f7 100644 --- a/app/react/kubernetes/dashboard/DashboardView.tsx +++ b/app/react/kubernetes/dashboard/DashboardView.tsx @@ -1,5 +1,5 @@ import { Box, Database, FileCode, Layers, Lock, Shuffle } from 'lucide-react'; -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import Route from '@/assets/ico/route.svg?c'; diff --git a/app/react/kubernetes/ingresses/queries.ts b/app/react/kubernetes/ingresses/queries.ts index ae3a7fe08..ea112afb4 100644 --- a/app/react/kubernetes/ingresses/queries.ts +++ b/app/react/kubernetes/ingresses/queries.ts @@ -1,4 +1,4 @@ -import { useQuery, useMutation, useQueryClient } from 'react-query'; +import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { diff --git a/app/react/kubernetes/namespaces/CreateView/queries/useCreateNamespaceMutation.ts b/app/react/kubernetes/namespaces/CreateView/queries/useCreateNamespaceMutation.ts index 5dbbbcc91..717d0979a 100644 --- a/app/react/kubernetes/namespaces/CreateView/queries/useCreateNamespaceMutation.ts +++ b/app/react/kubernetes/namespaces/CreateView/queries/useCreateNamespaceMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/kubernetes/namespaces/CreateView/queries/useResourceLimitsQuery.ts b/app/react/kubernetes/namespaces/CreateView/queries/useResourceLimitsQuery.ts index 74bf5e93d..c624d952f 100644 --- a/app/react/kubernetes/namespaces/CreateView/queries/useResourceLimitsQuery.ts +++ b/app/react/kubernetes/namespaces/CreateView/queries/useResourceLimitsQuery.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { notifyError } from '@/portainer/services/notifications'; diff --git a/app/react/kubernetes/namespaces/queries/useNamespaceQuery.ts b/app/react/kubernetes/namespaces/queries/useNamespaceQuery.ts index a0bcebe88..3ee707aab 100644 --- a/app/react/kubernetes/namespaces/queries/useNamespaceQuery.ts +++ b/app/react/kubernetes/namespaces/queries/useNamespaceQuery.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { notifyError } from '@/portainer/services/notifications'; diff --git a/app/react/kubernetes/namespaces/queries/useNamespacesQuery.ts b/app/react/kubernetes/namespaces/queries/useNamespacesQuery.ts index 28554159a..b3937ad28 100644 --- a/app/react/kubernetes/namespaces/queries/useNamespacesQuery.ts +++ b/app/react/kubernetes/namespaces/queries/useNamespacesQuery.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/kubernetes/networks/services/queries.ts b/app/react/kubernetes/networks/services/queries.ts index 9f3bd1436..00b798e9a 100644 --- a/app/react/kubernetes/networks/services/queries.ts +++ b/app/react/kubernetes/networks/services/queries.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { EnvironmentId } from '@/react/portainer/environments/types'; import { error as notifyError } from '@/portainer/services/notifications'; diff --git a/app/react/kubernetes/queries/useGetMetricsMutation.ts b/app/react/kubernetes/queries/useGetMetricsMutation.ts index cc9ce4821..f5bba6337 100644 --- a/app/react/kubernetes/queries/useGetMetricsMutation.ts +++ b/app/react/kubernetes/queries/useGetMetricsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { getMetricsForAllNodes } from '../services/service'; diff --git a/app/react/kubernetes/services/service.ts b/app/react/kubernetes/services/service.ts index 52bdec91d..98db5f0e2 100644 --- a/app/react/kubernetes/services/service.ts +++ b/app/react/kubernetes/services/service.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery, useQueryClient } from 'react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { compact } from 'lodash'; import { ServiceList } from 'kubernetes-types/core/v1'; diff --git a/app/react/kubernetes/volumes/usePVCsQuery.ts b/app/react/kubernetes/volumes/usePVCsQuery.ts index 876b68bda..6e9813b73 100644 --- a/app/react/kubernetes/volumes/usePVCsQuery.ts +++ b/app/react/kubernetes/volumes/usePVCsQuery.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { PersistentVolumeClaimList } from 'kubernetes-types/core/v1'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/portainer/HomeView/BackupFailedPanel.tsx b/app/react/portainer/HomeView/BackupFailedPanel.tsx index 9a8ba2deb..8cfbb0273 100644 --- a/app/react/portainer/HomeView/BackupFailedPanel.tsx +++ b/app/react/portainer/HomeView/BackupFailedPanel.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { error as notifyError } from '@/portainer/services/notifications'; import { getBackupStatus } from '@/portainer/services/api/backup.service'; diff --git a/app/react/portainer/HomeView/MotdPanel.tsx b/app/react/portainer/HomeView/MotdPanel.tsx index 21f837f65..98435fded 100644 --- a/app/react/portainer/HomeView/MotdPanel.tsx +++ b/app/react/portainer/HomeView/MotdPanel.tsx @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import _ from 'lodash'; import { useUIState } from '@/react/hooks/useUIState'; @@ -43,7 +43,7 @@ export function MotdPanel() { } function useMotd() { - const { data } = useQuery('motd', () => getMotd()); + const { data } = useQuery(['motd'], () => getMotd()); return data; } diff --git a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx index c61fb0cd7..5f3ac56c0 100644 --- a/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx +++ b/app/react/portainer/access-control/AccessControlPanel/AccessControlPanelForm.tsx @@ -1,6 +1,6 @@ import { Form, Formik } from 'formik'; import clsx from 'clsx'; -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { object } from 'yup'; import { useCurrentUser, useIsEdgeAdmin } from '@/react/hooks/useUser'; diff --git a/app/react/portainer/access-control/EditDetails/useLoadState.ts b/app/react/portainer/access-control/EditDetails/useLoadState.ts index af08e13a0..c0b0dcc7d 100644 --- a/app/react/portainer/access-control/EditDetails/useLoadState.ts +++ b/app/react/portainer/access-control/EditDetails/useLoadState.ts @@ -13,6 +13,9 @@ export function useLoadState(environmentId: EnvironmentId) { teams: teams.data, users: users.data, isAdmin: isAdminQuery.isAdmin, - isLoading: teams.isLoading || users.isLoading || isAdminQuery.isLoading, + isLoading: + teams.isInitialLoading || + users.isInitialLoading || + isAdminQuery.isLoading, }; } diff --git a/app/react/portainer/account/AccountView/AccessTokensDatatable/useDeleteAccessTokensMutation.ts b/app/react/portainer/account/AccountView/AccessTokensDatatable/useDeleteAccessTokensMutation.ts index d605de89f..eb082864b 100644 --- a/app/react/portainer/account/AccountView/AccessTokensDatatable/useDeleteAccessTokensMutation.ts +++ b/app/react/portainer/account/AccountView/AccessTokensDatatable/useDeleteAccessTokensMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { withError, withInvalidate } from '@/react-tools/react-query'; import { useCurrentUser } from '@/react/hooks/useUser'; diff --git a/app/react/portainer/account/AccountView/HelmRepositoryDatatable/helm-repositories.service.ts b/app/react/portainer/account/AccountView/HelmRepositoryDatatable/helm-repositories.service.ts index cf7503974..c12ed9ffa 100644 --- a/app/react/portainer/account/AccountView/HelmRepositoryDatatable/helm-repositories.service.ts +++ b/app/react/portainer/account/AccountView/HelmRepositoryDatatable/helm-repositories.service.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery, useQueryClient } from 'react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { success as notifySuccess } from '@/portainer/services/notifications'; @@ -82,7 +82,7 @@ export function useDeleteHelmRepositoriesMutation() { } export function useHelmRepositories(userId: number) { - return useQuery('helmrepositories', () => getHelmRepositories(userId), { + return useQuery(['helmrepositories'], () => getHelmRepositories(userId), { staleTime: 20, ...withError('Unable to retrieve Helm repositories'), }); diff --git a/app/react/portainer/account/CreateAccessTokenView/useCreateUserAccessTokenMutation.ts b/app/react/portainer/account/CreateAccessTokenView/useCreateUserAccessTokenMutation.ts index 299b6888f..624394c68 100644 --- a/app/react/portainer/account/CreateAccessTokenView/useCreateUserAccessTokenMutation.ts +++ b/app/react/portainer/account/CreateAccessTokenView/useCreateUserAccessTokenMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/account/access-tokens/queries/useAccessTokens.ts b/app/react/portainer/account/access-tokens/queries/useAccessTokens.ts index 033c4805b..8e25d1492 100644 --- a/app/react/portainer/account/access-tokens/queries/useAccessTokens.ts +++ b/app/react/portainer/account/access-tokens/queries/useAccessTokens.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { useCurrentUser } from '@/react/hooks/useUser'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/account/git-credentials/git-credentials.service.ts b/app/react/portainer/account/git-credentials/git-credentials.service.ts index 8c606a6aa..370ad48ee 100644 --- a/app/react/portainer/account/git-credentials/git-credentials.service.ts +++ b/app/react/portainer/account/git-credentials/git-credentials.service.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery, useQueryClient } from 'react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { success as notifySuccess } from '@/portainer/services/notifications'; @@ -101,7 +101,7 @@ export function useGitCredentials( userId: UserId, { enabled }: { enabled?: boolean } = {} ) { - return useQuery('gitcredentials', () => getGitCredentials(userId), { + return useQuery(['gitcredentials'], () => getGitCredentials(userId), { enabled: isBE && enabled, meta: { error: { diff --git a/app/react/portainer/account/git-credentials/queries/useCreateGitCredentialsMutation.ts b/app/react/portainer/account/git-credentials/queries/useCreateGitCredentialsMutation.ts index 27b40c6ec..af03e190d 100644 --- a/app/react/portainer/account/git-credentials/queries/useCreateGitCredentialsMutation.ts +++ b/app/react/portainer/account/git-credentials/queries/useCreateGitCredentialsMutation.ts @@ -1,4 +1,4 @@ -import { useQueryClient, useMutation } from 'react-query'; +import { useQueryClient, useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { notifyError, notifySuccess } from '@/portainer/services/notifications'; diff --git a/app/react/portainer/account/useUpdateUserMutation.tsx b/app/react/portainer/account/useUpdateUserMutation.tsx index 85a8edf9b..570258926 100644 --- a/app/react/portainer/account/useUpdateUserMutation.tsx +++ b/app/react/portainer/account/useUpdateUserMutation.tsx @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { User } from '@/portainer/users/types'; diff --git a/app/react/portainer/environments/EdgeAutoCreateScriptView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx b/app/react/portainer/environments/EdgeAutoCreateScriptView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx index bd09c805d..2671cf6a9 100644 --- a/app/react/portainer/environments/EdgeAutoCreateScriptView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx +++ b/app/react/portainer/environments/EdgeAutoCreateScriptView/AutomaticEdgeEnvCreation/AutomaticEdgeEnvCreation.tsx @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { useEffect, useState } from 'react'; import { Laptop } from 'lucide-react'; diff --git a/app/react/portainer/environments/ListView/useDeleteEnvironmentsMutation.ts b/app/react/portainer/environments/ListView/useDeleteEnvironmentsMutation.ts index 8c6df6c99..5c8a91777 100644 --- a/app/react/portainer/environments/ListView/useDeleteEnvironmentsMutation.ts +++ b/app/react/portainer/environments/ListView/useDeleteEnvironmentsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/environments/environment-groups/ListView/EnvironmentGroupsDatatable/useDeleteEnvironmentGroupsMutation.ts b/app/react/portainer/environments/environment-groups/ListView/EnvironmentGroupsDatatable/useDeleteEnvironmentGroupsMutation.ts index 4542f7c83..154f4fad1 100644 --- a/app/react/portainer/environments/environment-groups/ListView/EnvironmentGroupsDatatable/useDeleteEnvironmentGroupsMutation.ts +++ b/app/react/portainer/environments/environment-groups/ListView/EnvironmentGroupsDatatable/useDeleteEnvironmentGroupsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { withError, withInvalidate } from '@/react-tools/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; diff --git a/app/react/portainer/environments/environment-groups/queries.ts b/app/react/portainer/environments/environment-groups/queries.ts index 3e5c8399a..df5a778b5 100644 --- a/app/react/portainer/environments/environment-groups/queries.ts +++ b/app/react/portainer/environments/environment-groups/queries.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { error as notifyError } from '@/portainer/services/notifications'; diff --git a/app/react/portainer/environments/environment-groups/queries/useCreateGroupMutation.ts b/app/react/portainer/environments/environment-groups/queries/useCreateGroupMutation.ts index 6c160400a..9174a0f72 100644 --- a/app/react/portainer/environments/environment-groups/queries/useCreateGroupMutation.ts +++ b/app/react/portainer/environments/environment-groups/queries/useCreateGroupMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { TagId } from '@/portainer/tags/types'; diff --git a/app/react/portainer/environments/environment-groups/queries/useEnvironmentGroups.ts b/app/react/portainer/environments/environment-groups/queries/useEnvironmentGroups.ts index 4fde407b4..e7d2ea082 100644 --- a/app/react/portainer/environments/environment-groups/queries/useEnvironmentGroups.ts +++ b/app/react/portainer/environments/environment-groups/queries/useEnvironmentGroups.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/environments/queries/useAgentVersionsList.ts b/app/react/portainer/environments/queries/useAgentVersionsList.ts index c4fe926bc..c86d85a13 100644 --- a/app/react/portainer/environments/queries/useAgentVersionsList.ts +++ b/app/react/portainer/environments/queries/useAgentVersionsList.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { getAgentVersions } from '../environment.service'; diff --git a/app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts b/app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts index 0e52264cb..53b251acb 100644 --- a/app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts +++ b/app/react/portainer/environments/queries/useCreateEnvironmentMutation.ts @@ -1,4 +1,8 @@ -import { useQueryClient, useMutation, MutationFunction } from 'react-query'; +import { + useQueryClient, + useMutation, + MutationFunction, +} from '@tanstack/react-query'; import { createRemoteEnvironment, diff --git a/app/react/portainer/environments/queries/useDeleteEnvironmentsMutation.ts b/app/react/portainer/environments/queries/useDeleteEnvironmentsMutation.ts index 9b36b0f6e..57519d062 100644 --- a/app/react/portainer/environments/queries/useDeleteEnvironmentsMutation.ts +++ b/app/react/portainer/environments/queries/useDeleteEnvironmentsMutation.ts @@ -1,4 +1,4 @@ -import { useQueryClient, useMutation } from 'react-query'; +import { useQueryClient, useMutation } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import { diff --git a/app/react/portainer/environments/queries/useEnvironment.ts b/app/react/portainer/environments/queries/useEnvironment.ts index 1cd912a70..7a0b4961c 100644 --- a/app/react/portainer/environments/queries/useEnvironment.ts +++ b/app/react/portainer/environments/queries/useEnvironment.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/environments/queries/useEnvironmentList.ts b/app/react/portainer/environments/queries/useEnvironmentList.ts index ef183ef1b..afc3f5eb6 100644 --- a/app/react/portainer/environments/queries/useEnvironmentList.ts +++ b/app/react/portainer/environments/queries/useEnvironmentList.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/environments/queries/useUpdateEnvironmentMutation.ts b/app/react/portainer/environments/queries/useUpdateEnvironmentMutation.ts index aeb99a832..4b58ccc4a 100644 --- a/app/react/portainer/environments/queries/useUpdateEnvironmentMutation.ts +++ b/app/react/portainer/environments/queries/useUpdateEnvironmentMutation.ts @@ -1,4 +1,4 @@ -import { useQueryClient, useMutation } from 'react-query'; +import { useQueryClient, useMutation } from '@tanstack/react-query'; import { withError, withInvalidate } from '@/react-tools/react-query'; import { diff --git a/app/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation.ts b/app/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation.ts index d080a8500..8af07934e 100644 --- a/app/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation.ts +++ b/app/react/portainer/environments/queries/useUpdateEnvironmentsRelationsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { diff --git a/app/react/portainer/environments/update-schedules/queries/create.ts b/app/react/portainer/environments/update-schedules/queries/create.ts index 97b06fb6a..3edbc9c79 100644 --- a/app/react/portainer/environments/update-schedules/queries/create.ts +++ b/app/react/portainer/environments/update-schedules/queries/create.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError, withInvalidate } from '@/react-tools/react-query'; diff --git a/app/react/portainer/environments/update-schedules/queries/list.ts b/app/react/portainer/environments/update-schedules/queries/list.ts index 7b0f2a2cb..c899825c8 100644 --- a/app/react/portainer/environments/update-schedules/queries/list.ts +++ b/app/react/portainer/environments/update-schedules/queries/list.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts b/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts index 5e781f129..ceb794bea 100644 --- a/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts +++ b/app/react/portainer/environments/update-schedules/queries/useActiveSchedules.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/portainer/environments/update-schedules/queries/useItem.ts b/app/react/portainer/environments/update-schedules/queries/useItem.ts index ae3fb43b9..7ba80c155 100644 --- a/app/react/portainer/environments/update-schedules/queries/useItem.ts +++ b/app/react/portainer/environments/update-schedules/queries/useItem.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts b/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts index 13ceb9173..be055ffdc 100644 --- a/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts +++ b/app/react/portainer/environments/update-schedules/queries/usePreviousVersions.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { EnvironmentId } from '@/react/portainer/environments/types'; diff --git a/app/react/portainer/environments/update-schedules/queries/useRemoveMutation.ts b/app/react/portainer/environments/update-schedules/queries/useRemoveMutation.ts index 74362e4ed..306773b3e 100644 --- a/app/react/portainer/environments/update-schedules/queries/useRemoveMutation.ts +++ b/app/react/portainer/environments/update-schedules/queries/useRemoveMutation.ts @@ -1,4 +1,4 @@ -import { useQueryClient, useMutation } from 'react-query'; +import { useQueryClient, useMutation } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/environments/update-schedules/queries/useSupportedAgentVersions.ts b/app/react/portainer/environments/update-schedules/queries/useSupportedAgentVersions.ts index 31be18a7b..f96da5670 100644 --- a/app/react/portainer/environments/update-schedules/queries/useSupportedAgentVersions.ts +++ b/app/react/portainer/environments/update-schedules/queries/useSupportedAgentVersions.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/environments/update-schedules/queries/useUpdateMutation.ts b/app/react/portainer/environments/update-schedules/queries/useUpdateMutation.ts index 4e3f93aad..4b7a45962 100644 --- a/app/react/portainer/environments/update-schedules/queries/useUpdateMutation.ts +++ b/app/react/portainer/environments/update-schedules/queries/useUpdateMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError, withInvalidate } from '@/react-tools/react-query'; diff --git a/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts b/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts index f718c9fed..dec99359c 100644 --- a/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts +++ b/app/react/portainer/environments/wizard/HomeView/useFetchOrCreateLocalEnvironment.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { useEnvironmentList } from '@/react/portainer/environments/queries/useEnvironmentList'; import { diff --git a/app/react/portainer/gitops/GitFormUrlField.tsx b/app/react/portainer/gitops/GitFormUrlField.tsx index ff257b761..07ba8acec 100644 --- a/app/react/portainer/gitops/GitFormUrlField.tsx +++ b/app/react/portainer/gitops/GitFormUrlField.tsx @@ -1,6 +1,6 @@ import { ChangeEvent, useState } from 'react'; import { RefreshCcw } from 'lucide-react'; -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { string, StringSchema } from 'yup'; import { diff --git a/app/react/portainer/gitops/queries/useCheckRepo.ts b/app/react/portainer/gitops/queries/useCheckRepo.ts index cb58b59d4..4fa9b6416 100644 --- a/app/react/portainer/gitops/queries/useCheckRepo.ts +++ b/app/react/portainer/gitops/queries/useCheckRepo.ts @@ -1,5 +1,5 @@ import { AxiosError } from 'axios'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { isDefaultResponse, diff --git a/app/react/portainer/gitops/queries/useGitRefs.ts b/app/react/portainer/gitops/queries/useGitRefs.ts index ca0e00a0f..e091da71e 100644 --- a/app/react/portainer/gitops/queries/useGitRefs.ts +++ b/app/react/portainer/gitops/queries/useGitRefs.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/gitops/queries/useSearch.ts b/app/react/portainer/gitops/queries/useSearch.ts index 7ab8a38e3..0590b1e0f 100644 --- a/app/react/portainer/gitops/queries/useSearch.ts +++ b/app/react/portainer/gitops/queries/useSearch.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/licenses/use-license.service.ts b/app/react/portainer/licenses/use-license.service.ts index a0e75e23e..0cc817760 100644 --- a/app/react/portainer/licenses/use-license.service.ts +++ b/app/react/portainer/licenses/use-license.service.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { error as notifyError } from '@/portainer/services/notifications'; import { useNodesCount } from '@/react/portainer/system/useNodesCount'; @@ -8,7 +8,7 @@ import { LicenseInfo, LicenseType } from './types'; export function useLicenseInfo() { const { isLoading, data: info } = useQuery( - 'licenseInfo', + ['licenseInfo'], () => getLicenseInfo(), { onError(error) { diff --git a/app/react/portainer/logs/ActivityLogsView/useActivityLogs.ts b/app/react/portainer/logs/ActivityLogsView/useActivityLogs.ts index 3883e9d2a..fb5ba7a69 100644 --- a/app/react/portainer/logs/ActivityLogsView/useActivityLogs.ts +++ b/app/react/portainer/logs/ActivityLogsView/useActivityLogs.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/logs/ActivityLogsView/useExportMutation.ts b/app/react/portainer/logs/ActivityLogsView/useExportMutation.ts index c9bcfe87e..7dfd48343 100644 --- a/app/react/portainer/logs/ActivityLogsView/useExportMutation.ts +++ b/app/react/portainer/logs/ActivityLogsView/useExportMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { saveAs } from 'file-saver'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/registries/ListView/RegistriesDatatable/useDeleteRegistriesMutation.ts b/app/react/portainer/registries/ListView/RegistriesDatatable/useDeleteRegistriesMutation.ts index fe4a281fe..8773001f0 100644 --- a/app/react/portainer/registries/ListView/RegistriesDatatable/useDeleteRegistriesMutation.ts +++ b/app/react/portainer/registries/ListView/RegistriesDatatable/useDeleteRegistriesMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/registries/queries/useRegistries.ts b/app/react/portainer/registries/queries/useRegistries.ts index 06d8c937d..007ab70cb 100644 --- a/app/react/portainer/registries/queries/useRegistries.ts +++ b/app/react/portainer/registries/queries/useRegistries.ts @@ -1,4 +1,4 @@ -import { QueryKey, useQuery } from 'react-query'; +import { QueryKey, useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/registries/queries/useRegistry.ts b/app/react/portainer/registries/queries/useRegistry.ts index 053888194..6dbe4efdc 100644 --- a/app/react/portainer/registries/queries/useRegistry.ts +++ b/app/react/portainer/registries/queries/useRegistry.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; diff --git a/app/react/portainer/registries/repositories/ListView/useRepositoryTags.ts b/app/react/portainer/registries/repositories/ListView/useRepositoryTags.ts index e5349dba9..1cc75475e 100644 --- a/app/react/portainer/registries/repositories/ListView/useRepositoryTags.ts +++ b/app/react/portainer/registries/repositories/ListView/useRepositoryTags.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import _ from 'lodash'; import { Environment } from '@/react/portainer/environments/types'; diff --git a/app/react/portainer/registries/repositories/queries/useTagDetails.ts b/app/react/portainer/registries/repositories/queries/useTagDetails.ts index be534af32..89da912f7 100644 --- a/app/react/portainer/registries/repositories/queries/useTagDetails.ts +++ b/app/react/portainer/registries/repositories/queries/useTagDetails.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { Environment } from '@/react/portainer/environments/types'; import { Registry } from '@/react/portainer/registries/types/registry'; diff --git a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatableActions.tsx b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatableActions.tsx index f7f60c457..08dcf8e21 100644 --- a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatableActions.tsx +++ b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/FDOProfilesDatatableActions.tsx @@ -1,4 +1,4 @@ -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import { useRouter } from '@uirouter/react'; import { PlusCircle } from 'lucide-react'; @@ -103,6 +103,6 @@ export function FDOProfilesDatatableActions({ }) ); - await queryClient.invalidateQueries('fdo_profiles'); + await queryClient.invalidateQueries(['fdo_profiles']); } } diff --git a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/useFDOProfiles.tsx b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/useFDOProfiles.tsx index 2e8c53d4b..04f669500 100644 --- a/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/useFDOProfiles.tsx +++ b/app/react/portainer/settings/EdgeComputeView/FDOProfilesDatatable/useFDOProfiles.tsx @@ -1,12 +1,12 @@ import { useEffect, useMemo } from 'react'; -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import PortainerError from '@/portainer/error'; import * as notifications from '@/portainer/services/notifications'; import { getProfiles } from '@/portainer/hostmanagement/fdo/fdo.service'; export function useFDOProfiles() { - const { isLoading, data, isError, error } = useQuery('fdo_profiles', () => + const { isLoading, data, isError, error } = useQuery(['fdo_profiles'], () => getProfiles() ); diff --git a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useBackupS3Settings.ts b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useBackupS3Settings.ts index 048e7717f..726af243e 100644 --- a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useBackupS3Settings.ts +++ b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useBackupS3Settings.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useDownloadBackupMutation.ts b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useDownloadBackupMutation.ts index d305d2b03..966876546 100644 --- a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useDownloadBackupMutation.ts +++ b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useDownloadBackupMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { saveAs } from 'file-saver'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useExportS3BackupMutation.ts b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useExportS3BackupMutation.ts index 6c78c14be..367b42521 100644 --- a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useExportS3BackupMutation.ts +++ b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useExportS3BackupMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withGlobalError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useUpdateBackupS3SettingsMutation.ts b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useUpdateBackupS3SettingsMutation.ts index 7f9c3ad30..00fdb7c45 100644 --- a/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useUpdateBackupS3SettingsMutation.ts +++ b/app/react/portainer/settings/SettingsView/BackupSettingsView/queries/useUpdateBackupS3SettingsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withGlobalError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/SettingsView/KubeSettingsPanel/KubeSettingsPanel.tsx b/app/react/portainer/settings/SettingsView/KubeSettingsPanel/KubeSettingsPanel.tsx index b77757d16..302ae75df 100644 --- a/app/react/portainer/settings/SettingsView/KubeSettingsPanel/KubeSettingsPanel.tsx +++ b/app/react/portainer/settings/SettingsView/KubeSettingsPanel/KubeSettingsPanel.tsx @@ -1,5 +1,5 @@ import { Form, Formik } from 'formik'; -import { useQueryClient } from 'react-query'; +import { useQueryClient } from '@tanstack/react-query'; import kubeIcon from '@/assets/ico/kube.svg?c'; import { notifySuccess } from '@/portainer/services/notifications'; diff --git a/app/react/portainer/settings/SettingsView/useUpdateSSLConfigMutation.tsx b/app/react/portainer/settings/SettingsView/useUpdateSSLConfigMutation.tsx index 062a3e633..e11dca457 100644 --- a/app/react/portainer/settings/SettingsView/useUpdateSSLConfigMutation.tsx +++ b/app/react/portainer/settings/SettingsView/useUpdateSSLConfigMutation.tsx @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { mutationOptions, withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/queries/useExperimentalSettings.ts b/app/react/portainer/settings/queries/useExperimentalSettings.ts index 642df4d2a..dda159ca1 100644 --- a/app/react/portainer/settings/queries/useExperimentalSettings.ts +++ b/app/react/portainer/settings/queries/useExperimentalSettings.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/queries/useExperimentalSettingsMutation.ts b/app/react/portainer/settings/queries/useExperimentalSettingsMutation.ts index d995395a2..63ac1fdf5 100644 --- a/app/react/portainer/settings/queries/useExperimentalSettingsMutation.ts +++ b/app/react/portainer/settings/queries/useExperimentalSettingsMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { diff --git a/app/react/portainer/settings/queries/usePublicSettings.ts b/app/react/portainer/settings/queries/usePublicSettings.ts index f13f27bd9..871b499e3 100644 --- a/app/react/portainer/settings/queries/usePublicSettings.ts +++ b/app/react/portainer/settings/queries/usePublicSettings.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/settings/queries/useSSLSettings.ts b/app/react/portainer/settings/queries/useSSLSettings.ts index 8567ba19a..6692fb129 100644 --- a/app/react/portainer/settings/queries/useSSLSettings.ts +++ b/app/react/portainer/settings/queries/useSSLSettings.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/settings/queries/useSettings.ts b/app/react/portainer/settings/queries/useSettings.ts index 75315c061..04d7094c8 100644 --- a/app/react/portainer/settings/queries/useSettings.ts +++ b/app/react/portainer/settings/queries/useSettings.ts @@ -1,4 +1,4 @@ -import { useQuery, useMutation, useQueryClient } from 'react-query'; +import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { mutationOptions, diff --git a/app/react/portainer/system/useNodesCount.ts b/app/react/portainer/system/useNodesCount.ts index 2f750b008..e01ec834e 100644 --- a/app/react/portainer/system/useNodesCount.ts +++ b/app/react/portainer/system/useNodesCount.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/system/useSystemInfo.ts b/app/react/portainer/system/useSystemInfo.ts index 769ed1143..c6f4abe4e 100644 --- a/app/react/portainer/system/useSystemInfo.ts +++ b/app/react/portainer/system/useSystemInfo.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/system/useSystemStatus.ts b/app/react/portainer/system/useSystemStatus.ts index ecc5394f2..0b675f205 100644 --- a/app/react/portainer/system/useSystemStatus.ts +++ b/app/react/portainer/system/useSystemStatus.ts @@ -1,5 +1,4 @@ -import { useQuery } from 'react-query'; -import { RetryValue } from 'react-query/types/core/retryer'; +import { UseQueryOptions, useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { UserId } from '@/portainer/users/types'; @@ -43,7 +42,7 @@ export function useSystemStatus({ }: { select?: (status: StatusResponse) => T; enabled?: boolean; - retry?: RetryValue; + retry?: UseQueryOptions['retry']; onSuccess?: (data: T) => void; } = {}) { return useQuery(queryKey, () => getSystemStatus(), { diff --git a/app/react/portainer/system/useSystemVersion.ts b/app/react/portainer/system/useSystemVersion.ts index 9b288864b..a141c9b3c 100644 --- a/app/react/portainer/system/useSystemVersion.ts +++ b/app/react/portainer/system/useSystemVersion.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/system/useUpgradeEditionMutation.ts b/app/react/portainer/system/useUpgradeEditionMutation.ts index c453e377a..9cc1694b4 100644 --- a/app/react/portainer/system/useUpgradeEditionMutation.ts +++ b/app/react/portainer/system/useUpgradeEditionMutation.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import axios, { isAxiosError, diff --git a/app/react/portainer/templates/app-templates/DeployFormWidget/ContainerDeployForm/useCreateLocalVolumes.ts b/app/react/portainer/templates/app-templates/DeployFormWidget/ContainerDeployForm/useCreateLocalVolumes.ts index deae99f1b..cf4f0985b 100644 --- a/app/react/portainer/templates/app-templates/DeployFormWidget/ContainerDeployForm/useCreateLocalVolumes.ts +++ b/app/react/portainer/templates/app-templates/DeployFormWidget/ContainerDeployForm/useCreateLocalVolumes.ts @@ -1,4 +1,4 @@ -import { useMutation } from 'react-query'; +import { useMutation } from '@tanstack/react-query'; import { useEnvironmentId } from '@/react/hooks/useEnvironmentId'; import { createVolume } from '@/react/docker/volumes/queries/useCreateVolume'; diff --git a/app/react/portainer/templates/app-templates/queries/useAppTemplates.ts b/app/react/portainer/templates/app-templates/queries/useAppTemplates.ts index 589c761d0..663beb376 100644 --- a/app/react/portainer/templates/app-templates/queries/useAppTemplates.ts +++ b/app/react/portainer/templates/app-templates/queries/useAppTemplates.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { useRegistries } from '@/react/portainer/registries/queries/useRegistries'; diff --git a/app/react/portainer/templates/app-templates/queries/useFetchTemplateFile.ts b/app/react/portainer/templates/app-templates/queries/useFetchTemplateFile.ts index 6a7198262..39d411d82 100644 --- a/app/react/portainer/templates/app-templates/queries/useFetchTemplateFile.ts +++ b/app/react/portainer/templates/app-templates/queries/useFetchTemplateFile.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/templates/custom-templates/CreateView/useInitialValues.ts b/app/react/portainer/templates/custom-templates/CreateView/useInitialValues.ts index 615c0e828..dc8c5696a 100644 --- a/app/react/portainer/templates/custom-templates/CreateView/useInitialValues.ts +++ b/app/react/portainer/templates/custom-templates/CreateView/useInitialValues.ts @@ -28,7 +28,7 @@ export function useInitialValues({ } = useCurrentStateAndParams(); const fileContentQuery = useFetchTemplateFile(appTemplateId); - if (fileContentQuery.isLoading) { + if (fileContentQuery.isInitialLoading) { return undefined; } diff --git a/app/react/portainer/templates/custom-templates/queries/useCreateTemplateMutation.ts b/app/react/portainer/templates/custom-templates/queries/useCreateTemplateMutation.ts index f3fc06118..711bc62d8 100644 --- a/app/react/portainer/templates/custom-templates/queries/useCreateTemplateMutation.ts +++ b/app/react/portainer/templates/custom-templates/queries/useCreateTemplateMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { json2formData, diff --git a/app/react/portainer/templates/custom-templates/queries/useCustomTemplate.ts b/app/react/portainer/templates/custom-templates/queries/useCustomTemplate.ts index 28dde5471..511dfe38e 100644 --- a/app/react/portainer/templates/custom-templates/queries/useCustomTemplate.ts +++ b/app/react/portainer/templates/custom-templates/queries/useCustomTemplate.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import { withGlobalError } from '@/react-tools/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/templates/custom-templates/queries/useCustomTemplateFile.ts b/app/react/portainer/templates/custom-templates/queries/useCustomTemplateFile.ts index 021c2c4c7..18a1075b7 100644 --- a/app/react/portainer/templates/custom-templates/queries/useCustomTemplateFile.ts +++ b/app/react/portainer/templates/custom-templates/queries/useCustomTemplateFile.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery } from 'react-query'; +import { useMutation, useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withGlobalError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/templates/custom-templates/queries/useCustomTemplates.ts b/app/react/portainer/templates/custom-templates/queries/useCustomTemplates.ts index bf7a7ae44..39a3865c6 100644 --- a/app/react/portainer/templates/custom-templates/queries/useCustomTemplates.ts +++ b/app/react/portainer/templates/custom-templates/queries/useCustomTemplates.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { withGlobalError } from '@/react-tools/react-query'; diff --git a/app/react/portainer/templates/custom-templates/queries/useDeleteTemplateMutation.ts b/app/react/portainer/templates/custom-templates/queries/useDeleteTemplateMutation.ts index 5def6dbac..3a6974c1a 100644 --- a/app/react/portainer/templates/custom-templates/queries/useDeleteTemplateMutation.ts +++ b/app/react/portainer/templates/custom-templates/queries/useDeleteTemplateMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { mutationOptions, diff --git a/app/react/portainer/templates/custom-templates/queries/useUpdateTemplateMutation.ts b/app/react/portainer/templates/custom-templates/queries/useUpdateTemplateMutation.ts index 02367490a..7347b45a9 100644 --- a/app/react/portainer/templates/custom-templates/queries/useUpdateTemplateMutation.ts +++ b/app/react/portainer/templates/custom-templates/queries/useUpdateTemplateMutation.ts @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; import { diff --git a/app/react/portainer/users/RolesView/useRbacRoles.ts b/app/react/portainer/users/RolesView/useRbacRoles.ts index d17788d98..b11480a00 100644 --- a/app/react/portainer/users/RolesView/useRbacRoles.ts +++ b/app/react/portainer/users/RolesView/useRbacRoles.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/portainer/users/teams/ItemView/Details.tsx b/app/react/portainer/users/teams/ItemView/Details.tsx index 4ebe20353..95f721a04 100644 --- a/app/react/portainer/users/teams/ItemView/Details.tsx +++ b/app/react/portainer/users/teams/ItemView/Details.tsx @@ -1,5 +1,5 @@ import { useRouter } from '@uirouter/react'; -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Users } from 'lucide-react'; import { usePublicSettings } from '@/react/portainer/settings/queries'; diff --git a/app/react/portainer/users/teams/ListView/CreateTeamForm/CreateTeamForm.tsx b/app/react/portainer/users/teams/ListView/CreateTeamForm/CreateTeamForm.tsx index 81e2b78b6..4efff99fe 100644 --- a/app/react/portainer/users/teams/ListView/CreateTeamForm/CreateTeamForm.tsx +++ b/app/react/portainer/users/teams/ListView/CreateTeamForm/CreateTeamForm.tsx @@ -1,5 +1,5 @@ import { Formik, Field, Form } from 'formik'; -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { useReducer } from 'react'; import { Plus } from 'lucide-react'; diff --git a/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx b/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx index 9dbbd9eac..61e62bb39 100644 --- a/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx +++ b/app/react/portainer/users/teams/ListView/TeamsDatatable/TeamsDatatable.tsx @@ -1,4 +1,4 @@ -import { useMutation, useQueryClient } from 'react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Users } from 'lucide-react'; import { ColumnDef } from '@tanstack/react-table'; diff --git a/app/react/portainer/users/teams/queries.ts b/app/react/portainer/users/teams/queries.ts index 2fe39412d..4582a5b82 100644 --- a/app/react/portainer/users/teams/queries.ts +++ b/app/react/portainer/users/teams/queries.ts @@ -1,4 +1,4 @@ -import { useMutation, useQuery, useQueryClient } from 'react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { promiseSequence } from '@/portainer/helpers/promise-utils'; import { notifyError } from '@/portainer/services/notifications'; diff --git a/app/react/portainer/webhooks/useWebhooks.ts b/app/react/portainer/webhooks/useWebhooks.ts index ce05d2477..60e4d1d9b 100644 --- a/app/react/portainer/webhooks/useWebhooks.ts +++ b/app/react/portainer/webhooks/useWebhooks.ts @@ -1,4 +1,4 @@ -import { useQuery } from 'react-query'; +import { useQuery } from '@tanstack/react-query'; import axios, { parseAxiosError } from '@/portainer/services/axios'; diff --git a/app/react/test-utils/withTestQuery.tsx b/app/react/test-utils/withTestQuery.tsx index 6d9f8758c..78bc81fef 100644 --- a/app/react/test-utils/withTestQuery.tsx +++ b/app/react/test-utils/withTestQuery.tsx @@ -1,5 +1,5 @@ import { ComponentType } from 'react'; -import { QueryClient } from 'react-query'; +import { QueryClient } from '@tanstack/react-query'; import { withReactQuery } from '@/react-tools/withReactQuery'; diff --git a/package.json b/package.json index 19c460f01..f991fa382 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,8 @@ "@reach/dialog": "^0.17.0", "@reach/menu-button": "^0.16.1", "@reach/popover": "^0.18.0", + "@tanstack/react-query": "4", + "@tanstack/react-query-devtools": "4", "@tanstack/react-table": "^8.8.5", "@tippyjs/react": "^4.2.6", "@uirouter/angularjs": "1.0.11", @@ -114,7 +116,6 @@ "react-i18next": "^11.12.0", "react-is": "^17.0.2", "react-json-view-lite": "^1.2.1", - "react-query": "^3.33.4", "react-select": "^5.2.1", "sanitize-html": "^2.8.1", "spinkit": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index 0b93156f9..ea015ba59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2913,7 +2913,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.5.tgz#7f3e34bf8bdbbadf03fbb7b1ea0d929569c9487a" integrity sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA== @@ -5575,6 +5575,35 @@ resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.5.tgz#043b731d4f56a79b4897a3de1af35e75d56bc63a" integrity sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw== +"@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@4.36.1": + version "4.36.1" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-4.36.1.tgz#79f8c1a539d47c83104210be2388813a7af2e524" + integrity sha512-DJSilV5+ytBP1FbFcEJovv4rnnm/CokuVvrBEtW/Va9DvuJ3HksbXUJEpI0aV1KtuL4ZoO9AVE6PyNLzF7tLeA== + +"@tanstack/react-query-devtools@4": + version "4.36.1" + resolved "https://registry.yarnpkg.com/@tanstack/react-query-devtools/-/react-query-devtools-4.36.1.tgz#7e63601135902a993ca9af73507b125233b1554e" + integrity sha512-WYku83CKP3OevnYSG8Y/QO9g0rT75v1om5IvcWUwiUZJ4LanYGLVCZ8TdFG5jfsq4Ej/lu2wwDAULEUnRIMBSw== + dependencies: + "@tanstack/match-sorter-utils" "^8.7.0" + superjson "^1.10.0" + use-sync-external-store "^1.2.0" + +"@tanstack/react-query@4": + version "4.36.1" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-4.36.1.tgz#acb589fab4085060e2e78013164868c9c785e5d2" + integrity sha512-y7ySVHFyyQblPl3J3eQBWpXZkliroki3ARnBKsdJchlgt7yJLRDUcf4B8soufgiYt3pEQIkBWBx1N9/ZPIeUWw== + dependencies: + "@tanstack/query-core" "4.36.1" + use-sync-external-store "^1.2.0" + "@tanstack/react-table@^8.8.5": version "8.9.0" resolved "https://registry.yarnpkg.com/@tanstack/react-table/-/react-table-8.9.0.tgz#5ddda736248b8271e9522337b188c4bed2f4db8e" @@ -7523,7 +7552,7 @@ better-opn@^3.0.2: dependencies: open "^8.0.4" -big-integer@^1.6.16, big-integer@^1.6.44: +big-integer@^1.6.44: version "1.6.51" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== @@ -7643,20 +7672,6 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -broadcast-channel@^3.4.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-3.7.0.tgz#2dfa5c7b4289547ac3f6705f9c00af8723889937" - integrity sha512-cIAKJXAxGJceNZGTZSBzMxzyOn72cVgPnKx4dc6LRjQgbaJUQqhy5rzL3zbMxkMWsGKkv2hSFkPRMEXfoMZ2Mg== - dependencies: - "@babel/runtime" "^7.7.2" - detect-node "^2.1.0" - js-sha3 "0.8.0" - microseconds "0.2.0" - nano-time "1.0.0" - oblivious-set "1.0.0" - rimraf "3.0.2" - unload "2.2.0" - browser-assert@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/browser-assert/-/browser-assert-1.2.1.tgz#9aaa5a2a8c74685c2ae05bfe46efd606f068c200" @@ -8408,6 +8423,13 @@ cookie@0.5.0, 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" + copy-webpack-plugin@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz#96d4dbdb5f73d02dd72d0528d1958721ab72e04a" @@ -8990,7 +9012,7 @@ detect-node-es@^1.1.0: resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== -detect-node@^2.0.4, detect-node@^2.1.0: +detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== @@ -11828,6 +11850,11 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" +is-what@^4.1.8: + version "4.1.16" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.16.tgz#1ad860a19da8b4895ad5495da3182ce2acdd7a6f" + integrity sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A== + is-windows@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -12012,11 +12039,6 @@ js-levenshtein@^1.1.6: resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== -js-sha3@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -12604,14 +12626,6 @@ markdown-to-jsx@^7.1.8: resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.2.0.tgz#e7b46b65955f6a04d48a753acd55874a14bdda4b" integrity sha512-3l4/Bigjm4bEqjCR6Xr+d4DtM1X6vvtGsMGSjJYyep8RjjIvcWtrXBS8Wbfe1/P+atKNMccpsraESIaWVplzVg== -match-sorter@^6.0.2: - version "6.3.1" - resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-6.3.1.tgz#98cc37fda756093424ddf3cbc62bfe9c75b92bda" - integrity sha512-mxybbo3pPNuA+ZuCUhm5bwNkXrJTbsk5VWbR5wiwz/GC6LIiegBGn2w3O08UG/jdbYLinw51fSQ5xNU1U3MgBw== - dependencies: - "@babel/runtime" "^7.12.5" - remove-accents "0.4.2" - md5@^2.2.1: version "2.3.0" resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" @@ -12702,11 +12716,6 @@ micromatch@4.0.5, micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -microseconds@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/microseconds/-/microseconds-0.2.0.tgz#233b25f50c62a65d861f978a4a4f8ec18797dc39" - integrity sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA== - mime-db@1.51.0: version "1.51.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" @@ -12954,13 +12963,6 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nano-time@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/nano-time/-/nano-time-1.0.0.tgz#b0554f69ad89e22d0907f7a12b0993a5d96137ef" - integrity sha1-sFVPaa2J4i0JB/ehKwmTpdlhN+8= - dependencies: - big-integer "^1.6.16" - nanoclone@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/nanoclone/-/nanoclone-0.2.1.tgz#dd4090f8f1a110d26bb32c49ed2f5b9235209ed4" @@ -13356,11 +13358,6 @@ objectorarray@^1.0.5: resolved "https://registry.yarnpkg.com/objectorarray/-/objectorarray-1.0.5.tgz#2c05248bbefabd8f43ad13b41085951aac5e68a5" integrity sha512-eJJDYkhJFFbBBAxeh8xW+weHlkI28n2ZdQV/J/DNfWfSKlGEf2xcfAbZTv3riEXHAhL9SVOTs2pRmXiSTf78xg== -oblivious-set@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.0.0.tgz#c8316f2c2fb6ff7b11b6158db3234c49f733c566" - integrity sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw== - obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -14634,15 +14631,6 @@ react-json-view-lite@^1.2.1: resolved "https://registry.yarnpkg.com/react-json-view-lite/-/react-json-view-lite-1.2.1.tgz#c59a0bea4ede394db331d482ee02e293d38f8218" integrity sha512-Itc0g86fytOmKZoIoJyGgvNqohWSbh3NXIKNgH6W6FT9PC1ck4xas1tT3Rr/b3UlFXyA9Jjaw9QSXdZy2JwGMQ== -react-query@^3.33.4: - version "3.34.4" - resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.34.4.tgz#da926717683fd9e9e310d46ab6f60f76a80ffaae" - integrity sha512-1Pa7pNJF9I+UdQ1RvqmBO9tWvBNfzNeJM3vYApcE2SL4Hbwy6q4U7ce4u+SWQnLMFit3z8WWp9OXpcDqEQ/E1A== - dependencies: - "@babel/runtime" "^7.5.5" - broadcast-channel "^3.4.1" - match-sorter "^6.0.2" - react-refresh@^0.14.0: version "0.14.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" @@ -14991,7 +14979,7 @@ remark-slug@^6.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 sha1-CkPTqq4egNuRngeuJUsoXZ4ce7U= + integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA== renderkid@^3.0.0: version "3.0.0" @@ -15150,13 +15138,6 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rimraf@3.0.2, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - rimraf@^2.6.1, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -15164,6 +15145,13 @@ rimraf@^2.6.1, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -16075,6 +16063,13 @@ sucrase@^3.32.0: pirates "^4.0.1" ts-interface-checker "^0.1.9" +superjson@^1.10.0: + version "1.13.3" + resolved "https://registry.yarnpkg.com/superjson/-/superjson-1.13.3.tgz#3bd64046f6c0a47062850bb3180ef352a471f930" + integrity sha512-mJiVjfd2vokfDxsQPOwJ/PtanO87LhpYY88ubI5dUB1Ab58Txbyje3+jpm+/83R/fevaq/107NNhtYBLuoTrFg== + dependencies: + copy-anything "^3.0.2" + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -16788,14 +16783,6 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -unload@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/unload/-/unload-2.2.0.tgz#ccc88fdcad345faa06a92039ec0f80b488880ef7" - integrity sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA== - dependencies: - "@babel/runtime" "^7.6.2" - detect-node "^2.0.4" - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -16901,7 +16888,7 @@ use-sidecar@^1.1.2: detect-node-es "^1.1.0" tslib "^2.0.0" -use-sync-external-store@1.2.0: +use-sync-external-store@1.2.0, 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==