react-toolkits 0.8.43 → 0.8.44

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/lib/index.d.ts CHANGED
@@ -124,7 +124,7 @@ export declare const Layout: FC<PropsWithChildren>;
124
124
 
125
125
  declare interface ListResponse<T = any> {
126
126
  list: T[];
127
- total?: number;
127
+ total: number;
128
128
  }
129
129
 
130
130
  export declare type Locale = {
@@ -279,12 +279,12 @@ declare interface QueryListDataType<Item> {
279
279
  total: number;
280
280
  }
281
281
 
282
- declare type QueryListMutator = <T = any>(key: string, data?: QueryListDataType<T> | Promise<QueryListDataType<T>> | MutatorCallback<QueryListDataType<T>>, opts?: MutatorOptions<QueryListDataType<T>>) => void;
282
+ declare type QueryListMutator = <T = any>(action: string, data?: QueryListDataType<T> | Promise<QueryListDataType<T>> | MutatorCallback<QueryListDataType<T>>, opts?: MutatorOptions<QueryListDataType<T>>) => void;
283
283
 
284
- declare interface QueryListPayload<Arg = any> {
284
+ declare interface QueryListPayload<FormValues = any> {
285
285
  page?: number;
286
286
  size?: number;
287
- arg?: Arg;
287
+ formValues?: FormValues;
288
288
  }
289
289
 
290
290
  export declare interface QueryListProps<Item = any, Values = any, Response = any, Arg extends Values = Values> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered' | 'components'> {
@@ -295,9 +295,9 @@ export declare interface QueryListProps<Item = any, Values = any, Response = any
295
295
  refreshInterval?: number;
296
296
  onePage?: boolean;
297
297
  defaultSize?: number;
298
- headers?: RequestOptions['headers'] | ((payload: QueryListPayload<Arg>) => RequestOptions['headers']);
299
- body?: RequestOptions['body'] | ((payload: QueryListPayload<Arg>) => RequestOptions['body']);
300
- params?: RequestOptions['params'] | ((payload: QueryListPayload<Arg>) => RequestOptions['params']);
298
+ headers?: RequestOptions['headers'] | ((payload: QueryListPayload<Arg> | undefined) => RequestOptions['headers']);
299
+ getBody?: (payload: QueryListPayload<Arg>) => RequestOptions['body'];
300
+ getParams?: (payload: QueryListPayload<Arg>) => RequestOptions['params'];
301
301
  renderForm?: (form: FormInstance<Values>) => ReactNode;
302
302
  extra?: (form: FormInstance<Values>) => ReactNode;
303
303
  onTableChange?: TableProps<Item>['onChange'];
@@ -312,9 +312,9 @@ export declare interface QueryListRef<Item = any, Values = any> {
312
312
  }
313
313
 
314
314
  declare interface QueryListState {
315
- keyMap: Map<string, string | null>;
315
+ swrKeyMap: Map<string, string | null>;
316
316
  payloadMap: Map<string, QueryListPayload>;
317
- propsMap: Map<string, QueryListProps<any>>;
317
+ propsMap: Map<string, QueryListProps>;
318
318
  mutate: QueryListMutator;
319
319
  setPayload(key: string, payload: QueryListPayload, forceUpdate?: boolean): void;
320
320
  }
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r, D as u, F as n, G as m, H as d, i as l, L as p, N as L, k as S, O as g, l as y, P, n as x, Q as c, o as F, R as G, p as M, S as T, q as h, t as k, v as q, r as Q, b as R, x as v, y as B, z as C, c as N, B as f, u as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-TorC7885.chunk.js";
1
+ import { C as r, D as u, F as n, G as m, H as d, i as l, L as p, N as L, k as S, O as g, l as y, P, n as x, Q as c, o as F, R as G, p as M, S as T, q as h, t as k, v as q, r as Q, b as R, x as v, y as B, z as C, c as N, B as f, u as w, E as D, J as E, d as H, a as I, K as O, M as W } from "./index-uwVSeX-w.chunk.js";
2
2
  import "react";
3
3
  import "antd";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-toolkits",
3
- "version": "0.8.43",
3
+ "version": "0.8.44",
4
4
  "packageManager": "^pnpm@8.7.5",
5
5
  "sideEffects": [
6
6
  "**/*.css"