linkmore-design 1.1.27-alpha.0 → 1.1.27

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 (103) hide show
  1. package/dist/LmEditTable/DndContainer.d.ts +3 -6
  2. package/dist/LmEditTable/EditTable.d.ts +5 -10
  3. package/dist/LmEditTable/sortableItem.d.ts +2 -3
  4. package/dist/LmEditTable/util.d.ts +0 -7
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.umd.js +527 -1133
  7. package/dist/index.umd.min.js +8 -8
  8. package/dist/variables.css +0 -65
  9. package/es/InputNumber/index.js +9 -7
  10. package/es/LmEditTable/DndContainer.d.ts +3 -6
  11. package/es/LmEditTable/DndContainer.js +10 -70
  12. package/es/LmEditTable/DragHandle.js +1 -1
  13. package/es/LmEditTable/EditTable.d.ts +5 -10
  14. package/es/LmEditTable/EditTable.js +360 -352
  15. package/es/LmEditTable/sortableItem.d.ts +2 -3
  16. package/es/LmEditTable/sortableItem.js +4 -16
  17. package/es/LmEditTable/sortableItemCol.js +10 -40
  18. package/es/LmEditTable/style/index.css +0 -65
  19. package/es/LmEditTable/style/variables.css +0 -65
  20. package/es/LmEditTable/util.d.ts +0 -7
  21. package/es/LmEditTable/util.js +7 -92
  22. package/es/LmTable/virTual/VirtualRow.js +14 -12
  23. package/es/hooks/useEvent/index.js +1 -1
  24. package/es/index.d.ts +2 -1
  25. package/es/styles/variables.css +0 -65
  26. package/lib/InputNumber/index.js +9 -9
  27. package/lib/LmEditTable/DndContainer.d.ts +3 -6
  28. package/lib/LmEditTable/DndContainer.js +9 -74
  29. package/lib/LmEditTable/DragHandle.js +1 -1
  30. package/lib/LmEditTable/EditTable.d.ts +5 -10
  31. package/lib/LmEditTable/EditTable.js +357 -349
  32. package/lib/LmEditTable/sortableItem.d.ts +2 -3
  33. package/lib/LmEditTable/sortableItem.js +5 -19
  34. package/lib/LmEditTable/sortableItemCol.js +8 -37
  35. package/lib/LmEditTable/style/index.css +0 -65
  36. package/lib/LmEditTable/style/variables.css +0 -65
  37. package/lib/LmEditTable/util.d.ts +0 -7
  38. package/lib/LmEditTable/util.js +6 -97
  39. package/lib/LmTable/virTual/VirtualRow.js +14 -12
  40. package/lib/hooks/useEvent/index.js +1 -1
  41. package/lib/index.d.ts +2 -1
  42. package/lib/styles/variables.css +0 -65
  43. package/package.json +9 -7
  44. package/dist/LmEditTable/components/DraggableContainer.d.ts +0 -10
  45. package/dist/LmEditTable/components/QuickOpetate.d.ts +0 -12
  46. package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +0 -13
  47. package/dist/LmEditTable/components/index.d.ts +0 -16
  48. package/dist/LmEditTable/hooks/useForkRef.d.ts +0 -2
  49. package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +0 -10
  50. package/dist/LmEditTable/virtual/VirtualRow.d.ts +0 -7
  51. package/dist/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
  52. package/dist/LmEditTable/virtual/VirtualTable.d.ts +0 -3
  53. package/dist/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
  54. package/dist/LmEditTable/virtual/context.d.ts +0 -13
  55. package/dist/LmEditTable/virtual/index.d.ts +0 -4
  56. package/es/LmEditTable/components/DraggableContainer.d.ts +0 -10
  57. package/es/LmEditTable/components/DraggableContainer.js +0 -39
  58. package/es/LmEditTable/components/QuickOpetate.d.ts +0 -12
  59. package/es/LmEditTable/components/QuickOpetate.js +0 -82
  60. package/es/LmEditTable/components/bottomOpetateComponent.d.ts +0 -13
  61. package/es/LmEditTable/components/bottomOpetateComponent.js +0 -23
  62. package/es/LmEditTable/components/index.d.ts +0 -16
  63. package/es/LmEditTable/components/index.js +0 -7
  64. package/es/LmEditTable/hooks/useForkRef.d.ts +0 -2
  65. package/es/LmEditTable/hooks/useForkRef.js +0 -22
  66. package/es/LmEditTable/rowSort/DndContainerRow.d.ts +0 -10
  67. package/es/LmEditTable/rowSort/DndContainerRow.js +0 -81
  68. package/es/LmEditTable/virtual/VirtualRow.d.ts +0 -7
  69. package/es/LmEditTable/virtual/VirtualRow.js +0 -62
  70. package/es/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
  71. package/es/LmEditTable/virtual/VirtualRowBack.js +0 -100
  72. package/es/LmEditTable/virtual/VirtualTable.d.ts +0 -3
  73. package/es/LmEditTable/virtual/VirtualTable.js +0 -54
  74. package/es/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
  75. package/es/LmEditTable/virtual/VirtualWrapper.js +0 -60
  76. package/es/LmEditTable/virtual/context.d.ts +0 -13
  77. package/es/LmEditTable/virtual/context.js +0 -54
  78. package/es/LmEditTable/virtual/index.d.ts +0 -4
  79. package/es/LmEditTable/virtual/index.js +0 -4
  80. package/lib/LmEditTable/components/DraggableContainer.d.ts +0 -10
  81. package/lib/LmEditTable/components/DraggableContainer.js +0 -52
  82. package/lib/LmEditTable/components/QuickOpetate.d.ts +0 -12
  83. package/lib/LmEditTable/components/QuickOpetate.js +0 -96
  84. package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +0 -13
  85. package/lib/LmEditTable/components/bottomOpetateComponent.js +0 -34
  86. package/lib/LmEditTable/components/index.d.ts +0 -16
  87. package/lib/LmEditTable/components/index.js +0 -37
  88. package/lib/LmEditTable/hooks/useForkRef.d.ts +0 -2
  89. package/lib/LmEditTable/hooks/useForkRef.js +0 -29
  90. package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +0 -10
  91. package/lib/LmEditTable/rowSort/DndContainerRow.js +0 -99
  92. package/lib/LmEditTable/virtual/VirtualRow.d.ts +0 -7
  93. package/lib/LmEditTable/virtual/VirtualRow.js +0 -78
  94. package/lib/LmEditTable/virtual/VirtualRowBack.d.ts +0 -6
  95. package/lib/LmEditTable/virtual/VirtualRowBack.js +0 -113
  96. package/lib/LmEditTable/virtual/VirtualTable.d.ts +0 -3
  97. package/lib/LmEditTable/virtual/VirtualTable.js +0 -71
  98. package/lib/LmEditTable/virtual/VirtualWrapper.d.ts +0 -3
  99. package/lib/LmEditTable/virtual/VirtualWrapper.js +0 -73
  100. package/lib/LmEditTable/virtual/context.d.ts +0 -13
  101. package/lib/LmEditTable/virtual/context.js +0 -64
  102. package/lib/LmEditTable/virtual/index.d.ts +0 -4
  103. package/lib/LmEditTable/virtual/index.js +0 -31
