linkmore-design 1.1.1 → 1.1.2
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/tableChartsModal.d.ts +2 -0
- package/dist/LmTable/util.d.ts +18 -6
- package/dist/index.umd.js +376 -255
- package/dist/index.umd.min.js +4 -4
- package/es/LmTable/Table.js +187 -135
- package/es/LmTable/components/sheelTableCell.js +10 -6
- package/es/LmTable/components/sortableItemCol.js +3 -1
- package/es/LmTable/components/tableChartsModal.d.ts +2 -0
- package/es/LmTable/components/tableChartsModal.js +31 -5
- package/es/LmTable/util.js +94 -27
- package/lib/LmTable/Table.js +187 -135
- package/lib/LmTable/components/sheelTableCell.js +10 -6
- package/lib/LmTable/components/sortableItemCol.js +3 -1
- package/lib/LmTable/components/tableChartsModal.d.ts +2 -0
- package/lib/LmTable/components/tableChartsModal.js +33 -4
- package/lib/LmTable/util.js +94 -27
- package/package.json +2 -1
- package/dist/LmTable/test/index.d.ts +0 -100
- package/es/LmTable/test/index.js +0 -254
- package/lib/LmTable/test/index.js +0 -254
package/dist/index.umd.js
CHANGED
|
@@ -129972,12 +129972,12 @@
|
|
|
129972
129972
|
return reject(err);
|
|
129973
129973
|
}
|
|
129974
129974
|
}
|
|
129975
|
-
let sock;
|
|
129976
129975
|
// Shuffle proxies
|
|
129977
129976
|
if (options.randomizeChain) {
|
|
129978
129977
|
(0, util$1.shuffleArray)(options.proxies);
|
|
129979
129978
|
}
|
|
129980
129979
|
try {
|
|
129980
|
+
let sock;
|
|
129981
129981
|
for (let i = 0; i < options.proxies.length; i++) {
|
|
129982
129982
|
const nextProxy = options.proxies[i];
|
|
129983
129983
|
// If we've reached the last proxy in the chain, the destination is the actual destination, otherwise it's the next proxy.
|
|
@@ -129993,12 +129993,10 @@
|
|
|
129993
129993
|
command: 'connect',
|
|
129994
129994
|
proxy: nextProxy,
|
|
129995
129995
|
destination: nextDestination,
|
|
129996
|
-
|
|
129996
|
+
existing_socket: sock,
|
|
129997
129997
|
});
|
|
129998
129998
|
// If sock is undefined, assign it here.
|
|
129999
|
-
|
|
130000
|
-
sock = result.socket;
|
|
130001
|
-
}
|
|
129999
|
+
sock = sock || result.socket;
|
|
130002
130000
|
}
|
|
130003
130001
|
if (typeof callback === 'function') {
|
|
130004
130002
|
callback(null, { socket: sock });
|
|
@@ -221460,12 +221458,14 @@
|
|
|
221460
221458
|
|
|
221461
221459
|
var _excluded$1T = ["children"];
|
|
221462
221460
|
var Item$4 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
221461
|
+
var _children$props;
|
|
221462
|
+
|
|
221463
221463
|
var children = _ref.children,
|
|
221464
221464
|
props = _objectWithoutProperties$1(_ref, _excluded$1T);
|
|
221465
221465
|
|
|
221466
221466
|
return /*#__PURE__*/React__default['default'].createElement("th", _extends$2({}, props, {
|
|
221467
221467
|
ref: ref
|
|
221468
|
-
}), children);
|
|
221468
|
+
}), (children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.children) || children);
|
|
221469
221469
|
});
|
|
221470
221470
|
function SortableItem(props) {
|
|
221471
221471
|
var _useSortable = useSortable({
|
|
@@ -222080,7 +222080,7 @@
|
|
|
222080
222080
|
|
|
222081
222081
|
var _ref = (isSelected === null || isSelected === void 0 ? void 0 : isSelected(rowIndex, colIndex)) || {},
|
|
222082
222082
|
_ref$isSelected = _ref.isSelected,
|
|
222083
|
-
|
|
222083
|
+
_selected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
222084
222084
|
_ref$isEnd = _ref.isEnd,
|
|
222085
222085
|
isEnd = _ref$isEnd === void 0 ? false : _ref$isEnd,
|
|
222086
222086
|
_ref$isRightEnd = _ref.isRightEnd,
|
|
@@ -222088,7 +222088,9 @@
|
|
|
222088
222088
|
_ref$isEditing = _ref.isEditing,
|
|
222089
222089
|
isEditing = _ref$isEditing === void 0 ? false : _ref$isEditing,
|
|
222090
222090
|
_ref$isVaildCommit = _ref.isVaildCommit,
|
|
222091
|
-
isVaildCommit = _ref$isVaildCommit === void 0 ? false : _ref$isVaildCommit
|
|
222091
|
+
isVaildCommit = _ref$isVaildCommit === void 0 ? false : _ref$isVaildCommit,
|
|
222092
|
+
_ref$selectedReadonly = _ref.selectedReadonly,
|
|
222093
|
+
selectedReadonly = _ref$selectedReadonly === void 0 ? false : _ref$selectedReadonly;
|
|
222092
222094
|
|
|
222093
222095
|
var _useState = React.useState((record === null || record === void 0 ? void 0 : record[col === null || col === void 0 ? void 0 : col.dataIndex]) || ''),
|
|
222094
222096
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
@@ -222156,13 +222158,12 @@
|
|
|
222156
222158
|
|
|
222157
222159
|
var saveRenderValue = function saveRenderValue() {
|
|
222158
222160
|
if (valueRef.current !== (record === null || record === void 0 ? void 0 : record[col === null || col === void 0 ? void 0 : col.dataIndex])) {
|
|
222159
|
-
dataSourceChange === null || dataSourceChange === void 0 ? void 0 : dataSourceChange(rowIndex, colIndex, _objectSpread(_objectSpread({}, record), {}, _defineProperty$1({}, col.dataIndex, valueRef.current)));
|
|
222161
|
+
dataSourceChange === null || dataSourceChange === void 0 ? void 0 : dataSourceChange(rowIndex, colIndex, valueRef.current, _objectSpread(_objectSpread({}, record), {}, _defineProperty$1({}, col.dataIndex, valueRef.current)));
|
|
222160
222162
|
}
|
|
222161
222163
|
};
|
|
222162
222164
|
|
|
222163
222165
|
var renderEditor = function renderEditor() {
|
|
222164
222166
|
if (isEditing) {
|
|
222165
|
-
console.log(isEditing, '-----isEditing-----');
|
|
222166
222167
|
var Editor = (col === null || col === void 0 ? void 0 : col.dataEditor) || InputDataEdit;
|
|
222167
222168
|
return /*#__PURE__*/React__default['default'].createElement(Editor, {
|
|
222168
222169
|
cell: col,
|
|
@@ -222183,13 +222184,16 @@
|
|
|
222183
222184
|
var content = renderComponent() || renderEditor() || renderViewer;
|
|
222184
222185
|
return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, lodash.omit(clearProps, ['commitIng', 'editIng'])), {}, {
|
|
222185
222186
|
// style={{ userSelect: 'none' }}
|
|
222186
|
-
className: _classnames_2_3_2_classnames(colIndex === undefined && 'row_selection_td', 'unselection',
|
|
222187
|
+
className: _classnames_2_3_2_classnames(colIndex === undefined && 'row_selection_td', 'unselection', _selected && selectIng && 'selected', isEnd && 'end', isRightEnd && 'right_end', isEditing && 'editing', isVaildCommit && 'commiting', selectedReadonly && 'readonly_red'),
|
|
222187
222188
|
onMouseDown: handleMouseDown,
|
|
222188
222189
|
onMouseOver: handleMouseOver,
|
|
222189
222190
|
onContextMenu: handleContextMenu,
|
|
222190
222191
|
onDoubleClick: handleDoubleClick,
|
|
222191
222192
|
key: "".concat(rowIndex, "_").concat(colIndex)
|
|
222192
|
-
}), content
|
|
222193
|
+
}), content, isRightEnd && isEnd && !isEditing && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
222194
|
+
ref: endCellRef,
|
|
222195
|
+
className: 'lmtable_cell_end_icon'
|
|
222196
|
+
}));
|
|
222193
222197
|
};
|
|
222194
222198
|
|
|
222195
222199
|
var isArrayLike$1 = function (value) {
|
|
@@ -236814,31 +236818,6 @@
|
|
|
236814
236818
|
return ShapeAnnotation;
|
|
236815
236819
|
}(GroupComponent));
|
|
236816
236820
|
|
|
236817
|
-
var CONTAINER_CLASS = 'g2-tooltip';
|
|
236818
|
-
var CONTAINER_CLASS_CUSTOM = 'g2-tooltip-custom';
|
|
236819
|
-
var TITLE_CLASS = 'g2-tooltip-title';
|
|
236820
|
-
var LIST_CLASS = 'g2-tooltip-list';
|
|
236821
|
-
var LIST_ITEM_CLASS = 'g2-tooltip-list-item';
|
|
236822
|
-
var MARKER_CLASS = 'g2-tooltip-marker';
|
|
236823
|
-
var VALUE_CLASS = 'g2-tooltip-value';
|
|
236824
|
-
var NAME_CLASS = 'g2-tooltip-name';
|
|
236825
|
-
var CROSSHAIR_X = 'g2-tooltip-crosshair-x';
|
|
236826
|
-
var CROSSHAIR_Y = 'g2-tooltip-crosshair-y';
|
|
236827
|
-
|
|
236828
|
-
var CssConst = /*#__PURE__*/Object.freeze({
|
|
236829
|
-
__proto__: null,
|
|
236830
|
-
CONTAINER_CLASS: CONTAINER_CLASS,
|
|
236831
|
-
CONTAINER_CLASS_CUSTOM: CONTAINER_CLASS_CUSTOM,
|
|
236832
|
-
TITLE_CLASS: TITLE_CLASS,
|
|
236833
|
-
LIST_CLASS: LIST_CLASS,
|
|
236834
|
-
LIST_ITEM_CLASS: LIST_ITEM_CLASS,
|
|
236835
|
-
MARKER_CLASS: MARKER_CLASS,
|
|
236836
|
-
VALUE_CLASS: VALUE_CLASS,
|
|
236837
|
-
NAME_CLASS: NAME_CLASS,
|
|
236838
|
-
CROSSHAIR_X: CROSSHAIR_X,
|
|
236839
|
-
CROSSHAIR_Y: CROSSHAIR_Y
|
|
236840
|
-
});
|
|
236841
|
-
|
|
236842
236821
|
var HtmlComponent = /** @class */ (function (_super) {
|
|
236843
236822
|
__extends(HtmlComponent, _super);
|
|
236844
236823
|
function HtmlComponent() {
|
|
@@ -236971,17 +236950,10 @@
|
|
|
236971
236950
|
}
|
|
236972
236951
|
};
|
|
236973
236952
|
HtmlComponent.prototype.applyChildrenStyles = function (element, styles) {
|
|
236974
|
-
var _this = this;
|
|
236975
236953
|
each$2(styles, function (style, name) {
|
|
236976
236954
|
var elements = element.getElementsByClassName(name);
|
|
236977
236955
|
each$2(elements, function (el) {
|
|
236978
|
-
|
|
236979
|
-
// 在自定义容器下, 可以渲染 g2-tooltip 的样式, 以兼容线上场景, 但是不应该设置 visibility
|
|
236980
|
-
var newStyle = style;
|
|
236981
|
-
if (hasClass(el, CONTAINER_CLASS) && containerClassName === CONTAINER_CLASS_CUSTOM) {
|
|
236982
|
-
newStyle = __assign(__assign({}, style), { visibility: 'unset', position: 'unset' });
|
|
236983
|
-
}
|
|
236984
|
-
modifyCSS(el, newStyle);
|
|
236956
|
+
modifyCSS(el, style);
|
|
236985
236957
|
});
|
|
236986
236958
|
});
|
|
236987
236959
|
};
|
|
@@ -238673,14 +238645,14 @@
|
|
|
238673
238645
|
return LineCrosshair;
|
|
238674
238646
|
}(CrosshairBase));
|
|
238675
238647
|
|
|
238676
|
-
var CONTAINER_CLASS
|
|
238677
|
-
var CROSSHAIR_LINE = CONTAINER_CLASS
|
|
238678
|
-
var CROSSHAIR_TEXT = CONTAINER_CLASS
|
|
238648
|
+
var CONTAINER_CLASS = 'g2-crosshair';
|
|
238649
|
+
var CROSSHAIR_LINE = CONTAINER_CLASS + "-line";
|
|
238650
|
+
var CROSSHAIR_TEXT = CONTAINER_CLASS + "-text";
|
|
238679
238651
|
|
|
238680
238652
|
var _a$1;
|
|
238681
238653
|
var HtmlTheme = (_a$1 = {},
|
|
238682
238654
|
// css style for tooltip
|
|
238683
|
-
_a$1["" + CONTAINER_CLASS
|
|
238655
|
+
_a$1["" + CONTAINER_CLASS] = {
|
|
238684
238656
|
position: 'relative'
|
|
238685
238657
|
},
|
|
238686
238658
|
_a$1["" + CROSSHAIR_LINE] = {
|
|
@@ -238701,7 +238673,7 @@
|
|
|
238701
238673
|
}
|
|
238702
238674
|
HtmlCrosshair.prototype.getDefaultCfg = function () {
|
|
238703
238675
|
var cfg = _super.prototype.getDefaultCfg.call(this);
|
|
238704
|
-
return __assign(__assign({}, cfg), { name: 'crosshair', type: 'html', locationType: 'region', start: { x: 0, y: 0 }, end: { x: 0, y: 0 }, capture: false, text: null, containerTpl: "<div class=\"" + CONTAINER_CLASS
|
|
238676
|
+
return __assign(__assign({}, cfg), { name: 'crosshair', type: 'html', locationType: 'region', start: { x: 0, y: 0 }, end: { x: 0, y: 0 }, capture: false, text: null, containerTpl: "<div class=\"" + CONTAINER_CLASS + "\"></div>", crosshairTpl: "<div class=\"" + CROSSHAIR_LINE + "\"></div>", textTpl: "<span class=\"" + CROSSHAIR_TEXT + "\">{content}</span>", domStyles: null, containerClassName: CONTAINER_CLASS, defaultStyles: HtmlTheme, defaultCfg: {
|
|
238705
238677
|
text: {
|
|
238706
238678
|
position: 'start',
|
|
238707
238679
|
content: null,
|
|
@@ -240546,10 +240518,33 @@
|
|
|
240546
240518
|
return ContinueLegend;
|
|
240547
240519
|
}(LegendBase));
|
|
240548
240520
|
|
|
240521
|
+
var CONTAINER_CLASS$1 = 'g2-tooltip';
|
|
240522
|
+
var TITLE_CLASS = 'g2-tooltip-title';
|
|
240523
|
+
var LIST_CLASS = 'g2-tooltip-list';
|
|
240524
|
+
var LIST_ITEM_CLASS = 'g2-tooltip-list-item';
|
|
240525
|
+
var MARKER_CLASS = 'g2-tooltip-marker';
|
|
240526
|
+
var VALUE_CLASS = 'g2-tooltip-value';
|
|
240527
|
+
var NAME_CLASS = 'g2-tooltip-name';
|
|
240528
|
+
var CROSSHAIR_X = 'g2-tooltip-crosshair-x';
|
|
240529
|
+
var CROSSHAIR_Y = 'g2-tooltip-crosshair-y';
|
|
240530
|
+
|
|
240531
|
+
var CssConst = /*#__PURE__*/Object.freeze({
|
|
240532
|
+
__proto__: null,
|
|
240533
|
+
CONTAINER_CLASS: CONTAINER_CLASS$1,
|
|
240534
|
+
TITLE_CLASS: TITLE_CLASS,
|
|
240535
|
+
LIST_CLASS: LIST_CLASS,
|
|
240536
|
+
LIST_ITEM_CLASS: LIST_ITEM_CLASS,
|
|
240537
|
+
MARKER_CLASS: MARKER_CLASS,
|
|
240538
|
+
VALUE_CLASS: VALUE_CLASS,
|
|
240539
|
+
NAME_CLASS: NAME_CLASS,
|
|
240540
|
+
CROSSHAIR_X: CROSSHAIR_X,
|
|
240541
|
+
CROSSHAIR_Y: CROSSHAIR_Y
|
|
240542
|
+
});
|
|
240543
|
+
|
|
240549
240544
|
var _a$2;
|
|
240550
240545
|
var TooltipTheme = (_a$2 = {},
|
|
240551
240546
|
// css style for tooltip
|
|
240552
|
-
_a$2["" + CONTAINER_CLASS] = {
|
|
240547
|
+
_a$2["" + CONTAINER_CLASS$1] = {
|
|
240553
240548
|
position: 'absolute',
|
|
240554
240549
|
visibility: 'visible',
|
|
240555
240550
|
// @2018-07-25 by blue.lb 这里去掉浮动,火狐上存在样式错位
|
|
@@ -240567,13 +240562,6 @@
|
|
|
240567
240562
|
lineHeight: '20px',
|
|
240568
240563
|
padding: '10px 10px 6px 10px',
|
|
240569
240564
|
},
|
|
240570
|
-
_a$2["" + CONTAINER_CLASS_CUSTOM] = {
|
|
240571
|
-
position: 'absolute',
|
|
240572
|
-
zIndex: 8,
|
|
240573
|
-
transition: 'visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), ' +
|
|
240574
|
-
'left 0.4s cubic-bezier(0.23, 1, 0.32, 1), ' +
|
|
240575
|
-
'top 0.4s cubic-bezier(0.23, 1, 0.32, 1)',
|
|
240576
|
-
},
|
|
240577
240565
|
_a$2["" + TITLE_CLASS] = {
|
|
240578
240566
|
marginBottom: '4px',
|
|
240579
240567
|
},
|
|
@@ -240718,14 +240706,14 @@
|
|
|
240718
240706
|
}
|
|
240719
240707
|
Tooltip.prototype.getDefaultCfg = function () {
|
|
240720
240708
|
var cfg = _super.prototype.getDefaultCfg.call(this);
|
|
240721
|
-
return __assign(__assign({}, cfg), { name: 'tooltip', type: 'html', x: 0, y: 0, items: [], customContent: null, containerTpl: "<div class=\"" + CONTAINER_CLASS + "\"><div class=\"" + TITLE_CLASS + "\"></div><ul class=\"" + LIST_CLASS + "\"></ul></div>", itemTpl: "<li class=\"" + LIST_ITEM_CLASS + "\" data-index={index}>\n <span class=\"" + MARKER_CLASS + "\" style=\"background:{color}\"></span>\n <span class=\"" + NAME_CLASS + "\">{name}</span>:\n <span class=\"" + VALUE_CLASS + "\">{value}</span>\n </li>", xCrosshairTpl: "<div class=\"" + CROSSHAIR_X + "\"></div>", yCrosshairTpl: "<div class=\"" + CROSSHAIR_Y + "\"></div>", title: null, showTitle: true,
|
|
240709
|
+
return __assign(__assign({}, cfg), { name: 'tooltip', type: 'html', x: 0, y: 0, items: [], customContent: null, containerTpl: "<div class=\"" + CONTAINER_CLASS$1 + "\"><div class=\"" + TITLE_CLASS + "\"></div><ul class=\"" + LIST_CLASS + "\"></ul></div>", itemTpl: "<li class=\"" + LIST_ITEM_CLASS + "\" data-index={index}>\n <span class=\"" + MARKER_CLASS + "\" style=\"background:{color}\"></span>\n <span class=\"" + NAME_CLASS + "\">{name}</span>:\n <span class=\"" + VALUE_CLASS + "\">{value}</span>\n </li>", xCrosshairTpl: "<div class=\"" + CROSSHAIR_X + "\"></div>", yCrosshairTpl: "<div class=\"" + CROSSHAIR_Y + "\"></div>", title: null, showTitle: true,
|
|
240722
240710
|
/**
|
|
240723
240711
|
* tooltip 限制的区域
|
|
240724
240712
|
* @type {Region}
|
|
240725
240713
|
*/
|
|
240726
240714
|
region: null,
|
|
240727
240715
|
// crosshair 的限制区域
|
|
240728
|
-
crosshairsRegion: null, containerClassName: CONTAINER_CLASS,
|
|
240716
|
+
crosshairsRegion: null, containerClassName: CONTAINER_CLASS$1,
|
|
240729
240717
|
// x, y, xy
|
|
240730
240718
|
crosshairs: null, offset: 10, position: 'right', domStyles: null, defaultStyles: TooltipTheme });
|
|
240731
240719
|
};
|
|
@@ -240795,12 +240783,6 @@
|
|
|
240795
240783
|
display: display,
|
|
240796
240784
|
});
|
|
240797
240785
|
};
|
|
240798
|
-
Tooltip.prototype.setCustomContainer = function () {
|
|
240799
|
-
var customContainer = document.createElement('div');
|
|
240800
|
-
customContainer.className = CONTAINER_CLASS_CUSTOM;
|
|
240801
|
-
this.set('container', customContainer);
|
|
240802
|
-
this.set('containerClassName', CONTAINER_CLASS_CUSTOM);
|
|
240803
|
-
};
|
|
240804
240786
|
// 如有 customContent 则根据 customContent 设置 container
|
|
240805
240787
|
Tooltip.prototype.initContainer = function () {
|
|
240806
240788
|
_super.prototype.initContainer.call(this);
|
|
@@ -240808,11 +240790,9 @@
|
|
|
240808
240790
|
if (this.get('container')) {
|
|
240809
240791
|
this.get('container').remove();
|
|
240810
240792
|
}
|
|
240811
|
-
this.
|
|
240812
|
-
|
|
240813
|
-
|
|
240814
|
-
customContainer.appendChild(newContainer);
|
|
240815
|
-
this.get('parent').appendChild(customContainer);
|
|
240793
|
+
var container = this.getHtmlContentNode();
|
|
240794
|
+
this.get('parent').appendChild(container);
|
|
240795
|
+
this.set('container', container);
|
|
240816
240796
|
this.resetStyles();
|
|
240817
240797
|
this.applyStyles();
|
|
240818
240798
|
}
|
|
@@ -240867,22 +240847,16 @@
|
|
|
240867
240847
|
};
|
|
240868
240848
|
// 根据 customContent 渲染
|
|
240869
240849
|
Tooltip.prototype.renderCustomContent = function () {
|
|
240870
|
-
var
|
|
240871
|
-
var
|
|
240872
|
-
|
|
240873
|
-
|
|
240874
|
-
|
|
240875
|
-
this.setCustomContainer();
|
|
240876
|
-
oldContainer = this.get('container');
|
|
240877
|
-
var parent_1 = this.get('parent');
|
|
240878
|
-
var target = parent_1.querySelector("." + CONTAINER_CLASS);
|
|
240879
|
-
parent_1.removeChild(target);
|
|
240850
|
+
var node = this.getHtmlContentNode();
|
|
240851
|
+
var parent = this.get('parent');
|
|
240852
|
+
var curContainer = this.get('container');
|
|
240853
|
+
if (curContainer && curContainer.parentNode === parent) {
|
|
240854
|
+
parent.replaceChild(node, curContainer);
|
|
240880
240855
|
}
|
|
240881
|
-
|
|
240882
|
-
|
|
240883
|
-
if (existG2TooltipClass) {
|
|
240884
|
-
this.get('parent').appendChild(oldContainer);
|
|
240856
|
+
else {
|
|
240857
|
+
parent.appendChild(node);
|
|
240885
240858
|
}
|
|
240859
|
+
this.set('container', node);
|
|
240886
240860
|
this.resetStyles();
|
|
240887
240861
|
this.applyStyles();
|
|
240888
240862
|
};
|
|
@@ -245717,7 +245691,7 @@
|
|
|
245717
245691
|
},
|
|
245718
245692
|
// tooltip dom 样式
|
|
245719
245693
|
domStyles: (_a = {},
|
|
245720
|
-
_a["".concat(CONTAINER_CLASS)] = {
|
|
245694
|
+
_a["".concat(CONTAINER_CLASS$1)] = {
|
|
245721
245695
|
position: 'absolute',
|
|
245722
245696
|
visibility: 'hidden',
|
|
245723
245697
|
zIndex: 8,
|
|
@@ -268427,7 +268401,7 @@
|
|
|
268427
268401
|
crosshairs: null,
|
|
268428
268402
|
domStyles: __assign({}, deepMix({}, tooltipStyles, (_a = {},
|
|
268429
268403
|
// 超长的时候,tooltip tip 最大宽度为 50%,然后可以换行
|
|
268430
|
-
_a[CONTAINER_CLASS] = { 'max-width': '50%' },
|
|
268404
|
+
_a[CONTAINER_CLASS$1] = { 'max-width': '50%' },
|
|
268431
268405
|
_a[TITLE_CLASS] = { 'word-break': 'break-all' },
|
|
268432
268406
|
_a))),
|
|
268433
268407
|
});
|
|
@@ -269919,7 +269893,7 @@
|
|
|
269919
269893
|
ListRadio.prototype.renderTooltip = function () {
|
|
269920
269894
|
var _a;
|
|
269921
269895
|
var tooltipStyles = (_a = {},
|
|
269922
|
-
_a[CONTAINER_CLASS] = {
|
|
269896
|
+
_a[CONTAINER_CLASS$1] = {
|
|
269923
269897
|
padding: '6px 8px',
|
|
269924
269898
|
transform: 'translate(-50%, -80%)',
|
|
269925
269899
|
background: 'rgba(0,0,0,0.75)',
|
|
@@ -271380,7 +271354,7 @@
|
|
|
271380
271354
|
this.tooltip.update({
|
|
271381
271355
|
title: text || '',
|
|
271382
271356
|
customContent: function () {
|
|
271383
|
-
return "\n <div class=\"".concat(CONTAINER_CLASS, "\" style={").concat(descriptionTooltipStyle, "}>\n <div class=\"").concat(TITLE_CLASS, "\">\n \u5B57\u6BB5\u8BF4\u660E\uFF1A").concat(description, "\n </div>\n </div>\n ");
|
|
271357
|
+
return "\n <div class=\"".concat(CONTAINER_CLASS$1, "\" style={").concat(descriptionTooltipStyle, "}>\n <div class=\"").concat(TITLE_CLASS, "\">\n \u5B57\u6BB5\u8BF4\u660E\uFF1A").concat(description, "\n </div>\n </div>\n ");
|
|
271384
271358
|
},
|
|
271385
271359
|
x: x,
|
|
271386
271360
|
y: y,
|
|
@@ -271409,7 +271383,7 @@
|
|
|
271409
271383
|
containerId: AXIS_DESCRIPTION_TOOLTIP,
|
|
271410
271384
|
domStyles: __assign({}, deepMix({}, (_a = {},
|
|
271411
271385
|
// 超长的时候,tooltip tip 最大宽度为 50%,然后可以换行
|
|
271412
|
-
_a[CONTAINER_CLASS] = {
|
|
271386
|
+
_a[CONTAINER_CLASS$1] = {
|
|
271413
271387
|
'max-width': '50%',
|
|
271414
271388
|
padding: '10px',
|
|
271415
271389
|
'line-height': '15px',
|
|
@@ -292666,8 +292640,16 @@
|
|
|
292666
292640
|
onCancel = props.onCancel,
|
|
292667
292641
|
data = props.data,
|
|
292668
292642
|
columns = props.columns,
|
|
292669
|
-
selectInfo = props.selectInfo
|
|
292643
|
+
selectInfo = props.selectInfo,
|
|
292644
|
+
rowKey = props.rowKey,
|
|
292645
|
+
deepDataSource = props.deepDataSource;
|
|
292646
|
+
console.log(data, columns, '---props---', rowKey);
|
|
292647
|
+
var keyByCol = React.useMemo(function () {
|
|
292648
|
+
return lodash.keyBy(columns, 'dataIndex');
|
|
292649
|
+
}, [columns]);
|
|
292670
292650
|
var resultData = React.useMemo(function () {
|
|
292651
|
+
var _ref;
|
|
292652
|
+
|
|
292671
292653
|
var start = selectInfo.start,
|
|
292672
292654
|
end = selectInfo.end;
|
|
292673
292655
|
var rCol = columns === null || columns === void 0 ? void 0 : columns.filter(function (item, index) {
|
|
@@ -292684,14 +292666,14 @@
|
|
|
292684
292666
|
});
|
|
292685
292667
|
var maxi = Math.max(start.i, end.i);
|
|
292686
292668
|
var mini = Math.min(start.i, end.i);
|
|
292687
|
-
var rDataSource = data === null ||
|
|
292669
|
+
var rDataSource = (_ref = deepDataSource || data) === null || _ref === void 0 ? void 0 : _ref.filter(function (item, index) {
|
|
292688
292670
|
if (index >= mini && index <= maxi) {
|
|
292689
292671
|
return true;
|
|
292690
292672
|
}
|
|
292691
292673
|
|
|
292692
292674
|
return false;
|
|
292693
292675
|
}).map(function (item) {
|
|
292694
|
-
return lodash.pick(item, rCol);
|
|
292676
|
+
return lodash.pick(item, [].concat(_toConsumableArray$1(rCol), [rowKey]));
|
|
292695
292677
|
});
|
|
292696
292678
|
return {
|
|
292697
292679
|
rDataSource: rDataSource,
|
|
@@ -292716,6 +292698,7 @@
|
|
|
292716
292698
|
yField: yField
|
|
292717
292699
|
};
|
|
292718
292700
|
}, [resultData, getTypeCol]);
|
|
292701
|
+
console.log(Field, '--Field--', resultData);
|
|
292719
292702
|
var config = React.useMemo(function () {
|
|
292720
292703
|
if (type === 'pie') {
|
|
292721
292704
|
return {
|
|
@@ -292727,8 +292710,8 @@
|
|
|
292727
292710
|
label: {
|
|
292728
292711
|
type: 'inner',
|
|
292729
292712
|
offset: '-30%',
|
|
292730
|
-
content: function content(
|
|
292731
|
-
var percent =
|
|
292713
|
+
content: function content(_ref2) {
|
|
292714
|
+
var percent = _ref2.percent;
|
|
292732
292715
|
return "".concat((percent * 100).toFixed(0), "%");
|
|
292733
292716
|
},
|
|
292734
292717
|
style: {
|
|
@@ -292744,7 +292727,7 @@
|
|
|
292744
292727
|
|
|
292745
292728
|
return {
|
|
292746
292729
|
data: resultData.rDataSource,
|
|
292747
|
-
xField:
|
|
292730
|
+
xField: rowKey,
|
|
292748
292731
|
yField: Field.yField,
|
|
292749
292732
|
label: {
|
|
292750
292733
|
position: 'middle',
|
|
@@ -292753,8 +292736,24 @@
|
|
|
292753
292736
|
opacity: 0.6
|
|
292754
292737
|
}
|
|
292755
292738
|
},
|
|
292739
|
+
tooltip: {
|
|
292740
|
+
title: Field.xField,
|
|
292741
|
+
formatter: function formatter(datum) {
|
|
292742
|
+
var _keyByCol$Field$yFiel, _keyByCol$Field$yFiel2;
|
|
292743
|
+
|
|
292744
|
+
return {
|
|
292745
|
+
name: ((_keyByCol$Field$yFiel = keyByCol[Field.yField]) === null || _keyByCol$Field$yFiel === void 0 ? void 0 : _keyByCol$Field$yFiel.title) || ((_keyByCol$Field$yFiel2 = keyByCol[Field.yField]) === null || _keyByCol$Field$yFiel2 === void 0 ? void 0 : _keyByCol$Field$yFiel2.dataIndex),
|
|
292746
|
+
value: datum === null || datum === void 0 ? void 0 : datum[Field.yField]
|
|
292747
|
+
};
|
|
292748
|
+
}
|
|
292749
|
+
},
|
|
292756
292750
|
xAxis: {
|
|
292757
292751
|
label: {
|
|
292752
|
+
formatter: function formatter(text, item, index) {
|
|
292753
|
+
var _resultData$rDataSour, _resultData$rDataSour2;
|
|
292754
|
+
|
|
292755
|
+
return ((_resultData$rDataSour = resultData.rDataSource) === null || _resultData$rDataSour === void 0 ? void 0 : (_resultData$rDataSour2 = _resultData$rDataSour[index]) === null || _resultData$rDataSour2 === void 0 ? void 0 : _resultData$rDataSour2[Field.xField]) || text;
|
|
292756
|
+
},
|
|
292758
292757
|
autoHide: true,
|
|
292759
292758
|
autoRotate: false
|
|
292760
292759
|
}
|
|
@@ -292888,6 +292887,7 @@
|
|
|
292888
292887
|
|
|
292889
292888
|
var tempColumns = groupBy(dataSourceCopy, columnsCopy, groupColKeysCopy, null);
|
|
292890
292889
|
var keyMap = new Map();
|
|
292890
|
+
var __index = 0;
|
|
292891
292891
|
|
|
292892
292892
|
var dataSourceBy = function dataSourceBy(source) {
|
|
292893
292893
|
return [source.reduce(function (prev, sItem) {
|
|
@@ -292911,6 +292911,10 @@
|
|
|
292911
292911
|
}); // 对dataSource的key值进行更改:例如:'name' => 'name_xiaoming_age_18_address'
|
|
292912
292912
|
|
|
292913
292913
|
Object.keys(sItem).forEach(function (key) {
|
|
292914
|
+
if (key === '__index') {
|
|
292915
|
+
return;
|
|
292916
|
+
}
|
|
292917
|
+
|
|
292914
292918
|
var newKey = "".concat(str, "_").concat(key);
|
|
292915
292919
|
|
|
292916
292920
|
if (keyMap.has(newKey)) {
|
|
@@ -292923,8 +292927,9 @@
|
|
|
292923
292927
|
}
|
|
292924
292928
|
|
|
292925
292929
|
sItem[newKey] = sItem[key];
|
|
292926
|
-
sItem["".concat(newKey, "_originIndex")] = sItem.__index;
|
|
292930
|
+
sItem["".concat(newKey, "_originIndex")] = sItem.__index === undefined ? __index : sItem.__index;
|
|
292927
292931
|
});
|
|
292932
|
+
__index += 1;
|
|
292928
292933
|
}
|
|
292929
292934
|
|
|
292930
292935
|
if (!prev) {
|
|
@@ -292952,14 +292957,15 @@
|
|
|
292952
292957
|
var groupBy = function groupBy(lastFilter, oGroup, preKey) {
|
|
292953
292958
|
if (!(oGroup === null || oGroup === void 0 ? void 0 : oGroup.length)) return lastFilter;
|
|
292954
292959
|
var group = oGroup.slice();
|
|
292955
|
-
var filterKey = group.shift(); //
|
|
292960
|
+
var filterKey = group.shift(); // 记录数据原来的位置索引信息
|
|
292956
292961
|
|
|
292957
292962
|
var i = 0;
|
|
292958
292963
|
var map = lastFilter.reduce(function (acc, el) {
|
|
292959
|
-
el.__index = i;
|
|
292960
|
-
i += 1;
|
|
292961
292964
|
var value = el[filterKey];
|
|
292962
|
-
acc[value] = [].concat(_toConsumableArray$1(acc[value] || []), [el
|
|
292965
|
+
acc[value] = [].concat(_toConsumableArray$1(acc[value] || []), [_objectSpread(_objectSpread({}, el), {}, {
|
|
292966
|
+
__index: i
|
|
292967
|
+
})]);
|
|
292968
|
+
i += 1;
|
|
292963
292969
|
return acc;
|
|
292964
292970
|
}, {});
|
|
292965
292971
|
return Object.keys(map).map(function (item) {
|
|
@@ -293003,26 +293009,6 @@
|
|
|
293003
293009
|
isVaildCommit: mini <= i && maxi >= i || minj <= j && maxj >= j
|
|
293004
293010
|
};
|
|
293005
293011
|
}
|
|
293006
|
-
/**
|
|
293007
|
-
* 获取空行列表值数组
|
|
293008
|
-
* @param {Array} dataSourceWithGroup
|
|
293009
|
-
* @returns {Array}
|
|
293010
|
-
*/
|
|
293011
|
-
|
|
293012
|
-
function getSkipList(dataSourceWithGroup) {
|
|
293013
|
-
var skipList = dataSourceWithGroup.reduce(function (prev, cur) {
|
|
293014
|
-
if (!prev.length) {
|
|
293015
|
-
return cur._group ? [1] : [0];
|
|
293016
|
-
}
|
|
293017
|
-
|
|
293018
|
-
if (cur._group) {
|
|
293019
|
-
return [].concat(_toConsumableArray$1(prev), [prev[prev.length - 1] + 1]);
|
|
293020
|
-
}
|
|
293021
|
-
|
|
293022
|
-
return [].concat(_toConsumableArray$1(prev), [prev[prev.length - 1]]);
|
|
293023
|
-
}, []);
|
|
293024
|
-
return skipList;
|
|
293025
|
-
}
|
|
293026
293012
|
/**
|
|
293027
293013
|
* 获取选中行文本
|
|
293028
293014
|
* @param {Object}
|
|
@@ -293115,6 +293101,84 @@
|
|
|
293115
293101
|
dfs(dataSource);
|
|
293116
293102
|
return index;
|
|
293117
293103
|
}
|
|
293104
|
+
/**
|
|
293105
|
+
* 框选是否跨行分组
|
|
293106
|
+
* @param {number} i
|
|
293107
|
+
* @param {React.Ref} shellStatusRef
|
|
293108
|
+
* @param {React.Ref} deepDataSourceRef
|
|
293109
|
+
* @returns
|
|
293110
|
+
*/
|
|
293111
|
+
|
|
293112
|
+
function isSelectCrossRowGroup(i, shellStatusRef, deepDataSourceRef) {
|
|
293113
|
+
var _shellStatusRef$curre;
|
|
293114
|
+
|
|
293115
|
+
var x;
|
|
293116
|
+
var y;
|
|
293117
|
+
|
|
293118
|
+
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre = shellStatusRef.current) === null || _shellStatusRef$curre === void 0 ? void 0 : _shellStatusRef$curre.commiting.start.i) < i) {
|
|
293119
|
+
var _shellStatusRef$curre2;
|
|
293120
|
+
|
|
293121
|
+
x = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre2 = shellStatusRef.current) === null || _shellStatusRef$curre2 === void 0 ? void 0 : _shellStatusRef$curre2.commiting.start.i;
|
|
293122
|
+
y = i;
|
|
293123
|
+
} else {
|
|
293124
|
+
var _shellStatusRef$curre3;
|
|
293125
|
+
|
|
293126
|
+
x = i;
|
|
293127
|
+
y = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre3 = shellStatusRef.current) === null || _shellStatusRef$curre3 === void 0 ? void 0 : _shellStatusRef$curre3.commiting.start.i;
|
|
293128
|
+
}
|
|
293129
|
+
|
|
293130
|
+
for (; x <= y; x += 1) {
|
|
293131
|
+
var _deepDataSourceRef$cu;
|
|
293132
|
+
|
|
293133
|
+
if ((deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu = deepDataSourceRef.current) === null || _deepDataSourceRef$cu === void 0 ? void 0 : _deepDataSourceRef$cu.length) && (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current[x]._group)) {
|
|
293134
|
+
return true;
|
|
293135
|
+
}
|
|
293136
|
+
}
|
|
293137
|
+
|
|
293138
|
+
return false;
|
|
293139
|
+
}
|
|
293140
|
+
/**
|
|
293141
|
+
* 不允许跨无效列
|
|
293142
|
+
* @param {number} i
|
|
293143
|
+
* @param {number} j
|
|
293144
|
+
* @param {React.Ref} shellStatusRef
|
|
293145
|
+
* @param {React.Ref} deepDataSourceRef
|
|
293146
|
+
* @param {React.Ref} deepColumnsRef
|
|
293147
|
+
* @returns
|
|
293148
|
+
*/
|
|
293149
|
+
|
|
293150
|
+
function isSelectCrossInvalidCol(i, j, shellStatusRef, deepDataSourceRef, deepColumnsRef) {
|
|
293151
|
+
var _shellStatusRef$curre4;
|
|
293152
|
+
|
|
293153
|
+
var x;
|
|
293154
|
+
var y;
|
|
293155
|
+
|
|
293156
|
+
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre4 = shellStatusRef.current) === null || _shellStatusRef$curre4 === void 0 ? void 0 : _shellStatusRef$curre4.commiting.start.j) < j) {
|
|
293157
|
+
var _shellStatusRef$curre5;
|
|
293158
|
+
|
|
293159
|
+
x = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre5 = shellStatusRef.current) === null || _shellStatusRef$curre5 === void 0 ? void 0 : _shellStatusRef$curre5.commiting.start.j;
|
|
293160
|
+
y = j;
|
|
293161
|
+
} else {
|
|
293162
|
+
var _shellStatusRef$curre6;
|
|
293163
|
+
|
|
293164
|
+
x = j;
|
|
293165
|
+
y = shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre6 = shellStatusRef.current) === null || _shellStatusRef$curre6 === void 0 ? void 0 : _shellStatusRef$curre6.commiting.start.j;
|
|
293166
|
+
}
|
|
293167
|
+
|
|
293168
|
+
for (; x <= y; x += 1) {
|
|
293169
|
+
var _deepColumnsRef$curre, _deepDataSourceRef$cu2;
|
|
293170
|
+
|
|
293171
|
+
if ((deepColumnsRef === null || deepColumnsRef === void 0 ? void 0 : (_deepColumnsRef$curre = deepColumnsRef.current) === null || _deepColumnsRef$curre === void 0 ? void 0 : _deepColumnsRef$curre.length) && (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu2 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu2 === void 0 ? void 0 : _deepDataSourceRef$cu2.length)) {
|
|
293172
|
+
var key = deepColumnsRef === null || deepColumnsRef === void 0 ? void 0 : deepColumnsRef.current[x].dataIndex;
|
|
293173
|
+
|
|
293174
|
+
if (!(key in (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current[i]))) {
|
|
293175
|
+
return true;
|
|
293176
|
+
}
|
|
293177
|
+
}
|
|
293178
|
+
}
|
|
293179
|
+
|
|
293180
|
+
return false;
|
|
293181
|
+
}
|
|
293118
293182
|
|
|
293119
293183
|
// 表格基础配置文件
|
|
293120
293184
|
// 行选择
|
|
@@ -293397,6 +293461,12 @@
|
|
|
293397
293461
|
return ((_Object$keys = Object.keys(obj || {})) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) === 0;
|
|
293398
293462
|
};
|
|
293399
293463
|
|
|
293464
|
+
var defaultParsePaste = function defaultParsePaste(str) {
|
|
293465
|
+
return str.split(/\r\n|\n|\r/).map(function (row) {
|
|
293466
|
+
return row.split('\t');
|
|
293467
|
+
});
|
|
293468
|
+
}; // const DragHandle = SortableHandle(() => <MenuOutlined style={{ cursor: 'grab', color: '#999' }} />);
|
|
293469
|
+
|
|
293400
293470
|
|
|
293401
293471
|
var DragHandle = sortableHandle(function () {
|
|
293402
293472
|
return /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
@@ -293492,12 +293562,6 @@
|
|
|
293492
293562
|
|
|
293493
293563
|
var deepDataSourceRef = React.useRef([]);
|
|
293494
293564
|
var deepColumnsRef = React.useRef([]);
|
|
293495
|
-
/** 行分组表格对应数据的隐藏数列表 */
|
|
293496
|
-
|
|
293497
|
-
var hideListRef = React.useRef([]);
|
|
293498
|
-
/** 行分组的空行列表数据 */
|
|
293499
|
-
|
|
293500
|
-
var skipListRef = React.useRef([]);
|
|
293501
293565
|
/** 记录最原始数据 */
|
|
293502
293566
|
|
|
293503
293567
|
React.useEffect(function () {
|
|
@@ -293531,8 +293595,7 @@
|
|
|
293531
293595
|
setExpandedRowKeys([]);
|
|
293532
293596
|
deepDataSourceRef.current = [];
|
|
293533
293597
|
deepColumnsRef.current = [];
|
|
293534
|
-
|
|
293535
|
-
}, [groupRowKeys]);
|
|
293598
|
+
}, [groupRowKeys, groupColKeys]);
|
|
293536
293599
|
/** sheel数据的表格 */
|
|
293537
293600
|
|
|
293538
293601
|
var _useState9 = React.useState({
|
|
@@ -293616,46 +293679,18 @@
|
|
|
293616
293679
|
React.useEffect(function () {
|
|
293617
293680
|
var source = [];
|
|
293618
293681
|
|
|
293619
|
-
var dfs = function dfs(children) {
|
|
293620
|
-
var num = 0;
|
|
293621
|
-
children.forEach(function (item) {
|
|
293622
|
-
if (item.children) {
|
|
293623
|
-
num += dfs(item.children);
|
|
293624
|
-
} else {
|
|
293625
|
-
num += 1;
|
|
293626
|
-
}
|
|
293627
|
-
});
|
|
293628
|
-
return num;
|
|
293629
|
-
};
|
|
293630
|
-
|
|
293631
|
-
var hideList = [];
|
|
293632
|
-
|
|
293633
293682
|
var deepChildren = function deepChildren(arr) {
|
|
293634
293683
|
arr.forEach(function (item) {
|
|
293635
|
-
source.push(lodash.omit(item, 'children'));
|
|
293636
|
-
var prev = hideList.length ? hideList[hideList.length - 1] : 0; // 展开
|
|
293684
|
+
source.push(lodash.omit(item, 'children')); // 展开
|
|
293637
293685
|
|
|
293638
293686
|
if ((item === null || item === void 0 ? void 0 : item.children) && expandedRowKeys.includes(item.key)) {
|
|
293639
|
-
hideList.push(prev);
|
|
293640
293687
|
deepChildren(item === null || item === void 0 ? void 0 : item.children);
|
|
293641
|
-
} // 隐藏
|
|
293642
|
-
|
|
293643
|
-
|
|
293644
|
-
if ((item === null || item === void 0 ? void 0 : item.children) && !expandedRowKeys.includes(item.key)) {
|
|
293645
|
-
var count = dfs(item.children);
|
|
293646
|
-
hideList.push(count + prev);
|
|
293647
|
-
}
|
|
293648
|
-
|
|
293649
|
-
if (!(item === null || item === void 0 ? void 0 : item.children)) {
|
|
293650
|
-
hideList.push(prev);
|
|
293651
293688
|
}
|
|
293652
293689
|
});
|
|
293653
293690
|
};
|
|
293654
293691
|
|
|
293655
293692
|
deepChildren(dataSource);
|
|
293656
293693
|
deepDataSourceRef.current = source;
|
|
293657
|
-
hideListRef.current = hideList;
|
|
293658
|
-
skipListRef.current = getSkipList((groupRowKeys === null || groupRowKeys === void 0 ? void 0 : groupRowKeys.length) ? deepDataSourceRef.current : dataSource);
|
|
293659
293694
|
}, [dataSource, expandedRowKeys]); // 列分组数据铺平,在框选时获取数据使用
|
|
293660
293695
|
|
|
293661
293696
|
React.useEffect(function () {
|
|
@@ -293768,7 +293803,11 @@
|
|
|
293768
293803
|
isEditing: (editing === null || editing === void 0 ? void 0 : editing.i) === i && (editing === null || editing === void 0 ? void 0 : editing.j) === j,
|
|
293769
293804
|
|
|
293770
293805
|
/** 是否有效拉伸 */
|
|
293771
|
-
isVaildCommit: isEmpty$1(commiting) ? false : isSelected && !checkIsSelectd(i, j, commiting === null || commiting === void 0 ? void 0 : commiting.start, commiting === null || commiting === void 0 ? void 0 : commiting.end)
|
|
293806
|
+
isVaildCommit: isEmpty$1(commiting) ? false : isSelected && !checkIsSelectd(i, j, commiting === null || commiting === void 0 ? void 0 : commiting.start, commiting === null || commiting === void 0 ? void 0 : commiting.end),
|
|
293807
|
+
|
|
293808
|
+
/** 是否选中只读框 */
|
|
293809
|
+
// TODO
|
|
293810
|
+
selectedReadonly: true
|
|
293772
293811
|
};
|
|
293773
293812
|
};
|
|
293774
293813
|
/** 获取框选的数据 */
|
|
@@ -293797,40 +293836,36 @@
|
|
|
293797
293836
|
|
|
293798
293837
|
|
|
293799
293838
|
var handleCopy = function handleCopy(e) {
|
|
293800
|
-
var
|
|
293801
|
-
|
|
293802
|
-
if (isEmpty$1((_shellStatusRef$curre2 = shellStatusRef.current) === null || _shellStatusRef$curre2 === void 0 ? void 0 : _shellStatusRef$curre2.editing)) {
|
|
293803
|
-
var _e$clipboardData;
|
|
293839
|
+
var _e$clipboardData;
|
|
293804
293840
|
|
|
293805
|
-
|
|
293806
|
-
|
|
293807
|
-
|
|
293808
|
-
|
|
293809
|
-
|
|
293810
|
-
|
|
293811
|
-
|
|
293812
|
-
|
|
293813
|
-
|
|
293814
|
-
|
|
293815
|
-
|
|
293816
|
-
|
|
293841
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
293842
|
+
var _shellStatusRef$curre2 = shellStatusRef.current,
|
|
293843
|
+
start = _shellStatusRef$curre2.start,
|
|
293844
|
+
end = _shellStatusRef$curre2.end;
|
|
293845
|
+
var text = getSelectDatas(start, end);
|
|
293846
|
+
|
|
293847
|
+
if (window.clipboardData && window.clipboardData.setData) {
|
|
293848
|
+
window.clipboardData.setData('Text', text);
|
|
293849
|
+
} else if ((_e$clipboardData = e.clipboardData) === null || _e$clipboardData === void 0 ? void 0 : _e$clipboardData.setData) {
|
|
293850
|
+
e.clipboardData.setData('text/plain', text);
|
|
293851
|
+
} else {
|
|
293852
|
+
var _document;
|
|
293817
293853
|
|
|
293818
|
-
|
|
293854
|
+
(_document = document) === null || _document === void 0 ? void 0 : _document.execCommand('copy');
|
|
293819
293855
|
|
|
293820
|
-
|
|
293821
|
-
|
|
293822
|
-
}
|
|
293856
|
+
if (contextMenuStatus) {
|
|
293857
|
+
setContextMenuStatus(false);
|
|
293823
293858
|
}
|
|
293824
293859
|
}
|
|
293825
293860
|
};
|
|
293826
293861
|
|
|
293827
293862
|
var onMouseOver = function onMouseOver(i, j) {
|
|
293828
|
-
var _shellStatusRef$
|
|
293863
|
+
var _shellStatusRef$curre3, _shellStatusRef$curre6, _checkStatus, _shellStatusRef$curre7;
|
|
293829
293864
|
|
|
293830
|
-
if (isEmpty$1(shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$
|
|
293831
|
-
var _shellStatusRef$
|
|
293865
|
+
if (isEmpty$1(shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre3 = shellStatusRef.current) === null || _shellStatusRef$curre3 === void 0 ? void 0 : _shellStatusRef$curre3.commiting)) {
|
|
293866
|
+
var _shellStatusRef$curre4, _shellStatusRef$curre5;
|
|
293832
293867
|
|
|
293833
|
-
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$
|
|
293868
|
+
if ((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre4 = shellStatusRef.current) === null || _shellStatusRef$curre4 === void 0 ? void 0 : _shellStatusRef$curre4.selecting) && isEmpty$1(shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre5 = shellStatusRef.current) === null || _shellStatusRef$curre5 === void 0 ? void 0 : _shellStatusRef$curre5.editing)) {
|
|
293834
293869
|
shellStatusRef.current = _objectSpread(_objectSpread({}, shellStatusRef.current), {}, {
|
|
293835
293870
|
end: {
|
|
293836
293871
|
i: i,
|
|
@@ -293844,7 +293879,15 @@
|
|
|
293844
293879
|
}
|
|
293845
293880
|
}));
|
|
293846
293881
|
}
|
|
293847
|
-
} else if (!isEmpty$1((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$
|
|
293882
|
+
} else if (!isEmpty$1((shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre6 = shellStatusRef.current) === null || _shellStatusRef$curre6 === void 0 ? void 0 : _shellStatusRef$curre6.commiting) || {}) && ((_checkStatus = checkStatus(i, j, shellStatusRef === null || shellStatusRef === void 0 ? void 0 : (_shellStatusRef$curre7 = shellStatusRef.current) === null || _shellStatusRef$curre7 === void 0 ? void 0 : _shellStatusRef$curre7.commiting)) === null || _checkStatus === void 0 ? void 0 : _checkStatus.isVaildCommit)) {
|
|
293883
|
+
if (isSelectCrossRowGroup(i, shellStatusRef, deepDataSourceRef)) {
|
|
293884
|
+
return;
|
|
293885
|
+
}
|
|
293886
|
+
|
|
293887
|
+
if (isSelectCrossInvalidCol(i, j, shellStatusRef, deepDataSourceRef, deepColumnsRef)) {
|
|
293888
|
+
return;
|
|
293889
|
+
}
|
|
293890
|
+
|
|
293848
293891
|
shellStatusRef.current = _objectSpread(_objectSpread({}, shellStatusRef.current), {}, {
|
|
293849
293892
|
end: {
|
|
293850
293893
|
i: i,
|
|
@@ -293858,6 +293901,49 @@
|
|
|
293858
293901
|
}
|
|
293859
293902
|
}));
|
|
293860
293903
|
}
|
|
293904
|
+
}; // 通过表格的行列索引,获取对应的原始数据的item信息
|
|
293905
|
+
|
|
293906
|
+
|
|
293907
|
+
var getSourceItemInfo = function getSourceItemInfo(trIndex, tdIndex) {
|
|
293908
|
+
var innerColumns = (groupColKeys === null || groupColKeys === void 0 ? void 0 : groupColKeys.length) ? deepColumnsRef.current : columns;
|
|
293909
|
+
var columnsKeysList = innerColumns.map(function (item) {
|
|
293910
|
+
return item.dataIndex;
|
|
293911
|
+
});
|
|
293912
|
+
var key = columnsKeysList[tdIndex];
|
|
293913
|
+
var index;
|
|
293914
|
+
var nil = {
|
|
293915
|
+
index: -1,
|
|
293916
|
+
key: undefined
|
|
293917
|
+
};
|
|
293918
|
+
|
|
293919
|
+
if (key === undefined) {
|
|
293920
|
+
return nil;
|
|
293921
|
+
} // 列分组的情况下
|
|
293922
|
+
|
|
293923
|
+
|
|
293924
|
+
if (groupColKeys === null || groupColKeys === void 0 ? void 0 : groupColKeys.length) {
|
|
293925
|
+
var _deepDataSourceRef$cu;
|
|
293926
|
+
|
|
293927
|
+
if ((groupRowKeys === null || groupRowKeys === void 0 ? void 0 : groupRowKeys.length) && (deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu = deepDataSourceRef.current) === null || _deepDataSourceRef$cu === void 0 ? void 0 : _deepDataSourceRef$cu[trIndex]._group)) {
|
|
293928
|
+
return nil;
|
|
293929
|
+
}
|
|
293930
|
+
|
|
293931
|
+
index = getDataSourceIndex({
|
|
293932
|
+
key: key,
|
|
293933
|
+
dataSource: dataSource
|
|
293934
|
+
});
|
|
293935
|
+
var arr = key.split('_');
|
|
293936
|
+
key = arr[arr.length - 2];
|
|
293937
|
+
} else if (groupRowKeys.length) {
|
|
293938
|
+
index = deepDataSourceRef.current[trIndex].__index;
|
|
293939
|
+
} else {
|
|
293940
|
+
index = trIndex;
|
|
293941
|
+
}
|
|
293942
|
+
|
|
293943
|
+
return {
|
|
293944
|
+
index: index,
|
|
293945
|
+
key: key
|
|
293946
|
+
};
|
|
293861
293947
|
};
|
|
293862
293948
|
/** sheel 表格 鼠标松开 */
|
|
293863
293949
|
|
|
@@ -293865,30 +293951,31 @@
|
|
|
293865
293951
|
|
|
293866
293952
|
|
|
293867
293953
|
var sheelOnMouseUp = function sheelOnMouseUp() {
|
|
293868
|
-
var _shellStatusRef$
|
|
293954
|
+
var _shellStatusRef$curre8;
|
|
293869
293955
|
|
|
293870
293956
|
console.log('mouseup_start', shellStatusRef.current);
|
|
293871
293957
|
|
|
293872
|
-
if (!isEmpty$1((_shellStatusRef$
|
|
293958
|
+
if (!isEmpty$1((_shellStatusRef$curre8 = shellStatusRef.current) === null || _shellStatusRef$curre8 === void 0 ? void 0 : _shellStatusRef$curre8.commiting)) {
|
|
293873
293959
|
var _commiting$start, _commiting$end, _commiting$start2, _commiting$end2, _difference, _difference2, _obj$i;
|
|
293874
293960
|
|
|
293875
|
-
var _shellStatusRef$
|
|
293876
|
-
start = _shellStatusRef$
|
|
293877
|
-
end = _shellStatusRef$
|
|
293878
|
-
commiting = _shellStatusRef$
|
|
293961
|
+
var _shellStatusRef$curre9 = shellStatusRef.current,
|
|
293962
|
+
start = _shellStatusRef$curre9.start,
|
|
293963
|
+
end = _shellStatusRef$curre9.end,
|
|
293964
|
+
commiting = _shellStatusRef$curre9.commiting; //
|
|
293879
293965
|
|
|
293880
293966
|
var innerColumns = (groupColKeys === null || groupColKeys === void 0 ? void 0 : groupColKeys.length) ? deepColumnsRef.current : columns;
|
|
293881
293967
|
var innerDataSource = (groupRowKeys === null || groupRowKeys === void 0 ? void 0 : groupRowKeys.length) ? deepDataSourceRef.current : dataSource; //
|
|
293882
293968
|
|
|
293883
293969
|
var columnsKeysList = innerColumns.map(function (item) {
|
|
293884
293970
|
return item.dataIndex;
|
|
293885
|
-
}); //
|
|
293971
|
+
}); // 行文本
|
|
293886
293972
|
|
|
293887
293973
|
var rowtext = getSelectionRowText({
|
|
293888
293974
|
selection: commiting,
|
|
293889
293975
|
columnsKeysList: columnsKeysList,
|
|
293890
293976
|
dataSource: innerDataSource
|
|
293891
|
-
});
|
|
293977
|
+
}); // 列文本
|
|
293978
|
+
|
|
293892
293979
|
var coltext = getSelectionColText({
|
|
293893
293980
|
selection: commiting,
|
|
293894
293981
|
columns: innerColumns,
|
|
@@ -293935,20 +294022,17 @@
|
|
|
293935
294022
|
var _isSelected;
|
|
293936
294023
|
|
|
293937
294024
|
if ((_isSelected = isSelected(tri, tdj)) === null || _isSelected === void 0 ? void 0 : _isSelected.isSelected) {
|
|
293938
|
-
var
|
|
293939
|
-
var sourceIndex; // 列分组的情况下
|
|
294025
|
+
var _deepColumnsRef$curre, _deepColumnsRef$curre2;
|
|
293940
294026
|
|
|
293941
|
-
|
|
293942
|
-
|
|
293943
|
-
|
|
293944
|
-
dataSource: dataSource
|
|
293945
|
-
});
|
|
293946
|
-
var arr = key.split('_');
|
|
293947
|
-
key = arr[arr.length - 2];
|
|
293948
|
-
} else {
|
|
293949
|
-
sourceIndex = tri - skipListRef.current[tri] + hideListRef.current[tri];
|
|
294027
|
+
// 只读列无法修改其内容
|
|
294028
|
+
if (deepColumnsRef === null || deepColumnsRef === void 0 ? void 0 : (_deepColumnsRef$curre = deepColumnsRef.current) === null || _deepColumnsRef$curre === void 0 ? void 0 : (_deepColumnsRef$curre2 = _deepColumnsRef$curre[tdj]) === null || _deepColumnsRef$curre2 === void 0 ? void 0 : _deepColumnsRef$curre2.readOnly) {
|
|
294029
|
+
return;
|
|
293950
294030
|
}
|
|
293951
294031
|
|
|
294032
|
+
var _getSourceItemInfo = getSourceItemInfo(tri, tdj),
|
|
294033
|
+
sourceIndex = _getSourceItemInfo.index,
|
|
294034
|
+
key = _getSourceItemInfo.key;
|
|
294035
|
+
|
|
293952
294036
|
if (sourceIndex < 0 || sourceIndex >= data.length) {
|
|
293953
294037
|
return;
|
|
293954
294038
|
} // 行替换
|
|
@@ -293997,9 +294081,9 @@
|
|
|
293997
294081
|
|
|
293998
294082
|
|
|
293999
294083
|
var handleCut = function handleCut(e) {
|
|
294000
|
-
var _shellStatusRef$
|
|
294084
|
+
var _shellStatusRef$curre10;
|
|
294001
294085
|
|
|
294002
|
-
if (isEmpty$1((_shellStatusRef$
|
|
294086
|
+
if (isEmpty$1((_shellStatusRef$curre10 = shellStatusRef.current) === null || _shellStatusRef$curre10 === void 0 ? void 0 : _shellStatusRef$curre10.editing)) {
|
|
294003
294087
|
e.preventDefault();
|
|
294004
294088
|
handleCopy(e);
|
|
294005
294089
|
/** 暂时先不隐藏 */
|
|
@@ -294012,42 +294096,70 @@
|
|
|
294012
294096
|
/** TODO: 在分组的情况,需要排除_group行的数据转换 */
|
|
294013
294097
|
|
|
294014
294098
|
|
|
294015
|
-
var handlePaste = function handlePaste(e) {
|
|
294016
|
-
|
|
294017
|
-
|
|
294018
|
-
|
|
294019
|
-
|
|
294020
|
-
|
|
294021
|
-
|
|
294022
|
-
|
|
294023
|
-
|
|
294024
|
-
|
|
294025
|
-
|
|
294026
|
-
|
|
294027
|
-
|
|
294028
|
-
|
|
294029
|
-
|
|
294030
|
-
|
|
294031
|
-
|
|
294032
|
-
|
|
294033
|
-
|
|
294034
|
-
|
|
294035
|
-
|
|
294036
|
-
|
|
294037
|
-
|
|
294038
|
-
|
|
294039
|
-
|
|
294040
|
-
|
|
294041
|
-
|
|
294042
|
-
|
|
294043
|
-
|
|
294044
|
-
|
|
294045
|
-
|
|
294046
|
-
|
|
294047
|
-
|
|
294048
|
-
|
|
294049
|
-
|
|
294050
|
-
|
|
294099
|
+
var handlePaste = function handlePaste(e) {
|
|
294100
|
+
var _shellStatusRef$curre11;
|
|
294101
|
+
|
|
294102
|
+
if (isEmpty$1((_shellStatusRef$curre11 = shellStatusRef.current) === null || _shellStatusRef$curre11 === void 0 ? void 0 : _shellStatusRef$curre11.editing)) {
|
|
294103
|
+
var _shellStatusRef$curre12 = shellStatusRef.current,
|
|
294104
|
+
start = _shellStatusRef$curre12.start,
|
|
294105
|
+
end = _shellStatusRef$curre12.end;
|
|
294106
|
+
start = {
|
|
294107
|
+
i: Math.min(start.i, end.i),
|
|
294108
|
+
j: Math.min(start.j, end.j)
|
|
294109
|
+
};
|
|
294110
|
+
end = {
|
|
294111
|
+
i: Math.max(start.i, end.i),
|
|
294112
|
+
j: Math.max(start.j, end.j)
|
|
294113
|
+
};
|
|
294114
|
+
var parse = defaultParsePaste;
|
|
294115
|
+
var pasteData = [];
|
|
294116
|
+
|
|
294117
|
+
if (window.clipboardData && window.clipboardData.getData) {
|
|
294118
|
+
// IE
|
|
294119
|
+
pasteData = parse(window.clipboardData.getData('Text'));
|
|
294120
|
+
} else if (e.clipboardData && e.clipboardData.getData) {
|
|
294121
|
+
pasteData = parse(e.clipboardData.getData('text/plain'));
|
|
294122
|
+
} // in order of preference
|
|
294123
|
+
|
|
294124
|
+
|
|
294125
|
+
var resultEnd = [];
|
|
294126
|
+
pasteData.forEach(function (row, i) {
|
|
294127
|
+
row.forEach(function (value, j) {
|
|
294128
|
+
resultEnd.push({
|
|
294129
|
+
i: start.i + i,
|
|
294130
|
+
j: start.j + j,
|
|
294131
|
+
value: value
|
|
294132
|
+
});
|
|
294133
|
+
});
|
|
294134
|
+
});
|
|
294135
|
+
var res = fn(dataSourceRef.current, function (draft) {
|
|
294136
|
+
resultEnd.forEach(function (item) {
|
|
294137
|
+
var _isSelected2;
|
|
294138
|
+
|
|
294139
|
+
if ((_isSelected2 = isSelected(item.i, item.j)) === null || _isSelected2 === void 0 ? void 0 : _isSelected2.isSelected) {
|
|
294140
|
+
var _getSourceItemInfo2 = getSourceItemInfo(item.i, item.j),
|
|
294141
|
+
index = _getSourceItemInfo2.index,
|
|
294142
|
+
key = _getSourceItemInfo2.key;
|
|
294143
|
+
|
|
294144
|
+
if (index < 0 || index >= draft.length) {
|
|
294145
|
+
return;
|
|
294146
|
+
}
|
|
294147
|
+
|
|
294148
|
+
draft[index][key] = item.value;
|
|
294149
|
+
}
|
|
294150
|
+
});
|
|
294151
|
+
});
|
|
294152
|
+
/** 只有开通了编辑权限之后才可以 */
|
|
294153
|
+
|
|
294154
|
+
if (editSheet) {
|
|
294155
|
+
dataChange === null || dataChange === void 0 ? void 0 : dataChange(res);
|
|
294156
|
+
}
|
|
294157
|
+
} // 修复重复问题
|
|
294158
|
+
|
|
294159
|
+
|
|
294160
|
+
document.removeEventListener('paste', handlePaste);
|
|
294161
|
+
document.removeEventListener('copy', handleCopy);
|
|
294162
|
+
document.removeEventListener('cut', handleCut);
|
|
294051
294163
|
};
|
|
294052
294164
|
|
|
294053
294165
|
var pageClick = function pageClick(e) {
|
|
@@ -294091,13 +294203,13 @@
|
|
|
294091
294203
|
|
|
294092
294204
|
|
|
294093
294205
|
var sheelMouseDown = function sheelMouseDown(i, j, e, commitStatus) {
|
|
294094
|
-
var _shellStatusRef$
|
|
294206
|
+
var _shellStatusRef$curre13, _shellStatusRef$curre14, _shellStatusRef$curre15, _shellStatusRef$curre16, _shellStatusRef$curre17, _shellStatusRef$curre18, _shellStatusRef$curre19, _shellStatusRef$curre20, _shellStatusRef$curre21, _shellStatusRef$curre22;
|
|
294095
294207
|
|
|
294096
|
-
var isNowEditingSameCell = !isEmpty$1((_shellStatusRef$
|
|
294097
|
-
var editing = isEmpty$1((_shellStatusRef$
|
|
294208
|
+
var isNowEditingSameCell = !isEmpty$1((_shellStatusRef$curre13 = shellStatusRef.current) === null || _shellStatusRef$curre13 === void 0 ? void 0 : _shellStatusRef$curre13.editing) && ((_shellStatusRef$curre14 = shellStatusRef.current) === null || _shellStatusRef$curre14 === void 0 ? void 0 : _shellStatusRef$curre14.editing.i) === i && ((_shellStatusRef$curre15 = shellStatusRef.current) === null || _shellStatusRef$curre15 === void 0 ? void 0 : _shellStatusRef$curre15.editing.j) === j;
|
|
294209
|
+
var editing = isEmpty$1((_shellStatusRef$curre16 = shellStatusRef.current) === null || _shellStatusRef$curre16 === void 0 ? void 0 : _shellStatusRef$curre16.editing) || ((_shellStatusRef$curre17 = shellStatusRef.current) === null || _shellStatusRef$curre17 === void 0 ? void 0 : _shellStatusRef$curre17.editing.i) !== i || ((_shellStatusRef$curre18 = shellStatusRef.current) === null || _shellStatusRef$curre18 === void 0 ? void 0 : _shellStatusRef$curre18.editing.j) !== j ? {} : (_shellStatusRef$curre19 = shellStatusRef.current) === null || _shellStatusRef$curre19 === void 0 ? void 0 : _shellStatusRef$curre19.editing;
|
|
294098
294210
|
shellStatusRef.current = {
|
|
294099
294211
|
selecting: !isNowEditingSameCell,
|
|
294100
|
-
start: (e === null || e === void 0 ? void 0 : e.shiftKey) || commitStatus ? (_shellStatusRef$
|
|
294212
|
+
start: (e === null || e === void 0 ? void 0 : e.shiftKey) || commitStatus ? (_shellStatusRef$curre20 = shellStatusRef.current) === null || _shellStatusRef$curre20 === void 0 ? void 0 : _shellStatusRef$curre20.start : {
|
|
294101
294213
|
i: i,
|
|
294102
294214
|
j: j
|
|
294103
294215
|
},
|
|
@@ -294108,7 +294220,7 @@
|
|
|
294108
294220
|
editing: editing,
|
|
294109
294221
|
forceEdit: !!isNowEditingSameCell,
|
|
294110
294222
|
commiting: commitStatus ? {
|
|
294111
|
-
start: (_shellStatusRef$
|
|
294223
|
+
start: (_shellStatusRef$curre21 = shellStatusRef.current) === null || _shellStatusRef$curre21 === void 0 ? void 0 : _shellStatusRef$curre21.start,
|
|
294112
294224
|
end: {
|
|
294113
294225
|
i: i,
|
|
294114
294226
|
j: j
|
|
@@ -294121,7 +294233,7 @@
|
|
|
294121
294233
|
setCommitIng(true);
|
|
294122
294234
|
}
|
|
294123
294235
|
|
|
294124
|
-
if (isEmpty$1((_shellStatusRef$
|
|
294236
|
+
if (isEmpty$1((_shellStatusRef$curre22 = shellStatusRef.current) === null || _shellStatusRef$curre22 === void 0 ? void 0 : _shellStatusRef$curre22.editing)) {
|
|
294125
294237
|
setEditIng(false);
|
|
294126
294238
|
}
|
|
294127
294239
|
|
|
@@ -294137,9 +294249,9 @@
|
|
|
294137
294249
|
var onContextMenu = function onContextMenu(evt, i, j) {
|
|
294138
294250
|
console.log(evt, i, j, '222');
|
|
294139
294251
|
evt.preventDefault();
|
|
294140
|
-
var _shellStatusRef$
|
|
294141
|
-
start = _shellStatusRef$
|
|
294142
|
-
end = _shellStatusRef$
|
|
294252
|
+
var _shellStatusRef$curre23 = shellStatusRef.current,
|
|
294253
|
+
start = _shellStatusRef$curre23.start,
|
|
294254
|
+
end = _shellStatusRef$curre23.end;
|
|
294143
294255
|
/** 如果表格当前没有选择,则把当前的右击的td块默认选中 */
|
|
294144
294256
|
|
|
294145
294257
|
if (isEmpty$1(start) && isEmpty$1(end)) {
|
|
@@ -294194,11 +294306,18 @@
|
|
|
294194
294306
|
}
|
|
294195
294307
|
};
|
|
294196
294308
|
|
|
294197
|
-
var dataSourceChange = function dataSourceChange(i, j,
|
|
294198
|
-
|
|
294199
|
-
|
|
294309
|
+
var dataSourceChange = function dataSourceChange(i, j, value) {
|
|
294310
|
+
var _getSourceItemInfo3 = getSourceItemInfo(i, j),
|
|
294311
|
+
index = _getSourceItemInfo3.index,
|
|
294312
|
+
key = _getSourceItemInfo3.key;
|
|
294313
|
+
|
|
294314
|
+
if (index < 0 || index >= dataSourceRef.current.length) {
|
|
294315
|
+
return;
|
|
294316
|
+
} // 表格中的行数 转化为 对应的数据源索引
|
|
294317
|
+
|
|
294318
|
+
|
|
294200
294319
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
294201
|
-
draft[
|
|
294320
|
+
draft[index][key] = value;
|
|
294202
294321
|
});
|
|
294203
294322
|
dataChange === null || dataChange === void 0 ? void 0 : dataChange(res);
|
|
294204
294323
|
shellStatusRef.current = _objectSpread(_objectSpread({}, shellStatusRef.current), {}, {
|
|
@@ -294228,6 +294347,7 @@
|
|
|
294228
294347
|
|
|
294229
294348
|
if (col.children && col.children.length) {
|
|
294230
294349
|
traverseColumns(col.children);
|
|
294350
|
+
return;
|
|
294231
294351
|
} else {
|
|
294232
294352
|
// $_ 开头表示私有属性
|
|
294233
294353
|
col.$_colIndex = colIndex;
|
|
@@ -294564,7 +294684,6 @@
|
|
|
294564
294684
|
})
|
|
294565
294685
|
};
|
|
294566
294686
|
}, [sortOpen, resizeable, components, colSortOpen]);
|
|
294567
|
-
console.log(dataSource, '-------datasource-----');
|
|
294568
294687
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
294569
294688
|
style: {
|
|
294570
294689
|
height: '100%',
|
|
@@ -294668,6 +294787,8 @@
|
|
|
294668
294787
|
return setChartsModalStatus(false);
|
|
294669
294788
|
},
|
|
294670
294789
|
data: dataSource,
|
|
294790
|
+
deepDataSource: deepDataSourceRef.current,
|
|
294791
|
+
rowKey: rowKey,
|
|
294671
294792
|
columns: columns,
|
|
294672
294793
|
selectInfo: lodash.pick(shellStatusRef.current, ['start', 'end'])
|
|
294673
294794
|
}));
|