@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/table/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { useEffect, useImperativeHandle } from 'react';
|
|
|
15
15
|
import { Resizable } from 'react-resizable';
|
|
16
16
|
import CcsEllipsis2 from "../ellipsis";
|
|
17
17
|
import useTabs from "../hooks/use-tabs";
|
|
18
|
+
import { TableEvent } from "../pro-table/table";
|
|
18
19
|
import "./index.less";
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
var ResizableTitle = function ResizableTitle(props) {
|
|
@@ -67,53 +68,52 @@ var CustomTable = function CustomTable(props) {
|
|
|
67
68
|
|
|
68
69
|
// table 固定表头,内容滚动
|
|
69
70
|
var _useDebounceFn = useDebounceFn(function () {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
var _tableContentRef$curr;
|
|
72
|
+
if ((scroll === null || scroll === void 0 ? void 0 : scroll.y) !== 'auto') return;
|
|
73
|
+
var tableTarget = tableContentRef === null || tableContentRef === void 0 ? void 0 : tableContentRef.current;
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
75
|
+
// 在ccs tabs组件内
|
|
76
|
+
if (inTabs !== null && inTabs !== void 0 && inTabs.tabsId) {
|
|
77
|
+
var tabsDom = document.getElementById(inTabs === null || inTabs === void 0 ? void 0 : inTabs.tabsId);
|
|
78
|
+
if (tabsDom) {
|
|
79
|
+
tabsDom.classList.add('ccs-tabs-auto-height');
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// 容器最大高度
|
|
84
|
-
var maxHeight = (_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight;
|
|
81
|
+
}
|
|
82
|
+
if (!tableTarget) return;
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var childHeights = [];
|
|
89
|
-
var antTablebody = undefined;
|
|
90
|
-
tableEle.childNodes.forEach(function (e) {
|
|
91
|
-
if (e.classList.contains('ant-table-container')) {
|
|
92
|
-
e.childNodes.forEach(function (node) {
|
|
93
|
-
if (node.classList.contains('ant-table-body')) {
|
|
94
|
-
antTablebody = node;
|
|
95
|
-
} else {
|
|
96
|
-
childHeights.push(node.clientHeight || 0);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
} else {
|
|
100
|
-
childHeights.push(e.clientHeight || 0);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
84
|
+
// 容器最大高度
|
|
85
|
+
var maxHeight = (_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight;
|
|
103
86
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
87
|
+
// 计算所有dom高度
|
|
88
|
+
var tableEle = tableTarget.getElementsByClassName('ant-table')[0];
|
|
89
|
+
var childHeights = [];
|
|
90
|
+
var antTablebody = undefined;
|
|
91
|
+
tableEle.childNodes.forEach(function (e) {
|
|
92
|
+
if (e.classList.contains('ant-table-container')) {
|
|
93
|
+
e.childNodes.forEach(function (node) {
|
|
94
|
+
if (node.classList.contains('ant-table-body')) {
|
|
95
|
+
antTablebody = node;
|
|
96
|
+
} else {
|
|
97
|
+
childHeights.push(node.clientHeight || 0);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
} else {
|
|
101
|
+
childHeights.push(e.clientHeight || 0);
|
|
108
102
|
}
|
|
103
|
+
});
|
|
109
104
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
// 分页高度
|
|
106
|
+
var pagination = tableTarget.getElementsByClassName('ant-pagination');
|
|
107
|
+
if (pagination && pagination.length > 0) {
|
|
108
|
+
childHeights.push(pagination[0].clientHeight);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// 计算body滚动高度
|
|
112
|
+
if (antTablebody) {
|
|
113
|
+
var scrollHeight = maxHeight - childHeights.reduce(function (c, s) {
|
|
114
|
+
return c + s;
|
|
115
|
+
}, 0);
|
|
116
|
+
antTablebody.style.height = "".concat(scrollHeight, "px");
|
|
117
117
|
}
|
|
118
118
|
}, {
|
|
119
119
|
wait: 500,
|
|
@@ -131,9 +131,11 @@ var CustomTable = function CustomTable(props) {
|
|
|
131
131
|
useImperativeHandle(tableRef, function () {
|
|
132
132
|
return {
|
|
133
133
|
onColumnFilter: function onColumnFilter(e) {
|
|
134
|
+
var _props$onEvent;
|
|
134
135
|
columns === null || columns === void 0 || columns.forEach(function (c) {
|
|
135
136
|
c.hidden = e.columnHiddenKeys.includes(c.dataIndex);
|
|
136
137
|
});
|
|
138
|
+
(_props$onEvent = props.onEvent) === null || _props$onEvent === void 0 || _props$onEvent.call(props, TableEvent.ColumnFilter, e);
|
|
137
139
|
update();
|
|
138
140
|
},
|
|
139
141
|
onFixedThead: onFixedThead
|
|
@@ -205,6 +207,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
205
207
|
var tableRowKey = function tableRowKey(_, index) {
|
|
206
208
|
return index || 0;
|
|
207
209
|
};
|
|
210
|
+
var showColumns = filterColumns();
|
|
208
211
|
return /*#__PURE__*/_jsx("div", {
|
|
209
212
|
className: "ccs-table-card",
|
|
210
213
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -229,7 +232,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
229
232
|
rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
|
|
230
233
|
columnWidth: 60
|
|
231
234
|
}) : undefined,
|
|
232
|
-
columns:
|
|
235
|
+
columns: showColumns,
|
|
233
236
|
components: {
|
|
234
237
|
header: {
|
|
235
238
|
cell: ResizableTitle
|
|
@@ -238,8 +241,15 @@ var CustomTable = function CustomTable(props) {
|
|
|
238
241
|
}, restProps), {}, {
|
|
239
242
|
size: restProps.size || 'middle',
|
|
240
243
|
className: classNames(_defineProperty(_defineProperty(_defineProperty({}, 'ccs-table-nodata', !dataSource || dataSource.length === 0), 'ccs-table-wrapper', !rowSelection), "className", className)),
|
|
241
|
-
scroll: scroll
|
|
244
|
+
scroll: scroll,
|
|
245
|
+
summary: restProps !== null && restProps !== void 0 && restProps.summary ? function (e) {
|
|
246
|
+
var _restProps$summary;
|
|
247
|
+
return (_restProps$summary = restProps.summary) === null || _restProps$summary === void 0 ? void 0 : _restProps$summary.call(restProps, e, showColumns || []);
|
|
248
|
+
} : undefined
|
|
242
249
|
}))
|
|
243
250
|
});
|
|
244
251
|
};
|
|
252
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
253
|
+
CustomTable.displayName = 'CcsTable';
|
|
254
|
+
}
|
|
245
255
|
export default CustomTable;
|
package/es/trigger/index.d.ts
CHANGED
package/es/trigger/index.js
CHANGED
package/es/upload/index.d.ts
CHANGED
|
@@ -34,8 +34,9 @@ export type FileUploadList = UploadChangeParam['fileList'][0] & {
|
|
|
34
34
|
};
|
|
35
35
|
/** 生成图片默认值 */
|
|
36
36
|
export declare function uploadDefaultFlies(value: CcsUploadProps['value'], fileDownloadUrl: string): FileUploadList[];
|
|
37
|
-
declare function
|
|
38
|
-
declare namespace
|
|
37
|
+
declare function CustomUpload({ value, uploadText, maxCount, maxFileSize, fileDownloadUrl, uploadRequest, onChange, ...otherProps }: CcsUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare namespace CustomUpload {
|
|
39
39
|
var Image: typeof ImageUpload;
|
|
40
|
+
var displayName: string;
|
|
40
41
|
}
|
|
41
|
-
export default
|
|
42
|
+
export default CustomUpload;
|
package/es/upload/index.js
CHANGED
|
@@ -59,7 +59,7 @@ export function uploadDefaultFlies(value, fileDownloadUrl) {
|
|
|
59
59
|
}
|
|
60
60
|
return [];
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function CustomUpload(_ref) {
|
|
63
63
|
var value = _ref.value,
|
|
64
64
|
uploadText = _ref.uploadText,
|
|
65
65
|
_ref$maxCount = _ref.maxCount,
|
|
@@ -160,5 +160,8 @@ function CcsUpload(_ref) {
|
|
|
160
160
|
})
|
|
161
161
|
}));
|
|
162
162
|
}
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
CustomUpload.Image = ImageUpload;
|
|
164
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
165
|
+
CustomUpload.displayName = 'CcsUpload';
|
|
166
|
+
}
|
|
167
|
+
export default CustomUpload;
|
package/es/water-mark/index.d.ts
CHANGED
|
@@ -58,5 +58,8 @@ export type WaterMarkProps = PropsWithNodeChildren & PropsWithCss & {
|
|
|
58
58
|
* @param WaterMarkProps
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
declare const WaterMarkComponent:
|
|
61
|
+
declare const WaterMarkComponent: {
|
|
62
|
+
(props: WaterMarkProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
62
65
|
export default WaterMarkComponent;
|
package/es/water-mark/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccs-ui/rc-pro",
|
|
3
|
-
"version": "2.3.6-beta-
|
|
3
|
+
"version": "2.3.6-beta-36",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
"react-draggable": "^4.4.5",
|
|
72
72
|
"react-error-overlay": "^6.0.11",
|
|
73
73
|
"react-resizable": "^3.0.5",
|
|
74
|
-
"runes2": "^1.1.4"
|
|
74
|
+
"runes2": "^1.1.4",
|
|
75
|
+
"tiny-pinyin": "^1.3.2"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|
|
77
78
|
"@ant-design/compatible": "^5.1.2",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SelectProps } from 'antd';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
export type SelectCustomInstance = {
|
|
4
|
-
value?: any;
|
|
5
|
-
onClose?: () => void;
|
|
6
|
-
onChange?: (value: any) => void;
|
|
7
|
-
onChangeLabel?: (label?: string) => void;
|
|
8
|
-
};
|
|
9
|
-
interface SelectCustomizeProps extends SelectProps {
|
|
10
|
-
/** 选择触发器宽度 */
|
|
11
|
-
width?: number;
|
|
12
|
-
/** 内容宽度 */
|
|
13
|
-
contentWidth?: number;
|
|
14
|
-
/** 选择模式,下拉或弹框 */
|
|
15
|
-
customMode?: 'select' | 'modal';
|
|
16
|
-
/** 自定义内容 */
|
|
17
|
-
children: ReactElement;
|
|
18
|
-
/** form item value */
|
|
19
|
-
value?: any;
|
|
20
|
-
/** 隐藏确定 */
|
|
21
|
-
hideOk?: boolean;
|
|
22
|
-
/** form item onChange */
|
|
23
|
-
onChange?: (e: any) => void;
|
|
24
|
-
}
|
|
25
|
-
export default function CcsSelectCustomize({ width, title, hideOk, children, customMode, contentWidth, value, onChange, style, ...otherProps }: SelectCustomizeProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export {};
|