@@ -9738,9 +9738,6 @@ p {
9738
9738
  width: 32px;
9739
9739
  padding: 0 8px;
9740
9740
  }
9741
- .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
9742
- height: 100%;
9743
- }
9744
9741
  .lm_editTable_warpper .lm_editTable_cell {
9745
9742
  cursor: pointer;
9746
9743
  height: 40px;
@@ -9752,21 +9749,6 @@ p {
9752
9749
  letter-spacing: 0px;
9753
9750
  color: var(--color-85);
9754
9751
  }
9755
- .lm_editTable_warpper .lm_custom_cell_td {
9756
- position: relative;
9757
- }
9758
- .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append {
9759
- display: flex;
9760
- flex-direction: row;
9761
- flex-wrap: nowrap;
9762
- }
9763
- .lm_editTable_warpper .lm_custom_cell_td.ant-table-cell-with-append .ant-table-row-expand-icon {
9764
- margin-right: 8px;
9765
- flex: none;
9766
- }
9767
- .lm_editTable_warpper .lm_custom_cell_td > .ant-form-item {
9768
- flex: 1 1 auto;
9769
- }
9770
9752
  .lm_editTable_warpper .lm_custom_cell_td .ant-form-item-control-input-content {
9771
9753
  display: flex;
9772
9754
  flex-direction: row;
@@ -9778,32 +9760,6 @@ p {
9778
9760
  .lm_editTable_warpper .lm_custom_cell_td .ant-table-row-expand-icon {
9779
9761
  margin-top: 6px;
9780
9762
  }
9781
- .lm_editTable_warpper .lm_custom_cell_td .quick_copy_warp {
9782
- font-size: 8px;
9783
- position: absolute;
9784
- left: calc(50% - 10px);
9785
- z-index: 100;
9786
- width: 20px;
9787
- height: 10px;
9788
- background-color: var(--color-6);
9789
- display: flex;
9790
- align-items: center;
9791
- justify-content: center;
9792
- color: #D8D8D8;
9793
- }
9794
- .lm_editTable_warpper .lm_custom_cell_td .quick_copy_warp:hover {
9795
- cursor: pointer;
9796
- background-color: var(--primary-color);
9797
- color: #fff;
9798
- }
9799
- .lm_editTable_warpper .lm_custom_cell_td .quick_copy_up {
9800
- top: -4px;
9801
- left: calc(50% - 10px);
9802
- }
9803
- .lm_editTable_warpper .lm_custom_cell_td .quick_copy_down {
9804
- bottom: -6px;
9805
- left: calc(50% - 10px);
9806
- }
9807
9763
  .lm_editTable_warpper .lm_editTable_cell_edit {
9808
9764
  height: 40px;
9809
9765
  padding: 8px 8px !important;
@@ -9815,9 +9771,6 @@ p {
9815
9771
  .lm_editTable_warpper .lm_table_quickcopy .anticon {
9816
9772
  color: var(--text-color);
9817
9773
  }
9818
- .lm_editTable_warpper .ant-table-body {
9819
- scroll-behavior: smooth;
9820
- }
9821
9774
  .lm_editTable_warpper .icon_drag {
9822
9775
  color: var(--tip-text-color);
9823
9776
  }
@@ -9834,9 +9787,6 @@ p {
9834
9787
  .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
9835
9788
  background-color: rgba(0, 0, 0, 0.06) !important;
9836
9789
  }
9837
- .lm_editTable_warpper .ant-table-thead > tr > th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
9838
- background-color: rgba(0, 0, 0, 0.06) !important;
9839
- }
9840
9790
  .lm_editTable_warpper .ant-picker {
9841
9791
  height: 24px !important;
9842
9792
  padding: 2px 8px;
@@ -9880,21 +9830,6 @@ p {
9880
9830
  .lm_table_append_add_popover .ant-popover-inner-content ul li:hover {
9881
9831
  background-color: var(--color-15);
9882
9832
  }
9883
- .lm_edittable_col_sort_item {
9884
- overflow: hidden;
9885
- }
9886
- .lm_editable_col_drag {
9887
- background-color: #fff;
9888
- font-size: 12px;
9889
- display: flex;
9890
- box-sizing: border-box;
9891
- transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));
9892
- transform-origin: 0 0;
9893
- touch-action: manipulation;
9894
- scale: 1.05;
9895
- box-shadow: 0 0 0 calc(1px / var(--scale-x, 1)) rgba(63, 63, 68, 0.05), 0 1px calc(3px / var(--scale-x, 1)) 0 rgba(34, 33, 81, 0.15);
9896
- padding: 8px;
9897
- }
9898
9833
  .lm_filter_wrapper .lm_filter_container .lm_filter {
9899
9834
  display: flex;
9900
9835
  flex-wrap: wrap;
@@ -15,11 +15,12 @@ var __rest = this && this.__rest || function (s, e) {
15
15
  };
16
16
 
17
17
  import classNames from 'classnames';
18
- import React, { forwardRef } from 'react';
18
+ import React from 'react';
19
19
  import DisabledContext from '../ConfigProvider/DisabledContext';
20
20
  import SizeContext from '../ConfigProvider/SizeContext';
21
21
  var prefixCls = 'lm_input-number';
22
- var LMInputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
22
+
23
+ var LMInputNumber = function LMInputNumber(props) {
23
24
  var children = props.children,
24
25
  className = props.className,
25
26
  customDisabled = props.disabled,
@@ -34,22 +35,23 @@ var LMInputNumber = /*#__PURE__*/forwardRef(function (props, ref) {
34
35
  var size = React.useContext(SizeContext);
35
36
  var mergeSize = customizeSize || size;
36
37
  return /*#__PURE__*/React.createElement(_InputNumber, Object.assign({
37
- ref: ref,
38
38
  className: classNames(className, prefixCls),
39
39
  placeholder: "\u8BF7\u8F93\u5165"
40
40
  }, rest, {
41
41
  size: mergeSize,
42
42
  disabled: mergedDisabled
43
43
  }));
44
- });
44
+ };
45
+
45
46
  var CInputNumber = LMInputNumber;
46
- CInputNumber.Price = /*#__PURE__*/forwardRef(function (props, ref) {
47
+
48
+ CInputNumber.Price = function (props) {
47
49
  return /*#__PURE__*/React.createElement(_InputNumber, Object.assign({
48
50
  prefix: "\uFFE5",
49
- ref: ref,
50
51
  formatter: function formatter(value) {
51
52
  return "".concat(value).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
52
53
  }
53
54
  }, props));
54
- });
55
+ };
56
+
55
57
  export default CInputNumber;
@@ -1,8 +1,5 @@
1
- import React from 'react';
2
- declare const _default: React.MemoExoticComponent<({ children, move, options, rowKey }: {
1
+ declare const DndContainer: ({ children, move }: {
3
2
  children: any;
4
3
  move: any;
5
- options: any;
6
- rowKey: any;
7
- }) => JSX.Element>;
8
- export default _default;
4
+ }) => JSX.Element;
5
+ export default DndContainer;
@@ -1,61 +1,18 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import React, { memo } from 'react';
3
- import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors, DragOverlay } from '@dnd-kit/core';
1
+ import React from 'react';
2
+ import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
4
3
  import { restrictToParentElement } from '@dnd-kit/modifiers';
5
- import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
6
- var DragOver = /*#__PURE__*/React.memo(function (_ref) {
7
- var instance = _ref.instance;
8
- var isDragging = instance.isDragging,
9
- activeId = instance.activeId,
10
- options = instance.options;
11
- var item = activeId && options.find(function (v) {
12
- return v.dataIndex === activeId;
13
- });
14
- return /*#__PURE__*/React.createElement(DragOverlay, {
15
- adjustScale: false
16
- }, isDragging ? /*#__PURE__*/React.createElement("div", {
17
- className: "lm_editable_col_drag"
18
- }, item === null || item === void 0 ? void 0 : item.title) : null);
19
- }); // 可拖拽容器
20
-
21
- var DndContainer = function DndContainer(_ref2) {
22
- var children = _ref2.children,
23
- move = _ref2.move,
24
- options = _ref2.options,
25
- rowKey = _ref2.rowKey;
26
-
27
- var _React$useState = React.useState(false),
28
- _React$useState2 = _slicedToArray(_React$useState, 2),
29
- isDragging = _React$useState2[0],
30
- setIsDragging = _React$useState2[1]; // 是否拖拽中
31
-
32
-
33
- var _React$useState3 = React.useState(null),
34
- _React$useState4 = _slicedToArray(_React$useState3, 2),
35
- activeId = _React$useState4[0],
36
- setActiveId = _React$useState4[1]; // 是否拖拽中
37
-
4
+ import { sortableKeyboardCoordinates } from '@dnd-kit/sortable'; // 可拖拽容器
38
5
 
6
+ var DndContainer = function DndContainer(_ref) {
7
+ var children = _ref.children,
8
+ move = _ref.move;
39
9
  var sensors = useSensors(useSensor(PointerSensor), useSensor(KeyboardSensor, {
40
10
  coordinateGetter: sortableKeyboardCoordinates
41
- })); // 开始拖拽
42
-
43
- var handleDragStart = function handleDragStart(_ref3) {
44
- var active = _ref3.active;
45
- setIsDragging(true);
46
-
47
- if (!active) {
48
- return;
49
- }
50
-
51
- setActiveId(active.id);
52
- }; // 拖拽结束
53
-
11
+ })); // 拖拽结束
54
12
 
55
13
  var handleDragEnd = function handleDragEnd(event) {
56
14
  var active = event.active,
57
- over = event.over;
58
- setActiveId(null); // 未移入时触发
15
+ over = event.over; // 未移入时触发
59
16
 
60
17
  if (!(over === null || over === void 0 ? void 0 : over.id)) {
61
18
  return;
@@ -67,29 +24,12 @@ var DndContainer = function DndContainer(_ref2) {
67
24
  }
68
25
  };
69
26
 
70
- var instance = {
71
- isDragging: isDragging,
72
- activeId: activeId,
73
- options: options,
74
- rowKey: rowKey,
75
- children: children,
76
- move: move,
77
- items: options === null || options === void 0 ? void 0 : options.map(function (v) {
78
- return v[rowKey];
79
- })
80
- };
81
27
  return /*#__PURE__*/React.createElement(DndContext, {
82
28
  sensors: sensors,
83
29
  collisionDetection: closestCenter,
84
- onDragStart: handleDragStart,
85
30
  onDragEnd: handleDragEnd,
86
- onDragCancel: function onDragCancel() {
87
- return setActiveId(null);
88
- },
89
31
  modifiers: [restrictToParentElement]
90
- }, children, /*#__PURE__*/React.createElement(DragOver, {
91
- instance: instance
92
- }));
32
+ }, children);
93
33
  };
94
34
 
95
- export default /*#__PURE__*/memo(DndContainer);
35
+ export default DndContainer;
@@ -17,7 +17,7 @@ export var Dragger = function Dragger(_ref) {
17
17
  touchAction: 'none',
18
18
  cursor: 'move'
19
19
  },
20
- className: "icon_drag".concat(isDragging ? 'bing' : '')
20
+ className: 'icon_drag' + (isDragging ? 'bing' : '')
21
21
  }));
