linkmore-design 1.1.22-beta.3 → 1.1.22-beta.5

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.
Files changed (36) hide show
  1. package/dist/LmTable/components/Container/Container.d.ts +2 -0
  2. package/dist/LmTable/components/DndContainer.d.ts +0 -1
  3. package/dist/QuickMenu/index.d.ts +2 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.umd.css +8 -8
  6. package/dist/index.umd.js +56 -53
  7. package/dist/index.umd.min.css +1 -1
  8. package/dist/index.umd.min.js +2 -2
  9. package/dist/variables.css +6 -0
  10. package/es/LmTable/Table.js +27 -13
  11. package/es/LmTable/components/Container/Container.css +8 -1
  12. package/es/LmTable/components/Container/Container.d.ts +2 -0
  13. package/es/LmTable/components/Container/Container.js +7 -3
  14. package/es/LmTable/components/DndContainer.d.ts +0 -1
  15. package/es/LmTable/components/DndContainer.js +12 -27
  16. package/es/LmTable/style/index.css +6 -0
  17. package/es/LmTable/style/variables.css +6 -0
  18. package/es/QuickMenu/index.d.ts +2 -1
  19. package/es/QuickMenu/index.js +11 -11
  20. package/es/index.d.ts +1 -0
  21. package/es/styles/variables.css +6 -0
  22. package/lib/LmTable/Table.js +27 -13
  23. package/lib/LmTable/components/Container/Container.css +8 -1
  24. package/lib/LmTable/components/Container/Container.d.ts +2 -0
  25. package/lib/LmTable/components/Container/Container.js +7 -3
  26. package/lib/LmTable/components/DndContainer.d.ts +0 -1
  27. package/lib/LmTable/components/DndContainer.js +12 -27
  28. package/lib/LmTable/style/index.css +6 -0
  29. package/lib/LmTable/style/variables.css +6 -0
  30. package/lib/QuickMenu/index.d.ts +2 -1
  31. package/lib/QuickMenu/index.js +11 -11
  32. package/lib/index.d.ts +1 -0
  33. package/lib/styles/variables.css +6 -0
  34. package/package.json +1 -1
  35. package/es/LmTable/components/DndContainer.module.css +0 -6
  36. package/lib/LmTable/components/DndContainer.module.css +0 -6
@@ -10965,6 +10965,12 @@ p {
10965
10965
  #lm_protable_warp .ant-table-container {
10966
10966
  height: 100%;
10967
10967
  }
10968
+ #lm_protable_warp.lm_protable_footer .ant-table-container {
10969
+ height: auto;
10970
+ }
10971
+ #lm_protable_warp.lm_protable_footer .ant-table-footer {
10972
+ background-color: #fff;
10973
+ }
10968
10974
  #lm_protable_warp .ant-card-body,
10969
10975
  #lm_protable_warp .ant-pro-card-body {
10970
10976
  padding: 0;
@@ -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
- var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
937
- return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
938
- });
939
- selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
940
- setSelectedRows({
941
- selectedRows: (0, _lodash.cloneDeep)(selectedRows)
942
- });
943
- // rowClick?.(selectedRows)
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)(columnsRef.current, function (node) {
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]);
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,8 @@ 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
+ footer = props.footer;
1311
1317
  var _useState21 = (0, _react.useState)({
1312
1318
  width: '100%',
1313
1319
  height: '100%'
@@ -1318,9 +1324,11 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1318
1324
  var defaultRef = ref || (0, _react.useRef)(null);
1319
1325
  var tableWarpRef = (0, _react.useRef)(null);
1320
1326
  var resizeRef = (0, _react.useRef)(null);
1327
+ var clsName = (0, _classnames.default)(footer && 'lm_protable_footer');
1321
1328
  if (!autoSizer) {
1322
1329
  return /*#__PURE__*/_react.default.createElement("div", {
1323
1330
  ref: tableWarpRef,
1331
+ className: clsName,
1324
1332
  id: "lm_protable_warp",
1325
1333
  style: {
1326
1334
  width: '100%',
@@ -1350,8 +1358,13 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1350
1358
  })) {
1351
1359
  h -= 32;
1352
1360
  }
1361
+ // 行列分组的高度
1353
1362
  if (openRowGroup || openColGroup) {
1354
- h -= 100;
1363
+ h -= 102;
1364
+ }
1365
+ // safe area
1366
+ if (h < 0) {
1367
+ h = 0;
1355
1368
  }
1356
1369
  return h;
1357
1370
  }, [props.hiddenPage, props.customCheck, props.columns, tableSize]);
@@ -1405,6 +1418,7 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1405
1418
  };
1406
1419
  }, []);
