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
|
@@ -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
|
-
|
|
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",
|
|
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
|
-
|
|
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
|
-
|
|
531
|
-
|
|
532
|
-
|
|
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':
|
|
@@ -128,15 +128,18 @@ var SheelTabelCell = function SheelTabelCell(props) {
|
|
|
128
128
|
};
|
|
129
129
|
var renderViewer = children;
|
|
130
130
|
var content = renderComponent() || renderEditor() || renderViewer;
|
|
131
|
+
var className = (0, _classnames.default)(colIndex === undefined && 'row_selection_td', 'unselection', _selected && selectIng && 'selected', isEnd && 'end', isRightEnd && 'right_end', isEditing && 'editing', isVaildCommit && 'commiting', selectedReadonly && 'readonly_red');
|
|
132
|
+
// 在编辑模式下不允许进行快速复制操作
|
|
133
|
+
var showEndCell = isRightEnd && isEnd && !isEditing;
|
|
134
|
+
console.log(content);
|
|
131
135
|
return /*#__PURE__*/_react.default.createElement("td", Object.assign({}, (0, _lodash.omit)(clearProps, ['commitIng', 'editIng']), {
|
|
132
|
-
|
|
133
|
-
className: (0, _classnames.default)(colIndex === undefined && 'row_selection_td', 'unselection', _selected && selectIng && 'selected', isEnd && 'end', isRightEnd && 'right_end', isEditing && 'editing', isVaildCommit && 'commiting', selectedReadonly && 'readonly_red'),
|
|
136
|
+
className: className,
|
|
134
137
|
onMouseDown: handleMouseDown,
|
|
135
138
|
onMouseOver: handleMouseOver,
|
|
136
139
|
onContextMenu: handleContextMenu,
|
|
137
140
|
onDoubleClick: handleDoubleClick,
|
|
138
141
|
key: "".concat(rowIndex, "_").concat(colIndex)
|
|
139
|
-
}), content,
|
|
142
|
+
}), content, showEndCell && /*#__PURE__*/_react.default.createElement("div", {
|
|
140
143
|
ref: endCellRef,
|
|
141
144
|
className: 'lmtable_cell_end_icon'
|
|
142
145
|
}));
|
|
@@ -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/lib/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/lib/QuickMenu/index.js
CHANGED
|
@@ -19,7 +19,8 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
19
19
|
top = _props$top === void 0 ? '104px' : _props$top,
|
|
20
20
|
_props$menuData = props.menuData,
|
|
21
21
|
menuData = _props$menuData === void 0 ? [] : _props$menuData,
|
|
22
|
-
warpElement = props.warpElement
|
|
22
|
+
warpElement = props.warpElement,
|
|
23
|
+
root = props.root;
|
|
23
24
|
var idTopInfo = (0, _react.useRef)({});
|
|
24
25
|
var _useState = (0, _react.useState)(false),
|
|
25
26
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -64,11 +65,13 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
64
65
|
// eslint-disable-next-line global-require
|
|
65
66
|
var scrollama = require('scrollama');
|
|
66
67
|
menuTimeEventRef.current = scrollama();
|
|
68
|
+
console.log((0, _domTarget.getTargetElement)(warpElement || document), '--getTargetElement(warpElement || document)');
|
|
67
69
|
(_c = (_b = menuTimeEventRef.current) === null || _b === void 0 ? void 0 : _b.setup({
|
|
68
70
|
step: filterMenuData.map(function (item) {
|
|
69
71
|
return document.getElementById("".concat(item.menuId));
|
|
70
72
|
}).filter(Boolean),
|
|
71
|
-
container: (0, _domTarget.getTargetElement)(warpElement || document)
|
|
73
|
+
container: (0, _domTarget.getTargetElement)(warpElement || document),
|
|
74
|
+
root: root ? (0, _domTarget.getTargetElement)(root) : undefined
|
|
72
75
|
})) === null || _c === void 0 ? void 0 : _c.onStepEnter(function (_ref) {
|
|
73
76
|
var element = _ref.element;
|
|
74
77
|
updateActiveToc(element.id);
|
|
@@ -94,11 +97,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
94
97
|
}, [scroll], {
|
|
95
98
|
wait: 50
|
|
96
99
|
});
|
|
97
|
-
var bindDom = function bindDom() {
|
|
98
|
-
if (!Object.keys(idTopInfo.current).length) {
|
|
99
|
-
setKeysDom();
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
100
|
var handleScroll = function handleScroll() {
|
|
103
101
|
setScrollOpenStatus(true);
|
|
104
102
|
};
|
|
@@ -109,10 +107,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
109
107
|
(0, _react.useEffect)(function () {
|
|
110
108
|
var _a;
|
|
111
109
|
// bindScroller();
|
|
112
|
-
setTimeout(function () {
|
|
113
|
-
bindDom();
|
|
114
|
-
bindScroller();
|
|
115
|
-
}, 200);
|
|
116
110
|
(_a = (0, _domTarget.getTargetElement)(warpElement || document)) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', handleScroll, {
|
|
117
111
|
once: true
|
|
118
112
|
});
|
|
@@ -121,6 +115,12 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
121
115
|
(_a = (0, _domTarget.getTargetElement)(warpElement || document)) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', handleScroll);
|
|
122
116
|
};
|
|
123
117
|
}, []);
|
|
118
|
+
(0, _react.useEffect)(function () {
|
|
119
|
+
setTimeout(function () {
|
|
120
|
+
setKeysDom();
|
|
121
|
+
bindScroller();
|
|
122
|
+
}, 200);
|
|
123
|
+
}, [filterMenuData]);
|
|
124
124
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
125
125
|
className: (0, _classnames.default)(prefixCls),
|
|
126
126
|
onMouseEnter: function onMouseEnter() {
|
package/lib/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/lib/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/package.json
CHANGED