@ccs-ui/rc-pro 2.3.6-beta-34 → 2.3.6-beta-36
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/aj-captcha/index.d.ts +5 -2
- package/es/aj-captcha/index.js +6 -2
- package/es/auth/index.d.ts +3 -0
- package/es/auth/index.js +3 -0
- package/es/button/dropdown.js +5 -17
- package/es/button/group.js +31 -48
- package/es/button/index.d.ts +2 -8
- package/es/button/index.js +10 -13
- package/es/cascader/index.d.ts +5 -2
- package/es/cascader/index.js +6 -2
- package/es/ccs.d.ts +7 -8
- package/es/color-picker/index.d.ts +5 -1
- package/es/color-picker/index.js +6 -2
- package/es/date-picker/index.d.ts +1 -0
- package/es/date-picker/index.js +3 -0
- package/es/dialog/button.d.ts +1 -1
- package/es/dialog/index.d.ts +3 -1
- package/es/dialog/index.js +3 -0
- package/es/editor/index.d.ts +1 -0
- package/es/editor/index.js +3 -0
- package/es/ellipsis/index.d.ts +2 -2
- package/es/ellipsis/index.js +7 -6
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/interval-button/index.js +3 -0
- package/es/layout-keep-alive/index.d.ts +5 -2
- package/es/layout-keep-alive/index.js +6 -2
- package/es/layout-single-page/index.d.ts +5 -2
- package/es/layout-single-page/index.js +8 -7
- package/es/loading/index.d.ts +4 -1
- package/es/loading/index.js +4 -1
- package/es/pro-table/index.d.ts +7 -0
- package/es/pro-table/index.js +9 -0
- package/es/pro-table/selection-alert.d.ts +18 -0
- package/es/pro-table/selection-alert.js +52 -0
- package/es/pro-table/summary.d.ts +8 -0
- package/es/pro-table/summary.js +32 -0
- package/es/pro-table/table.d.ts +28 -18
- package/es/pro-table/table.js +279 -141
- package/es/pro-table/useSelection.d.ts +28 -0
- package/es/pro-table/useSelection.js +146 -0
- package/es/pro-tabs/index.d.ts +5 -2
- package/es/pro-tabs/index.js +6 -2
- package/es/result/index.d.ts +11 -15
- package/es/result/index.js +57 -54
- package/es/select/ modal.d.ts +16 -0
- package/es/select/ modal.js +100 -0
- package/es/select/api.d.ts +25 -0
- package/es/select/api.js +67 -0
- package/es/select/customize.d.ts +33 -0
- package/es/{select-customize/index.js → select/customize.js} +82 -98
- package/es/select/index.d.ts +20 -20
- package/es/select/index.js +69 -80
- package/es/status-tag/index.d.ts +5 -1
- package/es/status-tag/index.js +6 -2
- package/es/table/index.d.ts +5 -2
- package/es/table/index.js +53 -43
- package/es/trigger/index.d.ts +1 -0
- package/es/trigger/index.js +1 -0
- package/es/upload/index.d.ts +4 -3
- package/es/upload/index.js +6 -3
- package/es/water-mark/index.d.ts +4 -1
- package/es/water-mark/index.js +3 -0
- package/package.json +3 -2
- package/es/select-customize/index.d.ts +0 -26
package/es/aj-captcha/index.d.ts
CHANGED
|
@@ -27,5 +27,8 @@ export type AjCaptchaProps = {
|
|
|
27
27
|
/** 校验方法 */
|
|
28
28
|
onValid: (point: Point | Point[], captchaType: 'sliding' | 'wordSelect') => void;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
declare function AjCaptcha(props: AjCaptchaProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare namespace AjCaptcha {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
export default AjCaptcha;
|
package/es/aj-captcha/index.js
CHANGED
|
@@ -271,7 +271,7 @@ function AjCaptchaWord(_ref3) {
|
|
|
271
271
|
})]
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
|
-
|
|
274
|
+
function AjCaptcha(props) {
|
|
275
275
|
var bodyPadding = props.captchaType === 'sliding' ? '10px 10px 0 10px' : 10;
|
|
276
276
|
return /*#__PURE__*/_jsx(Modal, {
|
|
277
277
|
width: 330,
|
|
@@ -295,4 +295,8 @@ export default function AjCaptcha(props) {
|
|
|
295
295
|
},
|
|
296
296
|
children: props.captchaType === 'sliding' ? /*#__PURE__*/_jsx(AjCaptchaSliding, _objectSpread({}, props)) : /*#__PURE__*/_jsx(AjCaptchaWord, _objectSpread({}, props))
|
|
297
297
|
});
|
|
298
|
-
}
|
|
298
|
+
}
|
|
299
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
300
|
+
AjCaptcha.displayName = 'CcsAjCaptcha';
|
|
301
|
+
}
|
|
302
|
+
export default AjCaptcha;
|
package/es/auth/index.d.ts
CHANGED
|
@@ -9,4 +9,7 @@ export declare function ModalConfirm({ modalRef }: {
|
|
|
9
9
|
modalRef: any;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function CcsAuth({ auth, children }: CcsAuthProps): ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
12
|
+
declare namespace CcsAuth {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
12
15
|
export default CcsAuth;
|
package/es/auth/index.js
CHANGED
package/es/button/dropdown.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["auth", "menus", "children", "onClick"]
|
|
3
|
-
_excluded2 = ["onDisabled"];
|
|
2
|
+
var _excluded = ["auth", "menus", "children", "onClick"];
|
|
4
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -9,9 +8,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
10
|
import { Dropdown } from 'antd';
|
|
12
|
-
import React, {
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
13
12
|
import { useCcsPage } from '..';
|
|
14
|
-
import { TableSelectionContext } from "../pro-table/table";
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* 带权限的Dropdown组件
|
|
@@ -23,12 +21,10 @@ export default function CssButtonDropdown(_ref) {
|
|
|
23
21
|
_ref$menus = _ref.menus,
|
|
24
22
|
menus = _ref$menus === void 0 ? [] : _ref$menus,
|
|
25
23
|
children = _ref.children,
|
|
26
|
-
|
|
24
|
+
onClick = _ref.onClick,
|
|
27
25
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
26
|
var _ref2 = useCcsPage() || {},
|
|
29
27
|
onAuth = _ref2.onAuth;
|
|
30
|
-
var _ref3 = useContext(TableSelectionContext) || {},
|
|
31
|
-
selectedRows = _ref3.selectedRows;
|
|
32
28
|
var items = useMemo(function () {
|
|
33
29
|
function filterTreeArray(menuItems) {
|
|
34
30
|
var mis = menuItems.filter(function (item) {
|
|
@@ -68,16 +64,8 @@ export default function CssButtonDropdown(_ref) {
|
|
|
68
64
|
return i.type !== 'divider';
|
|
69
65
|
}).length ? /*#__PURE__*/_jsx(Dropdown, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
70
66
|
menu: {
|
|
71
|
-
items: items
|
|
72
|
-
|
|
73
|
-
item = _objectWithoutProperties(_ref4, _excluded2);
|
|
74
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
75
|
-
disabled: (item === null || item === void 0 ? void 0 : item.disabled) || onDisabled && onDisabled(selectedRows)
|
|
76
|
-
});
|
|
77
|
-
}),
|
|
78
|
-
onClick: function onClick(e) {
|
|
79
|
-
if (_onClick) _onClick(e, selectedRows);
|
|
80
|
-
}
|
|
67
|
+
items: items,
|
|
68
|
+
onClick: onClick
|
|
81
69
|
},
|
|
82
70
|
children: renderChildren
|
|
83
71
|
})) : /*#__PURE__*/_jsx(_Fragment, {});
|
package/es/button/group.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["
|
|
3
|
-
_excluded2 = ["key", "label", "auth", "confirm"
|
|
4
|
-
_excluded3 = ["key", "label", "disabled", "auth", "confirm"
|
|
2
|
+
var _excluded = ["auth", "hidden"],
|
|
3
|
+
_excluded2 = ["key", "label", "auth", "confirm"],
|
|
4
|
+
_excluded3 = ["key", "label", "disabled", "auth", "confirm"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -12,13 +12,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
12
12
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
13
13
|
import { EllipsisOutlined, ExclamationCircleOutlined } from '@ant-design/icons';
|
|
14
14
|
import { Button, Divider, Dropdown, Space } from 'antd';
|
|
15
|
-
import {
|
|
15
|
+
import { useRef } from 'react';
|
|
16
16
|
import { ModalConfirm } from '.';
|
|
17
17
|
import { useCcsPage } from '..';
|
|
18
|
-
import { TableSelectionContext } from "../pro-table/table";
|
|
19
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
19
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
21
|
export default function CssButtonGroup(_ref) {
|
|
23
22
|
var size = _ref.size,
|
|
24
23
|
isLink = _ref.isLink,
|
|
@@ -31,32 +30,20 @@ export default function CssButtonGroup(_ref) {
|
|
|
31
30
|
var _ref2 = useCcsPage() || {},
|
|
32
31
|
onAuth = _ref2.onAuth;
|
|
33
32
|
var modalRef = useRef(null);
|
|
34
|
-
var _ref3 = useContext(TableSelectionContext) || {},
|
|
35
|
-
selectedRows = _ref3.selectedRows;
|
|
36
33
|
|
|
37
34
|
// 有权限的按钮
|
|
38
35
|
var authButtons = [];
|
|
39
36
|
|
|
40
37
|
// 变量按钮
|
|
41
|
-
items.forEach(function (
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
item = _objectWithoutProperties(_ref4, _excluded);
|
|
38
|
+
items.forEach(function (_ref3) {
|
|
39
|
+
var auth = _ref3.auth,
|
|
40
|
+
hidden = _ref3.hidden,
|
|
41
|
+
item = _objectWithoutProperties(_ref3, _excluded);
|
|
46
42
|
// 权限校验
|
|
47
43
|
if (onAuth && auth && !onAuth(auth)) {
|
|
48
44
|
return;
|
|
49
45
|
}
|
|
50
|
-
|
|
51
|
-
// 隐藏按钮
|
|
52
|
-
if (onHidden && onHidden(selectedRows || [])) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 禁用按钮
|
|
57
|
-
if (onDisabled && onDisabled(selectedRows || [])) {
|
|
58
|
-
item.disabled = true;
|
|
59
|
-
}
|
|
46
|
+
if (hidden) return;
|
|
60
47
|
authButtons.push(item);
|
|
61
48
|
});
|
|
62
49
|
if (!authButtons || items.length === 0) return null;
|
|
@@ -77,12 +64,12 @@ export default function CssButtonGroup(_ref) {
|
|
|
77
64
|
okText: '确认',
|
|
78
65
|
cancelText: '取消',
|
|
79
66
|
onOk: function onOk() {
|
|
80
|
-
return onClick
|
|
67
|
+
return onClick === null || onClick === void 0 ? void 0 : onClick(key);
|
|
81
68
|
}
|
|
82
69
|
});
|
|
83
70
|
return;
|
|
84
71
|
}
|
|
85
|
-
onClick(key
|
|
72
|
+
onClick(key);
|
|
86
73
|
};
|
|
87
74
|
|
|
88
75
|
// 显示的按钮
|
|
@@ -98,16 +85,13 @@ export default function CssButtonGroup(_ref) {
|
|
|
98
85
|
margin: 0
|
|
99
86
|
}
|
|
100
87
|
}),
|
|
101
|
-
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (
|
|
102
|
-
var key =
|
|
103
|
-
label =
|
|
104
|
-
auth =
|
|
105
|
-
confirm =
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
onHidden = _ref5.onHidden,
|
|
109
|
-
restProps = _objectWithoutProperties(_ref5, _excluded2);
|
|
110
|
-
return /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
|
|
88
|
+
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (_ref4) {
|
|
89
|
+
var key = _ref4.key,
|
|
90
|
+
label = _ref4.label,
|
|
91
|
+
auth = _ref4.auth,
|
|
92
|
+
confirm = _ref4.confirm,
|
|
93
|
+
restProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
94
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
111
95
|
style: {
|
|
112
96
|
padding: 0
|
|
113
97
|
}
|
|
@@ -117,7 +101,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
117
101
|
onClick: function onClick() {
|
|
118
102
|
return handleOnClick(key);
|
|
119
103
|
},
|
|
120
|
-
children:
|
|
104
|
+
children: label
|
|
121
105
|
}), key);
|
|
122
106
|
})
|
|
123
107
|
}), authButtons.length > 0 && /*#__PURE__*/_jsx(Dropdown, {
|
|
@@ -143,24 +127,23 @@ export default function CssButtonGroup(_ref) {
|
|
|
143
127
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
144
128
|
children: [/*#__PURE__*/_jsx(Space, {
|
|
145
129
|
wrap: true,
|
|
146
|
-
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (
|
|
147
|
-
var key =
|
|
148
|
-
label =
|
|
149
|
-
disabled =
|
|
150
|
-
auth =
|
|
151
|
-
confirm =
|
|
152
|
-
|
|
153
|
-
restProps = _objectWithoutProperties(_ref6, _excluded3);
|
|
130
|
+
children: showBtns === null || showBtns === void 0 ? void 0 : showBtns.map(function (_ref5, index) {
|
|
131
|
+
var key = _ref5.key,
|
|
132
|
+
label = _ref5.label,
|
|
133
|
+
disabled = _ref5.disabled,
|
|
134
|
+
auth = _ref5.auth,
|
|
135
|
+
confirm = _ref5.confirm,
|
|
136
|
+
restProps = _objectWithoutProperties(_ref5, _excluded3);
|
|
154
137
|
// 更多按钮
|
|
155
138
|
if (index === showBtns.length - 1 && authButtons.length > 0) {
|
|
156
139
|
return /*#__PURE__*/_jsxs(Space.Compact, {
|
|
157
|
-
children: [/*#__PURE__*/
|
|
140
|
+
children: [/*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
158
141
|
size: size,
|
|
159
142
|
onClick: function onClick() {
|
|
160
143
|
return handleOnClick(key);
|
|
161
144
|
},
|
|
162
145
|
disabled: disabled,
|
|
163
|
-
children:
|
|
146
|
+
children: label
|
|
164
147
|
})), /*#__PURE__*/_jsx(Dropdown, {
|
|
165
148
|
menu: {
|
|
166
149
|
items: authButtons,
|
|
@@ -175,13 +158,13 @@ export default function CssButtonGroup(_ref) {
|
|
|
175
158
|
})]
|
|
176
159
|
}, key);
|
|
177
160
|
}
|
|
178
|
-
return /*#__PURE__*/
|
|
161
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
179
162
|
size: size,
|
|
180
163
|
disabled: disabled,
|
|
181
164
|
onClick: function onClick() {
|
|
182
165
|
return handleOnClick(key);
|
|
183
166
|
},
|
|
184
|
-
children:
|
|
167
|
+
children: label
|
|
185
168
|
}), key);
|
|
186
169
|
})
|
|
187
170
|
}), items.find(function (i) {
|
package/es/button/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type CcsButtonGroupProps = {
|
|
|
42
42
|
export declare function ModalConfirm({ modalRef }: {
|
|
43
43
|
modalRef: any;
|
|
44
44
|
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export type CcsAuthButtonProps =
|
|
45
|
+
export type CcsAuthButtonProps = ButtonProps & {
|
|
46
46
|
/** 权限标识 */
|
|
47
47
|
auth?: string;
|
|
48
48
|
/** 文本 */
|
|
@@ -51,19 +51,13 @@ export type CcsAuthButtonProps = Omit<ButtonProps, 'onClick'> & {
|
|
|
51
51
|
confirm?: string;
|
|
52
52
|
/** 输入确认的值 */
|
|
53
53
|
inputConfirm?: string;
|
|
54
|
-
/** 显示当前选中的记录条数 */
|
|
55
|
-
showRowsCount?: boolean;
|
|
56
|
-
/** 点击事件 */
|
|
57
|
-
onClick?: (e: React.MouseEvent<HTMLElement, MouseEvent>, selectedRows?: any[]) => void;
|
|
58
|
-
/** 按钮禁用方法 */
|
|
59
|
-
onDisabled?: (selectedRows?: any[]) => boolean;
|
|
60
54
|
};
|
|
61
55
|
/**
|
|
62
56
|
* 带权限的按钮组件、继承Ant Button所有属性
|
|
63
57
|
* @param CcsAuthButtonProps
|
|
64
58
|
* @returns
|
|
65
59
|
*/
|
|
66
|
-
declare function CcsButton({ auth, text, confirm, disabled, inputConfirm,
|
|
60
|
+
declare function CcsButton({ auth, text, confirm, disabled, inputConfirm, onClick, ...restProps }: CcsAuthButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
67
61
|
declare namespace CcsButton {
|
|
68
62
|
var displayName: string;
|
|
69
63
|
var Group: typeof CssButtonGroup;
|
package/es/button/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["auth", "text", "confirm", "disabled", "inputConfirm", "
|
|
2
|
+
var _excluded = ["auth", "text", "confirm", "disabled", "inputConfirm", "onClick"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -15,9 +15,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
17
17
|
import { Button, Input, Modal } from 'antd';
|
|
18
|
-
import {
|
|
18
|
+
import { useEffect, useRef } from 'react';
|
|
19
19
|
import { useCcsPage } from '..';
|
|
20
|
-
import { TableSelectionContext } from "../pro-table/table";
|
|
21
20
|
import CssButtonDropdown from "./dropdown";
|
|
22
21
|
import CssButtonGroup from "./group";
|
|
23
22
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -47,15 +46,11 @@ function CcsButton(_ref2) {
|
|
|
47
46
|
confirm = _ref2.confirm,
|
|
48
47
|
disabled = _ref2.disabled,
|
|
49
48
|
inputConfirm = _ref2.inputConfirm,
|
|
50
|
-
showRowsCount = _ref2.showRowsCount,
|
|
51
49
|
_onClick = _ref2.onClick,
|
|
52
|
-
onDisabled = _ref2.onDisabled,
|
|
53
50
|
restProps = _objectWithoutProperties(_ref2, _excluded);
|
|
54
51
|
var _ref3 = useCcsPage() || {},
|
|
55
52
|
onAuth = _ref3.onAuth;
|
|
56
53
|
var modalRef = useRef(null);
|
|
57
|
-
var _ref4 = useContext(TableSelectionContext) || {},
|
|
58
|
-
selectedRows = _ref4.selectedRows;
|
|
59
54
|
var ref = useRef(null);
|
|
60
55
|
var button = /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
61
56
|
onClick: function onClick(e) {
|
|
@@ -88,7 +83,7 @@ function CcsButton(_ref2) {
|
|
|
88
83
|
return new Promise(function (resolve, reject) {
|
|
89
84
|
var _ref$current;
|
|
90
85
|
if (((_ref$current = ref.current) === null || _ref$current === void 0 || (_ref$current = _ref$current.input) === null || _ref$current === void 0 ? void 0 : _ref$current.value) === inputConfirm) {
|
|
91
|
-
_onClick(e
|
|
86
|
+
_onClick(e);
|
|
92
87
|
resolve(true);
|
|
93
88
|
} else {
|
|
94
89
|
var errorDom = document.getElementById('_inputConfirmError');
|
|
@@ -102,15 +97,15 @@ function CcsButton(_ref2) {
|
|
|
102
97
|
}
|
|
103
98
|
});
|
|
104
99
|
}
|
|
105
|
-
_onClick(e
|
|
100
|
+
_onClick(e);
|
|
106
101
|
}
|
|
107
102
|
});
|
|
108
103
|
return;
|
|
109
104
|
}
|
|
110
|
-
_onClick(e
|
|
105
|
+
_onClick(e);
|
|
111
106
|
},
|
|
112
|
-
disabled: disabled
|
|
113
|
-
children: [text,
|
|
107
|
+
disabled: disabled,
|
|
108
|
+
children: [text, restProps.children]
|
|
114
109
|
}));
|
|
115
110
|
|
|
116
111
|
// 不控制权限或没有传auth
|
|
@@ -130,7 +125,9 @@ function CcsButton(_ref2) {
|
|
|
130
125
|
}) : null]
|
|
131
126
|
});
|
|
132
127
|
}
|
|
133
|
-
|
|
128
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
129
|
+
CcsButton.displayName = 'CcsButton';
|
|
130
|
+
}
|
|
134
131
|
CcsButton.Group = CssButtonGroup;
|
|
135
132
|
CcsButton.Dropdown = CssButtonDropdown;
|
|
136
133
|
export default CcsButton;
|
package/es/cascader/index.d.ts
CHANGED
|
@@ -26,5 +26,8 @@ type ApiCascaderProps = Omit<CascaderProps, 'fieldNames'> & {
|
|
|
26
26
|
* @param CcsSelectProps
|
|
27
27
|
* @returns
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
declare function ApiCascader({ onQuery, cache, fieldNames, defaultParams, ...restProps }: ApiCascaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare namespace ApiCascader {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export default ApiCascader;
|
package/es/cascader/index.js
CHANGED
|
@@ -31,7 +31,7 @@ function onIsArray(data) {
|
|
|
31
31
|
* @param CcsSelectProps
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
function ApiCascader(_ref) {
|
|
35
35
|
var onQuery = _ref.onQuery,
|
|
36
36
|
cache = _ref.cache,
|
|
37
37
|
fieldNames = _ref.fieldNames,
|
|
@@ -113,4 +113,8 @@ export default function CcsApiCascader(_ref) {
|
|
|
113
113
|
}
|
|
114
114
|
}, restProps))
|
|
115
115
|
);
|
|
116
|
-
}
|
|
116
|
+
}
|
|
117
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
118
|
+
ApiCascader.displayName = 'CcsApiCascader';
|
|
119
|
+
}
|
|
120
|
+
export default ApiCascader;
|
package/es/ccs.d.ts
CHANGED
|
@@ -43,8 +43,13 @@ type TableDataType<T> = {
|
|
|
43
43
|
result?: T[];
|
|
44
44
|
};
|
|
45
45
|
type TableInstance<T = any> = {
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
* 获取form表单数据,排序等条件数据
|
|
49
|
+
*/
|
|
47
50
|
formValues: Record<string, any>;
|
|
51
|
+
/** 接口请求参数 */
|
|
52
|
+
searchParam: Record<string, any>;
|
|
48
53
|
/** 获取当前表单数据 */
|
|
49
54
|
data: TableData<T>;
|
|
50
55
|
/** 获取当前选中的数据 */
|
|
@@ -60,7 +65,7 @@ type TableInstance<T = any> = {
|
|
|
60
65
|
/** 改变data 数据 */
|
|
61
66
|
onChangeData: React.Dispatch<React.SetStateAction<TableDataType<T>>>;
|
|
62
67
|
/** 清空选中的数据 */
|
|
63
|
-
onClearSelected: () => void;
|
|
68
|
+
onClearSelected: (key?: React.Key) => void;
|
|
64
69
|
};
|
|
65
70
|
type AuthButtonItem = {
|
|
66
71
|
key: string;
|
|
@@ -72,10 +77,6 @@ type AuthButtonItem = {
|
|
|
72
77
|
type?: ButtonProps['type'];
|
|
73
78
|
/** 按钮禁用 */
|
|
74
79
|
disabled?: boolean;
|
|
75
|
-
/** 根据选中数据判断是否禁用 */
|
|
76
|
-
onDisabled?: (selectedRows: any[]) => boolean;
|
|
77
|
-
/** 根据选中数据判断是否隐藏 */
|
|
78
|
-
onHidden?: (selectedRows: any[]) => boolean;
|
|
79
80
|
/** 按钮隐藏 */
|
|
80
81
|
hidden?: boolean;
|
|
81
82
|
/** 警告按钮 */
|
|
@@ -84,8 +85,6 @@ type AuthButtonItem = {
|
|
|
84
85
|
icon?: ReactNode;
|
|
85
86
|
/** 按钮操作确认消息 */
|
|
86
87
|
confirm?: string;
|
|
87
|
-
/** 显示当前选中的记录条数 */
|
|
88
|
-
showRowsCount?: boolean;
|
|
89
88
|
};
|
|
90
89
|
type TriggerChildrenProps<T = any> = {
|
|
91
90
|
/** 选中值 */
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ColorPickerProps } from 'antd';
|
|
2
2
|
import './index.less';
|
|
3
|
-
|
|
3
|
+
declare function CcsColorPicker({ mode, children, onChange, ...otherProps }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace CcsColorPicker {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default CcsColorPicker;
|
package/es/color-picker/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var presets = genPresets({
|
|
|
44
44
|
presets.forEach(function (f) {
|
|
45
45
|
f.colors = f.colors.slice(0, 6);
|
|
46
46
|
});
|
|
47
|
-
|
|
47
|
+
function CcsColorPicker(_ref3) {
|
|
48
48
|
var _ref3$mode = _ref3.mode,
|
|
49
49
|
mode = _ref3$mode === void 0 ? 'single' : _ref3$mode,
|
|
50
50
|
children = _ref3.children,
|
|
@@ -135,4 +135,8 @@ export default function CcsColorPicker(_ref3) {
|
|
|
135
135
|
}, otherProps), {}, {
|
|
136
136
|
children: children || renderValue()
|
|
137
137
|
}));
|
|
138
|
-
}
|
|
138
|
+
}
|
|
139
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
140
|
+
CcsColorPicker.displayName = 'CcsColorPicker';
|
|
141
|
+
}
|
|
142
|
+
export default CcsColorPicker;
|
|
@@ -14,5 +14,6 @@ type CcsRangePickerProps = {
|
|
|
14
14
|
declare function CcsDatePicker({ value, onChange, ...restProps }: CcsDatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare namespace CcsDatePicker {
|
|
16
16
|
var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
var displayName: string;
|
|
17
18
|
}
|
|
18
19
|
export default CcsDatePicker;
|
package/es/date-picker/index.js
CHANGED
package/es/dialog/button.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type DialogButtonsProps<T> = Pick<CcsDialogModalProps, 'okText' | 'onClos
|
|
|
16
16
|
export type DialogButtonRef = {
|
|
17
17
|
onSetButtons: (e: React.ReactElement) => void;
|
|
18
18
|
};
|
|
19
|
-
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "auth" | "
|
|
19
|
+
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "auth" | "onClose" | "onOk" | "extraBtn" | "request" | "requestFieldNames" | "preventRequestHandle"> & {
|
|
20
20
|
formRef: React.RefObject<DialogFormRef<TParams>>;
|
|
21
21
|
formInitialValues: FormProps['initialValues'];
|
|
22
22
|
buttonRef: RefObject<DialogButtonRef>;
|
package/es/dialog/index.d.ts
CHANGED
|
@@ -14,5 +14,7 @@ type DialogInterface = {
|
|
|
14
14
|
/** drawer footer */
|
|
15
15
|
DrawerFooter: typeof CcsDrawerFooter;
|
|
16
16
|
};
|
|
17
|
-
declare const CcsDialog: typeof ThemeDialog & DialogInterface
|
|
17
|
+
declare const CcsDialog: typeof ThemeDialog & DialogInterface & {
|
|
18
|
+
displayName?: string | undefined;
|
|
19
|
+
};
|
|
18
20
|
export default CcsDialog;
|
package/es/dialog/index.js
CHANGED
|
@@ -9,4 +9,7 @@ CcsDialog.Buttons = CcsDialogFooter;
|
|
|
9
9
|
CcsDialog.useDialog = useCcsDialog;
|
|
10
10
|
CcsDialog.useInstance = useDialogContext;
|
|
11
11
|
CcsDialog.DrawerFooter = CcsDrawerFooter;
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
+
CcsDialog.displayName = 'CcsDialog';
|
|
14
|
+
}
|
|
12
15
|
export default CcsDialog;
|
package/es/editor/index.d.ts
CHANGED
package/es/editor/index.js
CHANGED
package/es/ellipsis/index.d.ts
CHANGED
package/es/ellipsis/index.js
CHANGED
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { CopyOutlined } from '@ant-design/icons';
|
|
8
8
|
import CcsUtils from '@ccs-ui/utils';
|
|
9
|
-
import {
|
|
9
|
+
import { Tooltip } from 'antd';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import CcsDialog from "../dialog";
|
|
12
12
|
import "./index.less";
|
|
@@ -34,10 +34,8 @@ var defaultProps = {
|
|
|
34
34
|
* @param EllipsisProps
|
|
35
35
|
* @returns
|
|
36
36
|
*/
|
|
37
|
-
var
|
|
37
|
+
var Ellipsis = function Ellipsis(p) {
|
|
38
38
|
var props = CcsUtils.mergeProps(defaultProps, p);
|
|
39
|
-
var _theme$useToken = theme.useToken(),
|
|
40
|
-
token = _theme$useToken.token;
|
|
41
39
|
var direction = props.direction,
|
|
42
40
|
rows = props.rows,
|
|
43
41
|
expandText = props.expandText,
|
|
@@ -98,7 +96,7 @@ var CcsEllipsis = function CcsEllipsis(p) {
|
|
|
98
96
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
99
97
|
children: [content, /*#__PURE__*/_jsxs("a", {
|
|
100
98
|
style: {
|
|
101
|
-
color:
|
|
99
|
+
color: 'gray',
|
|
102
100
|
display: 'block'
|
|
103
101
|
},
|
|
104
102
|
onClick: function onClick() {
|
|
@@ -123,4 +121,7 @@ var CcsEllipsis = function CcsEllipsis(p) {
|
|
|
123
121
|
});
|
|
124
122
|
}
|
|
125
123
|
};
|
|
126
|
-
|
|
124
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
125
|
+
Ellipsis.displayName = 'CcsEllipsis';
|
|
126
|
+
}
|
|
127
|
+
export default Ellipsis;
|
package/es/index.d.ts
CHANGED
|
@@ -23,8 +23,7 @@ export { default as CcsProTable } from './pro-table';
|
|
|
23
23
|
export { default as CcsProTabs } from './pro-tabs';
|
|
24
24
|
export { default as CcsResizeObserver } from './resize-observer';
|
|
25
25
|
export { default as CcsResult } from './result';
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as CcsSelectCustomize } from './select-customize';
|
|
26
|
+
export { default as CcsSelect } from './select';
|
|
28
27
|
export { default as CcsStatusTag } from './status-tag';
|
|
29
28
|
export { default as CcsTable } from './table';
|
|
30
29
|
export { default as CcsTimePicker } from './time-picker';
|
package/es/index.js
CHANGED
|
@@ -23,8 +23,7 @@ export { default as CcsProTable } from "./pro-table";
|
|
|
23
23
|
export { default as CcsProTabs } from "./pro-tabs";
|
|
24
24
|
export { default as CcsResizeObserver } from "./resize-observer";
|
|
25
25
|
export { default as CcsResult } from "./result";
|
|
26
|
-
export { default as
|
|
27
|
-
export { default as CcsSelectCustomize } from "./select-customize";
|
|
26
|
+
export { default as CcsSelect } from "./select";
|
|
28
27
|
export { default as CcsStatusTag } from "./status-tag";
|
|
29
28
|
export { default as CcsTable } from "./table";
|
|
30
29
|
export { default as CcsTimePicker } from "./time-picker";
|
|
@@ -122,4 +122,7 @@ function IntervalButton(_ref, ref) {
|
|
|
122
122
|
children: disabled ? "".concat(count, "\u79D2").concat(disabledText) : "".concat(children)
|
|
123
123
|
}));
|
|
124
124
|
}
|
|
125
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
126
|
+
IntervalButton.displayName = 'CcsIntervalButton';
|
|
127
|
+
}
|
|
125
128
|
export default /*#__PURE__*/forwardRef(IntervalButton);
|
|
@@ -22,5 +22,8 @@ type PropsType = {
|
|
|
22
22
|
history: any;
|
|
23
23
|
};
|
|
24
24
|
export declare function findMenusByUrl(tree: MenuType | MenuType[], targetUrl: string, parents?: MenuType[]): MenuType[] | null;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
declare function KeepAliveTabs({ maxLen, appName, history, menuItems, className, }: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare namespace KeepAliveTabs {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export default KeepAliveTabs;
|