react-toolkits 0.8.31 → 0.8.33

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-eAJECAOs.chunk.js";
1
+ import { a as S, j as e, d as $ } from "./index-i4KNvJuA.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-GRN5dgvP.chunk.js";
3
+ import { h as R, i as B } from "./index-XX29V_Aq.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
@@ -225,6 +225,13 @@ declare type MenuItemType2 = Merge<MenuItemType, {
225
225
 
226
226
  export declare const mixedStorage: StateStorage;
227
227
 
228
+ declare interface ModalState {
229
+ open: Map<string, boolean>;
230
+ getOpen: (uuid: string) => boolean;
231
+ show: (uuid: string) => void;
232
+ hide: (uuid: string) => void;
233
+ }
234
+
228
235
  export declare const NavMenu: NamedExoticComponent<object>;
229
236
 
230
237
  export declare type NavMenuItem = MenuItemType2 | SubMenuType2 | MenuItemGroupType2 | MenuDividerType | null;
@@ -351,10 +358,10 @@ export declare interface TokenState {
351
358
  clearToken: () => void;
352
359
  }
353
360
 
354
- export declare function useFormModal<Values, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
355
- show: (config?: {
356
- initialValues?: RecursivePartial<Values>;
357
- extraValues?: ExtraValues;
361
+ export declare function useFormModal<Values, ExtraValues extends NonNullable<unknown> = NonNullable<unknown>>(props: UseFormModalProps<Values, ExtraValues>): {
362
+ show: ({ initialValues, extraValues, }?: {
363
+ initialValues?: RecursivePartial<Values> | undefined;
364
+ extraValues?: ExtraValues | undefined;
358
365
  }) => void;
359
366
  hide: () => void;
360
367
  modal: JSX_2.Element;
@@ -380,6 +387,7 @@ export declare const useGameStore: UseBoundStore<Omit<StoreApi<GameState>, "pers
380
387
  }>;
381
388
 
382
389
  export declare function useModal(props: UseModalProps): {
390
+ uuid: string;
383
391
  show: () => void;
384
392
  hide: () => void;
385
393
  modal: JSX_2.Element;
@@ -390,6 +398,8 @@ declare interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoadin
390
398
  onConfirm?: () => void | Promise<void>;
391
399
  }
392
400
 
401
+ export declare const useModalStore: UseBoundStore<StoreApi<ModalState>>;
402
+
393
403
  export declare function usePermission(code: string | undefined, isGlobalNS?: boolean, config?: SWRConfiguration): {
394
404
  accessible: boolean;
395
405
  isValidating: boolean;
package/lib/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { C as r, D as n, F as u, 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 T, S as h, q as k, t as q, v as Q, r as R, b as v, x as B, y as C, c as M, z as N, u as f, B as w, E as D, d as E, a as H, J as I, K as O } from "./index-eAJECAOs.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-i4KNvJuA.chunk.js";
2
2
  import "react";
3
3
  import "antd";
4
4
  import "react-dom";
5
5
  import "react-router-dom";
6
6
  export {
7
7
  r as ContextProvider,
8
- n as DynamicTags,
9
- u as FilterFormWrapper,
8
+ u as DynamicTags,
9
+ n as FilterFormWrapper,
10
10
  m as GameSelect,
11
11
  d as Highlight,
12
12
  l as InfiniteList,
@@ -20,22 +20,23 @@ export {
20
20
  c as QueryList,
21
21
  F as QueryListAction,
22
22
  G as RequestError,
23
- T as RequireGame,
24
- h as SignIn,
25
- k as UserWidget,
26
- q as contextStore,
27
- Q as mixedStorage,
28
- R as request,
29
- v as useFormModal,
30
- B as useGameStore,
31
- C as useModal,
32
- M as usePermission,
33
- N as usePermissions,
34
- f as useQueryListStore,
35
- w as useTokenStore,
36
- D as useTokenValidation,
37
- E as useToolkitsContext,
38
- H as useTranslation,
39
- I as withBaseRoutes,
40
- O as withLayout
23
+ M as RequireGame,
24
+ T as SignIn,
25
+ h as UserWidget,
26
+ k as contextStore,
27
+ q as mixedStorage,
28
+ Q as request,
29
+ R as useFormModal,
30
+ v as useGameStore,
31
+ B as useModal,
32
+ C as useModalStore,
33
+ N as usePermission,
34
+ f as usePermissions,
35
+ w as useQueryListStore,
36
+ D as useTokenStore,
37
+ E as useTokenValidation,
38
+ H as useToolkitsContext,
39
+ I as useTranslation,
40
+ O as withBaseRoutes,
41
+ W as withLayout
41
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-toolkits",
3
- "version": "0.8.31",
3
+ "version": "0.8.33",
4
4
  "packageManager": "^pnpm@8.7.5",
5
5
  "sideEffects": [
6
6
  "**/*.css"