@ccs-ui/rc-pro 2.3.3-beta-8 → 2.3.3-beta-10
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/button/group.d.ts +1 -1
- package/es/button/group.js +7 -8
- package/es/button/index.d.ts +0 -2
- package/es/ccs.d.ts +2 -0
- package/es/context/index.d.ts +4 -4
- package/es/dialog/button.d.ts +1 -1
- package/es/table/index.js +1 -1
- package/es/upload/index.js +7 -6
- package/package.json +1 -1
package/es/button/group.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CcsButtonGroupProps } from '.';
|
|
2
|
-
export default function CssButtonGroup({ size, isLink, showCount, moreIcon, moreText,
|
|
2
|
+
export default function CssButtonGroup({ size, isLink, showCount, moreIcon, moreText, items, onClick, }: CcsButtonGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
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
2
|
var _excluded = ["onDisabled", "onHidden"],
|
|
3
|
-
_excluded2 = ["key", "label", "auth", "confirm", "onDisabled", "onHidden"],
|
|
4
|
-
_excluded3 = ["key", "label", "disabled", "auth", "confirm", "onDisabled", "onHidden"];
|
|
3
|
+
_excluded2 = ["key", "label", "auth", "confirm", "showRowsCount", "onDisabled", "onHidden"],
|
|
4
|
+
_excluded3 = ["key", "label", "disabled", "auth", "confirm", "showRowsCount", "onDisabled", "onHidden"];
|
|
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; }
|
|
@@ -25,7 +25,6 @@ export default function CssButtonGroup(_ref) {
|
|
|
25
25
|
showCount = _ref.showCount,
|
|
26
26
|
moreIcon = _ref.moreIcon,
|
|
27
27
|
moreText = _ref.moreText,
|
|
28
|
-
showRowsCount = _ref.showRowsCount,
|
|
29
28
|
_ref$items = _ref.items,
|
|
30
29
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
31
30
|
onClick = _ref.onClick;
|
|
@@ -35,7 +34,6 @@ export default function CssButtonGroup(_ref) {
|
|
|
35
34
|
var _ref3 = useContext(TableSelectionContext) || {},
|
|
36
35
|
selectedRows = _ref3.selectedRows;
|
|
37
36
|
var authButtons = [];
|
|
38
|
-
var showSelectedRows = showRowsCount && selectedRows !== null && selectedRows !== void 0 && selectedRows.length ? "(".concat(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length, ")") : '';
|
|
39
37
|
|
|
40
38
|
// 过滤隐藏按钮
|
|
41
39
|
authButtons = items.filter(function (item) {
|
|
@@ -86,7 +84,6 @@ export default function CssButtonGroup(_ref) {
|
|
|
86
84
|
}
|
|
87
85
|
onClick(key, selectedRows);
|
|
88
86
|
};
|
|
89
|
-
|
|
90
87
|
// link类型按钮
|
|
91
88
|
if (isLink) {
|
|
92
89
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -102,6 +99,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
102
99
|
label = _ref5.label,
|
|
103
100
|
auth = _ref5.auth,
|
|
104
101
|
confirm = _ref5.confirm,
|
|
102
|
+
showRowsCount = _ref5.showRowsCount,
|
|
105
103
|
onDisabled = _ref5.onDisabled,
|
|
106
104
|
onHidden = _ref5.onHidden,
|
|
107
105
|
restProps = _objectWithoutProperties(_ref5, _excluded2);
|
|
@@ -115,7 +113,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
115
113
|
onClick: function onClick() {
|
|
116
114
|
return handleOnClick(key);
|
|
117
115
|
},
|
|
118
|
-
children: [label,
|
|
116
|
+
children: [label, showRowsCount && selectedRows !== null && selectedRows !== void 0 && selectedRows.length ? "(".concat(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length, ")") : '']
|
|
119
117
|
}), key);
|
|
120
118
|
})
|
|
121
119
|
}), authButtons.length > 0 && /*#__PURE__*/_jsx(Dropdown, {
|
|
@@ -147,6 +145,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
147
145
|
disabled = _ref6.disabled,
|
|
148
146
|
auth = _ref6.auth,
|
|
149
147
|
confirm = _ref6.confirm,
|
|
148
|
+
showRowsCount = _ref6.showRowsCount,
|
|
150
149
|
onDisabled = _ref6.onDisabled,
|
|
151
150
|
onHidden = _ref6.onHidden,
|
|
152
151
|
restProps = _objectWithoutProperties(_ref6, _excluded3);
|
|
@@ -162,7 +161,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
162
161
|
return handleOnClick(key);
|
|
163
162
|
},
|
|
164
163
|
disabled: isDisabled,
|
|
165
|
-
children: [label, showRowsCount]
|
|
164
|
+
children: [label, showRowsCount && selectedRows !== null && selectedRows !== void 0 && selectedRows.length ? "(".concat(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length, ")") : '']
|
|
166
165
|
})), /*#__PURE__*/_jsx(Dropdown, {
|
|
167
166
|
menu: {
|
|
168
167
|
items: authButtons,
|
|
@@ -183,7 +182,7 @@ export default function CssButtonGroup(_ref) {
|
|
|
183
182
|
onClick: function onClick() {
|
|
184
183
|
return handleOnClick(key);
|
|
185
184
|
},
|
|
186
|
-
children: [label,
|
|
185
|
+
children: [label, showRowsCount && selectedRows !== null && selectedRows !== void 0 && selectedRows.length ? "(".concat(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length, ")") : '']
|
|
187
186
|
}), key);
|
|
188
187
|
})
|
|
189
188
|
}), items.find(function (i) {
|
package/es/button/index.d.ts
CHANGED
package/es/ccs.d.ts
CHANGED
package/es/context/index.d.ts
CHANGED
|
@@ -51,10 +51,10 @@ type FnContextType<T = Store> = {
|
|
|
51
51
|
close: () => void;
|
|
52
52
|
};
|
|
53
53
|
type CcsFieldNamesType = {
|
|
54
|
-
dataSource
|
|
55
|
-
total
|
|
56
|
-
current
|
|
57
|
-
pageSize
|
|
54
|
+
dataSource?: string[];
|
|
55
|
+
total?: string[];
|
|
56
|
+
current?: string[];
|
|
57
|
+
pageSize?: string[];
|
|
58
58
|
};
|
|
59
59
|
type CcsDialogFieldNames = {
|
|
60
60
|
/** 成功标识字段 */
|
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>, "
|
|
19
|
+
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "auth" | "request" | "onClose" | "onOk" | "extraBtn" | "requestFieldNames" | "preventRequestHandle"> & {
|
|
20
20
|
formRef: React.RefObject<DialogFormRef<TParams>>;
|
|
21
21
|
formInitialValues: FormProps['initialValues'];
|
|
22
22
|
buttonRef: RefObject<DialogButtonRef>;
|
package/es/table/index.js
CHANGED
|
@@ -141,7 +141,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
141
141
|
c.ellipsis = !isMultiRow;
|
|
142
142
|
c.render = function (e) {
|
|
143
143
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
144
|
-
zIndex:
|
|
144
|
+
zIndex: 9999,
|
|
145
145
|
title: e,
|
|
146
146
|
placement: "bottomLeft",
|
|
147
147
|
destroyTooltipOnHide: true,
|
package/es/upload/index.js
CHANGED
|
@@ -87,15 +87,16 @@ function CcsUpload(_ref) {
|
|
|
87
87
|
return f.status === 'uploading';
|
|
88
88
|
})) return;
|
|
89
89
|
if (maxCount === 1) {
|
|
90
|
-
var _fileList
|
|
90
|
+
var _fileList$, _fileList$2;
|
|
91
91
|
// 只能上传一个文件
|
|
92
|
-
onChange((_fileList$ = fileList[0]) === null || _fileList$ === void 0 ? void 0 : _fileList$.fileId);
|
|
92
|
+
onChange(((_fileList$ = fileList[0]) === null || _fileList$ === void 0 || (_fileList$ = _fileList$.response) === null || _fileList$ === void 0 ? void 0 : _fileList$.data) || ((_fileList$2 = fileList[0]) === null || _fileList$2 === void 0 ? void 0 : _fileList$2.fileId));
|
|
93
93
|
} else {
|
|
94
94
|
// 上传完成的文件,返回上传结果集
|
|
95
|
-
onChange(fileList.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
onChange(fileList.map(function (f) {
|
|
96
|
+
var _f$response;
|
|
97
|
+
return ((_f$response = f.response) === null || _f$response === void 0 ? void 0 : _f$response.data) || f.fileId;
|
|
98
|
+
}).filter(function (s) {
|
|
99
|
+
return s !== undefined;
|
|
99
100
|
}));
|
|
100
101
|
}
|
|
101
102
|
};
|