linkmore-design 1.1.22-beta.4 → 1.1.22-beta.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/dist/LmTable/components/Container/Container.d.ts +2 -0
- package/dist/LmTable/components/DndContainer.d.ts +0 -1
- package/dist/QuickMenu/index.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.umd.css +8 -8
- package/dist/index.umd.js +62 -52
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/dist/variables.css +10 -0
- package/es/Form/style/index.css +4 -0
- package/es/Form/style/variables.css +4 -0
- package/es/LmTable/Table.js +32 -13
- package/es/LmTable/components/Container/Container.css +8 -1
- package/es/LmTable/components/Container/Container.d.ts +2 -0
- package/es/LmTable/components/Container/Container.js +7 -3
- package/es/LmTable/components/DndContainer.d.ts +0 -1
- package/es/LmTable/components/DndContainer.js +12 -27
- package/es/LmTable/components/sheelTableCell.js +6 -3
- package/es/LmTable/expression.js +1 -0
- package/es/LmTable/style/index.css +6 -0
- package/es/LmTable/style/variables.css +6 -0
- package/es/QuickMenu/index.d.ts +2 -1
- package/es/QuickMenu/index.js +11 -11
- package/es/index.d.ts +1 -0
- package/es/styles/variables.css +10 -0
- package/lib/Form/style/index.css +4 -0
- package/lib/Form/style/variables.css +4 -0
- package/lib/LmTable/Table.js +32 -13
- package/lib/LmTable/components/Container/Container.css +8 -1
- package/lib/LmTable/components/Container/Container.d.ts +2 -0
- package/lib/LmTable/components/Container/Container.js +7 -3
- package/lib/LmTable/components/DndContainer.d.ts +0 -1
- package/lib/LmTable/components/DndContainer.js +12 -27
- package/lib/LmTable/components/sheelTableCell.js +6 -3
- package/lib/LmTable/expression.js +1 -0
- package/lib/LmTable/style/index.css +6 -0
- package/lib/LmTable/style/variables.css +6 -0
- package/lib/QuickMenu/index.d.ts +2 -1
- package/lib/QuickMenu/index.js +11 -11
- package/lib/index.d.ts +1 -0
- package/lib/styles/variables.css +10 -0
- package/package.json +1 -1
- package/es/LmTable/components/DndContainer.module.css +0 -6
- package/lib/LmTable/components/DndContainer.module.css +0 -6
package/dist/variables.css
CHANGED
|
@@ -9001,6 +9001,10 @@ p {
|
|
|
9001
9001
|
.form_responsive_group_title img.open {
|
|
9002
9002
|
transform: rotate(180deg);
|
|
9003
9003
|
}
|
|
9004
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
9005
|
+
line-height: 16px;
|
|
9006
|
+
height: 16px;
|
|
9007
|
+
}
|
|
9004
9008
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
9005
9009
|
width: 100%;
|
|
9006
9010
|
position: absolute;
|
|
@@ -10965,6 +10969,12 @@ p {
|
|
|
10965
10969
|
#lm_protable_warp .ant-table-container {
|
|
10966
10970
|
height: 100%;
|
|
10967
10971
|
}
|
|
10972
|
+
#lm_protable_warp.lm_protable_footer .ant-table-container {
|
|
10973
|
+
height: auto;
|
|
10974
|
+
}
|
|
10975
|
+
#lm_protable_warp.lm_protable_footer .ant-table-footer {
|
|
10976
|
+
background-color: #fff;
|
|
10977
|
+
}
|
|
10968
10978
|
#lm_protable_warp .ant-card-body,
|
|
10969
10979
|
#lm_protable_warp .ant-pro-card-body {
|
|
10970
10980
|
padding: 0;
|
package/es/Form/style/index.css
CHANGED
|
@@ -6656,6 +6656,10 @@ p {
|
|
|
6656
6656
|
.form_responsive_group_title img.open {
|
|
6657
6657
|
transform: rotate(180deg);
|
|
6658
6658
|
}
|
|
6659
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
6660
|
+
line-height: 16px;
|
|
6661
|
+
height: 16px;
|
|
6662
|
+
}
|
|
6659
6663
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6660
6664
|
width: 100%;
|
|
6661
6665
|
position: absolute;
|
|
@@ -6144,6 +6144,10 @@
|
|
|
6144
6144
|
.form_responsive_group_title img.open {
|
|
6145
6145
|
transform: rotate(180deg);
|
|
6146
6146
|
}
|
|
6147
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
6148
|
+
line-height: 16px;
|
|
6149
|
+
height: 16px;
|
|
6150
|
+
}
|
|
6147
6151
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6148
6152
|
width: 100%;
|
|
6149
6153
|
position: absolute;
|
package/es/LmTable/Table.js
CHANGED
|
@@ -933,14 +933,19 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
933
933
|
if (trigger === 'row') {
|
|
934
934
|
var selectedRows = useSelectedRows.selectedRows;
|
|
935
935
|
if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
selectedRows
|
|
942
|
-
|
|
943
|
-
|
|
936
|
+
if ((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) === 'radio') {
|
|
937
|
+
setSelectedRows({
|
|
938
|
+
selectedRows: [(0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]]
|
|
939
|
+
});
|
|
940
|
+
} else {
|
|
941
|
+
var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
|
|
942
|
+
return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
|
|
943
|
+
});
|
|
944
|
+
selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
|
|
945
|
+
setSelectedRows({
|
|
946
|
+
selectedRows: (0, _lodash.cloneDeep)(selectedRows)
|
|
947
|
+
});
|
|
948
|
+
}
|
|
944
949
|
}
|
|
945
950
|
} else {
|
|
946
951
|
rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
|
|
@@ -1030,7 +1035,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1030
1035
|
// rowClick?.(reulstSelect)
|
|
1031
1036
|
} : undefined,
|
|
1032
1037
|
onSelect: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) ? function (record, selected) {
|
|
1033
|
-
var reulstSelect = selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
1038
|
+
var reulstSelect = rowSelection.type === 'radio' ? [record] : selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
1034
1039
|
return item[rowKey] !== record[rowKey];
|
|
1035
1040
|
});
|
|
1036
1041
|
setSelectedRows({
|
|
@@ -1150,7 +1155,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1150
1155
|
if (!width) {
|
|
1151
1156
|
return /*#__PURE__*/_react.default.createElement("th", restProps);
|
|
1152
1157
|
}
|
|
1153
|
-
var column = (0, _index.treeFind)(
|
|
1158
|
+
var column = (0, _index.treeFind)(columns, function (node) {
|
|
1154
1159
|
return node.dataIndex === dataIndex;
|
|
1155
1160
|
});
|
|
1156
1161
|
if (!column) {
|
|
@@ -1215,7 +1220,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1215
1220
|
cell: openSheet ? _sheelTableCell.default : null
|
|
1216
1221
|
}, body)
|
|
1217
1222
|
};
|
|
1218
|
-
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource]);
|
|
1223
|
+
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns]);
|
|
1219
1224
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1220
1225
|
style: {
|
|
1221
1226
|
height: '100%',
|
|
@@ -1307,7 +1312,10 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1307
1312
|
var _props$autoSizer = props.autoSizer,
|
|
1308
1313
|
autoSizer = _props$autoSizer === void 0 ? false : _props$autoSizer,
|
|
1309
1314
|
openRowGroup = props.openRowGroup,
|
|
1310
|
-
openColGroup = props.openColGroup
|
|
1315
|
+
openColGroup = props.openColGroup,
|
|
1316
|
+
groupHeight = props.groupHeight,
|
|
1317
|
+
footer = props.footer,
|
|
1318
|
+
footerHeight = props.footerHeight;
|
|
1311
1319
|
var _useState21 = (0, _react.useState)({
|
|
1312
1320
|
width: '100%',
|
|
1313
1321
|
height: '100%'
|
|
@@ -1318,9 +1326,11 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1318
1326
|
var defaultRef = ref || (0, _react.useRef)(null);
|
|
1319
1327
|
var tableWarpRef = (0, _react.useRef)(null);
|
|
1320
1328
|
var resizeRef = (0, _react.useRef)(null);
|
|
1329
|
+
var clsName = (0, _classnames.default)(footer && 'lm_protable_footer');
|
|
1321
1330
|
if (!autoSizer) {
|
|
1322
1331
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1323
1332
|
ref: tableWarpRef,
|
|
1333
|
+
className: clsName,
|
|
1324
1334
|
id: "lm_protable_warp",
|
|
1325
1335
|
style: {
|
|
1326
1336
|
width: '100%',
|
|
@@ -1350,8 +1360,16 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1350
1360
|
})) {
|
|
1351
1361
|
h -= 32;
|
|
1352
1362
|
}
|
|
1363
|
+
// 行列分组的高度
|
|
1353
1364
|
if (openRowGroup || openColGroup) {
|
|
1354
|
-
h -=
|
|
1365
|
+
h -= groupHeight || 102;
|
|
1366
|
+
}
|
|
1367
|
+
if (footer) {
|
|
1368
|
+
h -= footerHeight || 54;
|
|
1369
|
+
}
|
|
1370
|
+
// safe area
|
|
1371
|
+
if (h < 0) {
|
|
1372
|
+
h = 0;
|
|
1355
1373
|
}
|
|
1356
1374
|
return h;
|
|
1357
1375
|
}, [props.hiddenPage, props.customCheck, props.columns, tableSize]);
|
|
@@ -1405,6 +1423,7 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1405
1423
|
};
|
|
1406
1424
|
}, []);
|
|
1407
1425
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1426
|
+
className: clsName,
|
|
1408
1427
|
ref: tableWarpRef,
|
|
1409
1428
|
id: "lm_protable_warp",
|
|
1410
1429
|
style: {
|
|
@@ -18,13 +18,20 @@
|
|
|
18
18
|
.dnd_container:last-child {
|
|
19
19
|
margin-right: 0;
|
|
20
20
|
}
|
|
21
|
+
.dnd_container.isNoneBorder {
|
|
22
|
+
border: 0 !important;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
21
25
|
.dnd_container ul {
|
|
22
26
|
display: flex;
|
|
23
27
|
flex-wrap: wrap;
|
|
24
28
|
list-style: none;
|
|
25
29
|
padding: 10px;
|
|
26
30
|
margin: 0;
|
|
27
|
-
min-height:
|
|
31
|
+
min-height: 57px;
|
|
32
|
+
}
|
|
33
|
+
.dnd_container ul.ulClassName {
|
|
34
|
+
padding: 0px;
|
|
28
35
|
}
|
|
29
36
|
.dnd_container.scrollable ul {
|
|
30
37
|
overflow-y: auto;
|
|
@@ -14,5 +14,7 @@ export interface Props {
|
|
|
14
14
|
unstyled?: boolean;
|
|
15
15
|
onClick?: (e: any) => void;
|
|
16
16
|
onRemove?: (e: any) => void;
|
|
17
|
+
ulClassName?: string;
|
|
18
|
+
isNoneBorder?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export declare const Container: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -27,18 +27,22 @@ export var Container = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
27
27
|
scrollable = _a.scrollable,
|
|
28
28
|
shadow = _a.shadow,
|
|
29
29
|
unstyled = _a.unstyled,
|
|
30
|
-
|
|
30
|
+
ulClassName = _a.ulClassName,
|
|
31
|
+
isNoneBorder = _a.isNoneBorder,
|
|
32
|
+
props = __rest(_a, ["children", "columns", "handleProps", "horizontal", "hover", "onClick", "onRemove", "label", "placeholder", "style", "scrollable", "shadow", "unstyled", "ulClassName", "isNoneBorder"]);
|
|
31
33
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, props, {
|
|
32
34
|
ref: ref,
|
|
33
35
|
style: Object.assign(Object.assign({}, style), {
|
|
34
36
|
'--columns': columns
|
|
35
37
|
}),
|
|
36
|
-
className: classNames('dnd_container', unstyled && 'unstyled', horizontal && 'horizontal', hover && 'hover', placeholder && 'placeholder', scrollable && 'scrollable', shadow && 'shadow'),
|
|
38
|
+
className: classNames('dnd_container', unstyled && 'unstyled', horizontal && 'horizontal', hover && 'hover', placeholder && 'placeholder', scrollable && 'scrollable', shadow && 'shadow', isNoneBorder && 'isNoneBorder'),
|
|
37
39
|
onClick: onClick,
|
|
38
40
|
tabIndex: onClick ? 0 : undefined
|
|
39
41
|
}), label ? /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: 'dnd_header'
|
|
41
43
|
}, label, /*#__PURE__*/React.createElement("div", {
|
|
42
44
|
className: 'dnd_actions'
|
|
43
|
-
})) : null, placeholder ? children : /*#__PURE__*/React.createElement("ul",
|
|
45
|
+
})) : null, placeholder ? children : /*#__PURE__*/React.createElement("ul", {
|
|
46
|
+
className: ulClassName
|
|
47
|
+
}, children));
|
|
44
48
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CancelDrop, Modifiers, UniqueIdentifier, KeyboardCoordinateGetter } from '@dnd-kit/core';
|
|
3
|
-
import './DndContainer.module.less';
|
|
4
3
|
declare type Items = Record<UniqueIdentifier, UniqueIdentifier[]>;
|
|
5
4
|
interface Props {
|
|
6
5
|
adjustScale?: boolean;
|
|
@@ -12,7 +12,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
12
12
|
return t;
|
|
13
13
|
};
|
|
14
14
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
15
|
-
import { createPortal
|
|
15
|
+
import { createPortal } from 'react-dom';
|
|
16
16
|
import { closestCenter, pointerWithin,
|
|
17
17
|
// 返回指针悬停在其上的矩形
|
|
18
18
|
rectIntersection, DndContext, DragOverlay,
|
|
@@ -24,7 +24,6 @@ import multipleContainersCoordinateGetter from '../multipleContainersKeyboardCoo
|
|
|
24
24
|
import { Item } from './Item';
|
|
25
25
|
import { Container } from './Container';
|
|
26
26
|
import classNames from 'classnames';
|
|
27
|
-
import "./DndContainer.module.css";
|
|
28
27
|
var defaultDropAnimationSideEffects = function defaultDropAnimationSideEffects(options) {
|
|
29
28
|
return function (_ref) {
|
|
30
29
|
var active = _ref.active,
|
|
@@ -128,7 +127,7 @@ var dropAnimation = {
|
|
|
128
127
|
})
|
|
129
128
|
};
|
|
130
129
|
export var TRASH_ID = 'void';
|
|
131
|
-
|
|
130
|
+
// const PLACEHOLDER_ID = 'placeholder';
|
|
132
131
|
// const empty: UniqueIdentifier[] = [];
|
|
133
132
|
export default function DndContainer(_ref2) {
|
|
134
133
|
var _ref2$adjustScale = _ref2.adjustScale,
|
|
@@ -371,30 +370,13 @@ export default function DndContainer(_ref2) {
|
|
|
371
370
|
setActiveId(null);
|
|
372
371
|
return;
|
|
373
372
|
}
|
|
374
|
-
if (overId === PLACEHOLDER_ID) {
|
|
375
|
-
var newContainerId = getNextContainerId();
|
|
376
|
-
unstable_batchedUpdates(function () {
|
|
377
|
-
setContainers(function (containers) {
|
|
378
|
-
return [].concat(_toConsumableArray(containers), [newContainerId]);
|
|
379
|
-
});
|
|
380
|
-
console.log('PLACEHOLDER_ID', overId);
|
|
381
|
-
setItems(function (items) {
|
|
382
|
-
var _Object$assign3;
|
|
383
|
-
return Object.assign(Object.assign({}, items), (_Object$assign3 = {}, _defineProperty(_Object$assign3, activeContainer, items[activeContainer].filter(function (id) {
|
|
384
|
-
return id !== activeId;
|
|
385
|
-
})), _defineProperty(_Object$assign3, newContainerId, [active.id]), _Object$assign3));
|
|
386
|
-
});
|
|
387
|
-
setActiveId(null);
|
|
388
|
-
});
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
373
|
var overContainer = findContainer(overId);
|
|
392
374
|
if (overContainer) {
|
|
393
375
|
var activeIndex = items[activeContainer].indexOf(active.id);
|
|
394
376
|
var overIndex = items[overContainer].indexOf(overId);
|
|
395
377
|
if (activeIndex !== overIndex) {
|
|
396
378
|
var newItems = Object.assign(Object.assign({}, items), _defineProperty({}, overContainer, arrayMove(items[overContainer], activeIndex, overIndex)));
|
|
397
|
-
setItems(newItems);
|
|
379
|
+
// setItems(newItems);
|
|
398
380
|
updateItems(newItems);
|
|
399
381
|
} else {
|
|
400
382
|
updateItems(items);
|
|
@@ -454,7 +436,9 @@ export default function DndContainer(_ref2) {
|
|
|
454
436
|
items: items[tableContainer],
|
|
455
437
|
scrollable: scrollable,
|
|
456
438
|
style: containerStyle,
|
|
457
|
-
unstyled: false
|
|
439
|
+
unstyled: false,
|
|
440
|
+
ulClassName: 'ulClassName',
|
|
441
|
+
isNoneBorder: true
|
|
458
442
|
}, /*#__PURE__*/React.createElement(SortableContext, {
|
|
459
443
|
items: items[tableContainer],
|
|
460
444
|
strategy: horizontalListSortingStrategy
|
|
@@ -520,12 +504,13 @@ export default function DndContainer(_ref2) {
|
|
|
520
504
|
});
|
|
521
505
|
}));
|
|
522
506
|
}
|
|
523
|
-
function getNextContainerId() {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
507
|
+
// function getNextContainerId() {
|
|
508
|
+
// const containerIds = Object.keys(items);
|
|
509
|
+
// const lastContainerId = containerIds[containerIds.length - 1];
|
|
510
|
+
// return String.fromCharCode(lastContainerId.charCodeAt(0) + 1);
|
|
511
|
+
// }
|
|
528
512
|
}
|
|
513
|
+
|
|
529
514
|
function getColor(id) {
|
|
530
515
|
switch (String(id)[0]) {
|
|
531
516
|
case 'A':
|
|
@@ -120,15 +120,18 @@ var SheelTabelCell = function SheelTabelCell(props) {
|
|
|
120
120
|
};
|
|
121
121
|
var renderViewer = children;
|
|
122
122
|
var content = renderComponent() || renderEditor() || renderViewer;
|
|
123
|
+
var className = cls(colIndex === undefined && 'row_selection_td', 'unselection', _selected && selectIng && 'selected', isEnd && 'end', isRightEnd && 'right_end', isEditing && 'editing', isVaildCommit && 'commiting', selectedReadonly && 'readonly_red');
|
|
124
|
+
// 在编辑模式下不允许进行快速复制操作
|
|
125
|
+
var showEndCell = isRightEnd && isEnd && !isEditing;
|
|
126
|
+
console.log(content);
|
|
123
127
|
return /*#__PURE__*/React.createElement("td", Object.assign({}, omit(clearProps, ['commitIng', 'editIng']), {
|
|
124
|
-
|
|
125
|
-
className: cls(colIndex === undefined && 'row_selection_td', 'unselection', _selected && selectIng && 'selected', isEnd && 'end', isRightEnd && 'right_end', isEditing && 'editing', isVaildCommit && 'commiting', selectedReadonly && 'readonly_red'),
|
|
128
|
+
className: className,
|
|
126
129
|
onMouseDown: handleMouseDown,
|
|
127
130
|
onMouseOver: handleMouseOver,
|
|
128
131
|
onContextMenu: handleContextMenu,
|
|
129
132
|
onDoubleClick: handleDoubleClick,
|
|
130
133
|
key: "".concat(rowIndex, "_").concat(colIndex)
|
|
131
|
-
}), content,
|
|
134
|
+
}), content, showEndCell && /*#__PURE__*/React.createElement("div", {
|
|
132
135
|
ref: endCellRef,
|
|
133
136
|
className: 'lmtable_cell_end_icon'
|
|
134
137
|
}));
|
package/es/LmTable/expression.js
CHANGED
|
@@ -873,6 +873,12 @@ p {
|
|
|
873
873
|
#lm_protable_warp .ant-table-container {
|
|
874
874
|
height: 100%;
|
|
875
875
|
}
|
|
876
|
+
#lm_protable_warp.lm_protable_footer .ant-table-container {
|
|
877
|
+
height: auto;
|
|
878
|
+
}
|
|
879
|
+
#lm_protable_warp.lm_protable_footer .ant-table-footer {
|
|
880
|
+
background-color: #fff;
|
|
881
|
+
}
|
|
876
882
|
#lm_protable_warp .ant-card-body,
|
|
877
883
|
#lm_protable_warp .ant-pro-card-body {
|
|
878
884
|
padding: 0;
|
|
@@ -361,6 +361,12 @@
|
|
|
361
361
|
#lm_protable_warp .ant-table-container {
|
|
362
362
|
height: 100%;
|
|
363
363
|
}
|
|
364
|
+
#lm_protable_warp.lm_protable_footer .ant-table-container {
|
|
365
|
+
height: auto;
|
|
366
|
+
}
|
|
367
|
+
#lm_protable_warp.lm_protable_footer .ant-table-footer {
|
|
368
|
+
background-color: #fff;
|
|
369
|
+
}
|
|
364
370
|
#lm_protable_warp .ant-card-body,
|
|
365
371
|
#lm_protable_warp .ant-pro-card-body {
|
|
366
372
|
padding: 0;
|
package/es/QuickMenu/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface IMenuData {
|
|
2
|
+
export interface IMenuData {
|
|
3
3
|
menuId: string;
|
|
4
4
|
title: string | React.ReactNode;
|
|
5
5
|
hidden?: boolean;
|
|
@@ -10,6 +10,7 @@ export interface IQuickMenuProps {
|
|
|
10
10
|
top?: number;
|
|
11
11
|
menuData: IMenuData[];
|
|
12
12
|
warpElement: any;
|
|
13
|
+
root?: IntersectionObserver['root'] | undefined;
|
|
13
14
|
}
|
|
14
15
|
declare const LMQuickMenu: React.FC<IQuickMenuProps>;
|
|
15
16
|
export default LMQuickMenu;
|
package/es/QuickMenu/index.js
CHANGED
|
@@ -11,7 +11,8 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
11
11
|
top = _props$top === void 0 ? '104px' : _props$top,
|
|
12
12
|
_props$menuData = props.menuData,
|
|
13
13
|
menuData = _props$menuData === void 0 ? [] : _props$menuData,
|
|
14
|
-
warpElement = props.warpElement
|
|
14
|
+
warpElement = props.warpElement,
|
|
15
|
+
root = props.root;
|
|
15
16
|
var idTopInfo = useRef({});
|
|
16
17
|
var _useState = useState(false),
|
|
17
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,11 +57,13 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
56
57
|
// eslint-disable-next-line global-require
|
|
57
58
|
var scrollama = require('scrollama');
|
|
58
59
|
menuTimeEventRef.current = scrollama();
|
|
60
|
+
console.log(getTargetElement(warpElement || document), '--getTargetElement(warpElement || document)');
|
|
59
61
|
(_c = (_b = menuTimeEventRef.current) === null || _b === void 0 ? void 0 : _b.setup({
|
|
60
62
|
step: filterMenuData.map(function (item) {
|
|
61
63
|
return document.getElementById("".concat(item.menuId));
|
|
62
64
|
}).filter(Boolean),
|
|
63
|
-
container: getTargetElement(warpElement || document)
|
|
65
|
+
container: getTargetElement(warpElement || document),
|
|
66
|
+
root: root ? getTargetElement(root) : undefined
|
|
64
67
|
})) === null || _c === void 0 ? void 0 : _c.onStepEnter(function (_ref) {
|
|
65
68
|
var element = _ref.element;
|
|
66
69
|
updateActiveToc(element.id);
|
|
@@ -86,11 +89,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
86
89
|
}, [scroll], {
|
|
87
90
|
wait: 50
|
|
88
91
|
});
|
|
89
|
-
var bindDom = function bindDom() {
|
|
90
|
-
if (!Object.keys(idTopInfo.current).length) {
|
|
91
|
-
setKeysDom();
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
92
|
var handleScroll = function handleScroll() {
|
|
95
93
|
setScrollOpenStatus(true);
|
|
96
94
|
};
|
|
@@ -101,10 +99,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
101
99
|
useEffect(function () {
|
|
102
100
|
var _a;
|
|
103
101
|
// bindScroller();
|
|
104
|
-
setTimeout(function () {
|
|
105
|
-
bindDom();
|
|
106
|
-
bindScroller();
|
|
107
|
-
}, 200);
|
|
108
102
|
(_a = getTargetElement(warpElement || document)) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', handleScroll, {
|
|
109
103
|
once: true
|
|
110
104
|
});
|
|
@@ -113,6 +107,12 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
113
107
|
(_a = getTargetElement(warpElement || document)) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', handleScroll);
|
|
114
108
|
};
|
|
115
109
|
}, []);
|
|
110
|
+
useEffect(function () {
|
|
111
|
+
setTimeout(function () {
|
|
112
|
+
setKeysDom();
|
|
113
|
+
bindScroller();
|
|
114
|
+
}, 200);
|
|
115
|
+
}, [filterMenuData]);
|
|
116
116
|
return /*#__PURE__*/React.createElement("div", {
|
|
117
117
|
className: classNames(prefixCls),
|
|
118
118
|
onMouseEnter: function onMouseEnter() {
|
package/es/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export { default as LmEditTable } from './LmEditTable';
|
|
|
54
54
|
export type { CountdownHandle, TLmEditTable } from './LmEditTable/EditTable';
|
|
55
55
|
export { default as List } from './List';
|
|
56
56
|
export { default as LMQuickMenu } from './QuickMenu';
|
|
57
|
+
export type { IMenuData, IQuickMenuProps } from './QuickMenu';
|
|
57
58
|
export { default as DatePicker } from './DatePicker';
|
|
58
59
|
export type { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './DatePicker';
|
|
59
60
|
export { default as Popover } from './Popover';
|
package/es/styles/variables.css
CHANGED
|
@@ -9001,6 +9001,10 @@ p {
|
|
|
9001
9001
|
.form_responsive_group_title img.open {
|
|
9002
9002
|
transform: rotate(180deg);
|
|
9003
9003
|
}
|
|
9004
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
9005
|
+
line-height: 16px;
|
|
9006
|
+
height: 16px;
|
|
9007
|
+
}
|
|
9004
9008
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
9005
9009
|
width: 100%;
|
|
9006
9010
|
position: absolute;
|
|
@@ -10965,6 +10969,12 @@ p {
|
|
|
10965
10969
|
#lm_protable_warp .ant-table-container {
|
|
10966
10970
|
height: 100%;
|
|
10967
10971
|
}
|
|
10972
|
+
#lm_protable_warp.lm_protable_footer .ant-table-container {
|
|
10973
|
+
height: auto;
|
|
10974
|
+
}
|
|
10975
|
+
#lm_protable_warp.lm_protable_footer .ant-table-footer {
|
|
10976
|
+
background-color: #fff;
|
|
10977
|
+
}
|
|
10968
10978
|
#lm_protable_warp .ant-card-body,
|
|
10969
10979
|
#lm_protable_warp .ant-pro-card-body {
|
|
10970
10980
|
padding: 0;
|
package/lib/Form/style/index.css
CHANGED
|
@@ -6656,6 +6656,10 @@ p {
|
|
|
6656
6656
|
.form_responsive_group_title img.open {
|
|
6657
6657
|
transform: rotate(180deg);
|
|
6658
6658
|
}
|
|
6659
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
6660
|
+
line-height: 16px;
|
|
6661
|
+
height: 16px;
|
|
6662
|
+
}
|
|
6659
6663
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6660
6664
|
width: 100%;
|
|
6661
6665
|
position: absolute;
|
|
@@ -6144,6 +6144,10 @@
|
|
|
6144
6144
|
.form_responsive_group_title img.open {
|
|
6145
6145
|
transform: rotate(180deg);
|
|
6146
6146
|
}
|
|
6147
|
+
.lm_form.ant-form .ant-form-item .ant-form-item-explain {
|
|
6148
|
+
line-height: 16px;
|
|
6149
|
+
height: 16px;
|
|
6150
|
+
}
|
|
6147
6151
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6148
6152
|
width: 100%;
|
|
6149
6153
|
position: absolute;
|
package/lib/LmTable/Table.js
CHANGED
|
@@ -933,14 +933,19 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
933
933
|
if (trigger === 'row') {
|
|
934
934
|
var selectedRows = useSelectedRows.selectedRows;
|
|
935
935
|
if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
selectedRows
|
|
942
|
-
|
|
943
|
-
|
|
936
|
+
if ((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) === 'radio') {
|
|
937
|
+
setSelectedRows({
|
|
938
|
+
selectedRows: [(0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]]
|
|
939
|
+
});
|
|
940
|
+
} else {
|
|
941
|
+
var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
|
|
942
|
+
return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
|
|
943
|
+
});
|
|
944
|
+
selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
|
|
945
|
+
setSelectedRows({
|
|
946
|
+
selectedRows: (0, _lodash.cloneDeep)(selectedRows)
|
|
947
|
+
});
|
|
948
|
+
}
|
|
944
949
|
}
|
|
945
950
|
} else {
|
|
946
951
|
rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
|
|
@@ -1030,7 +1035,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1030
1035
|
// rowClick?.(reulstSelect)
|
|
1031
1036
|
} : undefined,
|
|
1032
1037
|
onSelect: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) ? function (record, selected) {
|
|
1033
|
-
var reulstSelect = selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
1038
|
+
var reulstSelect = rowSelection.type === 'radio' ? [record] : selected ? (0, _lodash.uniqBy)([].concat((0, _toConsumableArray2.default)(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
1034
1039
|
return item[rowKey] !== record[rowKey];
|
|
1035
1040
|
});
|
|
1036
1041
|
setSelectedRows({
|
|
@@ -1150,7 +1155,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1150
1155
|
if (!width) {
|
|
1151
1156
|
return /*#__PURE__*/_react.default.createElement("th", restProps);
|
|
1152
1157
|
}
|
|
1153
|
-
var column = (0, _index.treeFind)(
|
|
1158
|
+
var column = (0, _index.treeFind)(columns, function (node) {
|
|
1154
1159
|
return node.dataIndex === dataIndex;
|
|
1155
1160
|
});
|
|
1156
1161
|
if (!column) {
|
|
@@ -1215,7 +1220,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1215
1220
|
cell: openSheet ? _sheelTableCell.default : null
|
|
1216
1221
|
}, body)
|
|
1217
1222
|
};
|
|
1218
|
-
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource]);
|
|
1223
|
+
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns]);
|
|
1219
1224
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1220
1225
|
style: {
|
|
1221
1226
|
height: '100%',
|
|
@@ -1307,7 +1312,10 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1307
1312
|
var _props$autoSizer = props.autoSizer,
|
|
1308
1313
|
autoSizer = _props$autoSizer === void 0 ? false : _props$autoSizer,
|
|
1309
1314
|
openRowGroup = props.openRowGroup,
|
|
1310
|
-
openColGroup = props.openColGroup
|
|
1315
|
+
openColGroup = props.openColGroup,
|
|
1316
|
+
groupHeight = props.groupHeight,
|
|
1317
|
+
footer = props.footer,
|
|
1318
|
+
footerHeight = props.footerHeight;
|
|
1311
1319
|
var _useState21 = (0, _react.useState)({
|
|
1312
1320
|
width: '100%',
|
|
1313
1321
|
height: '100%'
|
|
@@ -1318,9 +1326,11 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1318
1326
|
var defaultRef = ref || (0, _react.useRef)(null);
|
|
1319
1327
|
var tableWarpRef = (0, _react.useRef)(null);
|
|
1320
1328
|
var resizeRef = (0, _react.useRef)(null);
|
|
1329
|
+
var clsName = (0, _classnames.default)(footer && 'lm_protable_footer');
|
|
1321
1330
|
if (!autoSizer) {
|
|
1322
1331
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1323
1332
|
ref: tableWarpRef,
|
|
1333
|
+
className: clsName,
|
|
1324
1334
|
id: "lm_protable_warp",
|
|
1325
1335
|
style: {
|
|
1326
1336
|
width: '100%',
|
|
@@ -1350,8 +1360,16 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1350
1360
|
})) {
|
|
1351
1361
|
h -= 32;
|
|
1352
1362
|
}
|
|
1363
|
+
// 行列分组的高度
|
|
1353
1364
|
if (openRowGroup || openColGroup) {
|
|
1354
|
-
h -=
|
|
1365
|
+
h -= groupHeight || 102;
|
|
1366
|
+
}
|
|
1367
|
+
if (footer) {
|
|
1368
|
+
h -= footerHeight || 54;
|
|
1369
|
+
}
|
|
1370
|
+
// safe area
|
|
1371
|
+
if (h < 0) {
|
|
1372
|
+
h = 0;
|
|
1355
1373
|
}
|
|
1356
1374
|
return h;
|
|
1357
1375
|
}, [props.hiddenPage, props.customCheck, props.columns, tableSize]);
|
|
@@ -1405,6 +1423,7 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1405
1423
|
};
|
|
1406
1424
|
}, []);
|
|
1407
1425
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1426
|
+
className: clsName,
|
|
1408
1427
|
ref: tableWarpRef,
|
|
1409
1428
|
id: "lm_protable_warp",
|
|
1410
1429
|
style: {
|
|
@@ -18,13 +18,20 @@
|
|
|
18
18
|
.dnd_container:last-child {
|
|
19
19
|
margin-right: 0;
|
|
20
20
|
}
|
|
21
|
+
.dnd_container.isNoneBorder {
|
|
22
|
+
border: 0 !important;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
21
25
|
.dnd_container ul {
|
|
22
26
|
display: flex;
|
|
23
27
|
flex-wrap: wrap;
|
|
24
28
|
list-style: none;
|
|
25
29
|
padding: 10px;
|
|
26
30
|
margin: 0;
|
|
27
|
-
min-height:
|
|
31
|
+
min-height: 57px;
|
|
32
|
+
}
|
|
33
|
+
.dnd_container ul.ulClassName {
|
|
34
|
+
padding: 0px;
|
|
28
35
|
}
|
|
29
36
|
.dnd_container.scrollable ul {
|
|
30
37
|
overflow-y: auto;
|
|
@@ -14,5 +14,7 @@ export interface Props {
|
|
|
14
14
|
unstyled?: boolean;
|
|
15
15
|
onClick?: (e: any) => void;
|
|
16
16
|
onRemove?: (e: any) => void;
|
|
17
|
+
ulClassName?: string;
|
|
18
|
+
isNoneBorder?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export declare const Container: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|