@ahoo-wang/fetcher-react 2.6.15 → 2.6.16
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.es.js +156 -2112
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -17
- package/dist/index.umd.js.map +1 -1
- package/dist/wow/index.d.ts +1 -0
- package/dist/wow/index.d.ts.map +1 -1
- package/dist/wow/useCountQuery.d.ts +23 -38
- package/dist/wow/useCountQuery.d.ts.map +1 -1
- package/dist/wow/useListQuery.d.ts +31 -57
- package/dist/wow/useListQuery.d.ts.map +1 -1
- package/dist/wow/useListStreamQuery.d.ts +31 -64
- package/dist/wow/useListStreamQuery.d.ts.map +1 -1
- package/dist/wow/usePagedQuery.d.ts +32 -57
- package/dist/wow/usePagedQuery.d.ts.map +1 -1
- package/dist/wow/useQuery.d.ts +76 -0
- package/dist/wow/useQuery.d.ts.map +1 -0
- package/dist/wow/useSingleQuery.d.ts +31 -52
- package/dist/wow/useSingleQuery.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/wow/useListQueryState.d.ts +0 -66
- package/dist/wow/useListQueryState.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSingleQuery.d.ts","sourceRoot":"","sources":["../../src/wow/useSingleQuery.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"useSingleQuery.d.ts","sourceRoot":"","sources":["../../src/wow/useSingleQuery.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAY,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB,CACpC,CAAC,EACD,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,CAAC,GAAG,YAAY,CAChB,SAAQ,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CACnD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB,CACnC,CAAC,EACD,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,CAAC,GAAG,YAAY,CAChB,SAAQ,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,cAAc,CAC5B,CAAC,EACD,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,CAAC,GAAG,YAAY,EAEhB,OAAO,EAAE,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,GAC3C,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAEpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahoo-wang/fetcher-react",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.16",
|
|
4
4
|
"description": "React integration for Fetcher HTTP client. Provides React Hooks and components for seamless data fetching with automatic re-rendering and loading states.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"globals": "^16.4.0",
|
|
56
56
|
"prettier": "^3.6.2",
|
|
57
57
|
"typescript": "^5.9.3",
|
|
58
|
-
"typescript-eslint": "^8.
|
|
58
|
+
"typescript-eslint": "^8.46.0",
|
|
59
59
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
60
60
|
"unplugin-dts": "1.0.0-beta.6",
|
|
61
61
|
"vite": "^7.1.9",
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { ListQuery, Condition, Projection, FieldSort } from '@ahoo-wang/fetcher-wow';
|
|
2
|
-
/**
|
|
3
|
-
* Options for the useListQueryState hook.
|
|
4
|
-
* @template FIELDS - The type of the fields used in conditions and projections.
|
|
5
|
-
*/
|
|
6
|
-
export interface UseListQueryStateOptions<FIELDS extends string = string> {
|
|
7
|
-
/**
|
|
8
|
-
* The initial list query configuration.
|
|
9
|
-
*/
|
|
10
|
-
initialQuery: ListQuery<FIELDS>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Return type for the useListQueryState hook.
|
|
14
|
-
* @template FIELDS - The type of the fields used in conditions and projections.
|
|
15
|
-
*/
|
|
16
|
-
export interface UseListQueryStateReturn<FIELDS extends string = string> {
|
|
17
|
-
/**
|
|
18
|
-
* The current condition.
|
|
19
|
-
*/
|
|
20
|
-
condition: Condition<FIELDS>;
|
|
21
|
-
/**
|
|
22
|
-
* The current projection.
|
|
23
|
-
*/
|
|
24
|
-
projection?: Projection<FIELDS>;
|
|
25
|
-
/**
|
|
26
|
-
* The current sort order.
|
|
27
|
-
*/
|
|
28
|
-
sort?: FieldSort<FIELDS>[];
|
|
29
|
-
/**
|
|
30
|
-
* The current limit.
|
|
31
|
-
*/
|
|
32
|
-
limit?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Sets the condition for the query.
|
|
35
|
-
* @param condition - The new condition.
|
|
36
|
-
*/
|
|
37
|
-
setCondition: (condition: Condition<FIELDS>) => void;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the projection for the query.
|
|
40
|
-
* @param projection - The new projection.
|
|
41
|
-
*/
|
|
42
|
-
setProjection: (projection: Projection<FIELDS>) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the sort order for the query.
|
|
45
|
-
* @param sort - The new sort array.
|
|
46
|
-
*/
|
|
47
|
-
setSort: (sort: FieldSort<FIELDS>[]) => void;
|
|
48
|
-
/**
|
|
49
|
-
* Sets the limit for the query.
|
|
50
|
-
* @param limit - The new limit.
|
|
51
|
-
*/
|
|
52
|
-
setLimit: (limit: number) => void;
|
|
53
|
-
/**
|
|
54
|
-
* Builds the list query object from current state.
|
|
55
|
-
* @returns The list query object.
|
|
56
|
-
*/
|
|
57
|
-
buildQuery: () => ListQuery<FIELDS>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* A React hook for managing query state (condition, projection, sort, limit).
|
|
61
|
-
* @template FIELDS - The type of the fields used in conditions and projections.
|
|
62
|
-
* @param options - The options for the hook.
|
|
63
|
-
* @returns An object containing the query state and methods to update it.
|
|
64
|
-
*/
|
|
65
|
-
export declare function useListQueryState<FIELDS extends string = string>(options: UseListQueryStateOptions<FIELDS>): UseListQueryStateReturn<FIELDS>;
|
|
66
|
-
//# sourceMappingURL=useListQueryState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useListQueryState.d.ts","sourceRoot":"","sources":["../../src/wow/useListQueryState.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,EACT,SAAS,EACT,KAAK,UAAU,EAEf,SAAS,EACV,MAAM,wBAAwB,CAAC;AAGhC;;;GAGG;AACH,MAAM,WAAW,wBAAwB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IACtE;;OAEG;IACH,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM;IACrE;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD;;;OAGG;IACH,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,UAAU,EAAE,MAAM,SAAS,CAAC,MAAM,CAAC,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9D,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,uBAAuB,CAAC,MAAM,CAAC,CAwCjC"}
|