@tanstack/vue-query 5.0.4 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/legacy/index.cjs +3 -0
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +2 -1
- package/build/legacy/index.d.ts +2 -1
- package/build/legacy/index.js +2 -0
- package/build/legacy/index.js.map +1 -1
- package/build/legacy/queryOptions.cjs +33 -0
- package/build/legacy/queryOptions.cjs.map +1 -0
- package/build/legacy/queryOptions.d.cts +14 -0
- package/build/legacy/queryOptions.d.ts +14 -0
- package/build/legacy/queryOptions.js +8 -0
- package/build/legacy/queryOptions.js.map +1 -0
- package/build/legacy/useBaseQuery.d.cts +1 -1
- package/build/legacy/useBaseQuery.d.ts +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +1 -1
- package/build/legacy/useQueries.d.cts +1 -1
- package/build/legacy/useQueries.d.ts +1 -1
- package/build/legacy/{useQuery-ee0d2f3e.d.ts → useQuery-45f53b2f.d.ts} +1 -1
- package/build/legacy/{useQuery-83bce497.d.ts → useQuery-eb363283.d.ts} +1 -1
- package/build/legacy/useQuery.d.cts +1 -1
- package/build/legacy/useQuery.d.ts +1 -1
- package/build/modern/index.cjs +3 -0
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.d.cts +2 -1
- package/build/modern/index.d.ts +2 -1
- package/build/modern/index.js +2 -0
- package/build/modern/index.js.map +1 -1
- package/build/modern/queryOptions.cjs +33 -0
- package/build/modern/queryOptions.cjs.map +1 -0
- package/build/modern/queryOptions.d.cts +14 -0
- package/build/modern/queryOptions.d.ts +14 -0
- package/build/modern/queryOptions.js +8 -0
- package/build/modern/queryOptions.js.map +1 -0
- package/build/modern/useBaseQuery.d.cts +1 -1
- package/build/modern/useBaseQuery.d.ts +1 -1
- package/build/modern/useInfiniteQuery.d.cts +1 -1
- package/build/modern/useInfiniteQuery.d.ts +1 -1
- package/build/modern/useQueries.d.cts +1 -1
- package/build/modern/useQueries.d.ts +1 -1
- package/build/modern/{useQuery-ee0d2f3e.d.ts → useQuery-45f53b2f.d.ts} +1 -1
- package/build/modern/{useQuery-83bce497.d.ts → useQuery-eb363283.d.ts} +1 -1
- package/build/modern/useQuery.d.cts +1 -1
- package/build/modern/useQuery.d.ts +1 -1
- package/package.json +2 -2
- package/src/__tests__/mutationCache.test.ts +1 -2
- package/src/__tests__/queryCache.test.ts +1 -2
- package/src/__tests__/queryClient.test.ts +1 -2
- package/src/__tests__/queryOptions.types.test.ts +142 -0
- package/src/__tests__/useInfiniteQuery.test.ts +1 -1
- package/src/__tests__/useInfiniteQuery.types.test.tsx +2 -1
- package/src/__tests__/useIsFetching.test.ts +1 -2
- package/src/__tests__/useIsMutating.test.ts +1 -2
- package/src/__tests__/useMutation.test.ts +1 -1
- package/src/__tests__/useMutation.types.test.tsx +2 -1
- package/src/__tests__/useQueries.test.ts +1 -2
- package/src/__tests__/useQuery.test.ts +1 -2
- package/src/__tests__/useQuery.types.test.ts +277 -0
- package/src/__tests__/useQueryClient.test.ts +1 -1
- package/src/__tests__/utils.test.ts +1 -0
- package/src/__tests__/vueQueryPlugin.test.ts +1 -2
- package/src/index.ts +1 -0
- package/src/queryOptions.ts +31 -0
- package/src/__tests__/useQuery.types.test.tsx +0 -88
package/build/legacy/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(src_exports, {
|
|
|
26
26
|
QueryClient: () => import_queryClient.QueryClient,
|
|
27
27
|
VUE_QUERY_CLIENT: () => import_utils.VUE_QUERY_CLIENT,
|
|
28
28
|
VueQueryPlugin: () => import_vueQueryPlugin.VueQueryPlugin,
|
|
29
|
+
queryOptions: () => import_queryOptions.queryOptions,
|
|
29
30
|
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
|
|
30
31
|
useIsFetching: () => import_useIsFetching.useIsFetching,
|
|
31
32
|
useIsMutating: () => import_useMutationState.useIsMutating,
|
|
@@ -41,6 +42,7 @@ var import_useQueryClient = require("./useQueryClient.cjs");
|
|
|
41
42
|
var import_vueQueryPlugin = require("./vueQueryPlugin.cjs");
|
|
42
43
|
var import_queryClient = require("./queryClient.cjs");
|
|
43
44
|
var import_queryCache = require("./queryCache.cjs");
|
|
45
|
+
var import_queryOptions = require("./queryOptions.cjs");
|
|
44
46
|
var import_mutationCache = require("./mutationCache.cjs");
|
|
45
47
|
var import_useQuery = require("./useQuery.cjs");
|
|
46
48
|
var import_useQueries = require("./useQueries.cjs");
|
|
@@ -56,6 +58,7 @@ var import_utils = require("./utils.cjs");
|
|
|
56
58
|
QueryClient,
|
|
57
59
|
VUE_QUERY_CLIENT,
|
|
58
60
|
VueQueryPlugin,
|
|
61
|
+
queryOptions,
|
|
59
62
|
useInfiniteQuery,
|
|
60
63
|
useIsFetching,
|
|
61
64
|
useIsMutating,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
package/build/legacy/index.d.cts
CHANGED
|
@@ -3,8 +3,9 @@ export { useQueryClient } from './useQueryClient.cjs';
|
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
4
4
|
export { QueryClient } from './queryClient.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
|
+
export { queryOptions } from './queryOptions.cjs';
|
|
6
7
|
export { MutationCache } from './mutationCache.cjs';
|
|
7
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-
|
|
8
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-eb363283.js';
|
|
8
9
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.cjs';
|
|
9
10
|
export { UseMutationOptions, UseMutationReturnType, useMutation } from './useMutation.cjs';
|
|
10
11
|
export { QueryFilters, useIsFetching } from './useIsFetching.cjs';
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export { useQueryClient } from './useQueryClient.js';
|
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
4
4
|
export { QueryClient } from './queryClient.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
|
+
export { queryOptions } from './queryOptions.js';
|
|
6
7
|
export { MutationCache } from './mutationCache.js';
|
|
7
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-
|
|
8
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-45f53b2f.js';
|
|
8
9
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.js';
|
|
9
10
|
export { UseMutationOptions, UseMutationReturnType, useMutation } from './useMutation.js';
|
|
10
11
|
export { QueryFilters, useIsFetching } from './useIsFetching.js';
|
package/build/legacy/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useQueryClient } from "./useQueryClient.js";
|
|
|
4
4
|
import { VueQueryPlugin } from "./vueQueryPlugin.js";
|
|
5
5
|
import { QueryClient } from "./queryClient.js";
|
|
6
6
|
import { QueryCache } from "./queryCache.js";
|
|
7
|
+
import { queryOptions } from "./queryOptions.js";
|
|
7
8
|
import { MutationCache } from "./mutationCache.js";
|
|
8
9
|
import { useQuery } from "./useQuery.js";
|
|
9
10
|
import { useQueries } from "./useQueries.js";
|
|
@@ -18,6 +19,7 @@ export {
|
|
|
18
19
|
QueryClient,
|
|
19
20
|
VUE_QUERY_CLIENT,
|
|
20
21
|
VueQueryPlugin,
|
|
22
|
+
queryOptions,
|
|
21
23
|
useInfiniteQuery,
|
|
22
24
|
useIsFetching,
|
|
23
25
|
useIsMutating,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/queryOptions.ts
|
|
21
|
+
var queryOptions_exports = {};
|
|
22
|
+
__export(queryOptions_exports, {
|
|
23
|
+
queryOptions: () => queryOptions
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(queryOptions_exports);
|
|
26
|
+
function queryOptions(options) {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
queryOptions
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=queryOptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core'\nimport type {\n DefinedInitialQueryOptions,\n UndefinedInitialQueryOptions,\n} from './useQuery'\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { f as UndefinedInitialQueryOptions, D as DefinedInitialQueryOptions } from './useQuery-eb363283.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.cjs';
|
|
5
|
+
import './types.cjs';
|
|
6
|
+
|
|
7
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
8
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
9
|
+
};
|
|
10
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
11
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { queryOptions };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { f as UndefinedInitialQueryOptions, D as DefinedInitialQueryOptions } from './useQuery-45f53b2f.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.js';
|
|
5
|
+
import './types.js';
|
|
6
|
+
|
|
7
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
8
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
9
|
+
};
|
|
10
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
11
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { queryOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core'\nimport type {\n DefinedInitialQueryOptions,\n UndefinedInitialQueryOptions,\n} from './useQuery'\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AA4BO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './queryClient.cjs';
|
|
4
|
-
export {
|
|
4
|
+
export { g as UseBaseQueryReturnType, h as useBaseQuery } from './useQuery-eb363283.js';
|
|
5
5
|
import './types.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './queryClient.js';
|
|
4
|
-
export {
|
|
4
|
+
export { g as UseBaseQueryReturnType, h as useBaseQuery } from './useQuery-45f53b2f.js';
|
|
5
5
|
import './types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-
|
|
2
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-eb363283.js';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import './queryClient.cjs';
|
|
5
5
|
import 'vue-demi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-
|
|
2
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-45f53b2f.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import './queryClient.js';
|
|
5
5
|
import 'vue-demi';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, QueryKey, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError, DefaultError } from '@tanstack/query-core';
|
|
3
|
-
import { U as UseQueryOptions } from './useQuery-
|
|
3
|
+
import { U as UseQueryOptions } from './useQuery-eb363283.js';
|
|
4
4
|
import { QueryClient } from './queryClient.cjs';
|
|
5
5
|
import { MaybeRefDeep, DistributiveOmit } from './types.cjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, QueryKey, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError, DefaultError } from '@tanstack/query-core';
|
|
3
|
-
import { U as UseQueryOptions } from './useQuery-
|
|
3
|
+
import { U as UseQueryOptions } from './useQuery-45f53b2f.js';
|
|
4
4
|
import { QueryClient } from './queryClient.js';
|
|
5
5
|
import { MaybeRefDeep, DistributiveOmit } from './types.js';
|
|
6
6
|
|
|
@@ -43,4 +43,4 @@ declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData =
|
|
|
43
43
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryDefinedReturnType<TData, TError>;
|
|
44
44
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient): UseQueryReturnType<TData, TError>;
|
|
45
45
|
|
|
46
|
-
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e,
|
|
46
|
+
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e, UndefinedInitialQueryOptions as f, UseBaseQueryReturnType as g, useBaseQuery as h, useQuery as u };
|
|
@@ -43,4 +43,4 @@ declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData =
|
|
|
43
43
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryDefinedReturnType<TData, TError>;
|
|
44
44
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient): UseQueryReturnType<TData, TError>;
|
|
45
45
|
|
|
46
|
-
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e,
|
|
46
|
+
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e, UndefinedInitialQueryOptions as f, UseBaseQueryReturnType as g, useBaseQuery as h, useQuery as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
|
-
export { D as DefinedInitialQueryOptions,
|
|
3
|
+
export { D as DefinedInitialQueryOptions, f as UndefinedInitialQueryOptions, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, u as useQuery } from './useQuery-eb363283.js';
|
|
4
4
|
import './types.cjs';
|
|
5
5
|
import './queryClient.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
|
-
export { D as DefinedInitialQueryOptions,
|
|
3
|
+
export { D as DefinedInitialQueryOptions, f as UndefinedInitialQueryOptions, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, u as useQuery } from './useQuery-45f53b2f.js';
|
|
4
4
|
import './types.js';
|
|
5
5
|
import './queryClient.js';
|
package/build/modern/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(src_exports, {
|
|
|
26
26
|
QueryClient: () => import_queryClient.QueryClient,
|
|
27
27
|
VUE_QUERY_CLIENT: () => import_utils.VUE_QUERY_CLIENT,
|
|
28
28
|
VueQueryPlugin: () => import_vueQueryPlugin.VueQueryPlugin,
|
|
29
|
+
queryOptions: () => import_queryOptions.queryOptions,
|
|
29
30
|
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
|
|
30
31
|
useIsFetching: () => import_useIsFetching.useIsFetching,
|
|
31
32
|
useIsMutating: () => import_useMutationState.useIsMutating,
|
|
@@ -41,6 +42,7 @@ var import_useQueryClient = require("./useQueryClient.cjs");
|
|
|
41
42
|
var import_vueQueryPlugin = require("./vueQueryPlugin.cjs");
|
|
42
43
|
var import_queryClient = require("./queryClient.cjs");
|
|
43
44
|
var import_queryCache = require("./queryCache.cjs");
|
|
45
|
+
var import_queryOptions = require("./queryOptions.cjs");
|
|
44
46
|
var import_mutationCache = require("./mutationCache.cjs");
|
|
45
47
|
var import_useQuery = require("./useQuery.cjs");
|
|
46
48
|
var import_useQueries = require("./useQueries.cjs");
|
|
@@ -56,6 +58,7 @@ var import_utils = require("./utils.cjs");
|
|
|
56
58
|
QueryClient,
|
|
57
59
|
VUE_QUERY_CLIENT,
|
|
58
60
|
VueQueryPlugin,
|
|
61
|
+
queryOptions,
|
|
59
62
|
useInfiniteQuery,
|
|
60
63
|
useIsFetching,
|
|
61
64
|
useIsMutating,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
package/build/modern/index.d.cts
CHANGED
|
@@ -3,8 +3,9 @@ export { useQueryClient } from './useQueryClient.cjs';
|
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
4
4
|
export { QueryClient } from './queryClient.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
|
+
export { queryOptions } from './queryOptions.cjs';
|
|
6
7
|
export { MutationCache } from './mutationCache.cjs';
|
|
7
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-
|
|
8
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-eb363283.js';
|
|
8
9
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.cjs';
|
|
9
10
|
export { UseMutationOptions, UseMutationReturnType, useMutation } from './useMutation.cjs';
|
|
10
11
|
export { QueryFilters, useIsFetching } from './useIsFetching.cjs';
|
package/build/modern/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export { useQueryClient } from './useQueryClient.js';
|
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
4
4
|
export { QueryClient } from './queryClient.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
|
+
export { queryOptions } from './queryOptions.js';
|
|
6
7
|
export { MutationCache } from './mutationCache.js';
|
|
7
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-
|
|
8
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-45f53b2f.js';
|
|
8
9
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.js';
|
|
9
10
|
export { UseMutationOptions, UseMutationReturnType, useMutation } from './useMutation.js';
|
|
10
11
|
export { QueryFilters, useIsFetching } from './useIsFetching.js';
|
package/build/modern/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { useQueryClient } from "./useQueryClient.js";
|
|
|
4
4
|
import { VueQueryPlugin } from "./vueQueryPlugin.js";
|
|
5
5
|
import { QueryClient } from "./queryClient.js";
|
|
6
6
|
import { QueryCache } from "./queryCache.js";
|
|
7
|
+
import { queryOptions } from "./queryOptions.js";
|
|
7
8
|
import { MutationCache } from "./mutationCache.js";
|
|
8
9
|
import { useQuery } from "./useQuery.js";
|
|
9
10
|
import { useQueries } from "./useQueries.js";
|
|
@@ -18,6 +19,7 @@ export {
|
|
|
18
19
|
QueryClient,
|
|
19
20
|
VUE_QUERY_CLIENT,
|
|
20
21
|
VueQueryPlugin,
|
|
22
|
+
queryOptions,
|
|
21
23
|
useInfiniteQuery,
|
|
22
24
|
useIsFetching,
|
|
23
25
|
useIsMutating,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/queryOptions.ts
|
|
21
|
+
var queryOptions_exports = {};
|
|
22
|
+
__export(queryOptions_exports, {
|
|
23
|
+
queryOptions: () => queryOptions
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(queryOptions_exports);
|
|
26
|
+
function queryOptions(options) {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
queryOptions
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=queryOptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core'\nimport type {\n DefinedInitialQueryOptions,\n UndefinedInitialQueryOptions,\n} from './useQuery'\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { f as UndefinedInitialQueryOptions, D as DefinedInitialQueryOptions } from './useQuery-eb363283.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.cjs';
|
|
5
|
+
import './types.cjs';
|
|
6
|
+
|
|
7
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
8
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
9
|
+
};
|
|
10
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
11
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { queryOptions };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { f as UndefinedInitialQueryOptions, D as DefinedInitialQueryOptions } from './useQuery-45f53b2f.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.js';
|
|
5
|
+
import './types.js';
|
|
6
|
+
|
|
7
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
8
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
9
|
+
};
|
|
10
|
+
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
|
11
|
+
queryKey: DataTag<TQueryKey, TData>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { queryOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type { DataTag, DefaultError, QueryKey } from '@tanstack/query-core'\nimport type {\n DefinedInitialQueryOptions,\n UndefinedInitialQueryOptions,\n} from './useQuery'\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TData>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AA4BO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './queryClient.cjs';
|
|
4
|
-
export {
|
|
4
|
+
export { g as UseBaseQueryReturnType, h as useBaseQuery } from './useQuery-eb363283.js';
|
|
5
5
|
import './types.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './queryClient.js';
|
|
4
|
-
export {
|
|
4
|
+
export { g as UseBaseQueryReturnType, h as useBaseQuery } from './useQuery-45f53b2f.js';
|
|
5
5
|
import './types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-
|
|
2
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-eb363283.js';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import './queryClient.cjs';
|
|
5
5
|
import 'vue-demi';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-
|
|
2
|
+
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './useQuery-45f53b2f.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import './queryClient.js';
|
|
5
5
|
import 'vue-demi';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, QueryKey, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError, DefaultError } from '@tanstack/query-core';
|
|
3
|
-
import { U as UseQueryOptions } from './useQuery-
|
|
3
|
+
import { U as UseQueryOptions } from './useQuery-eb363283.js';
|
|
4
4
|
import { QueryClient } from './queryClient.cjs';
|
|
5
5
|
import { MaybeRefDeep, DistributiveOmit } from './types.cjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, QueryKey, QueriesPlaceholderDataFunction, QueryFunction, ThrowOnError, DefaultError } from '@tanstack/query-core';
|
|
3
|
-
import { U as UseQueryOptions } from './useQuery-
|
|
3
|
+
import { U as UseQueryOptions } from './useQuery-45f53b2f.js';
|
|
4
4
|
import { QueryClient } from './queryClient.js';
|
|
5
5
|
import { MaybeRefDeep, DistributiveOmit } from './types.js';
|
|
6
6
|
|
|
@@ -43,4 +43,4 @@ declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData =
|
|
|
43
43
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryDefinedReturnType<TData, TError>;
|
|
44
44
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient): UseQueryReturnType<TData, TError>;
|
|
45
45
|
|
|
46
|
-
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e,
|
|
46
|
+
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e, UndefinedInitialQueryOptions as f, UseBaseQueryReturnType as g, useBaseQuery as h, useQuery as u };
|
|
@@ -43,4 +43,4 @@ declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData =
|
|
|
43
43
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryDefinedReturnType<TData, TError>;
|
|
44
44
|
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, queryClient?: QueryClient): UseQueryReturnType<TData, TError>;
|
|
45
45
|
|
|
46
|
-
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e,
|
|
46
|
+
export { DefinedInitialQueryOptions as D, UseQueryOptions as U, useInfiniteQuery as a, UseQueryReturnType as b, UseQueryDefinedReturnType as c, UseInfiniteQueryOptions as d, UseInfiniteQueryReturnType as e, UndefinedInitialQueryOptions as f, UseBaseQueryReturnType as g, useBaseQuery as h, useQuery as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
|
-
export { D as DefinedInitialQueryOptions,
|
|
3
|
+
export { D as DefinedInitialQueryOptions, f as UndefinedInitialQueryOptions, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, u as useQuery } from './useQuery-eb363283.js';
|
|
4
4
|
import './types.cjs';
|
|
5
5
|
import './queryClient.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'vue-demi';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
|
-
export { D as DefinedInitialQueryOptions,
|
|
3
|
+
export { D as DefinedInitialQueryOptions, f as UndefinedInitialQueryOptions, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, u as useQuery } from './useQuery-45f53b2f.js';
|
|
4
4
|
import './types.js';
|
|
5
5
|
import './queryClient.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-query",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue",
|
|
5
5
|
"author": "Damian Osipiuk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@tanstack/match-sorter-utils": "^8.8.4",
|
|
50
50
|
"@vue/devtools-api": "^6.5.0",
|
|
51
51
|
"vue-demi": "^0.14.6",
|
|
52
|
-
"@tanstack/query-core": "5.0.
|
|
52
|
+
"@tanstack/query-core": "5.0.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@vue/composition-api": "1.7.2",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { beforeAll, describe, expect, test, vi } from 'vitest'
|
|
1
2
|
import { ref } from 'vue-demi'
|
|
2
3
|
import { MutationCache as MutationCacheOrigin } from '@tanstack/query-core'
|
|
3
|
-
|
|
4
|
-
import { vi } from 'vitest'
|
|
5
4
|
import { MutationCache } from '../mutationCache'
|
|
6
5
|
|
|
7
6
|
describe('MutationCache', () => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { beforeAll, describe, expect, test, vi } from 'vitest'
|
|
1
2
|
import { ref } from 'vue-demi'
|
|
2
3
|
import { QueryCache as QueryCacheOrigin } from '@tanstack/query-core'
|
|
3
|
-
|
|
4
|
-
import { vi } from 'vitest'
|
|
5
4
|
import { QueryCache } from '../queryCache'
|
|
6
5
|
|
|
7
6
|
describe('QueryCache', () => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { describe, expect, test, vi } from 'vitest'
|
|
1
2
|
import { ref } from 'vue-demi'
|
|
2
3
|
import { QueryClient as QueryClientOrigin } from '@tanstack/query-core'
|
|
3
|
-
|
|
4
|
-
import { vi } from 'vitest'
|
|
5
4
|
import { QueryClient } from '../queryClient'
|
|
6
5
|
|
|
7
6
|
vi.mock('@tanstack/query-core')
|