@zat-design/sisyphus-react 3.4.10-beta.2 → 3.4.10-beta.3
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.esm.css +3 -0
- package/dist/less.esm.css +3 -0
- package/es/ProEditTable/components/DndWrapper/index.d.ts +1 -0
- package/es/ProEditTable/components/DndWrapper/index.js +4 -3
- package/es/ProEditTable/index.js +4 -1
- package/es/ProEditTable/style/index.less +5 -0
- package/lib/ProEditTable/components/DndWrapper/index.d.ts +1 -0
- package/lib/ProEditTable/components/DndWrapper/index.js +4 -3
- package/lib/ProEditTable/index.js +4 -1
- package/lib/ProEditTable/style/index.less +5 -0
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -4233,6 +4233,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4233
4233
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
4234
4234
|
cursor: pointer;
|
|
4235
4235
|
}
|
|
4236
|
+
.pro-edit-table .drag-wrapper.no-check .anticon {
|
|
4237
|
+
margin-right: 0;
|
|
4238
|
+
}
|
|
4236
4239
|
.pro-edit-table.pro-table-no-stripe .ant-table-tbody tr:nth-child(n) > td {
|
|
4237
4240
|
background-color: var(--zaui-base-bg, #fff);
|
|
4238
4241
|
}
|
package/dist/less.esm.css
CHANGED
|
@@ -4233,6 +4233,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4233
4233
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
4234
4234
|
cursor: pointer;
|
|
4235
4235
|
}
|
|
4236
|
+
.pro-edit-table .drag-wrapper.no-check .anticon {
|
|
4237
|
+
margin-right: 0;
|
|
4238
|
+
}
|
|
4236
4239
|
.pro-edit-table.pro-table-no-stripe .ant-table-tbody tr:nth-child(n) > td {
|
|
4237
4240
|
background-color: var(--zaui-base-bg, #fff);
|
|
4238
4241
|
}
|
|
@@ -2,6 +2,7 @@ import React, { FC } from 'react';
|
|
|
2
2
|
interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
3
3
|
'data-row-key': string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
isShowCheckBox?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const Row: FC<RowProps>;
|
|
7
8
|
declare const DndWrapper: ({ draggable, value, onChange, disabled, children }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["disabled", "children"];
|
|
3
|
+
var _excluded = ["disabled", "isShowCheckBox", "children"];
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { DndContext } from '@dnd-kit/core';
|
|
@@ -9,6 +9,7 @@ import { CSS } from '@dnd-kit/utilities';
|
|
|
9
9
|
import ProIcon from '../../../ProIcon';
|
|
10
10
|
export var Row = function Row(props) {
|
|
11
11
|
var disabled = props.disabled,
|
|
12
|
+
isShowCheckBox = props.isShowCheckBox,
|
|
12
13
|
children = props.children,
|
|
13
14
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
14
15
|
var data = useSortable({
|
|
@@ -42,7 +43,7 @@ export var Row = function Row(props) {
|
|
|
42
43
|
renderIndex = _ref.renderIndex;
|
|
43
44
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
44
45
|
children: _jsxs("span", {
|
|
45
|
-
className: "drag-wrapper",
|
|
46
|
+
className: "drag-wrapper".concat(isShowCheckBox ? '' : ' no-check'),
|
|
46
47
|
children: [_jsx(ProIcon, _objectSpread({
|
|
47
48
|
className: "drag-icon",
|
|
48
49
|
style: {
|
|
@@ -51,7 +52,7 @@ export var Row = function Row(props) {
|
|
|
51
52
|
},
|
|
52
53
|
type: "drag",
|
|
53
54
|
size: 20
|
|
54
|
-
}, listeners)), render === null || render === void 0 ? void 0 : render(null, record, renderIndex)]
|
|
55
|
+
}, listeners)), isShowCheckBox ? render === null || render === void 0 ? void 0 : render(null, record, renderIndex) : null]
|
|
55
56
|
})
|
|
56
57
|
});
|
|
57
58
|
}
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -248,7 +248,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
248
248
|
if (disabled || isView) {
|
|
249
249
|
return null;
|
|
250
250
|
}
|
|
251
|
-
return
|
|
251
|
+
return _rowSelection;
|
|
252
252
|
};
|
|
253
253
|
var setColumns = /*#__PURE__*/function () {
|
|
254
254
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -315,6 +315,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
315
315
|
rowSelection: renderRowSelection()
|
|
316
316
|
});
|
|
317
317
|
} : summary;
|
|
318
|
+
// 是否展示勾选框
|
|
319
|
+
var isShowCheckBox = !isForbiddenBtn('mulDelete');
|
|
318
320
|
return _jsxs(_Fragment, {
|
|
319
321
|
children: [_jsxs(_ConfigProvider, {
|
|
320
322
|
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty,
|
|
@@ -341,6 +343,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
341
343
|
onRow: function onRow() {
|
|
342
344
|
return {
|
|
343
345
|
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
346
|
+
isShowCheckBox: isShowCheckBox,
|
|
344
347
|
onClick: function onClick() {}
|
|
345
348
|
};
|
|
346
349
|
}
|
|
@@ -2,6 +2,7 @@ import React, { FC } from 'react';
|
|
|
2
2
|
interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
3
3
|
'data-row-key': string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
isShowCheckBox?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const Row: FC<RowProps>;
|
|
7
8
|
declare const DndWrapper: ({ draggable, value, onChange, disabled, children }: {
|
|
@@ -13,9 +13,10 @@ var _core = require("@dnd-kit/core");
|
|
|
13
13
|
var _sortable = require("@dnd-kit/sortable");
|
|
14
14
|
var _utilities = require("@dnd-kit/utilities");
|
|
15
15
|
var _ProIcon = _interopRequireDefault(require("../../../ProIcon"));
|
|
16
|
-
var _excluded = ["disabled", "children"];
|
|
16
|
+
var _excluded = ["disabled", "isShowCheckBox", "children"];
|
|
17
17
|
var Row = exports.Row = function Row(props) {
|
|
18
18
|
var disabled = props.disabled,
|
|
19
|
+
isShowCheckBox = props.isShowCheckBox,
|
|
19
20
|
children = props.children,
|
|
20
21
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
21
22
|
var data = (0, _sortable.useSortable)({
|
|
@@ -49,7 +50,7 @@ var Row = exports.Row = function Row(props) {
|
|
|
49
50
|
renderIndex = _ref.renderIndex;
|
|
50
51
|
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
51
52
|
children: (0, _jsxRuntime.jsxs)("span", {
|
|
52
|
-
className: "drag-wrapper",
|
|
53
|
+
className: "drag-wrapper".concat(isShowCheckBox ? '' : ' no-check'),
|
|
53
54
|
children: [(0, _jsxRuntime.jsx)(_ProIcon.default, (0, _objectSpread2.default)({
|
|
54
55
|
className: "drag-icon",
|
|
55
56
|
style: {
|
|
@@ -58,7 +59,7 @@ var Row = exports.Row = function Row(props) {
|
|
|
58
59
|
},
|
|
59
60
|
type: "drag",
|
|
60
61
|
size: 20
|
|
61
|
-
}, listeners)), render === null || render === void 0 ? void 0 : render(null, record, renderIndex)]
|
|
62
|
+
}, listeners)), isShowCheckBox ? render === null || render === void 0 ? void 0 : render(null, record, renderIndex) : null]
|
|
62
63
|
})
|
|
63
64
|
});
|
|
64
65
|
}
|
|
@@ -251,7 +251,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
251
251
|
if (disabled || isView) {
|
|
252
252
|
return null;
|
|
253
253
|
}
|
|
254
|
-
return
|
|
254
|
+
return _rowSelection;
|
|
255
255
|
};
|
|
256
256
|
var setColumns = /*#__PURE__*/function () {
|
|
257
257
|
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
@@ -318,6 +318,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
318
318
|
rowSelection: renderRowSelection()
|
|
319
319
|
});
|
|
320
320
|
} : summary;
|
|
321
|
+
// 是否展示勾选框
|
|
322
|
+
var isShowCheckBox = !isForbiddenBtn('mulDelete');
|
|
321
323
|
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
322
324
|
children: [(0, _jsxRuntime.jsxs)(_antd.ConfigProvider, {
|
|
323
325
|
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : empty,
|
|
@@ -344,6 +346,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
344
346
|
onRow: function onRow() {
|
|
345
347
|
return {
|
|
346
348
|
disabled: disabled || virtualKey && !!editingKeys.length,
|
|
349
|
+
isShowCheckBox: isShowCheckBox,
|
|
347
350
|
onClick: function onClick() {}
|
|
348
351
|
};
|
|
349
352
|
}
|