react-toolkits 2.22.10 → 2.22.12
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/chunk-3N7LFLKJ.js +2 -0
- package/lib/chunk-3N7LFLKJ.js.map +1 -0
- package/lib/chunk-BRZIJDNT.js +2 -0
- package/lib/chunk-BRZIJDNT.js.map +1 -0
- package/lib/chunk-JQHQKJFH.js +2 -0
- package/lib/chunk-JQHQKJFH.js.map +1 -0
- package/lib/chunk-N67BWR5M.js +3 -0
- package/lib/chunk-N67BWR5M.js.map +1 -0
- package/lib/chunk-OLVGFJFN.js +2 -0
- package/lib/chunk-OLVGFJFN.js.map +1 -0
- package/lib/chunk-PB74M2DE.js +2 -0
- package/lib/chunk-PB74M2DE.js.map +1 -0
- package/lib/chunk-PMXRIKKI.js +2 -0
- package/lib/chunk-PMXRIKKI.js.map +1 -0
- package/lib/chunk-S6NRRFWG.js +2 -0
- package/lib/chunk-S6NRRFWG.js.map +1 -0
- package/lib/chunk-ZRGA4NV7.js +2 -0
- package/lib/chunk-ZRGA4NV7.js.map +1 -0
- package/lib/createMenuItem-WS2MRQJF.js +2 -0
- package/lib/createMenuItem-WS2MRQJF.js.map +1 -0
- package/lib/index.css +805 -1
- package/lib/index.d.ts +792 -21
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -0
- package/lib/menuItemList-CVNXJ7CP.js +2 -0
- package/lib/menuItemList-CVNXJ7CP.js.map +1 -0
- package/lib/roleDetail-WPKPZSX2.js +2 -0
- package/lib/roleDetail-WPKPZSX2.js.map +1 -0
- package/lib/roleList-RY6ZEVB4.js +2 -0
- package/lib/roleList-RY6ZEVB4.js.map +1 -0
- package/lib/updateMenuItem-AJRUUJ6K.js +2 -0
- package/lib/updateMenuItem-AJRUUJ6K.js.map +1 -0
- package/lib/userDetail-QQDMP7HT.js +2 -0
- package/lib/userDetail-QQDMP7HT.js.map +1 -0
- package/lib/userList-Q4RULNHM.js +2 -0
- package/lib/userList-Q4RULNHM.js.map +1 -0
- package/locale/context.js +2 -1
- package/locale/context.js.map +1 -0
- package/locale/en_GB.js +2 -1
- package/locale/en_GB.js.map +1 -0
- package/locale/hooks.js +2 -1
- package/locale/hooks.js.map +1 -0
- package/locale/index.js +2 -1
- package/locale/index.js.map +1 -0
- package/locale/ja_JP.js +2 -1
- package/locale/ja_JP.js.map +1 -0
- package/locale/ko_KR.js +2 -1
- package/locale/ko_KR.js.map +1 -0
- package/locale/zh_CN.js +2 -1
- package/locale/zh_CN.js.map +1 -0
- package/package.json +8 -36
- package/lib/chunk-4GULXGNG.js +0 -1
- package/lib/chunk-7NM3DK6A.js +0 -1
- package/lib/chunk-FXPGR372.js +0 -0
- package/lib/chunk-HZHE6R72.js +0 -1
- package/lib/chunk-JIBSYGRB.js +0 -1
- package/lib/chunk-JLHCYGWL.js +0 -1
- package/lib/chunk-JTDKSGJR.js +0 -1
- package/lib/chunk-LRMME3YZ.js +0 -2
- package/lib/chunk-MSKNHKMD.js +0 -1
- package/lib/chunk-O7AQM3CB.js +0 -1
- package/lib/chunk-OLM4QNJB.js +0 -1
- package/lib/chunk-RITI5HRV.js +0 -1
- package/lib/chunk-SJK2ZPEL.js +0 -1
- package/lib/chunk-WHOTHZUW.js +0 -1
- package/lib/chunk-X6ZI7RL7.js +0 -1
- package/lib/chunk-XQERUQGQ.js +0 -1
- package/lib/chunk-XWIQENHQ.js +0 -2
- package/lib/chunk-YIJSACFM.js +0 -1
- package/lib/chunk-ZCPZYTPN.js +0 -1
- package/lib/components.d.ts +0 -429
- package/lib/components.js +0 -1
- package/lib/constants.d.ts +0 -11
- package/lib/constants.js +0 -1
- package/lib/createMenuItem-HUQG2HQY.js +0 -1
- package/lib/hooks.d.ts +0 -108
- package/lib/hooks.js +0 -1
- package/lib/logo-L6MFCL6M.png +0 -0
- package/lib/menuItemList-AS6ZDOTZ.js +0 -1
- package/lib/modules.d.ts +0 -7
- package/lib/modules.js +0 -1
- package/lib/pages.d.ts +0 -20
- package/lib/pages.js +0 -1
- package/lib/roleDetail-2QUBILZK.js +0 -1
- package/lib/roleList-KWWVOLWJ.js +0 -1
- package/lib/services.d.ts +0 -196
- package/lib/services.js +0 -1
- package/lib/types-DVKf5poe.d.ts +0 -19
- package/lib/types.d.ts +0 -23
- package/lib/types.js +0 -1
- package/lib/updateMenuItem-7SUIOBXS.js +0 -1
- package/lib/userDetail-TXGT2W7X.js +0 -1
- package/lib/userList-ELLBMK76.js +0 -1
- package/lib/utils.d.ts +0 -6
- package/lib/utils.js +0 -1
- package/locale/chunk-GHHHKGNN.js +0 -1
package/lib/hooks.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DrawerProps, Button, FormProps, FormInstance, ModalProps } from 'antd';
|
|
3
|
-
import { ReactNode, ComponentProps } from 'react';
|
|
4
|
-
import { AnyObject } from 'antd/es/_util/type';
|
|
5
|
-
import { RecursivePartial } from './types.js';
|
|
6
|
-
import * as zustand from 'zustand';
|
|
7
|
-
|
|
8
|
-
interface UseDrawerOperation {
|
|
9
|
-
hide: () => void;
|
|
10
|
-
}
|
|
11
|
-
interface UseDrawerProps extends Omit<DrawerProps, 'open' | 'confirmLoading' | 'onClose' | 'footer'> {
|
|
12
|
-
content?: ReactNode | ((operation: UseDrawerOperation) => ReactNode);
|
|
13
|
-
onConfirm?: () => void | Promise<void>;
|
|
14
|
-
afterOpen?: () => void | Promise<void>;
|
|
15
|
-
afterClose?: () => void | Promise<void>;
|
|
16
|
-
footer?: ReactNode | null;
|
|
17
|
-
confirmText?: string;
|
|
18
|
-
cancelText?: string;
|
|
19
|
-
confirmButtonProps?: ComponentProps<typeof Button>;
|
|
20
|
-
cancelButtonProps?: ComponentProps<typeof Button>;
|
|
21
|
-
}
|
|
22
|
-
declare function useDrawer(props: UseDrawerProps): {
|
|
23
|
-
id: number;
|
|
24
|
-
show: () => Promise<void>;
|
|
25
|
-
hide: () => void;
|
|
26
|
-
confirmLoading: boolean;
|
|
27
|
-
drawer: react_jsx_runtime.JSX.Element;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
interface UseFormDrawerProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseDrawerProps, 'onConfirm' | 'content' | 'onShow' | 'afterClose'> {
|
|
31
|
-
formProps?: Omit<FormProps, 'form'>;
|
|
32
|
-
form?: FormInstance<Values>;
|
|
33
|
-
content?: ReactNode | ((extraValues: ExtraValues, operation: UseDrawerOperation) => ReactNode);
|
|
34
|
-
onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
|
|
35
|
-
onSuccess?: () => void;
|
|
36
|
-
afterClose?: (form: FormInstance<Values>) => void;
|
|
37
|
-
}
|
|
38
|
-
declare function useFormDrawer<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormDrawerProps<Values, ExtraValues>): {
|
|
39
|
-
id: number;
|
|
40
|
-
show: (options?: {
|
|
41
|
-
initialValues?: RecursivePartial<Values>;
|
|
42
|
-
extraValues?: ExtraValues;
|
|
43
|
-
}) => void;
|
|
44
|
-
hide: () => void;
|
|
45
|
-
drawer: react_jsx_runtime.JSX.Element;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
interface DrawerState {
|
|
49
|
-
open: Map<number, boolean>;
|
|
50
|
-
usedIds: Set<number>;
|
|
51
|
-
isOpen: (uuid: number) => boolean;
|
|
52
|
-
show: (uuid: number) => void;
|
|
53
|
-
hide: (uuid: number) => void;
|
|
54
|
-
hideAll: () => void;
|
|
55
|
-
checkUniqueness: (uuid: number) => boolean;
|
|
56
|
-
registerIds: (uuid: number) => boolean;
|
|
57
|
-
cleanup: (uuid: number) => void;
|
|
58
|
-
}
|
|
59
|
-
declare const useDrawerStore: zustand.UseBoundStore<zustand.StoreApi<DrawerState>>;
|
|
60
|
-
|
|
61
|
-
interface UseModalOperation {
|
|
62
|
-
hide: () => void;
|
|
63
|
-
}
|
|
64
|
-
interface UseModalProps extends Omit<ModalProps, 'open' | 'confirmLoading' | 'onOk' | 'onCancel'> {
|
|
65
|
-
content?: ReactNode | ((operation: UseModalOperation) => ReactNode);
|
|
66
|
-
onConfirm?: () => void | Promise<void>;
|
|
67
|
-
afterOpen?: () => void | Promise<void>;
|
|
68
|
-
afterClose?: () => void | Promise<void>;
|
|
69
|
-
}
|
|
70
|
-
declare function useModal(props: UseModalProps): {
|
|
71
|
-
id: number;
|
|
72
|
-
show: () => Promise<void>;
|
|
73
|
-
hide: () => void;
|
|
74
|
-
modal: react_jsx_runtime.JSX.Element;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
interface UseFormModalProps<Values extends AnyObject = AnyObject, ExtraValues = any> extends Omit<UseModalProps, 'onConfirm' | 'content' | 'onShow' | 'afterClose'> {
|
|
78
|
-
formProps?: Omit<FormProps, 'form'>;
|
|
79
|
-
form?: FormInstance<Values>;
|
|
80
|
-
content?: ReactNode | ((extraValues: ExtraValues, operation: UseModalOperation) => ReactNode);
|
|
81
|
-
onConfirm?: (values: Values, extraValues: ExtraValues) => void | Promise<void>;
|
|
82
|
-
onSuccess?: () => void;
|
|
83
|
-
afterClose?: (form: FormInstance<Values>) => void;
|
|
84
|
-
}
|
|
85
|
-
declare function useFormModal<Values extends AnyObject = AnyObject, ExtraValues = any>(props: UseFormModalProps<Values, ExtraValues>): {
|
|
86
|
-
id: number;
|
|
87
|
-
show: (options?: {
|
|
88
|
-
initialValues?: RecursivePartial<Values>;
|
|
89
|
-
extraValues?: ExtraValues;
|
|
90
|
-
}) => void;
|
|
91
|
-
hide: () => void;
|
|
92
|
-
modal: react_jsx_runtime.JSX.Element;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
interface ModalState {
|
|
96
|
-
open: Map<number, boolean>;
|
|
97
|
-
usedIds: Set<number>;
|
|
98
|
-
isOpen: (uuid: number) => boolean;
|
|
99
|
-
show: (uuid: number) => void;
|
|
100
|
-
hide: (uuid: number) => void;
|
|
101
|
-
hideAll: () => void;
|
|
102
|
-
checkUniqueness: (uuid: number) => boolean;
|
|
103
|
-
registerIds: (uuid: number) => boolean;
|
|
104
|
-
cleanup: (uuid: number) => void;
|
|
105
|
-
}
|
|
106
|
-
declare const useModalStore: zustand.UseBoundStore<zustand.StoreApi<ModalState>>;
|
|
107
|
-
|
|
108
|
-
export { type UseFormDrawerProps, type UseFormModalProps, useDrawer, useDrawerStore, useFormDrawer, useFormModal, useModal, useModalStore };
|
package/lib/hooks.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as useDrawer,a as useDrawerStore,c as useFormDrawer}from'./chunk-ZCPZYTPN.js';export{c as useFormModal,b as useModal,a as useModalStore}from'./chunk-HZHE6R72.js';import'./chunk-OLM4QNJB.js';
|
package/lib/logo-L6MFCL6M.png
DELETED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-JIBSYGRB.js';import {a as a$1}from'./chunk-RITI5HRV.js';import {b as b$1,d}from'./chunk-4GULXGNG.js';import {a}from'./chunk-7NM3DK6A.js';import {b as b$2}from'./chunk-X6ZI7RL7.js';import {b}from'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {App,Card,Button,Space,Popconfirm}from'antd';import {useNavigate}from'react-router-dom';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var M=b(()=>{let{t:n}=a(),{message:y}=App.useApp(),f=c(),{refetch:g}=b$1(),{refetch:h}=b$2(),m=useNavigate();return jsx(Fragment,{children:jsx(Card,{title:"\u83DC\u5355\u7BA1\u7406",extra:jsx(Button,{type:"primary",onClick:()=>{m("./create");},children:"\u521B\u5EFA\u83DC\u5355\u9879"}),children:jsx(d,{identifier:"menu-item-list",onePage:!0,code:"9900001",rowKey:"id",columns:[{title:"\u83DC\u5355\u540D\u79F0",dataIndex:"category",key:"category"},{title:"\u524D\u7AEF\u8DEF\u7531",dataIndex:"front_route"},{title:"Order",dataIndex:"order"},{title:"Is Common",dataIndex:"is_common",key:"is_common",render:o=>o?"\u662F":"\u5426"},{title:"\u6A21\u677F\u540D\u79F0",dataIndex:"model_name",key:"model_name"},{title:"\u64CD\u4F5C",key:"action",width:150,align:"center",render(o,t){return t.is_model?jsxs(Space,{size:"small",children:[jsx(Button,{type:"link",onClick:()=>{m(`./update/${t.id}`);},children:n("global.update")}),jsx(Popconfirm,{title:"\u5220\u9664\u83DC\u5355",placement:"topRight",description:jsxs(a$1,{texts:[t.category],children:["\u786E\u5B9A\u8981\u5220\u9664\u83DC\u5355 ",t.category," \u5417\uFF1F"]}),onConfirm:async()=>{await f.mutate(t.id),g("menu-item-list"),h(),y.success("\u5220\u9664\u6210\u529F");},children:jsx(Button,{danger:!0,type:"link",size:"small",children:n("global.delete")})})]}):null}}],request:{url:"/api/usystem/menu/list",method:"GET"},dataAdapter:o=>({items:o})})})})},{isGlobal:!0}),G=M;export{G as default};
|
package/lib/modules.d.ts
DELETED
package/lib/modules.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as menu,b as permission}from'./chunk-YIJSACFM.js';
|
package/lib/pages.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
interface NotFoundProps {
|
|
5
|
-
redirectUrl?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const NotFound: FC<NotFoundProps>;
|
|
8
|
-
|
|
9
|
-
declare const _default: {
|
|
10
|
-
(props: any): react_jsx_runtime.JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
interface SignInProps {
|
|
15
|
-
extra?: ReactNode;
|
|
16
|
-
title?: string;
|
|
17
|
-
}
|
|
18
|
-
declare const SignIn: FC<SignInProps>;
|
|
19
|
-
|
|
20
|
-
export { NotFound, _default as OperationLogList, SignIn };
|
package/lib/pages.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as NotFound,b as OperationLogList,c as SignIn}from'./chunk-XWIQENHQ.js';import'./chunk-JTDKSGJR.js';import'./chunk-4GULXGNG.js';import'./chunk-7NM3DK6A.js';import'./chunk-X6ZI7RL7.js';import'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$2,a as a$2}from'./chunk-JLHCYGWL.js';import {b as b$1}from'./chunk-XQERUQGQ.js';import {a as a$1}from'./chunk-SJK2ZPEL.js';import'./chunk-HZHE6R72.js';import {a}from'./chunk-7NM3DK6A.js';import'./chunk-X6ZI7RL7.js';import {b}from'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {Breadcrumb,Card,Skeleton,Descriptions,Divider}from'antd';import {useParams,Link}from'react-router-dom';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var C=()=>{let c=useParams(),{t:o}=a(),{data:t,isLoading:d,refetch:u}=b$1(c.name),{show:f,modal:b}=b$2({mode:"update",onSuccess(){u();}}),D=async()=>{f({initialValues:{permissions:t?.permissions,name:t?.name.replace(/^role_/,"")},extraValues:{id:t.id}});};return jsxs(Fragment,{children:[jsx(Breadcrumb,{style:{marginBottom:"1.5rem"},items:[{key:"1",title:jsx(Link,{to:"..",relative:"path",children:o("global.role")})},{key:"2",title:o("RoleDetail.title")}]}),jsx(Card,{title:o("RoleDetail.title"),extra:jsx(a$1,{code:"200003",onClick:D,children:o("global.update")}),children:jsxs(Skeleton,{loading:d,children:[jsxs(Descriptions,{column:2,layout:"vertical",className:"mb-6",children:[jsx(Descriptions.Item,{label:o("global.name"),children:t?.name}),jsx(Descriptions.Item,{label:"ID",children:t?.id}),jsx(Descriptions.Item,{label:o("global.creationTime"),children:t?.ctime})]}),jsx(Divider,{}),jsx(a$2,{readonly:!0,value:t?.permissions})]})}),b]})},N=b(C,{isGlobal:!0});export{N as default};
|
package/lib/roleList-KWWVOLWJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$2}from'./chunk-JLHCYGWL.js';import {e}from'./chunk-XQERUQGQ.js';import {a as a$4}from'./chunk-RITI5HRV.js';import {a as a$3}from'./chunk-SJK2ZPEL.js';import'./chunk-HZHE6R72.js';import {b as b$1,d as d$1}from'./chunk-4GULXGNG.js';import {a as a$1}from'./chunk-7NM3DK6A.js';import {a}from'./chunk-X6ZI7RL7.js';import {b,a as a$2,d}from'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {UsergroupAddOutlined}from'@ant-design/icons';import {App,Space,Card}from'antd';import {Link}from'react-router-dom';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var $=()=>{let{modal:h,message:k}=App.useApp(),{data:L}=a("200005"),{t}=a$1(),{permissionVersion:T}=a$2(e=>e),{refetch:s}=b$1(),b=d(),{show:C,modal:w}=b$2({mode:"create",onSuccess(){s("role-list",{page:1});}}),{show:V,modal:I}=b$2({mode:"update",onSuccess(){s("role-list");}}),S=e(),x=async e=>{let o=await b.get(`/api/usystem/role/info${T==="v2"?"V2":""}?name=${e.name}`);V({initialValues:{permissions:o.permissions,name:o.name.replace(/^role_/,"")},extraValues:{id:o?.id}});},P=[{title:t("global.name"),key:"name",render(e){return L?jsx(Link,{to:`${e.name}`,relative:"path",children:e.name}):jsx(Fragment,{children:e.name})}},{title:"ID",dataIndex:"id",key:"id"},{title:t("global.creationTime"),dataIndex:"ctime",key:"ctime"},{title:t("global.operation"),width:150,align:"center",render:(e,o)=>jsxs(Space,{size:"small",children:[jsx(a$3,{code:"200003",size:"small",type:"link",onClick:async()=>{x(o);},children:t("global.update")}),jsx(a$3,{danger:!0,code:"200004",size:"small",type:"link",onClick:()=>{h.confirm({title:t("Role.deleteTitle"),content:jsx(a$4,{texts:[o.name],children:t("Role.deleteContent",{role:o.name})}),async onOk(){await S.mutate({id:o.id,name:o.name}),s("role-list"),k.success(t("Role.deleteSuccessfully"));}});},children:t("global.delete")})]})}];return jsxs(Fragment,{children:[jsx(Card,{title:t("global.role"),extra:jsx(a$3,{type:"primary",code:"200002",icon:jsx(UsergroupAddOutlined,{}),onClick:()=>{C();},children:t("Role.createTitle")}),children:jsx(d$1,{identifier:"role-list",rowKey:"name",columns:P,code:"200001",request:{url:"/api/usystem/role/list",method:"GET"},dataAdapter:e=>({total:e?.Total,items:e?.List})})}),w,I]})},W=b($,{isGlobal:!0});export{W as default};
|
package/lib/services.d.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { Options } from 'ky';
|
|
3
|
-
import { G as Game } from './types-DVKf5poe.js';
|
|
4
|
-
import { MenuListItem } from './types.js';
|
|
5
|
-
|
|
6
|
-
declare function usePermission(code?: string | string[], config?: Options): {
|
|
7
|
-
data: boolean | Record<string, boolean>;
|
|
8
|
-
error: Error;
|
|
9
|
-
isError: true;
|
|
10
|
-
isPending: false;
|
|
11
|
-
isLoading: false;
|
|
12
|
-
isLoadingError: false;
|
|
13
|
-
isRefetchError: true;
|
|
14
|
-
isSuccess: false;
|
|
15
|
-
isPlaceholderData: false;
|
|
16
|
-
status: "error";
|
|
17
|
-
dataUpdatedAt: number;
|
|
18
|
-
errorUpdatedAt: number;
|
|
19
|
-
failureCount: number;
|
|
20
|
-
failureReason: Error | null;
|
|
21
|
-
errorUpdateCount: number;
|
|
22
|
-
isFetched: boolean;
|
|
23
|
-
isFetchedAfterMount: boolean;
|
|
24
|
-
isFetching: boolean;
|
|
25
|
-
isInitialLoading: boolean;
|
|
26
|
-
isPaused: boolean;
|
|
27
|
-
isRefetching: boolean;
|
|
28
|
-
isStale: boolean;
|
|
29
|
-
isEnabled: boolean;
|
|
30
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
31
|
-
has_all?: boolean;
|
|
32
|
-
}, Error>>;
|
|
33
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
34
|
-
promise: Promise<Record<string, boolean> & {
|
|
35
|
-
has_all?: boolean;
|
|
36
|
-
}>;
|
|
37
|
-
} | {
|
|
38
|
-
data: boolean | Record<string, boolean>;
|
|
39
|
-
error: null;
|
|
40
|
-
isError: false;
|
|
41
|
-
isPending: false;
|
|
42
|
-
isLoading: false;
|
|
43
|
-
isLoadingError: false;
|
|
44
|
-
isRefetchError: false;
|
|
45
|
-
isSuccess: true;
|
|
46
|
-
isPlaceholderData: false;
|
|
47
|
-
status: "success";
|
|
48
|
-
dataUpdatedAt: number;
|
|
49
|
-
errorUpdatedAt: number;
|
|
50
|
-
failureCount: number;
|
|
51
|
-
failureReason: Error | null;
|
|
52
|
-
errorUpdateCount: number;
|
|
53
|
-
isFetched: boolean;
|
|
54
|
-
isFetchedAfterMount: boolean;
|
|
55
|
-
isFetching: boolean;
|
|
56
|
-
isInitialLoading: boolean;
|
|
57
|
-
isPaused: boolean;
|
|
58
|
-
isRefetching: boolean;
|
|
59
|
-
isStale: boolean;
|
|
60
|
-
isEnabled: boolean;
|
|
61
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
62
|
-
has_all?: boolean;
|
|
63
|
-
}, Error>>;
|
|
64
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
65
|
-
promise: Promise<Record<string, boolean> & {
|
|
66
|
-
has_all?: boolean;
|
|
67
|
-
}>;
|
|
68
|
-
} | {
|
|
69
|
-
data: boolean | Record<string, boolean>;
|
|
70
|
-
error: Error;
|
|
71
|
-
isError: true;
|
|
72
|
-
isPending: false;
|
|
73
|
-
isLoading: false;
|
|
74
|
-
isLoadingError: true;
|
|
75
|
-
isRefetchError: false;
|
|
76
|
-
isSuccess: false;
|
|
77
|
-
isPlaceholderData: false;
|
|
78
|
-
status: "error";
|
|
79
|
-
dataUpdatedAt: number;
|
|
80
|
-
errorUpdatedAt: number;
|
|
81
|
-
failureCount: number;
|
|
82
|
-
failureReason: Error | null;
|
|
83
|
-
errorUpdateCount: number;
|
|
84
|
-
isFetched: boolean;
|
|
85
|
-
isFetchedAfterMount: boolean;
|
|
86
|
-
isFetching: boolean;
|
|
87
|
-
isInitialLoading: boolean;
|
|
88
|
-
isPaused: boolean;
|
|
89
|
-
isRefetching: boolean;
|
|
90
|
-
isStale: boolean;
|
|
91
|
-
isEnabled: boolean;
|
|
92
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
93
|
-
has_all?: boolean;
|
|
94
|
-
}, Error>>;
|
|
95
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
96
|
-
promise: Promise<Record<string, boolean> & {
|
|
97
|
-
has_all?: boolean;
|
|
98
|
-
}>;
|
|
99
|
-
} | {
|
|
100
|
-
data: boolean | Record<string, boolean>;
|
|
101
|
-
error: null;
|
|
102
|
-
isError: false;
|
|
103
|
-
isPending: true;
|
|
104
|
-
isLoading: true;
|
|
105
|
-
isLoadingError: false;
|
|
106
|
-
isRefetchError: false;
|
|
107
|
-
isSuccess: false;
|
|
108
|
-
isPlaceholderData: false;
|
|
109
|
-
status: "pending";
|
|
110
|
-
dataUpdatedAt: number;
|
|
111
|
-
errorUpdatedAt: number;
|
|
112
|
-
failureCount: number;
|
|
113
|
-
failureReason: Error | null;
|
|
114
|
-
errorUpdateCount: number;
|
|
115
|
-
isFetched: boolean;
|
|
116
|
-
isFetchedAfterMount: boolean;
|
|
117
|
-
isFetching: boolean;
|
|
118
|
-
isInitialLoading: boolean;
|
|
119
|
-
isPaused: boolean;
|
|
120
|
-
isRefetching: boolean;
|
|
121
|
-
isStale: boolean;
|
|
122
|
-
isEnabled: boolean;
|
|
123
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
124
|
-
has_all?: boolean;
|
|
125
|
-
}, Error>>;
|
|
126
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
127
|
-
promise: Promise<Record<string, boolean> & {
|
|
128
|
-
has_all?: boolean;
|
|
129
|
-
}>;
|
|
130
|
-
} | {
|
|
131
|
-
data: boolean | Record<string, boolean>;
|
|
132
|
-
error: null;
|
|
133
|
-
isError: false;
|
|
134
|
-
isPending: true;
|
|
135
|
-
isLoadingError: false;
|
|
136
|
-
isRefetchError: false;
|
|
137
|
-
isSuccess: false;
|
|
138
|
-
isPlaceholderData: false;
|
|
139
|
-
status: "pending";
|
|
140
|
-
dataUpdatedAt: number;
|
|
141
|
-
errorUpdatedAt: number;
|
|
142
|
-
failureCount: number;
|
|
143
|
-
failureReason: Error | null;
|
|
144
|
-
errorUpdateCount: number;
|
|
145
|
-
isFetched: boolean;
|
|
146
|
-
isFetchedAfterMount: boolean;
|
|
147
|
-
isFetching: boolean;
|
|
148
|
-
isLoading: boolean;
|
|
149
|
-
isInitialLoading: boolean;
|
|
150
|
-
isPaused: boolean;
|
|
151
|
-
isRefetching: boolean;
|
|
152
|
-
isStale: boolean;
|
|
153
|
-
isEnabled: boolean;
|
|
154
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
155
|
-
has_all?: boolean;
|
|
156
|
-
}, Error>>;
|
|
157
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
158
|
-
promise: Promise<Record<string, boolean> & {
|
|
159
|
-
has_all?: boolean;
|
|
160
|
-
}>;
|
|
161
|
-
} | {
|
|
162
|
-
data: boolean | Record<string, boolean>;
|
|
163
|
-
isError: false;
|
|
164
|
-
error: null;
|
|
165
|
-
isPending: false;
|
|
166
|
-
isLoading: false;
|
|
167
|
-
isLoadingError: false;
|
|
168
|
-
isRefetchError: false;
|
|
169
|
-
isSuccess: true;
|
|
170
|
-
isPlaceholderData: true;
|
|
171
|
-
status: "success";
|
|
172
|
-
dataUpdatedAt: number;
|
|
173
|
-
errorUpdatedAt: number;
|
|
174
|
-
failureCount: number;
|
|
175
|
-
failureReason: Error | null;
|
|
176
|
-
errorUpdateCount: number;
|
|
177
|
-
isFetched: boolean;
|
|
178
|
-
isFetchedAfterMount: boolean;
|
|
179
|
-
isFetching: boolean;
|
|
180
|
-
isInitialLoading: boolean;
|
|
181
|
-
isPaused: boolean;
|
|
182
|
-
isRefetching: boolean;
|
|
183
|
-
isStale: boolean;
|
|
184
|
-
isEnabled: boolean;
|
|
185
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Record<string, boolean> & {
|
|
186
|
-
has_all?: boolean;
|
|
187
|
-
}, Error>>;
|
|
188
|
-
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
189
|
-
promise: Promise<Record<string, boolean> & {
|
|
190
|
-
has_all?: boolean;
|
|
191
|
-
}>;
|
|
192
|
-
};
|
|
193
|
-
declare function useMenuList(): _tanstack_react_query.UseQueryResult<MenuListItem[], Error>;
|
|
194
|
-
declare const useGames: () => _tanstack_react_query.UseQueryResult<Game[], Error>;
|
|
195
|
-
|
|
196
|
-
export { useGames, useMenuList, usePermission };
|
package/lib/services.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{c as useGames,b as useMenuList,a as usePermission}from'./chunk-X6ZI7RL7.js';import'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';
|
package/lib/types-DVKf5poe.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type Area = 'all' | 'cn' | 'global';
|
|
2
|
-
type ScreenOrientation = 0 | 1;
|
|
3
|
-
interface Game {
|
|
4
|
-
id: number;
|
|
5
|
-
game_id: string | number;
|
|
6
|
-
game_group: string;
|
|
7
|
-
name: string;
|
|
8
|
-
screen_type: ScreenOrientation;
|
|
9
|
-
area: Area;
|
|
10
|
-
icon: string;
|
|
11
|
-
auth: string;
|
|
12
|
-
ctime: string;
|
|
13
|
-
mtime: string;
|
|
14
|
-
is_delete: 0 | 1;
|
|
15
|
-
is_new_game: 0 | 1;
|
|
16
|
-
server_type: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type { Game as G };
|
package/lib/types.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface Permission {
|
|
2
|
-
label: string;
|
|
3
|
-
value: string;
|
|
4
|
-
route: string;
|
|
5
|
-
method?: string;
|
|
6
|
-
}
|
|
7
|
-
interface MenuListItem {
|
|
8
|
-
id: number;
|
|
9
|
-
category: string;
|
|
10
|
-
is_common: boolean;
|
|
11
|
-
is_model: boolean;
|
|
12
|
-
model_name: string;
|
|
13
|
-
permissions: Permission[];
|
|
14
|
-
front_route: string;
|
|
15
|
-
order: number;
|
|
16
|
-
scheme: string;
|
|
17
|
-
ext: string;
|
|
18
|
-
}
|
|
19
|
-
type RecursivePartial<T> = NonNullable<T> extends object ? {
|
|
20
|
-
[P in keyof T]?: NonNullable<T[P]> extends (infer U)[] ? RecursivePartial<U>[] : NonNullable<T[P]> extends object ? RecursivePartial<T[P]> : T[P];
|
|
21
|
-
} : T;
|
|
22
|
-
|
|
23
|
-
export type { MenuListItem, Permission, RecursivePartial };
|
package/lib/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import'./chunk-FXPGR372.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-JIBSYGRB.js';import {b as b$2}from'./chunk-X6ZI7RL7.js';import {b,d,e}from'./chunk-WHOTHZUW.js';import {c}from'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {Editor}from'@monaco-editor/react';import {useQuery}from'@tanstack/react-query';import {App,Form,Card,Input,Switch,InputNumber,Button}from'antd';import {useEffect}from'react';import {useNavigate,useParams}from'react-router-dom';import {jsx,jsxs}from'react/jsx-runtime';var R=b(()=>{let{message:b}=App.useApp(),[i]=Form.useForm(),l=useNavigate(),{mutate:_}=b$1(),r=useParams(),{refetch:x}=b$2(),N=d(),{data:p,isLoading:v}=useQuery({queryKey:e.menus.detail(Number(r.id)),queryFn:()=>N.get(`/api/usystem/menu/info?id=${r.id}`),enabled:!!r.id}),q=async n=>{let{permissions:m,front_route:a,...u}=n;await _({...u,permissions:m?JSON.parse(m):void 0,front_route:c+a,id:+r.id}),x(),b.success("\u66F4\u65B0\u6210\u529F",.8,()=>l("../..",{relative:"route"}));};return useEffect(()=>{let{permissions:n,front_route:m,...a}=p??{},u=JSON.stringify(n||[],null,2),E=m?.replace(c,"");i.setFieldsValue({...a,permissions:u,front_route:E});},[p,i]),jsx(Card,{title:"\u66F4\u65B0\u83DC\u5355\u9879",loading:v,children:jsxs(Form,{scrollToFirstError:!0,form:i,labelCol:{flex:"120px"},initialValues:{is_common:!1,is_model:!1,order:0},onFinish:q,children:[jsx(Form.Item,{label:"\u83DC\u5355\u9879\u540D\u79F0",name:"category",rules:[{required:!0}],children:jsx(Input,{})}),jsx(Form.Item,{label:"\u524D\u7AEF\u8DEF\u7531",name:"front_route",rules:[{required:!0}],children:jsx(Input,{prefix:c})}),jsx(Form.Item,{label:"\u6A21\u677F\u540D\u79F0",name:"model_name",rules:[{required:!0}],children:jsx(Input,{})}),jsx(Form.Item,{label:"Is Common",name:"is_common",rules:[{required:!0}],valuePropName:"checked",children:jsx(Switch,{})}),jsx(Form.Item,{label:"Order",name:"order",children:jsx(InputNumber,{className:"w-full"})}),jsx(Form.Item,{label:"\u63A5\u53E3\u89C4\u5219",name:"permissions",children:jsx(Editor,{theme:"vs-dark",height:"300px",language:"json",options:{minimap:{enabled:!1}}})}),jsx(Form.Item,{label:"Schema",name:"scheme",rules:[{required:!0}],children:jsx(Editor,{theme:"vs-dark",height:"600px",language:"json",options:{minimap:{enabled:!1}}})}),jsx(Form.Item,{label:"Ext",name:"ext",children:jsx(Input.TextArea,{rows:5})}),jsx(Form.Item,{children:jsxs("div",{className:"flex justify-center gap-8",children:[jsx(Button,{type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"}),jsx(Button,{onClick:()=>{l("../..",{relative:"path"});},children:"\u53D6\u6D88"})]})})]})})},{isGlobal:!0}),X=R;export{X as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-O7AQM3CB.js';import'./chunk-XQERUQGQ.js';import {a as a$3}from'./chunk-SJK2ZPEL.js';import'./chunk-HZHE6R72.js';import {a}from'./chunk-7NM3DK6A.js';import {c,a as a$2}from'./chunk-X6ZI7RL7.js';import {a as a$1,d,e}from'./chunk-WHOTHZUW.js';import {e as e$1}from'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {useQuery}from'@tanstack/react-query';import {Tag,Breadcrumb,Card,Descriptions,Table}from'antd';import {useParams,Link}from'react-router-dom';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var G=()=>{let a$4=useParams(),{t}=a(),{gameApiV2:D}=a$1(),L=d(),{data:s,isLoading:T,refetch:h}=useQuery({queryKey:e.users.detail(a$4.id||""),queryFn:()=>L.get(`/api/usystem/user/info?id=${a$4.id}`),enabled:!!a$4.id}),{data:x}=c(),{data:V}=a$2("200005"),{show:B,modal:C}=b({mode:"update",onSuccess(){h();}}),K=[{key:"group",title:t("global.projectGroup"),dataIndex:"game_group",render(o){return o.map(r=>jsx(Tag,{children:r===e$1?"\u901A\u7528":r},r))}},{key:"game",title:t("global.game"),dataIndex:"game_ids",render(o){return o.map(r=>{let P=x?.find(m=>String(D?m.game_id:m.id)===r);return jsx(Tag,{children:P?.name??(r===e$1?"\u901A\u7528":r)},r)})}},{key:"role",title:t("global.role"),dataIndex:"role",render(o){return V?jsx(Link,{to:`../../role/${o}`,relative:"path",children:o}):o}}];return jsxs(Fragment,{children:[jsx(Breadcrumb,{style:{marginBottom:"1.5rem"},items:[{key:"1",title:jsx(Link,{to:"..",relative:"path",children:t("global.user")})},{key:"2",title:"\u7528\u6237\u8BE6\u60C5"}]}),jsx(Card,{title:"\u7528\u6237\u8BE6\u60C5",loading:T,extra:jsx(a$3,{code:"100003",onClick:()=>{B({initialValues:{name:s?.name,permissions:s?.permissions},extraValues:{id:s.id}});},children:t("global.update")}),children:jsxs(Descriptions,{bordered:!0,column:1,children:[jsx(Descriptions.Item,{label:t("global.name"),children:s?.name}),jsx(Descriptions.Item,{label:"ID",children:s?.id}),jsx(Descriptions.Item,{label:t("global.role"),children:jsx(Table,{rowKey:"role",columns:K,dataSource:s?.permissions,pagination:!1})})]})}),C]})},N=G;export{N as default};
|
package/lib/userList-ELLBMK76.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$2,b as b$2}from'./chunk-O7AQM3CB.js';import {h}from'./chunk-XQERUQGQ.js';import {a as a$4}from'./chunk-RITI5HRV.js';import {a as a$3}from'./chunk-SJK2ZPEL.js';import'./chunk-HZHE6R72.js';import {b as b$1,d}from'./chunk-4GULXGNG.js';import {a}from'./chunk-7NM3DK6A.js';import'./chunk-X6ZI7RL7.js';import {b,a as a$1}from'./chunk-WHOTHZUW.js';import'./chunk-LRMME3YZ.js';import'./chunk-OLM4QNJB.js';import {UserAddOutlined}from'@ant-design/icons';import {App,Row,Col,Tag,Space,Card,Form,Input}from'antd';import {Link}from'react-router-dom';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var K=()=>{let{modal:V,message:b}=App.useApp(),{t:o}=a(),I=h(),{refetch:r}=b$1(),{permissionVersion:u}=a$1(t=>t),L=u==="v1",i=u==="v3",{show:M,modal:x}=a$2({mode:"create",onSuccess(){r("user-list",{page:1});}}),{show:S,modal:F}=a$2({mode:"update",onSuccess(){r("user-list");}}),{show:A,modal:B}=b$2({mode:"create",onSuccess(){r("user-list",{page:1});}}),{show:P,modal:R}=b$2({mode:"update",onSuccess(){r("user-list");}}),z=[{title:o("global.name"),dataIndex:"name",key:"name",render(t,s){return i?jsx(Link,{to:`./${s.id}`,children:t}):t}},{title:"ID",dataIndex:"id",key:"id"},(L||i)&&{title:o("global.role"),dataIndex:"roles",key:"roles",width:"40%",render(t){return jsx(Row,{gutter:[4,4],children:(t||[]).map(s=>jsx(Col,{children:s==="root"?jsx(Tag,{color:"#f50",children:s}):jsx(Tag,{color:"#ff5a00",children:jsx(Link,{to:`../role/${s}`,children:s})})},s))})}},{title:o("global.creationTime"),dataIndex:"Ctime",key:"ctime"},{title:o("global.operation"),width:150,align:"center",render:(t,s)=>{let{name:l,permissions:G,roles:H,id:n}=s;return jsxs(Space,{children:[jsx(a$3,{size:"small",type:"link",code:"100003",onClick:()=>{i?P({initialValues:{name:l,permissions:G},extraValues:{id:n}}):S({initialValues:{name:l,roles:H},extraValues:{id:n}});},children:o("global.update")}),jsx(a$3,{danger:!0,size:"small",code:"100004",type:"link",onClick:()=>{V.confirm({title:o("User.deleteTitle"),content:jsx(a$4,{texts:[l],children:o("User.deleteContent",{user:l})}),async onOk(){await I.mutateAsync({id:n,name:l}),r("user-list"),b.success(o("User.deleteSuccessfully"));}});},children:o("global.delete")})]})}}].filter(Boolean);return jsxs(Fragment,{children:[jsx(Card,{title:o("global.user"),extra:jsx(a$3,{type:"primary",icon:jsx(UserAddOutlined,{}),code:"100002",onClick:()=>{i?A():M();},children:o("User.createTitle")}),children:jsx(d,{identifier:"user-list",code:"100001",request:{url:"/api/usystem/user/list",method:"GET"},rowKey:"id",columns:z,dataAdapter:t=>({total:t?.Total,items:t?.List}),renderForm:i?t=>jsx(Form,{form:t,children:jsx(Form.Item,{label:"\u540D\u79F0",name:"name",children:jsx(Input,{})})}):void 0})}),x,F,B,R]})},se=b(K,{isGlobal:!0});export{se as default};
|
package/lib/utils.d.ts
DELETED
package/lib/utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as generateId,a as mixedStorage}from'./chunk-OLM4QNJB.js';
|
package/locale/chunk-GHHHKGNN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {has,template,get}from'lodash-es';import {createContext,useMemo,useContext}from'react';import'antd';import {useStore}from'zustand';import'react/jsx-runtime';var p=createContext(null);function r(o){let e=useContext(p);if(!e)throw new Error("Missing ToolkitsProvider in the tree");return useStore(e,o||(t=>t))}function N(){let o=r(t=>t.locale);return {t:useMemo(()=>(t,s)=>has(o,t)?template(get(o,t))(s):t,[o])}}export{N as a};
|