react-toolkits 0.8.48 → 0.8.49

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.
@@ -1,6 +1,6 @@
1
- import { a as S, j as e, d as $ } from "./index-bnH8J_cZ.chunk.js";
1
+ import { a as S, j as e, d as $ } from "./index-j-_vPBvt.chunk.js";
2
2
  import { Collapse as D, Checkbox as k, Row as G, Col as _, Skeleton as T, Typography as A, Divider as w, Card as K, Space as M, Select as E, Button as N, Empty as O } from "antd";
3
- import { h as R, i as B } from "./index-K8VkAjED.chunk.js";
3
+ import { h as R, i as B } from "./index-8eu00YF4.chunk.js";
4
4
  import { useState as P, useCallback as F, useEffect as b } from "react";
5
5
  const q = (x) => {
6
6
  const { permissions: l, readonly: t, expand: d, value: a, onChange: r } = x, [m, p] = P([]), [g, u] = P({}), [c, f] = P(a ?? []), C = S(), h = F((s) => {
package/lib/index.d.ts CHANGED
@@ -264,7 +264,7 @@ export declare interface PermissionGuardProps {
264
264
  }
265
265
 
266
266
  export declare const QueryList: <Item extends object, Values extends object | undefined, Response_1 = ListResponse<Item>>(props: QueryListProps<Item, Values, Response_1> & {
267
- ref?: Ref<QueryListRef<Item, Values>> | undefined;
267
+ ref?: Ref<QueryListRef<Item, Values, Response_1>> | undefined;
268
268
  }) => ReactElement;
269
269
 
270
270
  export declare enum QueryListAction {
@@ -274,9 +274,10 @@ export declare enum QueryListAction {
274
274
  Init = "init"
275
275
  }
276
276
 
277
- declare interface QueryListDataType<Item> {
277
+ declare interface QueryListDataType<Item, Response> {
278
278
  dataSource: Item[];
279
279
  total: number;
280
+ originalData: Response;
280
281
  }
281
282
 
282
283
  declare type QueryListMutator = <T = any>(action: string, data?: QueryListDataType<T> | Promise<QueryListDataType<T>> | MutatorCallback<QueryListDataType<T>>, opts?: MutatorOptions<QueryListDataType<T>>) => void;
@@ -301,13 +302,13 @@ export declare interface QueryListProps<Item = any, Values = any, Response = any
301
302
  renderForm?: (form: FormInstance<Values>) => ReactNode;
302
303
  extra?: (form: FormInstance<Values>) => ReactNode;
303
304
  onTableChange?: TableProps<Item>['onChange'];
304
- afterSuccess?: (action: QueryListAction, data: QueryListDataType<Item>) => void;
305
+ afterSuccess?: (action: QueryListAction, data: QueryListDataType<Item, Response>) => void;
305
306
  getTotal?: (response: Response) => number;
306
307
  getDataSource?: (response: Response) => Item[];
307
308
  }
308
309
 
309
- export declare interface QueryListRef<Item = any, Values = any> {
310
- data: QueryListDataType<Item>;
310
+ export declare interface QueryListRef<Item = any, Values = any, Response = any> {
311
+ data: QueryListDataType<Item, Response>;
311
312
  form: FormInstance<Values>;
312
313
  }
313
314
 
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-bnH8J_cZ.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-j-_vPBvt.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.48",
3
+ "version": "0.8.49",
4
4
  "packageManager": "^pnpm@8.7.5",
5
5
  "sideEffects": [
6
6
  "**/*.css"