react-toolkits 0.8.47 → 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.
- package/CHANGELOG.md +12 -0
- package/lib/{index-o4GjoEFL.chunk.js → index-8eu00YF4.chunk.js} +1 -1
- package/lib/{index-C-hj-bT4.chunk.js → index-F3faSCo8.chunk.js} +2 -2
- package/lib/{index-D1Nw8Oc-.chunk.js → index-KpWVXj-d.chunk.js} +3 -3
- package/lib/{index-yNH1yWGv.chunk.js → index-OIBogbyi.chunk.js} +3 -3
- package/lib/{index-Ay1sFT_L.chunk.js → index-j-_vPBvt.chunk.js} +1858 -1849
- package/lib/{index-iQ0eRXNg.chunk.js → index-otQCfOM4.chunk.js} +2 -2
- package/lib/index.d.ts +13 -11
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as S, j as e, d as $ } from "./index-
|
|
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-
|
|
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
|
@@ -263,8 +263,8 @@ export declare interface PermissionGuardProps {
|
|
|
263
263
|
code: string;
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
export declare const QueryList: <Item extends object, Values extends object | undefined, Response_1 = ListResponse<Item
|
|
267
|
-
ref?: Ref<QueryListRef<Item, Values>> | undefined;
|
|
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, 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;
|
|
@@ -287,7 +288,7 @@ declare interface QueryListPayload<FormValues = any> {
|
|
|
287
288
|
formValues?: FormValues;
|
|
288
289
|
}
|
|
289
290
|
|
|
290
|
-
export declare interface QueryListProps<Item = any, Values = any, Response = any
|
|
291
|
+
export declare interface QueryListProps<Item = any, Values = any, Response = any> extends Pick<TableProps<Item>, 'columns' | 'rowKey' | 'tableLayout' | 'expandable' | 'rowSelection' | 'bordered' | 'components'> {
|
|
291
292
|
code?: string;
|
|
292
293
|
isGlobal?: boolean;
|
|
293
294
|
action: string;
|
|
@@ -295,19 +296,19 @@ export declare interface QueryListProps<Item = any, Values = any, Response = any
|
|
|
295
296
|
refreshInterval?: number;
|
|
296
297
|
onePage?: boolean;
|
|
297
298
|
defaultSize?: number;
|
|
298
|
-
headers?: RequestOptions['headers'] | ((payload: QueryListPayload<
|
|
299
|
-
getBody?: (payload: QueryListPayload<
|
|
300
|
-
getParams?: (payload: QueryListPayload<
|
|
299
|
+
headers?: RequestOptions['headers'] | ((payload: QueryListPayload<Values> | undefined) => RequestOptions['headers']);
|
|
300
|
+
getBody?: (payload: QueryListPayload<Values>) => RequestOptions['body'];
|
|
301
|
+
getParams?: (payload: QueryListPayload<Values>) => RequestOptions['params'];
|
|
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
|
|
|
@@ -315,8 +316,9 @@ declare interface QueryListState {
|
|
|
315
316
|
swrKeyMap: Map<string, string | null>;
|
|
316
317
|
payloadMap: Map<string, QueryListPayload>;
|
|
317
318
|
propsMap: Map<string, QueryListProps>;
|
|
319
|
+
setPayload(action: string, payload: QueryListPayload): void;
|
|
320
|
+
setSwrKey(action: string, key?: string | null): void;
|
|
318
321
|
mutate: QueryListMutator;
|
|
319
|
-
setPayload(action: string, payload: QueryListPayload, forceUpdate?: boolean): void;
|
|
320
322
|
remove(action: string): void;
|
|
321
323
|
}
|
|
322
324
|
|
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-
|
|
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";
|