1407
1420
  return /*#__PURE__*/_react.default.createElement("div", {
1421
+ className: clsName,
1408
1422
  ref: tableWarpRef,
1409
1423
  id: "lm_protable_warp",
1410
1424
  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: 40px;
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
- props = __rest(_a, ["children", "columns", "handleProps", "horizontal", "hover", "onClick", "onRemove", "label", "placeholder", "style", "scrollable", "shadow", "unstyled"]);
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", null, children));
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, unstable_batchedUpdates } from 'react-dom';
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
- var PLACEHOLDER_ID = 'placeholder';
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
- var containerIds = Object.keys(items);
525
- var lastContainerId = containerIds[containerIds.length - 1];
526
- return String.fromCharCode(lastContainerId.charCodeAt(0) + 1);
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':
@@ -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;
@@ -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;
@@ -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';
@@ -10965,6 +10965,12 @@ p {
10965
10965
  #lm_protable_warp .ant-table-container {
10966
10966
  height: 100%;
10967
10967
  }
10968
+ #lm_protable_warp.lm_protable_footer .ant-table-container {
10969
+ height: auto;
10970
+ }
10971
+ #lm_protable_warp.lm_protable_footer .ant-table-footer {
10972
+ background-color: #fff;
10973
+ }
10968
10974
  #lm_protable_warp .ant-card-body,
10969
10975
  #lm_protable_warp .ant-pro-card-body {
10970
10976
  padding: 0;
@@ -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
- var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
937
- return (0, _lodash.isObject)(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
938
- });
939
- selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push((0, _lodash.isObject)(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
940
- setSelectedRows({
941
- selectedRows: (0, _lodash.cloneDeep)(selectedRows)
942
- });
943
- // rowClick?.(selectedRows)
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)(columnsRef.current, function (node) {
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]);
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,8 @@ 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
+ footer = props.footer;
1311
1317
  var _useState21 = (0, _react.useState)({
1312
1318
  width: '100%',
1313
1319
  height: '100%'
@@ -1318,9 +1324,11 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1318
1324
  var defaultRef = ref || (0, _react.useRef)(null);
1319
1325
  var tableWarpRef = (0, _react.useRef)(null);
1320
1326
  var resizeRef = (0, _react.useRef)(null);
1327
+ var clsName = (0, _classnames.default)(footer && 'lm_protable_footer');
1321
1328
  if (!autoSizer) {
1322
1329
  return /*#__PURE__*/_react.default.createElement("div", {
1323
1330
  ref: tableWarpRef,
1331
+ className: clsName,
1324
1332
  id: "lm_protable_warp",
1325
1333
  style: {
1326
1334
  width: '100%',
@@ -1350,8 +1358,13 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1350
1358
  })) {
1351
1359
  h -= 32;
1352
1360
  }
1361
+ // 行列分组的高度
1353
1362
  if (openRowGroup || openColGroup) {
1354
- h -= 100;
1363
+ h -= 102;
1364
+ }
1365
+ // safe area
1366
+ if (h < 0) {
1367
+ h = 0;
1355
1368
  }
1356
1369
  return h;
1357
1370
  }, [props.hiddenPage, props.customCheck, props.columns, tableSize]);
@@ -1405,6 +1418,7 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
1405
1418
  };
1406
1419
  }, []);
1407
1420
  return /*#__PURE__*/_react.default.createElement("div", {
1421
+ className: clsName,
1408
1422
  ref: tableWarpRef,
1409
1423
  id: "lm_protable_warp",
1410
1424
  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: 40px;
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>>;
@@ -34,19 +34,23 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
34
34
  scrollable = _a.scrollable,
35
35
  shadow = _a.shadow,
36
36
  unstyled = _a.unstyled,
37
- props = __rest(_a, ["children", "columns", "handleProps", "horizontal", "hover", "onClick", "onRemove", "label", "placeholder", "style", "scrollable", "shadow", "unstyled"]);
37
+ ulClassName = _a.ulClassName,
38
+ isNoneBorder = _a.isNoneBorder,
39
+ props = __rest(_a, ["children", "columns", "handleProps", "horizontal", "hover", "onClick", "onRemove", "label", "placeholder", "style", "scrollable", "shadow", "unstyled", "ulClassName", "isNoneBorder"]);
38
40
  return /*#__PURE__*/_react.default.createElement("div", Object.assign({}, props, {
39
41
  ref: ref,
40
42
  style: Object.assign(Object.assign({}, style), {
41
43
  '--columns': columns
42
44
  }),
43
- className: (0, _classnames.default)('dnd_container', unstyled && 'unstyled', horizontal && 'horizontal', hover && 'hover', placeholder && 'placeholder', scrollable && 'scrollable', shadow && 'shadow'),
45
+ className: (0, _classnames.default)('dnd_container', unstyled && 'unstyled', horizontal && 'horizontal', hover && 'hover', placeholder && 'placeholder', scrollable && 'scrollable', shadow && 'shadow', isNoneBorder && 'isNoneBorder'),
44
46
  onClick: onClick,
45
47
  tabIndex: onClick ? 0 : undefined
46
48
  }), label ? /*#__PURE__*/_react.default.createElement("div", {
47
49
  className: 'dnd_header'
48
50
  }, label, /*#__PURE__*/_react.default.createElement("div", {
49
51
  className: 'dnd_actions'
50
- })) : null, placeholder ? children : /*#__PURE__*/_react.default.createElement("ul", null, children));
52
+ })) : null, placeholder ? children : /*#__PURE__*/_react.default.createElement("ul", {
53
+ className: ulClassName
54
+ }, children));
51
55
  });
