react-toolkits 0.9.7 → 0.10.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - a3cb8c4: chore: change repo path
8
+
9
+ ## 0.10.0
10
+
11
+ ### Minor Changes
12
+
13
+ - c3216f4: feat: set the default type of a generic of QueryList
14
+
3
15
  ## 0.9.7
4
16
 
5
17
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -248,6 +248,11 @@ interface PermissionGuardProps {
248
248
  }
249
249
  declare const PermissionGuard: FC<PropsWithChildren<PermissionGuardProps>>;
250
250
 
251
+ interface ListResponse<T = any> {
252
+ list: T[];
253
+ total: number;
254
+ }
255
+
251
256
  interface QueryListPayload<FormValues = any> {
252
257
  page?: number;
253
258
  size?: number;
@@ -290,7 +295,7 @@ interface QueryListProps<Item extends AnyObject = AnyObject, Values = any, Respo
290
295
  getTotal?: (response: Response) => number;
291
296
  getDataSource?: (response: Response, form: FormInstance<Values>) => Item[];
292
297
  }
293
- declare const QueryList: <Item extends AnyObject, Values, Response>(props: QueryListProps<Item, Values, Response> & {
298
+ declare const QueryList: <Item extends AnyObject = AnyObject, Values extends object | undefined = undefined, Response = ListResponse<Item>>(props: QueryListProps<Item, Values, Response> & {
294
299
  ref?: Ref<QueryListRef<Item, Values, Response>>;
295
300
  }) => ReactElement;
296
301
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-toolkits",
3
3
  "type": "module",
4
- "version": "0.9.7",
4
+ "version": "0.10.1",
5
5
  "sideEffects": [
6
6
  "**/*.css"
7
7
  ],
@@ -26,10 +26,10 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "author": "chaos1ee <chaos.maybeeee@gmail.com>",
29
- "homepage": "https://github.com/chaos1ee/everythingflow/tree/main/packages/react-toolkits#readme",
29
+ "homepage": "https://github.com/chaos1ee/flow/tree/main/packages/react-toolkits#readme",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "ssh://git@github.com/chaos1ee/everythingflow.git",
32
+ "url": "ssh://git@github.com/chaos1ee/flow.git",
33
33
  "directory": "packages/react-toolkits"
34
34
  },
35
35
  "publishConfig": {
@@ -64,8 +64,8 @@
64
64
  "ts-essentials": "^10.0.0",
65
65
  "tsup": "^8.1.0",
66
66
  "typescript": "^5.4.5",
67
+ "@flow97/eslint-config-react": "0.0.3",
67
68
  "tailwind-config": "0.1.2",
68
- "@flow97/eslint-config-react": "0.0.2",
69
69
  "tsconfig": "0.0.6"
70
70
  },
71
71
  "peerDependencies": {