@panneau/data 4.0.55 → 4.0.56
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/dist/index.d.ts +10 -10
- package/dist/index.js +3 -3
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions, UseQueryResult, UseMutationResult, UseMutationOptions, QueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { Item, Pagination, Resource, ResourceItem } from '@panneau/core';
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|
|
7
7
|
declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Promise<T>, opts?: any): {
|
|
@@ -27,10 +27,10 @@ declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Pro
|
|
|
27
27
|
isRefetching: boolean;
|
|
28
28
|
isStale: boolean;
|
|
29
29
|
isEnabled: boolean;
|
|
30
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<
|
|
30
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<T>, Error>>;
|
|
31
31
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
32
|
-
promise: Promise<
|
|
33
|
-
item:
|
|
32
|
+
promise: Promise<NoInfer<T>>;
|
|
33
|
+
item: T;
|
|
34
34
|
} | {
|
|
35
35
|
error: null;
|
|
36
36
|
isError: false;
|
|
@@ -54,10 +54,10 @@ declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Pro
|
|
|
54
54
|
isRefetching: boolean;
|
|
55
55
|
isStale: boolean;
|
|
56
56
|
isEnabled: boolean;
|
|
57
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<
|
|
57
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<T>, Error>>;
|
|
58
58
|
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
59
|
-
promise: Promise<
|
|
60
|
-
item:
|
|
59
|
+
promise: Promise<NoInfer<T>>;
|
|
60
|
+
item: T;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
type UseItemsResponse<T> = {
|
|
@@ -227,7 +227,7 @@ interface ApiProviderProps {
|
|
|
227
227
|
children: ReactNode;
|
|
228
228
|
}
|
|
229
229
|
declare function useApi(): Api;
|
|
230
|
-
declare function ApiProvider({ api: initialApi, baseUrl, onUnauthorized, children, }: ApiProviderProps):
|
|
230
|
+
declare function ApiProvider({ api: initialApi, baseUrl, onUnauthorized, children, }: ApiProviderProps): react.JSX.Element;
|
|
231
231
|
|
|
232
232
|
type QueryInitialData = Record<string, unknown> | Array<Record<string, unknown>>;
|
|
233
233
|
interface QueryProviderProps {
|
|
@@ -237,14 +237,14 @@ interface QueryProviderProps {
|
|
|
237
237
|
children: ReactNode;
|
|
238
238
|
}
|
|
239
239
|
declare function useQueryContext(): QueryClient;
|
|
240
|
-
declare function QueryProvider({ config: initialConfig, initialKey, initialData, children, }: QueryProviderProps):
|
|
240
|
+
declare function QueryProvider({ config: initialConfig, initialKey, initialData, children, }: QueryProviderProps): react.JSX.Element;
|
|
241
241
|
|
|
242
242
|
interface DataProviderProps {
|
|
243
243
|
api?: Api | null;
|
|
244
244
|
apiBaseUrl?: string;
|
|
245
245
|
children?: ReactNode;
|
|
246
246
|
}
|
|
247
|
-
declare function DataProvider({ api, apiBaseUrl, children }: DataProviderProps):
|
|
247
|
+
declare function DataProvider({ api, apiBaseUrl, children }: DataProviderProps): react.JSX.Element;
|
|
248
248
|
|
|
249
249
|
export { Api, ApiProvider, Base as BaseApi, DataProvider, QueryProvider, useApi, useItem, useItems, useQueryContext, useResourceClone, useResourceDestroy, useResourceItem, useResourceItems, useResourceRestore, useResourceCreate as useResourceStore, useResourceUpdate };
|
|
250
250
|
export type { UseItemsResponse };
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import queryString from 'query-string';
|
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
import { useQuery, keepPreviousData, useMutation, QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
8
8
|
import { c } from 'react/compiler-runtime';
|
|
9
|
-
import isArray from 'lodash/isArray';
|
|
10
|
-
import isObject from 'lodash/isObject';
|
|
11
|
-
import isString from 'lodash/isString';
|
|
9
|
+
import isArray from 'lodash-es/isArray';
|
|
10
|
+
import isObject from 'lodash-es/isObject';
|
|
11
|
+
import isString from 'lodash-es/isString';
|
|
12
12
|
|
|
13
13
|
function useItem(scope, id, loader, t0) {
|
|
14
14
|
const $ = c(15);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/data",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.56",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"type": "module",
|
|
37
37
|
"module": "dist/index.js",
|
|
38
38
|
"types": "dist/index.d.ts",
|
|
39
|
+
"sideEffects": false,
|
|
39
40
|
"exports": {
|
|
40
41
|
".": {
|
|
41
42
|
"types": "./dist/index.d.ts",
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
"@babel/runtime": "^7.28.6",
|
|
63
64
|
"@folklore/fetch": "^0.1.21",
|
|
64
65
|
"@folklore/routes": "^0.2.44",
|
|
65
|
-
"@panneau/core": "^4.0.
|
|
66
|
+
"@panneau/core": "^4.0.56",
|
|
66
67
|
"@tanstack/react-query": "^5.100.9",
|
|
67
68
|
"lodash": "^4.17.21",
|
|
68
69
|
"query-string": "^9.0.0"
|
|
@@ -70,5 +71,5 @@
|
|
|
70
71
|
"publishConfig": {
|
|
71
72
|
"access": "public"
|
|
72
73
|
},
|
|
73
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9c3ba1bdd04699e0150f84a35f2bdbdec073bd59"
|
|
74
75
|
}
|