@ccs-ui/rc-pro 1.1.4 → 1.1.6
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/es/auth/auth-dropdown.d.ts +2 -2
- package/es/auth/index.d.ts +4 -4
- package/es/ccs.d.ts +36 -36
- package/es/color-picker/index.d.ts +2 -2
- package/es/color-picker/index.js +1 -1
- package/es/context/index.d.ts +6 -6
- package/es/dialog/HookDrawer.d.ts +2 -2
- package/es/dialog/HookDrawer.js +2 -1
- package/es/dialog/HookModal.d.ts +2 -2
- package/es/dialog/HookModal.js +4 -3
- package/es/dialog/button.d.ts +3 -4
- package/es/dialog/button.js +2 -2
- package/es/dialog/context.d.ts +9 -7
- package/es/dialog/drawer-footer.d.ts +2 -2
- package/es/dialog/form.d.ts +4 -4
- package/es/dialog/hook.d.ts +6 -6
- package/es/dialog/index.d.ts +2 -2
- package/es/full-screen/index.d.ts +2 -2
- package/es/interval-button/index.d.ts +2 -2
- package/es/keep-alive-tabs/index.d.ts +2 -2
- package/es/keep-alive-tabs/page.d.ts +2 -2
- package/es/loading/index.d.ts +2 -2
- package/es/pro-grid/context.d.ts +2 -2
- package/es/pro-grid/index.d.ts +8 -8
- package/es/pro-table/index.d.ts +6 -6
- package/es/pro-table/search.d.ts +2 -2
- package/es/pro-tabs/index.d.ts +2 -2
- package/es/status-tag/index.d.ts +2 -2
- package/es/theme.d.ts +2 -7
- package/es/trigger/index.d.ts +2 -2
- package/es/utils/index.d.ts +2 -2
- package/es/virtual-list/index.d.ts +12 -12
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ type MenuDividerAuthType = MenuDividerType & {
|
|
|
20
20
|
children?: DropdownMenuItemType[];
|
|
21
21
|
};
|
|
22
22
|
type DropdownMenuItemType = MenuItemAuthType | SubMenuAuthType | MenuItemGroupAuthType | MenuDividerAuthType;
|
|
23
|
-
|
|
23
|
+
type CcsAuthDropdownProps = Omit<DropDownProps, 'overlay' | 'children'> & {
|
|
24
24
|
/** 权限标识 */
|
|
25
25
|
auth?: string;
|
|
26
26
|
/** dropdown 菜单数据 */
|
|
@@ -29,7 +29,7 @@ interface CcsAuthDropdownProps extends Omit<DropDownProps, 'overlay' | 'children
|
|
|
29
29
|
children: ChildrenType;
|
|
30
30
|
/** 点击事件 */
|
|
31
31
|
onClick?: (info: MenuInfo) => void;
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
/**
|
|
34
34
|
* 带权限的Dropdown组件
|
|
35
35
|
*/
|
package/es/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from 'antd';
|
|
2
2
|
import { ReactElement, ReactNode } from 'react';
|
|
3
3
|
import CCS from '..';
|
|
4
|
-
export
|
|
4
|
+
export type CcsAuthGroupProps = {
|
|
5
5
|
/** 按钮尺寸 */
|
|
6
6
|
size?: ButtonProps['size'];
|
|
7
7
|
/** 默认显示按钮数量 */
|
|
@@ -16,13 +16,13 @@ export interface CcsAuthGroupProps {
|
|
|
16
16
|
moreText?: string;
|
|
17
17
|
/** 点击事件 */
|
|
18
18
|
onClick?: (key: string) => void;
|
|
19
|
-
}
|
|
20
|
-
export
|
|
19
|
+
};
|
|
20
|
+
export type CcsAuthProps = {
|
|
21
21
|
/** 权限标识 */
|
|
22
22
|
auth?: string;
|
|
23
23
|
/** component children */
|
|
24
24
|
children: ReactElement;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
export declare function ModalConfirm({ modalRef }: {
|
|
27
27
|
modalRef: any;
|
|
28
28
|
}): import("react/jsx-runtime").JSX.Element;
|
package/es/ccs.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ButtonProps, MenuProps, ThemeConfig } from 'antd';
|
|
|
2
2
|
import { Rule } from 'antd/es/form';
|
|
3
3
|
import { ColumnsType } from 'antd/es/table';
|
|
4
4
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
5
|
-
|
|
5
|
+
type MenuTreeNodeData = {
|
|
6
6
|
buttonUrlId: number;
|
|
7
7
|
createTime: string;
|
|
8
8
|
icon?: string;
|
|
@@ -17,13 +17,13 @@ interface MenuTreeNodeData {
|
|
|
17
17
|
updateTime: string;
|
|
18
18
|
urlName: string;
|
|
19
19
|
urlPath: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
};
|
|
21
|
+
type MenuParentType = {
|
|
22
22
|
key: string;
|
|
23
23
|
url: string;
|
|
24
24
|
name: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
25
|
+
};
|
|
26
|
+
type MenuTreeNode = {
|
|
27
27
|
nodeId: string;
|
|
28
28
|
nodeName: string;
|
|
29
29
|
icon: string;
|
|
@@ -32,14 +32,14 @@ interface MenuTreeNode {
|
|
|
32
32
|
children?: MenuTreeNode[];
|
|
33
33
|
topUrl?: string;
|
|
34
34
|
parents?: MenuParentType[];
|
|
35
|
-
}
|
|
36
|
-
|
|
35
|
+
};
|
|
36
|
+
type UserDetail = {
|
|
37
37
|
/** 头像 */
|
|
38
38
|
avatar?: string;
|
|
39
39
|
/** 用户名 */
|
|
40
40
|
workerName: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
41
|
+
};
|
|
42
|
+
type TableData<T> = {
|
|
43
43
|
/** loading */
|
|
44
44
|
loading?: boolean;
|
|
45
45
|
/** 总条数 */
|
|
@@ -50,35 +50,35 @@ interface TableData<T> {
|
|
|
50
50
|
pageNo?: number;
|
|
51
51
|
/** Array List 数据 */
|
|
52
52
|
result?: T[];
|
|
53
|
-
}
|
|
54
|
-
|
|
53
|
+
};
|
|
54
|
+
type HttpResult<T = any> = {
|
|
55
55
|
code: string;
|
|
56
56
|
success: boolean;
|
|
57
57
|
data: T;
|
|
58
58
|
msg: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
59
|
+
};
|
|
60
|
+
type PageType<T> = {
|
|
61
61
|
hasNext: boolean;
|
|
62
62
|
totalNum: number;
|
|
63
63
|
pageNo: number;
|
|
64
64
|
pageSize: number;
|
|
65
65
|
result: T[];
|
|
66
|
-
}
|
|
67
|
-
|
|
66
|
+
};
|
|
67
|
+
type HttpPageResult<T = any> = Omit<HttpResult<T>, 'data'> & {
|
|
68
68
|
data: PageType<T>;
|
|
69
|
-
}
|
|
70
|
-
|
|
69
|
+
};
|
|
70
|
+
type HttpListResult<T = any> = Omit<HttpResult<T>, 'data'> & {
|
|
71
71
|
data: T[];
|
|
72
|
-
}
|
|
73
|
-
|
|
72
|
+
};
|
|
73
|
+
type OrderProp = {
|
|
74
74
|
ascending: boolean;
|
|
75
75
|
prop: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
76
|
+
};
|
|
77
|
+
type QueryLimit = {
|
|
78
78
|
fetchSize: number;
|
|
79
79
|
startIndex: number;
|
|
80
|
-
}
|
|
81
|
-
|
|
80
|
+
};
|
|
81
|
+
type PageQuery<T = any> = {
|
|
82
82
|
/** 查询的开始行数和取多少行,从0开始 */
|
|
83
83
|
limit?: QueryLimit;
|
|
84
84
|
/** 排序字段,一般前端不传,由后端指定 */
|
|
@@ -89,22 +89,22 @@ interface PageQuery<T = any> {
|
|
|
89
89
|
pageSize?: number;
|
|
90
90
|
/** 查询条件 */
|
|
91
91
|
query: T;
|
|
92
|
-
}
|
|
93
|
-
|
|
92
|
+
};
|
|
93
|
+
type ListQuery<T = any> = {
|
|
94
94
|
/** 查询的开始行数和取多少行,从0开始 */
|
|
95
95
|
limit?: QueryLimit;
|
|
96
96
|
/** 排序字段,一般前端不传,由后端指定 */
|
|
97
97
|
orderProps?: OrderProp[];
|
|
98
98
|
/** 查询条件 */
|
|
99
99
|
query: T;
|
|
100
|
-
}
|
|
100
|
+
};
|
|
101
101
|
type RecordType = Record<string, any>;
|
|
102
|
-
|
|
102
|
+
type RouteHistory = {
|
|
103
103
|
menuName: string;
|
|
104
104
|
pathName: string;
|
|
105
105
|
time: Date;
|
|
106
|
-
}
|
|
107
|
-
|
|
106
|
+
};
|
|
107
|
+
type TableDataType<T> = {
|
|
108
108
|
/** loading */
|
|
109
109
|
loading?: boolean;
|
|
110
110
|
/** 总条数 */
|
|
@@ -115,8 +115,8 @@ interface TableDataType<T> {
|
|
|
115
115
|
pageNo?: number;
|
|
116
116
|
/** Array List 数据 */
|
|
117
117
|
result?: T[];
|
|
118
|
-
}
|
|
119
|
-
|
|
118
|
+
};
|
|
119
|
+
type TableInstance<T = any> = {
|
|
120
120
|
/** 获取form表单数据 */
|
|
121
121
|
formValues: Record<string, any>;
|
|
122
122
|
/** 获取当前表单数据 */
|
|
@@ -131,8 +131,8 @@ interface TableInstance<T = any> {
|
|
|
131
131
|
onReset: () => void;
|
|
132
132
|
/** 改变data 数据 */
|
|
133
133
|
onChangeData: React.Dispatch<React.SetStateAction<TableDataType<T>>>;
|
|
134
|
-
}
|
|
135
|
-
|
|
134
|
+
};
|
|
135
|
+
type AuthButtonItem = {
|
|
136
136
|
key: string;
|
|
137
137
|
label: string;
|
|
138
138
|
auth?: string;
|
|
@@ -142,8 +142,8 @@ interface AuthButtonItem {
|
|
|
142
142
|
danger?: boolean;
|
|
143
143
|
icon?: ReactNode;
|
|
144
144
|
confirm?: string;
|
|
145
|
-
}
|
|
146
|
-
|
|
145
|
+
};
|
|
146
|
+
type TriggerChildrenProps<T = any> = {
|
|
147
147
|
/** 选中值 */
|
|
148
148
|
value?: T;
|
|
149
149
|
/** 选择框loading状态 */
|
|
@@ -154,7 +154,7 @@ interface TriggerChildrenProps<T = any> {
|
|
|
154
154
|
onChange?: ({}: T) => void;
|
|
155
155
|
/** 选择框显示名称 */
|
|
156
156
|
onChangeLabel?: (text: string | undefined) => void;
|
|
157
|
-
}
|
|
157
|
+
};
|
|
158
158
|
type ShowDependType = {
|
|
159
159
|
name: string;
|
|
160
160
|
value: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { RGBColor } from 'react-color';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export
|
|
4
|
+
export type PropsType = {
|
|
5
5
|
/** 指定选中项 */
|
|
6
6
|
value?: RGBColor;
|
|
7
7
|
/** 占位 */
|
|
@@ -10,7 +10,7 @@ export interface PropsType {
|
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
/** 选择完成后的回调 */
|
|
12
12
|
onChange?: (value: RGBColor) => void;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
/**
|
|
15
15
|
* 颜色选择组件
|
|
16
16
|
*/
|
package/es/color-picker/index.js
CHANGED
|
@@ -12,7 +12,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
14
14
|
import { Popover } from 'antd';
|
|
15
|
-
import
|
|
15
|
+
import { useState } from 'react';
|
|
16
16
|
import { SketchPicker } from 'react-color';
|
|
17
17
|
import "./index.less";
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/es/context/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type CcsTabProps = Omit<TabPaneProps, 'tab'> & {
|
|
|
17
17
|
key: string;
|
|
18
18
|
label: React.ReactNode;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
type CcsTabsContextType = {
|
|
21
21
|
/** 当前激活tab面板的key */
|
|
22
22
|
activeKey: string;
|
|
23
23
|
/** tab间传递的参数 */
|
|
@@ -28,7 +28,7 @@ interface CcsTabsContextType {
|
|
|
28
28
|
onRemoveTabs: (key: string | string[]) => void;
|
|
29
29
|
/** 改变tab间传递的参数 */
|
|
30
30
|
onTabChange: (tab: CcsTabsChangeProps) => void;
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
32
|
type PageContextType = {
|
|
33
33
|
/** ID */
|
|
34
34
|
id: string;
|
|
@@ -41,16 +41,16 @@ type PageContextType = {
|
|
|
41
41
|
/** 获取按钮权限 */
|
|
42
42
|
onAuth: (code: string) => boolean;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type GlobalContextPropsType = {
|
|
45
45
|
userDetail: CCS.UserDetail;
|
|
46
46
|
children: React.ReactElement;
|
|
47
|
-
}
|
|
47
|
+
};
|
|
48
48
|
type GlobalContextType = Omit<GlobalContextPropsType, 'children'>;
|
|
49
|
-
|
|
49
|
+
type FnContextType<T = Store> = {
|
|
50
50
|
locationKey: string;
|
|
51
51
|
formInitialValues: T;
|
|
52
52
|
close: () => void;
|
|
53
|
-
}
|
|
53
|
+
};
|
|
54
54
|
declare const GlobalContext: React.Context<GlobalContextType>;
|
|
55
55
|
declare const DrawerAndModalContext: React.Context<FnContextType<any>>;
|
|
56
56
|
declare const PageContext: React.Context<PageContextType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CcsDialogDrawer, CcsDialogDrawerProps } from './hook';
|
|
3
|
-
export
|
|
3
|
+
export type HookDrawerProps = {
|
|
4
4
|
afterClose: () => void;
|
|
5
5
|
config: CcsDialogDrawerProps;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
declare const _default: import("react").ForwardRefExoticComponent<HookDrawerProps & import("react").RefAttributes<CcsDialogDrawer>>;
|
|
8
8
|
export default _default;
|
package/es/dialog/HookDrawer.js
CHANGED
|
@@ -14,7 +14,7 @@ import { Drawer } from 'antd';
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
16
16
|
import { DialogSelfButton } from "./HookModal";
|
|
17
|
-
import { DialogButtonHolder } from "./button";
|
|
17
|
+
import CcsDialogButtons, { DialogButtonHolder } from "./button";
|
|
18
18
|
import { DialogContentContext } from "./context";
|
|
19
19
|
import DialogForm from "./form";
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -116,6 +116,7 @@ var HookDrawer = function HookDrawer(_ref, ref) {
|
|
|
116
116
|
}),
|
|
117
117
|
children: /*#__PURE__*/_jsx(DialogContentContext.Provider, {
|
|
118
118
|
value: {
|
|
119
|
+
Buttons: CcsDialogButtons,
|
|
119
120
|
buttonRef: buttonRef,
|
|
120
121
|
buttonType: 'drawer',
|
|
121
122
|
closeDialog: close,
|
package/es/dialog/HookModal.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, requ
|
|
|
6
6
|
formRef: React.RefObject<DialogFormRef>;
|
|
7
7
|
formInitialValues: FormProps['initialValues'];
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export
|
|
9
|
+
export type HookModalProps = {
|
|
10
10
|
afterClose: () => void;
|
|
11
11
|
config: CcsDialogModalProps;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
declare const _default: import("react").ForwardRefExoticComponent<HookModalProps & import("react").RefAttributes<CcsDialogModal>>;
|
|
14
14
|
export default _default;
|
package/es/dialog/HookModal.js
CHANGED
|
@@ -15,7 +15,7 @@ import classNames from 'classnames';
|
|
|
15
15
|
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
16
16
|
import Draggable from 'react-draggable';
|
|
17
17
|
import { CcsAuth, CcsDialog, CcsUtils } from '..';
|
|
18
|
-
import { DialogButtonHolder } from "./button";
|
|
18
|
+
import CcsDialogButtons, { DialogButtonHolder } from "./button";
|
|
19
19
|
import { DialogContentContext } from "./context";
|
|
20
20
|
import DialogForm from "./form";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -231,8 +231,9 @@ var HookModal = function HookModal(_ref3, ref) {
|
|
|
231
231
|
value: {
|
|
232
232
|
buttonRef: buttonRef,
|
|
233
233
|
buttonType: 'modal',
|
|
234
|
-
|
|
235
|
-
formInitialValues: ((_config$form2 = config.form) === null || _config$form2 === void 0 ? void 0 : _config$form2.initialValues) || {}
|
|
234
|
+
Buttons: CcsDialogButtons,
|
|
235
|
+
formInitialValues: ((_config$form2 = config.form) === null || _config$form2 === void 0 ? void 0 : _config$form2.initialValues) || {},
|
|
236
|
+
closeDialog: close
|
|
236
237
|
},
|
|
237
238
|
children: config.form ? /*#__PURE__*/_jsx(DialogForm, {
|
|
238
239
|
ref: formRef,
|
package/es/dialog/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
export type DialogButtonsProps = {
|
|
3
3
|
okText?: string;
|
|
4
4
|
cancelText?: string;
|
|
5
5
|
okAuth?: string;
|
|
@@ -7,10 +7,9 @@ interface DialogButtonsProps {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
hideCancel?: boolean;
|
|
9
9
|
onOk?: (values?: any) => void;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export type DialogButtonRef = {
|
|
12
12
|
onSetButtons: (e: React.ReactElement) => void;
|
|
13
13
|
};
|
|
14
14
|
export declare const DialogButtonHolder: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<DialogButtonRef>>>;
|
|
15
|
-
export default function CcsDialogButtons({ okText, okAuth, loading, children, hideCancel, cancelText, onOk, }: DialogButtonsProps):
|
|
16
|
-
export {};
|
|
15
|
+
export default function CcsDialogButtons({ okText, okAuth, loading, children, hideCancel, cancelText, onOk, }: DialogButtonsProps): import("react/jsx-runtime").JSX.Element;
|
package/es/dialog/button.js
CHANGED
|
@@ -84,8 +84,8 @@ export default function CcsDialogButtons(_ref) {
|
|
|
84
84
|
children: btns
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
CcsUtils.showWarning(!!buttonRef.current, "\u68C0\u6D4B\u5230".concat(buttonType === 'modal' ? 'openModal' : 'openDrawer', "\u4F20\u5165request\u53C2\u6570\
|
|
87
|
+
CcsUtils.showWarning(!!buttonRef.current, "\u68C0\u6D4B\u5230".concat(buttonType === 'modal' ? 'openModal' : 'openDrawer', "\u4F20\u5165request\u53C2\u6570\uFF0CButtons\u5C06\u4E0D\u80FD\u751F\u6548\u3002"));
|
|
88
88
|
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.onSetButtons(btns);
|
|
89
89
|
});
|
|
90
|
-
return
|
|
90
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
91
91
|
}
|
package/es/dialog/context.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { Store } from 'antd/es/form/interface';
|
|
2
|
-
import React, { RefObject } from 'react';
|
|
3
|
-
import { DialogButtonRef } from './button';
|
|
4
|
-
|
|
5
|
-
/** 按钮类型 */
|
|
6
|
-
buttonType: 'modal' | 'drawer';
|
|
2
|
+
import React, { ReactElement, RefObject } from 'react';
|
|
3
|
+
import { DialogButtonRef, DialogButtonsProps } from './button';
|
|
4
|
+
type DialogContextType<T = Store> = {
|
|
7
5
|
/** 表单初始值 */
|
|
8
6
|
formInitialValues: T;
|
|
7
|
+
/** 按钮组件 */
|
|
8
|
+
Buttons: (e: DialogButtonsProps) => ReactElement;
|
|
9
|
+
/** 按钮类型 */
|
|
10
|
+
buttonType: 'modal' | 'drawer';
|
|
9
11
|
/** 按钮 ref */
|
|
10
12
|
buttonRef: RefObject<DialogButtonRef>;
|
|
11
13
|
/** drawer footer ref */
|
|
12
14
|
drawerFooterRef?: RefObject<DialogButtonRef>;
|
|
13
15
|
/** 关闭弹框,可以设置返回值 */
|
|
14
16
|
closeDialog: (e?: any) => void;
|
|
15
|
-
}
|
|
17
|
+
};
|
|
16
18
|
declare const DialogContentContext: React.Context<DialogContextType<any>>;
|
|
17
19
|
declare const useDialogContext: <T = Store>() => DialogContextType<T>;
|
|
18
|
-
export { useDialogContext, DialogContentContext };
|
|
20
|
+
export { DialogContextType, useDialogContext, DialogContentContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
type DialogButtonsProps = {
|
|
3
3
|
okText?: string;
|
|
4
4
|
cancelText?: string;
|
|
5
5
|
okAuth?: string;
|
|
@@ -7,6 +7,6 @@ interface DialogButtonsProps {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
hideCancel?: boolean;
|
|
9
9
|
onOk?: (values?: any) => void;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export default function CcsDrawerFooter({ okText, okAuth, loading, children, hideCancel, cancelText, onOk, }: DialogButtonsProps): null;
|
|
12
12
|
export {};
|
package/es/dialog/form.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FormInstance, FormProps } from 'antd';
|
|
2
2
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
|
|
3
|
+
type PropsType = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
formProps: FormProps;
|
|
6
6
|
styles?: CSSProperties;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export type DialogFormRef = {
|
|
9
9
|
formInstance: FormInstance;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
/**
|
|
12
12
|
* 添加form实例
|
|
13
13
|
* @returns
|
package/es/dialog/hook.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DrawerProps, FormProps, ModalFuncProps } from 'antd';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import CCS from '..';
|
|
4
|
-
export
|
|
4
|
+
export type CcsDialogModal = {
|
|
5
5
|
destroy: () => void;
|
|
6
6
|
update: (config: ModalFuncProps) => void;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export type CcsDialogDrawer = {
|
|
9
9
|
destroy: () => void;
|
|
10
10
|
update: (config: DrawerProps) => void;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
type ModalFunc = (props: ModalFuncProps) => {
|
|
13
13
|
destroy: () => void;
|
|
14
14
|
update: (configUpdate: ModalFuncProps) => void;
|
|
@@ -51,10 +51,10 @@ export type CcsDialogDrawerProps = Omit<DrawerProps, 'extra'> & {
|
|
|
51
51
|
};
|
|
52
52
|
export type ModalDialog = (...args: Parameters<ModalFunc>) => ReturnType<ModalFunc>;
|
|
53
53
|
export type DrawerDialog = (...args: Parameters<ModalFunc>) => ReturnType<DrawerFunc>;
|
|
54
|
-
export
|
|
54
|
+
export type CcsDialogType = {
|
|
55
55
|
openDrawer: (props: CcsDialogDrawerProps) => ReturnType<DrawerDialog>;
|
|
56
56
|
openModal: (props: CcsDialogModalProps) => ReturnType<ModalDialog>;
|
|
57
57
|
contextHolder: React.JSX.Element;
|
|
58
|
-
}
|
|
58
|
+
};
|
|
59
59
|
export default function useCcsDialog(): CcsDialogType;
|
|
60
60
|
export {};
|
package/es/dialog/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { useDialogContext } from './context';
|
|
|
4
4
|
import CcsDrawerFooter from './drawer-footer';
|
|
5
5
|
import useCcsDialog from './hook';
|
|
6
6
|
import './index.less';
|
|
7
|
-
|
|
7
|
+
type DialogInterface = {
|
|
8
8
|
/** 获取openModal,openDrawer方法 */
|
|
9
9
|
useDialog: typeof useCcsDialog;
|
|
10
10
|
/** dialog 实例 */
|
|
@@ -13,6 +13,6 @@ interface DialogInterface {
|
|
|
13
13
|
Buttons: typeof CcsDialogButtons;
|
|
14
14
|
/** drawer footer */
|
|
15
15
|
DrawerFooter: typeof CcsDrawerFooter;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
declare const CcsDialog: typeof ThemeDialog & DialogInterface;
|
|
18
18
|
export default CcsDialog;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ButtonProps } from 'antd';
|
|
2
|
-
|
|
2
|
+
type CcsIntervalButton = ButtonProps & {
|
|
3
3
|
/** 计时数 */
|
|
4
4
|
num?: number;
|
|
5
5
|
/** 包含字符串`num`的文本内容 */
|
|
6
6
|
disabledText?: string;
|
|
7
7
|
/** 缓存key */
|
|
8
8
|
cacheKey?: string;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
/**
|
|
11
11
|
* 倒计时按钮组件
|
|
12
12
|
* @param PropsType
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import CCS from '../';
|
|
2
2
|
import './index.less';
|
|
3
|
-
|
|
3
|
+
type PropsType = {
|
|
4
4
|
maxLen?: number;
|
|
5
5
|
appName: string;
|
|
6
6
|
menus: CCS.MenuTreeNode[];
|
|
7
7
|
className?: string;
|
|
8
8
|
history: any;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
declare const _default: ({ maxLen, appName, history, menus, className, }: PropsType) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Location } from 'history';
|
|
2
2
|
import { JSXElementConstructor, ReactElement } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export type CachePageProps = {
|
|
4
4
|
/** 选中状态 */
|
|
5
5
|
active: boolean;
|
|
6
6
|
/** router location */
|
|
@@ -12,6 +12,6 @@ export interface CachePageProps {
|
|
|
12
12
|
children: ReactElement<any, string | JSXElementConstructor<any>> | null;
|
|
13
13
|
/** 销毁页面 */
|
|
14
14
|
onDestroy: (path: string) => void;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
declare const _default: import("react").MemoExoticComponent<(props: CachePageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
17
|
export default _default;
|
package/es/loading/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type CcsLoadingProps = {
|
|
2
2
|
/**
|
|
3
3
|
* loading 状态
|
|
4
4
|
* @default false
|
|
@@ -6,6 +6,6 @@ interface CcsLoadingProps {
|
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
/** loading 文字说明 */
|
|
8
8
|
loadingTip?: string;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
declare const Loading: ({ loading, loadingTip }: CcsLoadingProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
11
|
export default Loading;
|
package/es/pro-grid/context.d.ts
CHANGED
package/es/pro-grid/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { CardProps } from 'antd';
|
|
2
2
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
3
3
|
import './index.less';
|
|
4
|
-
|
|
4
|
+
type ClassProps = {
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: CSSProperties;
|
|
7
|
-
}
|
|
8
|
-
|
|
7
|
+
};
|
|
8
|
+
type CcsProGridProps = ClassProps & {
|
|
9
9
|
title?: string;
|
|
10
10
|
titleExtra?: ReactNode;
|
|
11
11
|
bordered?: boolean;
|
|
12
12
|
hideTitle?: boolean;
|
|
13
13
|
children?: ReactNode;
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
};
|
|
15
|
+
type ColProps = CardProps & {
|
|
16
16
|
colSpan?: string | number;
|
|
17
17
|
colStyle?: CSSProperties;
|
|
18
18
|
colClassName?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
19
|
+
};
|
|
20
|
+
type GridInstance = FC<CcsProGridProps> & {
|
|
21
21
|
Col: typeof GridCol;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
declare const GridCol: ({ colSpan, colClassName, colStyle, ...otherProps }: ColProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
declare const ProGrid: GridInstance;
|
|
25
25
|
export default ProGrid;
|
package/es/pro-table/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export type ShowDependType = {
|
|
|
8
8
|
value: any;
|
|
9
9
|
};
|
|
10
10
|
type SearchEventType = 'search' | 'reset' | 'reload' | 'changePage' | 'initSearch';
|
|
11
|
-
|
|
11
|
+
type SearchBeforeType = ParamType & {
|
|
12
12
|
query: ParamType;
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
};
|
|
14
|
+
export type CcsTableProps<T> = TableProps<T> & {
|
|
15
15
|
data?: CCS.TableData<T>;
|
|
16
16
|
/** request 方法 */
|
|
17
17
|
request?: (params: any) => void;
|
|
@@ -29,8 +29,8 @@ export interface CcsTableProps<T> extends TableProps<T> {
|
|
|
29
29
|
event$?: any;
|
|
30
30
|
/** style */
|
|
31
31
|
style?: CSSProperties;
|
|
32
|
-
}
|
|
33
|
-
export
|
|
32
|
+
};
|
|
33
|
+
export type CcsProTableProps<T> = {
|
|
34
34
|
/** api权限标识 */
|
|
35
35
|
auth?: string | 'ignore';
|
|
36
36
|
/** 是否初始查询,默认true */
|
|
@@ -71,7 +71,7 @@ export interface CcsProTableProps<T> {
|
|
|
71
71
|
onSearchBefore?: (params: SearchBeforeType, eventType?: SearchEventType) => SearchBeforeType;
|
|
72
72
|
/** 请求后格式化结果 */
|
|
73
73
|
onSearchAfter?: (data: any, eventType?: SearchEventType) => any;
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
75
|
export declare const classPrefix = "ccs-pl";
|
|
76
76
|
/**
|
|
77
77
|
* 布局组件 包括form、查询、toolbar、table 自动初始化数据
|
package/es/pro-table/search.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EventEmitter } from 'ahooks/lib/useEventEmitter';
|
|
|
2
2
|
import { FormInstance } from 'antd/lib/form';
|
|
3
3
|
import { ReactElement } from 'react';
|
|
4
4
|
import { CcsProTableProps } from './';
|
|
5
|
-
|
|
5
|
+
type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formInitValues' | 'expandForm' | 'disableCollapseForm' | 'formItemLabelWidth' | 'title'> & {
|
|
6
6
|
/** 显示列 */
|
|
7
7
|
columns?: any;
|
|
8
8
|
/** 更多查询条件 */
|
|
@@ -16,7 +16,7 @@ interface PropsType<T> extends Pick<CcsProTableProps<T>, 'toolbar' | 'formItems'
|
|
|
16
16
|
onReset: () => void;
|
|
17
17
|
onSearch: () => void;
|
|
18
18
|
event$: EventEmitter<any>;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
/** 操作按钮、查询,重置、列筛选、 */
|
|
21
21
|
declare function SearchComponent<T>({ form, title, event$, toolbar, columns, children, expandForm, titleBordered, formItems, formInitValues, isInModalOrDrawer, formItemLabelWidth, disableCollapseForm, onReset, onSearch, }: PropsType<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export default SearchComponent;
|
package/es/pro-tabs/index.d.ts
CHANGED
package/es/status-tag/index.d.ts
CHANGED
package/es/theme.d.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { ThemeConfig } from 'antd';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { GlobalConfig } from './ccs';
|
|
4
|
-
interface AppThemeProps {
|
|
5
|
-
theme: GlobalConfig['AppTheme'];
|
|
6
|
-
themeConfig?: ThemeConfig;
|
|
7
|
-
children: ReactElement;
|
|
8
|
-
}
|
|
9
4
|
/** 主题设置 */
|
|
10
|
-
|
|
5
|
+
type AppThemeProps = {
|
|
11
6
|
theme: GlobalConfig['AppTheme'];
|
|
12
7
|
themeConfig?: ThemeConfig;
|
|
13
8
|
children: ReactElement;
|
|
14
|
-
}
|
|
9
|
+
};
|
|
15
10
|
/** 主题设置 */
|
|
16
11
|
export default function AppTheme({ theme, themeConfig, children, }: AppThemeProps): import("react/jsx-runtime").JSX.Element;
|
|
17
12
|
export {};
|
package/es/trigger/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, ReactElement } from 'react';
|
|
2
2
|
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export
|
|
4
|
+
export type CcsTriggerProps = {
|
|
5
5
|
/** 下拉框宽度 */
|
|
6
6
|
width?: number;
|
|
7
7
|
/** 下拉框高度 */
|
|
@@ -38,7 +38,7 @@ export interface CcsTriggerProps {
|
|
|
38
38
|
popupContainer?: boolean;
|
|
39
39
|
/** Form.Item onChange */
|
|
40
40
|
onChange?: (value?: any) => void;
|
|
41
|
-
}
|
|
41
|
+
};
|
|
42
42
|
/**
|
|
43
43
|
* 适用于Form.Item中的 trigger组件,其内容自行定义,遵循ant form 自定义组件规范
|
|
44
44
|
* @param CcsTriggerPropsType
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
|
|
2
|
+
type DayjsType = dayjs.Dayjs & {
|
|
3
3
|
fromNow(withoutSuffix?: boolean): string;
|
|
4
4
|
from(compared: dayjs.ConfigType, withoutSuffix?: boolean): string;
|
|
5
5
|
toNow(withoutSuffix?: boolean): string;
|
|
6
6
|
to(compared: dayjs.ConfigType, withoutSuffix?: boolean): string;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export default class utils {
|
|
9
9
|
/**
|
|
10
10
|
* 是函数?
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
2
|
-
|
|
2
|
+
type Position = {
|
|
3
3
|
left: number;
|
|
4
4
|
top: number;
|
|
5
|
-
}
|
|
6
|
-
export
|
|
5
|
+
};
|
|
6
|
+
export type RowRendererProps = {
|
|
7
7
|
rowHeight: number;
|
|
8
8
|
index: number;
|
|
9
|
-
}
|
|
10
|
-
export
|
|
9
|
+
};
|
|
10
|
+
export type VirtualInstance = {
|
|
11
11
|
scrollTop: (top: number) => void;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
12
|
+
};
|
|
13
|
+
export type VirtualListProps = {
|
|
14
14
|
/** 容器高度 */
|
|
15
15
|
height?: number;
|
|
16
16
|
/** 记录条数 */
|
|
@@ -34,11 +34,11 @@ export interface VirtualListProps {
|
|
|
34
34
|
rowRenderer: ({ rowHeight, index }: RowRendererProps) => ReactNode;
|
|
35
35
|
/** scroll event */
|
|
36
36
|
onScroll?: (position: Position) => void;
|
|
37
|
-
}
|
|
38
|
-
export
|
|
37
|
+
};
|
|
38
|
+
export type VirtualListItemProps = Pick<VirtualListProps, 'rowHeight' | 'rowRenderer'> & {
|
|
39
39
|
index: number;
|
|
40
|
-
}
|
|
41
|
-
export
|
|
40
|
+
};
|
|
41
|
+
export type ListItemProps = {
|
|
42
42
|
prefix: ReactNode;
|
|
43
43
|
title: ReactNode;
|
|
44
44
|
extra?: ReactNode;
|
|
@@ -47,6 +47,6 @@ export interface ListItemProps {
|
|
|
47
47
|
className?: string;
|
|
48
48
|
description?: ReactNode;
|
|
49
49
|
onClick?: () => void;
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
declare const VirtualList: ({ height, rowCount, rowHeight, className, style, virtualRef, onScroll, rowRenderer, autoHideScroll, overscanRowCount, rowCountChangeScrollTop, }: VirtualListProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
52
|
export default VirtualList;
|