@tanstack/query-core
Advanced tools
Comparing version 5.0.0-alpha.90 to 5.0.0-alpha.91
@@ -1,2 +0,2 @@ | ||
import { n as Mutation, j as Query, y as QueryOptions, aj as MutationOptions, b as QueryClient, af as MutationKey, o as MutationState, ah as MutationMeta, p as QueryKey, l as QueryState, x as QueryMeta } from './queryClient-158dd7f5.js'; | ||
import { n as Mutation, j as Query, z as QueryOptions, ak as MutationOptions, b as QueryClient, ag as MutationKey, o as MutationState, ai as MutationMeta, p as QueryKey, l as QueryState, x as QueryMeta } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
export { av as CancelOptions, C as CancelledError, D as DefaultError, au as DefaultOptions, z as DefaultPageParam, H as DefaultedInfiniteQueryObserverOptions, E as DefaultedQueryObserverOptions, ad as DefinedInfiniteQueryObserverResult, a6 as DefinedQueryObserverResult, K as FetchInfiniteQueryOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, J as FetchQueryOptions, a0 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a8 as InfiniteQueryObserverBaseResult, aa as InfiniteQueryObserverLoadingErrorResult, a9 as InfiniteQueryObserverLoadingResult, F as InfiniteQueryObserverOptions, ab as InfiniteQueryObserverRefetchErrorResult, ae as InfiniteQueryObserverResult, ac as InfiniteQueryObserverSuccessResult, A as InfiniteQueryPageParamsOptions, I as InitialDataFunction, X as InvalidateOptions, S as InvalidateQueryFilters, am as MutateFunction, al as MutateOptions, n as Mutation, M as MutationCache, e as MutationFilters, ai as MutationFunction, af as MutationKey, ah as MutationMeta, d as MutationObserver, an as MutationObserverBaseResult, aq as MutationObserverErrorResult, ao as MutationObserverIdleResult, ap as MutationObserverLoadingResult, ak as MutationObserverOptions, as as MutationObserverResult, ar as MutationObserverSuccessResult, aj as MutationOptions, o as MutationState, ag as MutationStatus, N as NetworkMode, ay as NotifyEvent, ax as NotifyEventType, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, j as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, at as QueryClientConfig, f as QueryFilters, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, c as QueryObserver, a1 as QueryObserverBaseResult, a3 as QueryObserverLoadingErrorResult, a2 as QueryObserverLoadingResult, B as QueryObserverOptions, a4 as QueryObserverRefetchErrorResult, a7 as QueryObserverResult, a5 as QueryObserverSuccessResult, y as QueryOptions, l as QueryState, $ as QueryStatus, O as RefetchOptions, V as RefetchQueryFilters, R as Register, Y as ResetOptions, L as ResultOptions, aw as SetDataOptions, T as ThrowOnError, U as Updater, W as WithRequired, h as hashKey, g as isCancelledError, i as isServer, k as keepPreviousData, m as matchQuery, r as replaceEqualDeep } from './queryClient-158dd7f5.js'; | ||
export { aw as CancelOptions, C as CancelledError, D as DefaultError, av as DefaultOptions, A as DefaultPageParam, J as DefaultedInfiniteQueryObserverOptions, F as DefaultedQueryObserverOptions, ae as DefinedInfiniteQueryObserverResult, a7 as DefinedQueryObserverResult, L as FetchInfiniteQueryOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, K as FetchQueryOptions, a1 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a9 as InfiniteQueryObserverBaseResult, ab as InfiniteQueryObserverLoadingErrorResult, aa as InfiniteQueryObserverLoadingResult, H as InfiniteQueryObserverOptions, ac as InfiniteQueryObserverRefetchErrorResult, af as InfiniteQueryObserverResult, ad as InfiniteQueryObserverSuccessResult, B as InfiniteQueryPageParamsOptions, I as InitialDataFunction, Y as InvalidateOptions, V as InvalidateQueryFilters, an as MutateFunction, am as MutateOptions, n as Mutation, M as MutationCache, e as MutationFilters, aj as MutationFunction, ag as MutationKey, ai as MutationMeta, d as MutationObserver, ao as MutationObserverBaseResult, ar as MutationObserverErrorResult, ap as MutationObserverIdleResult, aq as MutationObserverLoadingResult, al as MutationObserverOptions, at as MutationObserverResult, as as MutationObserverSuccessResult, ak as MutationOptions, o as MutationState, ah as MutationStatus, N as NetworkMode, az as NotifyEvent, ay as NotifyEventType, y as NotifyOnChangeProps, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, j as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, au as QueryClientConfig, f as QueryFilters, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, c as QueryObserver, a2 as QueryObserverBaseResult, a4 as QueryObserverLoadingErrorResult, a3 as QueryObserverLoadingResult, E as QueryObserverOptions, a5 as QueryObserverRefetchErrorResult, a8 as QueryObserverResult, a6 as QueryObserverSuccessResult, z as QueryOptions, l as QueryState, a0 as QueryStatus, S as RefetchOptions, X as RefetchQueryFilters, R as Register, Z as ResetOptions, O as ResultOptions, ax as SetDataOptions, T as ThrowOnError, U as Updater, W as WithRequired, h as hashKey, g as isCancelledError, i as isServer, k as keepPreviousData, m as matchQuery, r as replaceEqualDeep } from './queryClient-9264ae39.js'; | ||
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js'; | ||
@@ -3,0 +3,0 @@ export { InfiniteQueryObserver } from './infiniteQueryObserver.js'; |
@@ -1,2 +0,2 @@ | ||
import { az as QueryBehavior, w as InfiniteData, A as InfiniteQueryPageParamsOptions } from './queryClient-158dd7f5.js'; | ||
import { aA as QueryBehavior, w as InfiniteData, B as InfiniteQueryPageParamsOptions } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
import { D as DefaultError, w as InfiniteData, p as QueryKey, c as QueryObserver, ae as InfiniteQueryObserverResult, aA as ObserverFetchOptions, b as QueryClient, F as InfiniteQueryObserverOptions, aB as NotifyOptions, H as DefaultedInfiniteQueryObserverOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, j as Query } from './queryClient-158dd7f5.js'; | ||
import { D as DefaultError, w as InfiniteData, p as QueryKey, c as QueryObserver, af as InfiniteQueryObserverResult, aB as ObserverFetchOptions, b as QueryClient, H as InfiniteQueryObserverOptions, aC as NotifyOptions, J as DefaultedInfiniteQueryObserverOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, j as Query } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
import './removable.js'; | ||
export { aT as Action, n as Mutation, o as MutationState, aU as getDefaultState } from './queryClient-158dd7f5.js'; | ||
export { aU as Action, n as Mutation, o as MutationState, aV as getDefaultState } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { M as MutationCache } from './queryClient-158dd7f5.js'; | ||
export { M as MutationCache } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
import './subscribable.js'; | ||
export { d as MutationObserver } from './queryClient-158dd7f5.js'; | ||
export { d as MutationObserver } from './queryClient-9264ae39.js'; | ||
import './removable.js'; |
@@ -1,2 +0,2 @@ | ||
import { a7 as QueryObserverResult, b as QueryClient, B as QueryObserverOptions, aB as NotifyOptions, j as Query, p as QueryKey, c as QueryObserver } from './queryClient-158dd7f5.js'; | ||
import { a8 as QueryObserverResult, b as QueryClient, E as QueryObserverOptions, aC as NotifyOptions, j as Query, p as QueryKey, c as QueryObserver } from './queryClient-9264ae39.js'; | ||
import { Subscribable } from './subscribable.js'; | ||
@@ -3,0 +3,0 @@ import './removable.js'; |
import './removable.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, j as Query, az as QueryBehavior, l as QueryState, b3 as SetStateOptions } from './queryClient-158dd7f5.js'; | ||
export { b3 as Action, a$ as FetchContext, b0 as FetchDirection, b1 as FetchMeta, b2 as FetchOptions, j as Query, aA as QueryBehavior, l as QueryState, b4 as SetStateOptions } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, b4 as QueryStore } from './queryClient-158dd7f5.js'; | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, b5 as QueryStore } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { b as QueryClient } from './queryClient-158dd7f5.js'; | ||
export { b as QueryClient } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
import './subscribable.js'; | ||
export { aB as NotifyOptions, aA as ObserverFetchOptions, c as QueryObserver } from './queryClient-158dd7f5.js'; | ||
export { aC as NotifyOptions, aB as ObserverFetchOptions, c as QueryObserver } from './queryClient-9264ae39.js'; | ||
import './removable.js'; |
@@ -307,6 +307,9 @@ import { | ||
const { notifyOnChangeProps } = this.options; | ||
if (notifyOnChangeProps === "all" || !notifyOnChangeProps && !__privateGet(this, _trackedProps).size) { | ||
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; | ||
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) { | ||
return true; | ||
} | ||
const includedProps = new Set(notifyOnChangeProps ?? __privateGet(this, _trackedProps)); | ||
const includedProps = new Set( | ||
notifyOnChangePropsValue ?? __privateGet(this, _trackedProps) | ||
); | ||
if (this.options.throwOnError) { | ||
@@ -313,0 +316,0 @@ includedProps.add("error"); |
@@ -1,3 +0,3 @@ | ||
export { C as CancelledError, aX as RetryDelayValue, aW as RetryValue, aV as Retryer, aY as canFetch, aZ as createRetryer, g as isCancelledError } from './queryClient-158dd7f5.js'; | ||
export { C as CancelledError, aY as RetryDelayValue, aX as RetryValue, aW as Retryer, aZ as canFetch, a_ as createRetryer, g as isCancelledError } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { av as CancelOptions, D as DefaultError, au as DefaultOptions, z as DefaultPageParam, H as DefaultedInfiniteQueryObserverOptions, E as DefaultedQueryObserverOptions, ad as DefinedInfiniteQueryObserverResult, a6 as DefinedQueryObserverResult, K as FetchInfiniteQueryOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, J as FetchQueryOptions, a0 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a8 as InfiniteQueryObserverBaseResult, aa as InfiniteQueryObserverLoadingErrorResult, a9 as InfiniteQueryObserverLoadingResult, F as InfiniteQueryObserverOptions, ab as InfiniteQueryObserverRefetchErrorResult, ae as InfiniteQueryObserverResult, ac as InfiniteQueryObserverSuccessResult, A as InfiniteQueryPageParamsOptions, I as InitialDataFunction, X as InvalidateOptions, S as InvalidateQueryFilters, am as MutateFunction, al as MutateOptions, ai as MutationFunction, af as MutationKey, ah as MutationMeta, an as MutationObserverBaseResult, aq as MutationObserverErrorResult, ao as MutationObserverIdleResult, ap as MutationObserverLoadingResult, ak as MutationObserverOptions, as as MutationObserverResult, ar as MutationObserverSuccessResult, aj as MutationOptions, ag as MutationStatus, N as NetworkMode, ay as NotifyEvent, ax as NotifyEventType, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, at as QueryClientConfig, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, a1 as QueryObserverBaseResult, a3 as QueryObserverLoadingErrorResult, a2 as QueryObserverLoadingResult, B as QueryObserverOptions, a4 as QueryObserverRefetchErrorResult, a7 as QueryObserverResult, a5 as QueryObserverSuccessResult, y as QueryOptions, $ as QueryStatus, O as RefetchOptions, V as RefetchQueryFilters, R as Register, Y as ResetOptions, L as ResultOptions, aw as SetDataOptions, T as ThrowOnError, W as WithRequired } from './queryClient-158dd7f5.js'; | ||
export { aw as CancelOptions, D as DefaultError, av as DefaultOptions, A as DefaultPageParam, J as DefaultedInfiniteQueryObserverOptions, F as DefaultedQueryObserverOptions, ae as DefinedInfiniteQueryObserverResult, a7 as DefinedQueryObserverResult, L as FetchInfiniteQueryOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, K as FetchQueryOptions, a1 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a9 as InfiniteQueryObserverBaseResult, ab as InfiniteQueryObserverLoadingErrorResult, aa as InfiniteQueryObserverLoadingResult, H as InfiniteQueryObserverOptions, ac as InfiniteQueryObserverRefetchErrorResult, af as InfiniteQueryObserverResult, ad as InfiniteQueryObserverSuccessResult, B as InfiniteQueryPageParamsOptions, I as InitialDataFunction, Y as InvalidateOptions, V as InvalidateQueryFilters, an as MutateFunction, am as MutateOptions, aj as MutationFunction, ag as MutationKey, ai as MutationMeta, ao as MutationObserverBaseResult, ar as MutationObserverErrorResult, ap as MutationObserverIdleResult, aq as MutationObserverLoadingResult, al as MutationObserverOptions, at as MutationObserverResult, as as MutationObserverSuccessResult, ak as MutationOptions, ah as MutationStatus, N as NetworkMode, az as NotifyEvent, ay as NotifyEventType, y as NotifyOnChangeProps, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, au as QueryClientConfig, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, a2 as QueryObserverBaseResult, a4 as QueryObserverLoadingErrorResult, a3 as QueryObserverLoadingResult, E as QueryObserverOptions, a5 as QueryObserverRefetchErrorResult, a8 as QueryObserverResult, a6 as QueryObserverSuccessResult, z as QueryOptions, a0 as QueryStatus, S as RefetchOptions, X as RefetchQueryFilters, R as Register, Z as ResetOptions, O as ResultOptions, ax as SetDataOptions, T as ThrowOnError, W as WithRequired } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { aC as DataUpdateFunction, e as MutationFilters, f as QueryFilters, aD as QueryTypeFilter, U as Updater, aR as addToEnd, aS as addToStart, aF as functionalUpdate, h as hashKey, aJ as hashQueryKeyByOptions, aM as isPlainArray, aN as isPlainObject, i as isServer, aG as isValidTimeout, k as keepPreviousData, aI as matchMutation, m as matchQuery, aE as noop, aK as partialMatchKey, aQ as replaceData, r as replaceEqualDeep, aP as scheduleMicrotask, aL as shallowEqualObjects, aO as sleep, aH as timeUntilStale } from './queryClient-158dd7f5.js'; | ||
export { aD as DataUpdateFunction, e as MutationFilters, f as QueryFilters, aE as QueryTypeFilter, U as Updater, aS as addToEnd, aT as addToStart, aG as functionalUpdate, h as hashKey, aK as hashQueryKeyByOptions, aN as isPlainArray, aO as isPlainObject, i as isServer, aH as isValidTimeout, k as keepPreviousData, aJ as matchMutation, m as matchQuery, aF as noop, aL as partialMatchKey, aR as replaceData, r as replaceEqualDeep, aQ as scheduleMicrotask, aM as shallowEqualObjects, aP as sleep, aI as timeUntilStale } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
import { n as Mutation, j as Query, y as QueryOptions, aj as MutationOptions, b as QueryClient, af as MutationKey, o as MutationState, ah as MutationMeta, p as QueryKey, l as QueryState, x as QueryMeta } from './queryClient-158dd7f5.js'; | ||
import { n as Mutation, j as Query, z as QueryOptions, ak as MutationOptions, b as QueryClient, ag as MutationKey, o as MutationState, ai as MutationMeta, p as QueryKey, l as QueryState, x as QueryMeta } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
export { av as CancelOptions, C as CancelledError, D as DefaultError, au as DefaultOptions, z as DefaultPageParam, H as DefaultedInfiniteQueryObserverOptions, E as DefaultedQueryObserverOptions, ad as DefinedInfiniteQueryObserverResult, a6 as DefinedQueryObserverResult, K as FetchInfiniteQueryOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, J as FetchQueryOptions, a0 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a8 as InfiniteQueryObserverBaseResult, aa as InfiniteQueryObserverLoadingErrorResult, a9 as InfiniteQueryObserverLoadingResult, F as InfiniteQueryObserverOptions, ab as InfiniteQueryObserverRefetchErrorResult, ae as InfiniteQueryObserverResult, ac as InfiniteQueryObserverSuccessResult, A as InfiniteQueryPageParamsOptions, I as InitialDataFunction, X as InvalidateOptions, S as InvalidateQueryFilters, am as MutateFunction, al as MutateOptions, n as Mutation, M as MutationCache, e as MutationFilters, ai as MutationFunction, af as MutationKey, ah as MutationMeta, d as MutationObserver, an as MutationObserverBaseResult, aq as MutationObserverErrorResult, ao as MutationObserverIdleResult, ap as MutationObserverLoadingResult, ak as MutationObserverOptions, as as MutationObserverResult, ar as MutationObserverSuccessResult, aj as MutationOptions, o as MutationState, ag as MutationStatus, N as NetworkMode, ay as NotifyEvent, ax as NotifyEventType, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, j as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, at as QueryClientConfig, f as QueryFilters, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, c as QueryObserver, a1 as QueryObserverBaseResult, a3 as QueryObserverLoadingErrorResult, a2 as QueryObserverLoadingResult, B as QueryObserverOptions, a4 as QueryObserverRefetchErrorResult, a7 as QueryObserverResult, a5 as QueryObserverSuccessResult, y as QueryOptions, l as QueryState, $ as QueryStatus, O as RefetchOptions, V as RefetchQueryFilters, R as Register, Y as ResetOptions, L as ResultOptions, aw as SetDataOptions, T as ThrowOnError, U as Updater, W as WithRequired, h as hashKey, g as isCancelledError, i as isServer, k as keepPreviousData, m as matchQuery, r as replaceEqualDeep } from './queryClient-158dd7f5.js'; | ||
export { aw as CancelOptions, C as CancelledError, D as DefaultError, av as DefaultOptions, A as DefaultPageParam, J as DefaultedInfiniteQueryObserverOptions, F as DefaultedQueryObserverOptions, ae as DefinedInfiniteQueryObserverResult, a7 as DefinedQueryObserverResult, L as FetchInfiniteQueryOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, K as FetchQueryOptions, a1 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a9 as InfiniteQueryObserverBaseResult, ab as InfiniteQueryObserverLoadingErrorResult, aa as InfiniteQueryObserverLoadingResult, H as InfiniteQueryObserverOptions, ac as InfiniteQueryObserverRefetchErrorResult, af as InfiniteQueryObserverResult, ad as InfiniteQueryObserverSuccessResult, B as InfiniteQueryPageParamsOptions, I as InitialDataFunction, Y as InvalidateOptions, V as InvalidateQueryFilters, an as MutateFunction, am as MutateOptions, n as Mutation, M as MutationCache, e as MutationFilters, aj as MutationFunction, ag as MutationKey, ai as MutationMeta, d as MutationObserver, ao as MutationObserverBaseResult, ar as MutationObserverErrorResult, ap as MutationObserverIdleResult, aq as MutationObserverLoadingResult, al as MutationObserverOptions, at as MutationObserverResult, as as MutationObserverSuccessResult, ak as MutationOptions, o as MutationState, ah as MutationStatus, N as NetworkMode, az as NotifyEvent, ay as NotifyEventType, y as NotifyOnChangeProps, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, j as Query, Q as QueryCache, a as QueryCacheNotifyEvent, b as QueryClient, au as QueryClientConfig, f as QueryFilters, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, c as QueryObserver, a2 as QueryObserverBaseResult, a4 as QueryObserverLoadingErrorResult, a3 as QueryObserverLoadingResult, E as QueryObserverOptions, a5 as QueryObserverRefetchErrorResult, a8 as QueryObserverResult, a6 as QueryObserverSuccessResult, z as QueryOptions, l as QueryState, a0 as QueryStatus, S as RefetchOptions, X as RefetchQueryFilters, R as Register, Z as ResetOptions, O as ResultOptions, ax as SetDataOptions, T as ThrowOnError, U as Updater, W as WithRequired, h as hashKey, g as isCancelledError, i as isServer, k as keepPreviousData, m as matchQuery, r as replaceEqualDeep } from './queryClient-9264ae39.js'; | ||
export { QueriesObserver, QueriesObserverOptions } from './queriesObserver.js'; | ||
@@ -3,0 +3,0 @@ export { InfiniteQueryObserver } from './infiniteQueryObserver.js'; |
@@ -1,2 +0,2 @@ | ||
import { az as QueryBehavior, w as InfiniteData, A as InfiniteQueryPageParamsOptions } from './queryClient-158dd7f5.js'; | ||
import { aA as QueryBehavior, w as InfiniteData, B as InfiniteQueryPageParamsOptions } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
@@ -1,2 +0,2 @@ | ||
import { D as DefaultError, w as InfiniteData, p as QueryKey, c as QueryObserver, ae as InfiniteQueryObserverResult, aA as ObserverFetchOptions, b as QueryClient, F as InfiniteQueryObserverOptions, aB as NotifyOptions, H as DefaultedInfiniteQueryObserverOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, j as Query } from './queryClient-158dd7f5.js'; | ||
import { D as DefaultError, w as InfiniteData, p as QueryKey, c as QueryObserver, af as InfiniteQueryObserverResult, aB as ObserverFetchOptions, b as QueryClient, H as InfiniteQueryObserverOptions, aC as NotifyOptions, J as DefaultedInfiniteQueryObserverOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, j as Query } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
@@ -3,0 +3,0 @@ import './subscribable.js'; |
import './removable.js'; | ||
export { aT as Action, n as Mutation, o as MutationState, aU as getDefaultState } from './queryClient-158dd7f5.js'; | ||
export { aU as Action, n as Mutation, o as MutationState, aV as getDefaultState } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { M as MutationCache } from './queryClient-158dd7f5.js'; | ||
export { M as MutationCache } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
import './subscribable.js'; | ||
export { d as MutationObserver } from './queryClient-158dd7f5.js'; | ||
export { d as MutationObserver } from './queryClient-9264ae39.js'; | ||
import './removable.js'; |
@@ -1,2 +0,2 @@ | ||
import { a7 as QueryObserverResult, b as QueryClient, B as QueryObserverOptions, aB as NotifyOptions, j as Query, p as QueryKey, c as QueryObserver } from './queryClient-158dd7f5.js'; | ||
import { a8 as QueryObserverResult, b as QueryClient, E as QueryObserverOptions, aC as NotifyOptions, j as Query, p as QueryKey, c as QueryObserver } from './queryClient-9264ae39.js'; | ||
import { Subscribable } from './subscribable.js'; | ||
@@ -3,0 +3,0 @@ import './removable.js'; |
import './removable.js'; | ||
export { b2 as Action, a_ as FetchContext, a$ as FetchDirection, b0 as FetchMeta, b1 as FetchOptions, j as Query, az as QueryBehavior, l as QueryState, b3 as SetStateOptions } from './queryClient-158dd7f5.js'; | ||
export { b3 as Action, a$ as FetchContext, b0 as FetchDirection, b1 as FetchMeta, b2 as FetchOptions, j as Query, aA as QueryBehavior, l as QueryState, b4 as SetStateOptions } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, b4 as QueryStore } from './queryClient-158dd7f5.js'; | ||
export { Q as QueryCache, a as QueryCacheNotifyEvent, b5 as QueryStore } from './queryClient-9264ae39.js'; | ||
import './subscribable.js'; | ||
import './removable.js'; |
@@ -1,3 +0,3 @@ | ||
export { b as QueryClient } from './queryClient-158dd7f5.js'; | ||
export { b as QueryClient } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
import './subscribable.js'; | ||
export { aB as NotifyOptions, aA as ObserverFetchOptions, c as QueryObserver } from './queryClient-158dd7f5.js'; | ||
export { aC as NotifyOptions, aB as ObserverFetchOptions, c as QueryObserver } from './queryClient-9264ae39.js'; | ||
import './removable.js'; |
@@ -354,6 +354,9 @@ // src/queryObserver.ts | ||
const { notifyOnChangeProps } = this.options; | ||
if (notifyOnChangeProps === "all" || !notifyOnChangeProps && !this.#trackedProps.size) { | ||
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; | ||
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) { | ||
return true; | ||
} | ||
const includedProps = new Set(notifyOnChangeProps ?? this.#trackedProps); | ||
const includedProps = new Set( | ||
notifyOnChangePropsValue ?? this.#trackedProps | ||
); | ||
if (this.options.throwOnError) { | ||
@@ -360,0 +363,0 @@ includedProps.add("error"); |
@@ -1,3 +0,3 @@ | ||
export { C as CancelledError, aX as RetryDelayValue, aW as RetryValue, aV as Retryer, aY as canFetch, aZ as createRetryer, g as isCancelledError } from './queryClient-158dd7f5.js'; | ||
export { C as CancelledError, aY as RetryDelayValue, aX as RetryValue, aW as Retryer, aZ as canFetch, a_ as createRetryer, g as isCancelledError } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { av as CancelOptions, D as DefaultError, au as DefaultOptions, z as DefaultPageParam, H as DefaultedInfiniteQueryObserverOptions, E as DefaultedQueryObserverOptions, ad as DefinedInfiniteQueryObserverResult, a6 as DefinedQueryObserverResult, K as FetchInfiniteQueryOptions, Z as FetchNextPageOptions, _ as FetchPreviousPageOptions, J as FetchQueryOptions, a0 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a8 as InfiniteQueryObserverBaseResult, aa as InfiniteQueryObserverLoadingErrorResult, a9 as InfiniteQueryObserverLoadingResult, F as InfiniteQueryObserverOptions, ab as InfiniteQueryObserverRefetchErrorResult, ae as InfiniteQueryObserverResult, ac as InfiniteQueryObserverSuccessResult, A as InfiniteQueryPageParamsOptions, I as InitialDataFunction, X as InvalidateOptions, S as InvalidateQueryFilters, am as MutateFunction, al as MutateOptions, ai as MutationFunction, af as MutationKey, ah as MutationMeta, an as MutationObserverBaseResult, aq as MutationObserverErrorResult, ao as MutationObserverIdleResult, ap as MutationObserverLoadingResult, ak as MutationObserverOptions, as as MutationObserverResult, ar as MutationObserverSuccessResult, aj as MutationOptions, ag as MutationStatus, N as NetworkMode, ay as NotifyEvent, ax as NotifyEventType, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, at as QueryClientConfig, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, a1 as QueryObserverBaseResult, a3 as QueryObserverLoadingErrorResult, a2 as QueryObserverLoadingResult, B as QueryObserverOptions, a4 as QueryObserverRefetchErrorResult, a7 as QueryObserverResult, a5 as QueryObserverSuccessResult, y as QueryOptions, $ as QueryStatus, O as RefetchOptions, V as RefetchQueryFilters, R as Register, Y as ResetOptions, L as ResultOptions, aw as SetDataOptions, T as ThrowOnError, W as WithRequired } from './queryClient-158dd7f5.js'; | ||
export { aw as CancelOptions, D as DefaultError, av as DefaultOptions, A as DefaultPageParam, J as DefaultedInfiniteQueryObserverOptions, F as DefaultedQueryObserverOptions, ae as DefinedInfiniteQueryObserverResult, a7 as DefinedQueryObserverResult, L as FetchInfiniteQueryOptions, _ as FetchNextPageOptions, $ as FetchPreviousPageOptions, K as FetchQueryOptions, a1 as FetchStatus, v as GetNextPageParamFunction, G as GetPreviousPageParamFunction, w as InfiniteData, a9 as InfiniteQueryObserverBaseResult, ab as InfiniteQueryObserverLoadingErrorResult, aa as InfiniteQueryObserverLoadingResult, H as InfiniteQueryObserverOptions, ac as InfiniteQueryObserverRefetchErrorResult, af as InfiniteQueryObserverResult, ad as InfiniteQueryObserverSuccessResult, B as InfiniteQueryPageParamsOptions, I as InitialDataFunction, Y as InvalidateOptions, V as InvalidateQueryFilters, an as MutateFunction, am as MutateOptions, aj as MutationFunction, ag as MutationKey, ai as MutationMeta, ao as MutationObserverBaseResult, ar as MutationObserverErrorResult, ap as MutationObserverIdleResult, aq as MutationObserverLoadingResult, al as MutationObserverOptions, at as MutationObserverResult, as as MutationObserverSuccessResult, ak as MutationOptions, ah as MutationStatus, N as NetworkMode, az as NotifyEvent, ay as NotifyEventType, y as NotifyOnChangeProps, P as PlaceholderDataFunction, t as QueriesPlaceholderDataFunction, au as QueryClientConfig, q as QueryFunction, s as QueryFunctionContext, p as QueryKey, u as QueryKeyHashFunction, x as QueryMeta, a2 as QueryObserverBaseResult, a4 as QueryObserverLoadingErrorResult, a3 as QueryObserverLoadingResult, E as QueryObserverOptions, a5 as QueryObserverRefetchErrorResult, a8 as QueryObserverResult, a6 as QueryObserverSuccessResult, z as QueryOptions, a0 as QueryStatus, S as RefetchOptions, X as RefetchQueryFilters, R as Register, Z as ResetOptions, O as ResultOptions, ax as SetDataOptions, T as ThrowOnError, W as WithRequired } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
@@ -1,3 +0,3 @@ | ||
export { aC as DataUpdateFunction, e as MutationFilters, f as QueryFilters, aD as QueryTypeFilter, U as Updater, aR as addToEnd, aS as addToStart, aF as functionalUpdate, h as hashKey, aJ as hashQueryKeyByOptions, aM as isPlainArray, aN as isPlainObject, i as isServer, aG as isValidTimeout, k as keepPreviousData, aI as matchMutation, m as matchQuery, aE as noop, aK as partialMatchKey, aQ as replaceData, r as replaceEqualDeep, aP as scheduleMicrotask, aL as shallowEqualObjects, aO as sleep, aH as timeUntilStale } from './queryClient-158dd7f5.js'; | ||
export { aD as DataUpdateFunction, e as MutationFilters, f as QueryFilters, aE as QueryTypeFilter, U as Updater, aS as addToEnd, aT as addToStart, aG as functionalUpdate, h as hashKey, aK as hashQueryKeyByOptions, aN as isPlainArray, aO as isPlainObject, i as isServer, aH as isValidTimeout, k as keepPreviousData, aJ as matchMutation, m as matchQuery, aF as noop, aL as partialMatchKey, aR as replaceData, r as replaceEqualDeep, aQ as scheduleMicrotask, aM as shallowEqualObjects, aP as sleep, aI as timeUntilStale } from './queryClient-9264ae39.js'; | ||
import './removable.js'; | ||
import './subscribable.js'; |
{ | ||
"name": "@tanstack/query-core", | ||
"version": "5.0.0-alpha.90", | ||
"version": "5.0.0-alpha.91", | ||
"description": "The framework agnostic core that powers TanStack Query", | ||
@@ -5,0 +5,0 @@ "author": "tannerlinsley", |
@@ -615,6 +615,10 @@ import { | ||
const { notifyOnChangeProps } = this.options | ||
const notifyOnChangePropsValue = | ||
typeof notifyOnChangeProps === 'function' | ||
? notifyOnChangeProps() | ||
: notifyOnChangeProps | ||
if ( | ||
notifyOnChangeProps === 'all' || | ||
(!notifyOnChangeProps && !this.#trackedProps.size) | ||
notifyOnChangePropsValue === 'all' || | ||
(!notifyOnChangePropsValue && !this.#trackedProps.size) | ||
) { | ||
@@ -624,3 +628,5 @@ return true | ||
const includedProps = new Set(notifyOnChangeProps ?? this.#trackedProps) | ||
const includedProps = new Set( | ||
notifyOnChangePropsValue ?? this.#trackedProps, | ||
) | ||
@@ -627,0 +633,0 @@ if (this.options.throwOnError) { |
@@ -98,2 +98,7 @@ /* istanbul ignore file */ | ||
export type NotifyOnChangeProps = | ||
| Array<keyof InfiniteQueryObserverResult> | ||
| 'all' | ||
| (() => Array<keyof InfiniteQueryObserverResult> | 'all') | ||
export interface QueryOptions< | ||
@@ -265,5 +270,6 @@ TQueryFnData = unknown, | ||
* When set to `'all'`, the component will re-render whenever a query is updated. | ||
* When set to a function, the function will be executed to compute the list of properties. | ||
* By default, access to properties will be tracked, and the component will only re-render when one of the tracked properties change. | ||
*/ | ||
notifyOnChangeProps?: Array<keyof InfiniteQueryObserverResult> | 'all' | ||
notifyOnChangeProps?: NotifyOnChangeProps | ||
/** | ||
@@ -297,4 +303,4 @@ * Whether errors should be thrown instead of setting the `error` property. | ||
export type WithRequired<T, K extends keyof T> = Omit<T, K> & | ||
Required<Pick<T, K>> | ||
export type WithRequired<T, K extends keyof T> = T & { [_ in K]: {} } | ||
export type DefaultedQueryObserverOptions< | ||
@@ -301,0 +307,0 @@ TQueryFnData = unknown, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1753199
26767