22
22
  };
23
23
  export default Dragger;
@@ -5,7 +5,6 @@ interface ILmEditTable extends TableProps<any> {
5
5
  isEdit?: boolean;
6
6
  isAdd?: boolean;
7
7
  rowKey?: string;
8
- disabled?: boolean;
9
8
  rowHoverEdit?: boolean;
10
9
  isUseForm?: boolean;
11
10
  isHoverEdit?: boolean;
@@ -14,7 +13,6 @@ interface ILmEditTable extends TableProps<any> {
14
13
  sortOpen?: boolean;
15
14
  size?: TableProps<any>['size'];
16
15
  colSortOpen?: boolean;
17
- indexCol?: boolean | Record<string, any>;
18
16
  filterChange?: (data: TableProps<any>['columns']) => void;
19
17
  recordCreatorProps?: {
20
18
  creatorButtonText?: string;
@@ -33,8 +31,7 @@ export interface CountdownHandle {
33
31
  getCheckboxRecords: () => any[];
34
32
  clearSelect: () => void;
35
33
  customSetCheckboxRecords: (data: any[]) => void;
36
- deleteRowData: (record: string | Record<string, any>) => void;
37
- addRowData: (record: string | Record<string, any>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean | 'replace') => void;
34
+ valid: () => void;
38
35
  }
39
36
  interface ILmColumns extends TableColumnType<any> {
40
37
  editable?: 'input' | 'number' | 'inputRange' | 'date' | 'select' | 'multiple' | 'checkbox' | 'radio' | 'switch' | 'upload' | 'operate' | 'lm_edit_opetate' | 'render';
@@ -46,14 +43,12 @@ interface ILmColumns extends TableColumnType<any> {
46
43
  componentProps?: Record<string, any>;
47
44
  relevanceCols?: boolean;
48
45
  }
49
- export declare type TLmEditTable = {
46
+ export declare type TLmEditTable = ILmEditTable & {
50
47
  onChange?: (data: any[]) => void;
51
48
  columns: ILmColumns[];
52
- virtual?: boolean;
53
- } & ILmEditTable;
54
- declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
49
+ };
50
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ILmEditTable & {
55
51
  onChange?: (data: any[]) => void;
56
52
  columns: ILmColumns[];
57
- virtual?: boolean;
58
- } & ILmEditTable & React.RefAttributes<CountdownHandle>>>;
53
+ } & React.RefAttributes<CountdownHandle>>>;
59
54
  export default _default;