52
56
  exports.Container = Container;
@@ -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;
@@ -19,7 +19,6 @@ var _multipleContainersKeyboardCoordinates = _interopRequireDefault(require("../
19
19
  var _Item = require("./Item");
20
20
  var _Container = require("./Container");
21
21
  var _classnames = _interopRequireDefault(require("classnames"));
22
- require("./DndContainer.module.css");
23
22
  var __rest = void 0 && (void 0).__rest || function (s, e) {
24
23
  var t = {};
25
24
  for (var p in s) {
@@ -133,9 +132,9 @@ var dropAnimation = {
133
132
  })
134
133
  };
135
134
  var TRASH_ID = 'void';
136
- exports.TRASH_ID = TRASH_ID;
137
- var PLACEHOLDER_ID = 'placeholder';
135
+ // const PLACEHOLDER_ID = 'placeholder';
138
136
  // const empty: UniqueIdentifier[] = [];
137
+ exports.TRASH_ID = TRASH_ID;
139
138
  function DndContainer(_ref2) {
140
139
  var _ref2$adjustScale = _ref2.adjustScale,
141
140
  adjustScale = _ref2$adjustScale === void 0 ? false : _ref2$adjustScale,
@@ -377,30 +376,13 @@ function DndContainer(_ref2) {
377
376
  setActiveId(null);
378
377
  return;
379
378
  }
380
- if (overId === PLACEHOLDER_ID) {
381
- var newContainerId = getNextContainerId();
382
- (0, _reactDom.unstable_batchedUpdates)(function () {
383
- setContainers(function (containers) {
384
- return [].concat((0, _toConsumableArray2.default)(containers), [newContainerId]);
385
- });
386
- console.log('PLACEHOLDER_ID', overId);
387
- setItems(function (items) {
388
- var _Object$assign3;
389
- return Object.assign(Object.assign({}, items), (_Object$assign3 = {}, (0, _defineProperty2.default)(_Object$assign3, activeContainer, items[activeContainer].filter(function (id) {
390
- return id !== activeId;
391
- })), (0, _defineProperty2.default)(_Object$assign3, newContainerId, [active.id]), _Object$assign3));
392
- });
393
- setActiveId(null);
394
- });
395
- return;
396
- }
397
379
  var overContainer = findContainer(overId);
398
380
  if (overContainer) {
399
381
  var activeIndex = items[activeContainer].indexOf(active.id);
400
382
  var overIndex = items[overContainer].indexOf(overId);
401
383
  if (activeIndex !== overIndex) {
402
384
  var newItems = Object.assign(Object.assign({}, items), (0, _defineProperty2.default)({}, overContainer, (0, _sortable.arrayMove)(items[overContainer], activeIndex, overIndex)));
403
- setItems(newItems);
385
+ // setItems(newItems);
404
386
  updateItems(newItems);
405
387
  } else {
406
388
  updateItems(items);
@@ -460,7 +442,9 @@ function DndContainer(_ref2) {
460
442
  items: items[tableContainer],
461
443
  scrollable: scrollable,
462
444
  style: containerStyle,
463
- unstyled: false
445
+ unstyled: false,
446
+ ulClassName: 'ulClassName',
447
+ isNoneBorder: true
464
448
  }, /*#__PURE__*/_react.default.createElement(_sortable.SortableContext, {
465
449
  items: items[tableContainer],
466
450
  strategy: _sortable.horizontalListSortingStrategy
@@ -526,12 +510,13 @@ function DndContainer(_ref2) {
526
510
  });
527
511
  }));
528
512
  }
529
- function getNextContainerId() {
530
- var containerIds = Object.keys(items);
531
- var lastContainerId = containerIds[containerIds.length - 1];
532
- return String.fromCharCode(lastContainerId.charCodeAt(0) + 1);
533
- }
513
+ // function getNextContainerId() {
514
+ // const containerIds = Object.keys(items);
515
+ // const lastContainerId = containerIds[containerIds.length - 1];
516
+ // return String.fromCharCode(lastContainerId.charCodeAt(0) + 1);
517
+ // }
534
518
  }
519
+
535
520
  function getColor(id) {
536
521
  switch (String(id)[0]) {
537
522
  case 'A':
@@ -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;