@kordar/easyui-tpl 2.0.7 → 2.0.8
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/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.css +1 -0
- package/dist/index.umd.cjs +11 -0
- package/dist/index.umd.cjs.map +1 -0
- package/dist/public/en.json +167 -0
- package/dist/public/themes/modern-blue/accordion.css +89 -0
- package/dist/public/themes/modern-blue/calendar.css +213 -0
- package/dist/public/themes/modern-blue/checkbox.css +31 -0
- package/dist/public/themes/modern-blue/combo.css +35 -0
- package/dist/public/themes/modern-blue/combobox.css +40 -0
- package/dist/public/themes/modern-blue/datagrid.css +305 -0
- package/dist/public/themes/modern-blue/datalist.css +95 -0
- package/dist/public/themes/modern-blue/datebox.css +36 -0
- package/dist/public/themes/modern-blue/dialog.css +47 -0
- package/dist/public/themes/modern-blue/drawer.css +15 -0
- package/dist/public/themes/modern-blue/easyui.css +4750 -0
- package/dist/public/themes/modern-blue/filebox.css +20 -0
- package/dist/public/themes/modern-blue/flex.css +52 -0
- package/dist/public/themes/modern-blue/images/accordion_arrows.png +0 -0
- package/dist/public/themes/modern-blue/images/blank.gif +0 -0
- package/dist/public/themes/modern-blue/images/calendar_arrows.png +0 -0
- package/dist/public/themes/modern-blue/images/combo_arrow.png +0 -0
- package/dist/public/themes/modern-blue/images/datagrid_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/datebox_arrow.png +0 -0
- package/dist/public/themes/modern-blue/images/layout_arrows.png +0 -0
- package/dist/public/themes/modern-blue/images/linkbutton_bg.png +0 -0
- package/dist/public/themes/modern-blue/images/loading.gif +0 -0
- package/dist/public/themes/modern-blue/images/menu_arrows.png +0 -0
- package/dist/public/themes/modern-blue/images/messager_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/messager_icons16.png +0 -0
- package/dist/public/themes/modern-blue/images/pagination_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/panel_tools.png +0 -0
- package/dist/public/themes/modern-blue/images/passwordbox_close.png +0 -0
- package/dist/public/themes/modern-blue/images/passwordbox_open.png +0 -0
- package/dist/public/themes/modern-blue/images/searchbox_button.png +0 -0
- package/dist/public/themes/modern-blue/images/slider_handle.png +0 -0
- package/dist/public/themes/modern-blue/images/spinner_arrows.png +0 -0
- package/dist/public/themes/modern-blue/images/tabs_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/tagbox_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/tree_icons.png +0 -0
- package/dist/public/themes/modern-blue/images/validatebox_warning.png +0 -0
- package/dist/public/themes/modern-blue/layout.css +150 -0
- package/dist/public/themes/modern-blue/linkbutton.css +203 -0
- package/dist/public/themes/modern-blue/menu.css +119 -0
- package/dist/public/themes/modern-blue/menubutton.css +94 -0
- package/dist/public/themes/modern-blue/messager.css +74 -0
- package/dist/public/themes/modern-blue/numberbox.css +0 -0
- package/dist/public/themes/modern-blue/pagination.css +77 -0
- package/dist/public/themes/modern-blue/panel.css +276 -0
- package/dist/public/themes/modern-blue/passwordbox.css +6 -0
- package/dist/public/themes/modern-blue/progressbar.css +33 -0
- package/dist/public/themes/modern-blue/propertygrid.css +27 -0
- package/dist/public/themes/modern-blue/radiobutton.css +25 -0
- package/dist/public/themes/modern-blue/searchbox.css +61 -0
- package/dist/public/themes/modern-blue/sidemenu.css +78 -0
- package/dist/public/themes/modern-blue/slider.css +101 -0
- package/dist/public/themes/modern-blue/spinner.css +114 -0
- package/dist/public/themes/modern-blue/splitbutton.css +12 -0
- package/dist/public/themes/modern-blue/switchbutton.css +83 -0
- package/dist/public/themes/modern-blue/tabs.css +415 -0
- package/dist/public/themes/modern-blue/tagbox.css +44 -0
- package/dist/public/themes/modern-blue/textbox.css +173 -0
- package/dist/public/themes/modern-blue/timepicker.css +93 -0
- package/dist/public/themes/modern-blue/tooltip.css +101 -0
- package/dist/public/themes/modern-blue/tree.css +168 -0
- package/dist/public/themes/modern-blue/validatebox.css +13 -0
- package/dist/public/themes/modern-blue/window.css +188 -0
- package/dist/public/zh_CN.json +166 -0
- package/dist/types/components/BaseLayout.d.ts +3 -0
- package/dist/types/components/Card.d.ts +29 -0
- package/dist/types/components/LayoutContext.d.ts +10 -0
- package/dist/types/components/LocaleBarItem.d.ts +3 -0
- package/dist/types/components/PaginationPanel.d.ts +4 -0
- package/dist/types/components/RememberMeBox.d.ts +8 -0
- package/dist/types/components/SettingBarItem.d.ts +3 -0
- package/dist/types/components/Tooltip.d.ts +17 -0
- package/dist/types/components/UserBarItem.d.ts +3 -0
- package/dist/types/composable/useAppRedirect.d.ts +1 -0
- package/dist/types/composable/useAppStarter.d.ts +7 -0
- package/dist/types/composable/useLocalTable.d.ts +3 -0
- package/dist/types/composable/useMenuAndTabData.d.ts +18 -0
- package/dist/types/composable/useRefreshKey.d.ts +1 -0
- package/dist/types/composable/useRemoteTable.d.ts +3 -0
- package/dist/types/hoc/withDocHoc.d.ts +3 -0
- package/dist/types/index.d.ts +44 -0
- package/dist/types/init.d.ts +7 -0
- package/dist/types/service/AdminService.d.ts +23 -0
- package/dist/types/service/AuthService.d.ts +13 -0
- package/dist/types/service/ConfigService.d.ts +6 -0
- package/dist/types/service/RbacService.d.ts +80 -0
- package/dist/types/service/ResourceService.d.ts +25 -0
- package/dist/types/util/form.d.ts +8 -0
- package/dist/types/util/helper.d.ts +7 -0
- package/dist/types/util/interface.d.ts +66 -0
- package/dist/types/util/lazy.d.ts +2 -0
- package/dist/types/util/tables.d.ts +5 -0
- package/dist/types/views/admin/assign.d.ts +4 -0
- package/dist/types/views/admin/context.d.ts +3 -0
- package/dist/types/views/admin/form_dlg.d.ts +4 -0
- package/dist/types/views/admin/index.d.ts +2 -0
- package/dist/types/views/admin/search.d.ts +3 -0
- package/dist/types/views/admin/table.d.ts +4 -0
- package/dist/types/views/dict/context.d.ts +3 -0
- package/dist/types/views/dict/dialog.d.ts +5 -0
- package/dist/types/views/dict/form.d.ts +4 -0
- package/dist/types/views/dict/index.d.ts +2 -0
- package/dist/types/views/dict/search.d.ts +3 -0
- package/dist/types/views/dict/table.d.ts +4 -0
- package/dist/types/views/dict-item/context.d.ts +3 -0
- package/dist/types/views/dict-item/dialog.d.ts +4 -0
- package/dist/types/views/dict-item/form.d.ts +4 -0
- package/dist/types/views/dict-item/index.d.ts +2 -0
- package/dist/types/views/dict-item/search.d.ts +3 -0
- package/dist/types/views/dict-item/table.d.ts +4 -0
- package/dist/types/views/home/index.d.ts +2 -0
- package/dist/types/views/language/index.d.ts +3 -0
- package/dist/types/views/login/form.d.ts +3 -0
- package/dist/types/views/login/header.d.ts +9 -0
- package/dist/types/views/login/index.d.ts +3 -0
- package/dist/types/views/page/404.d.ts +2 -0
- package/dist/types/views/permissions/context.d.ts +3 -0
- package/dist/types/views/permissions/fastadd_form_dlg.d.ts +4 -0
- package/dist/types/views/permissions/form_dlg.d.ts +4 -0
- package/dist/types/views/permissions/index.d.ts +2 -0
- package/dist/types/views/permissions/search.d.ts +3 -0
- package/dist/types/views/permissions/table.d.ts +3 -0
- package/dist/types/views/roles/assign.d.ts +4 -0
- package/dist/types/views/roles/context.d.ts +3 -0
- package/dist/types/views/roles/form_dlg.d.ts +4 -0
- package/dist/types/views/roles/index.d.ts +2 -0
- package/dist/types/views/roles/search.d.ts +3 -0
- package/dist/types/views/roles/table.d.ts +4 -0
- package/dist/types/views/router/context.d.ts +3 -0
- package/dist/types/views/router/form_dlg.d.ts +4 -0
- package/dist/types/views/router/index.d.ts +2 -0
- package/dist/types/views/router/search.d.ts +3 -0
- package/dist/types/views/router/table.d.ts +4 -0
- package/dist/types/views/setting/context.d.ts +3 -0
- package/dist/types/views/setting/dialog.d.ts +5 -0
- package/dist/types/views/setting/form.d.ts +4 -0
- package/dist/types/views/setting/index.d.ts +2 -0
- package/dist/types/views/setting/search.d.ts +3 -0
- package/dist/types/views/setting/table.d.ts +4 -0
- package/dist/types/views/srceen/design/container.d.ts +3 -0
- package/dist/types/views/srceen/design/index.d.ts +4 -0
- package/package.json +5 -4
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare class RbacService {
|
|
2
|
+
/**
|
|
3
|
+
* 获取角色列表
|
|
4
|
+
*/
|
|
5
|
+
roles(): Promise<any>;
|
|
6
|
+
/**
|
|
7
|
+
* 添加角色
|
|
8
|
+
*/
|
|
9
|
+
addRole(object: any): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* 更新角色
|
|
12
|
+
*/
|
|
13
|
+
updateRole(object: any): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* 删除角色
|
|
16
|
+
*/
|
|
17
|
+
deleteRole(object: any): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* 批量删除角色
|
|
20
|
+
*/
|
|
21
|
+
batchDeleteRole(object: any): Promise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* 获取权限列表
|
|
24
|
+
*/
|
|
25
|
+
permissions(): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* 添加权限
|
|
28
|
+
*/
|
|
29
|
+
addPermission(object: any): Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* 更新权限
|
|
32
|
+
*/
|
|
33
|
+
updatePermission(object: any): Promise<any>;
|
|
34
|
+
/**
|
|
35
|
+
* 删除权限
|
|
36
|
+
*/
|
|
37
|
+
deletePermission(object: any): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* 批量删除权限
|
|
40
|
+
*/
|
|
41
|
+
batchDeletePermission(object: any): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* 获取规则列表
|
|
44
|
+
*/
|
|
45
|
+
rules(): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* 添加规则
|
|
48
|
+
*/
|
|
49
|
+
addRule(object: any): Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* 删除规则
|
|
52
|
+
*/
|
|
53
|
+
deleteRule(object: any): Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
* 获取子item
|
|
56
|
+
*/
|
|
57
|
+
getChildren(params: any): Promise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* 分配权限节点
|
|
60
|
+
*/
|
|
61
|
+
addPermissionChildren(data: any): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* 通过用户获取角色
|
|
64
|
+
*/
|
|
65
|
+
getRolesByUser(userId: any): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* 设置节点到用户
|
|
68
|
+
*/
|
|
69
|
+
assignItemToUser(data: any): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* 快速添加权限
|
|
72
|
+
*/
|
|
73
|
+
fastAddPermission(data: any): Promise<any>;
|
|
74
|
+
/**
|
|
75
|
+
* 获取当前用户的所有权限
|
|
76
|
+
*/
|
|
77
|
+
getPermissionsByUser(userId: any): Promise<any>;
|
|
78
|
+
}
|
|
79
|
+
declare const rbacService: RbacService;
|
|
80
|
+
export default rbacService;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EditorBody, FormBody, RemoveBody, SearchBody } from "@kordar-lib/crud";
|
|
2
|
+
import { FormDataType } from "@kordar-lib/base";
|
|
3
|
+
declare class ResourceService {
|
|
4
|
+
result(code: any, message: string, data: any, count: number, success: Function, fail?: Function): void;
|
|
5
|
+
private buildQueryString;
|
|
6
|
+
listWithQuery(api: string, query: any, data?: SearchBody): Promise<any>;
|
|
7
|
+
list(api: string, data?: SearchBody): Promise<any>;
|
|
8
|
+
listResult(api: string, req: SearchBody | undefined, success: Function): Promise<void>;
|
|
9
|
+
configs(api: string, data?: any): Promise<any>;
|
|
10
|
+
configsResult(api: string, req: any | undefined, success: Function): Promise<void>;
|
|
11
|
+
edit(api: string, editorBody: EditorBody): Promise<any>;
|
|
12
|
+
editResult(api: string, editorBody: EditorBody, success: Function): Promise<void>;
|
|
13
|
+
add(api: string, formBody: FormBody): Promise<any>;
|
|
14
|
+
update(api: string, formBody: FormBody): Promise<any>;
|
|
15
|
+
saveResult(api: string, type: FormDataType, formBody: FormBody, success: Function): Promise<void>;
|
|
16
|
+
del(api: string, data: RemoveBody): Promise<any>;
|
|
17
|
+
delResult(api: string, removeBody: RemoveBody, success: Function): Promise<void>;
|
|
18
|
+
info(api: string, data?: any): Promise<any>;
|
|
19
|
+
output(api: string, data?: SearchBody, config?: any): Promise<any>;
|
|
20
|
+
outputOctetStream(api: string, data: SearchBody | undefined, name: string): Promise<any>;
|
|
21
|
+
search(api: string, resource: string, data?: SearchBody): Promise<any>;
|
|
22
|
+
fetch(api: string, resource: string, data: any, config: any): Promise<any>;
|
|
23
|
+
}
|
|
24
|
+
declare const resourceService: ResourceService;
|
|
25
|
+
export default resourceService;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 生成一些通用的function
|
|
3
|
+
*/
|
|
4
|
+
import { CheckAccessEle } from "@kordar-lib/base";
|
|
5
|
+
export declare const resourceAccessItems: (name: string) => Array<CheckAccessEle>;
|
|
6
|
+
export declare const removeEventFn: (ctx: any, content?: string) => ({ fn, params, success, error }: any) => void;
|
|
7
|
+
export declare const resourceRemoveEvent: (ctx: any, content?: string | undefined) => (removeBody: any) => void;
|
|
8
|
+
export declare function convertToText(obj: any): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormOption, TableContext } from "@kordar-lib/base";
|
|
2
|
+
export declare function permissionTree(data: any[]): any;
|
|
3
|
+
export declare function queryPermissionTress(treeData: Array<any>, set: Set<string>, targetNodes: Array<any>): number;
|
|
4
|
+
export declare function roleTree(data: any[]): any;
|
|
5
|
+
export declare const ctxPageValue: (ctx: TableContext | undefined, key: string) => any;
|
|
6
|
+
export declare const ctxPageValueOptions: (ctx: TableContext | undefined, key: string) => Array<FormOption>;
|
|
7
|
+
export declare const fetchConfigOptions: (fetchConfig: any, key: string) => Array<any>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FormDataType, TableContext, TableContextState } from "@kordar-lib/base";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { RefDialog } from "@kordar/easyui";
|
|
4
|
+
export interface CtxProps {
|
|
5
|
+
ctx: TableContext;
|
|
6
|
+
ctxState: TableContextState;
|
|
7
|
+
}
|
|
8
|
+
export interface TableProps extends CtxProps {
|
|
9
|
+
pageConfig?: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
fetchConfig?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface TablePanelProps extends TableProps {
|
|
17
|
+
searchPanel?: React.ReactNode;
|
|
18
|
+
toolbar?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface SearchProps extends CtxProps {
|
|
21
|
+
}
|
|
22
|
+
export interface FormDataProps extends CtxProps {
|
|
23
|
+
record?: any;
|
|
24
|
+
type?: FormDataType;
|
|
25
|
+
pageConfig?: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
};
|
|
28
|
+
fetchConfig?: {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface DocHocProps {
|
|
33
|
+
name: string;
|
|
34
|
+
fetchConfig?: Function;
|
|
35
|
+
}
|
|
36
|
+
export interface PageProps {
|
|
37
|
+
pageConfig: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
fetchConfig: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
};
|
|
43
|
+
fetchVersion?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface PageCtxProps {
|
|
46
|
+
version?: any;
|
|
47
|
+
ctx?: TableContext;
|
|
48
|
+
ctxState?: TableContextState;
|
|
49
|
+
pageConfig: {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
};
|
|
52
|
+
fetchConfig: {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
};
|
|
55
|
+
refs?: {
|
|
56
|
+
[key: string]: RefDialog;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 定义传递到table的数据
|
|
61
|
+
*/
|
|
62
|
+
export interface PagePanelProps {
|
|
63
|
+
SearchPanel?: React.ReactNode;
|
|
64
|
+
toolbar?: any;
|
|
65
|
+
pageVersion?: number;
|
|
66
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const renderTooltip: ({ value }: any) => import("react/jsx-runtime").JSX.Element | "";
|
|
2
|
+
export declare const renderType: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const renderDateTime02: ({ value }: any) => any;
|
|
4
|
+
export declare const renderText: (text: string, icon?: string) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const renderFetchConfigValue: (fetchConfig: any, key: string, value: any, defaultValue?: any) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kordar/easyui-tpl",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"main": "dist/index.umd.cjs",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"test": "jest"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@kordar-lib/base": "^2.0.1",
|
|
14
15
|
"@kordar-lib/i18n": "^2.0.1",
|
|
15
16
|
"@kordar-lib/reducers": "^2.0.1",
|
|
16
17
|
"@kordar/easyui": "^2.0.1",
|
|
17
18
|
"@kordar/easyui-datepicker": "^2.0.0",
|
|
18
|
-
"@kordar-lib/base": "^2.0.1",
|
|
19
19
|
"@reduxjs/toolkit": "^2.5.0",
|
|
20
20
|
"axios": "^1.8.3",
|
|
21
21
|
"flatpickr": "^4.6.13",
|
|
@@ -35,15 +35,16 @@
|
|
|
35
35
|
"redux-persist": "^6.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@babel/preset-env": "^7.26.0",
|
|
38
39
|
"@babel/preset-react": "^7.28.5",
|
|
39
40
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
40
41
|
"@types/react": "^19.2.14",
|
|
41
42
|
"@types/react-dom": "^19.2.3",
|
|
42
43
|
"@vitejs/plugin-react": "^4.7.0",
|
|
43
|
-
"
|
|
44
|
+
"clean-css": "^5.3.3",
|
|
44
45
|
"rollup-plugin-copy": "^3.5.0"
|
|
45
46
|
},
|
|
46
47
|
"files": [
|
|
47
48
|
"dist"
|
|
48
49
|
]
|
|
49
|
-
}
|
|
50
|
+
}
|