@leankylin-sheet/core 3.1.32 → 3.1.33
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/index.esm.js +66 -62
- package/dist/index.js +66 -62
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -36811,7 +36811,7 @@ function functionHTML(txt) {
|
|
|
36811
36811
|
} else if (matchConfig.dquote > 0) {
|
|
36812
36812
|
function_str += "".concat(str, "</span>");
|
|
36813
36813
|
} else if (str.indexOf("</span>") === -1 && str.length > 0) {
|
|
36814
|
-
var regx = /{.*?}/;
|
|
36814
|
+
var regx = /{{.*?}}/;
|
|
36815
36815
|
if (regx.test(_.trim(str))) {
|
|
36816
36816
|
var arraytxt = regx.exec(str)[0];
|
|
36817
36817
|
var arraystart = str.search(regx);
|
|
@@ -36819,7 +36819,7 @@ function functionHTML(txt) {
|
|
|
36819
36819
|
if (arraystart > 0) {
|
|
36820
36820
|
alltxt += "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(str.substr(0, arraystart), "</span>");
|
|
36821
36821
|
}
|
|
36822
|
-
alltxt += "<span dir=\"auto\" style=\"color:#
|
|
36822
|
+
alltxt += "<span dir=\"auto\" style=\"color:#3b82f4\" class=\"luckysheet-formula-text-var\">".concat(arraytxt, "</span>");
|
|
36823
36823
|
if (arraystart + arraytxt.length < str.length) {
|
|
36824
36824
|
alltxt += "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(str.substr(arraystart + arraytxt.length, str.length), "</span>");
|
|
36825
36825
|
}
|
|
@@ -59652,14 +59652,32 @@ var getCellBorder = function getCellBorder(domStyle, row_index, col_index) {
|
|
|
59652
59652
|
};
|
|
59653
59653
|
};
|
|
59654
59654
|
var getCellMcBorder = function getCellMcBorder(ctx, domStyle, row_index, col_index, mc) {
|
|
59655
|
-
var keys = [["border-left", "borderLeftWidth", "borderLeftColor", "borderLeftStyle"
|
|
59655
|
+
var keys = [["border-left", "borderLeftWidth", "borderLeftColor", "borderLeftStyle", function (curIndex, rs) {
|
|
59656
|
+
return [curIndex, curIndex + rs - 1];
|
|
59657
|
+
}, function (curIndex) {
|
|
59658
|
+
return [curIndex, curIndex];
|
|
59659
|
+
}], ["border-top", "borderTopWidth", "borderTopColor", "borderTopStyle", function (curIndex) {
|
|
59660
|
+
return [curIndex, curIndex];
|
|
59661
|
+
}, function (curIndex, cs) {
|
|
59662
|
+
return [curIndex, curIndex + cs - 1];
|
|
59663
|
+
}], ["border-right", "borderRightWidth", "borderRightColor", "borderRightStyle", function (curIndex, rs) {
|
|
59664
|
+
return [curIndex, curIndex + rs - 1];
|
|
59665
|
+
}, function (curIndex, cs) {
|
|
59666
|
+
return [curIndex + cs - 1, curIndex + cs - 1];
|
|
59667
|
+
}], ["border-bottom", "borderBottomWidth", "borderBottomColor", "borderBottomStyle", function (curIndex, cs) {
|
|
59668
|
+
return [curIndex + cs - 1, curIndex + cs - 1];
|
|
59669
|
+
}, function (curIndex, cs) {
|
|
59670
|
+
return [curIndex, curIndex + cs - 1];
|
|
59671
|
+
}]];
|
|
59656
59672
|
var result = [];
|
|
59657
59673
|
for (var index = 0; index < keys.length; index += 1) {
|
|
59658
|
-
var _keys$index2 = _slicedToArray(keys[index],
|
|
59674
|
+
var _keys$index2 = _slicedToArray(keys[index], 6),
|
|
59659
59675
|
p = _keys$index2[0],
|
|
59660
59676
|
w = _keys$index2[1],
|
|
59661
59677
|
c = _keys$index2[2],
|
|
59662
|
-
s = _keys$index2[3]
|
|
59678
|
+
s = _keys$index2[3],
|
|
59679
|
+
getRow = _keys$index2[4],
|
|
59680
|
+
getColumn = _keys$index2[5];
|
|
59663
59681
|
if (parseFloat(domStyle[w]) > 0 && domStyle[s] !== "inset") {
|
|
59664
59682
|
var _getQKBorder = getQKBorder(domStyle[w], domStyle[s], domStyle[c]),
|
|
59665
59683
|
_getQKBorder2 = _slicedToArray(_getQKBorder, 2),
|
|
@@ -59671,8 +59689,8 @@ var getCellMcBorder = function getCellMcBorder(ctx, domStyle, row_index, col_ind
|
|
|
59671
59689
|
color: color,
|
|
59672
59690
|
style: style,
|
|
59673
59691
|
range: normalizeSelection(ctx, [{
|
|
59674
|
-
row:
|
|
59675
|
-
column:
|
|
59692
|
+
row: getRow(row_index, mc.rs),
|
|
59693
|
+
column: getColumn(col_index, mc.cs)
|
|
59676
59694
|
}])
|
|
59677
59695
|
});
|
|
59678
59696
|
}
|
|
@@ -59719,13 +59737,17 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59719
59737
|
}
|
|
59720
59738
|
var result = [];
|
|
59721
59739
|
var borderInfo = [];
|
|
59740
|
+
var startOffColIndexMap = {};
|
|
59722
59741
|
for (var index = 0; index < (rows === null || rows === void 0 ? void 0 : rows.length); index += 1) {
|
|
59723
59742
|
var row = rows[index];
|
|
59743
|
+
var isFirstNoRs = false;
|
|
59724
59744
|
var cells = row.querySelectorAll("td");
|
|
59725
59745
|
if (!result[index]) {
|
|
59726
59746
|
result[index] = [];
|
|
59727
59747
|
}
|
|
59748
|
+
var offsetColIndex = 0;
|
|
59728
59749
|
for (var cIndex = 0; cIndex < cells.length; cIndex += 1) {
|
|
59750
|
+
var _colIndex = startCol + offsetColIndex + (startOffColIndexMap[index] || 0);
|
|
59729
59751
|
var cell = cells[cIndex];
|
|
59730
59752
|
var m = cell === null || cell === void 0 ? void 0 : cell.textContent;
|
|
59731
59753
|
var v = cell.getAttribute("x:num");
|
|
@@ -59740,13 +59762,46 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59740
59762
|
if (colspan > 1 || rowspan > 1) {
|
|
59741
59763
|
mainCell.mc = {
|
|
59742
59764
|
rs: rowspan,
|
|
59743
|
-
cs: colspan
|
|
59765
|
+
cs: colspan,
|
|
59766
|
+
r: index + startRow,
|
|
59767
|
+
c: _colIndex
|
|
59744
59768
|
};
|
|
59745
|
-
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow,
|
|
59769
|
+
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow, _colIndex, mainCell.mc)));
|
|
59746
59770
|
} else {
|
|
59747
|
-
|
|
59771
|
+
isFirstNoRs = true;
|
|
59772
|
+
borderInfo.push(getCellBorder(style, index + startRow, _colIndex));
|
|
59748
59773
|
}
|
|
59749
59774
|
result[index].push(mainCell);
|
|
59775
|
+
if (rowspan > 1) {
|
|
59776
|
+
for (var rs_index = 1; rs_index < rowspan; rs_index += 1) {
|
|
59777
|
+
if (!result[index + rs_index]) {
|
|
59778
|
+
result[index + rs_index] = [];
|
|
59779
|
+
}
|
|
59780
|
+
result[index + rs_index].push({
|
|
59781
|
+
mc: {
|
|
59782
|
+
r: index + startRow,
|
|
59783
|
+
c: _colIndex
|
|
59784
|
+
}
|
|
59785
|
+
});
|
|
59786
|
+
if (!isFirstNoRs) {
|
|
59787
|
+
if (!startOffColIndexMap[index + rs_index]) {
|
|
59788
|
+
startOffColIndexMap[index + rs_index] = 0;
|
|
59789
|
+
}
|
|
59790
|
+
startOffColIndexMap[index + rs_index] += colspan || 1;
|
|
59791
|
+
}
|
|
59792
|
+
}
|
|
59793
|
+
}
|
|
59794
|
+
if (colspan > 1) {
|
|
59795
|
+
for (var cs_index = 1; cs_index < colspan; cs_index += 1) {
|
|
59796
|
+
result[index].push({
|
|
59797
|
+
mc: {
|
|
59798
|
+
r: index + startRow,
|
|
59799
|
+
c: _colIndex
|
|
59800
|
+
}
|
|
59801
|
+
});
|
|
59802
|
+
}
|
|
59803
|
+
}
|
|
59804
|
+
offsetColIndex += colspan || 1;
|
|
59750
59805
|
} else {
|
|
59751
59806
|
result[index].push({
|
|
59752
59807
|
m: m,
|
|
@@ -59760,57 +59815,6 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59760
59815
|
borderInfo: borderInfo
|
|
59761
59816
|
};
|
|
59762
59817
|
}
|
|
59763
|
-
function expandMergedCells(mergedCells, startRow, startCol) {
|
|
59764
|
-
if (!mergedCells || mergedCells.length === 0) {
|
|
59765
|
-
return [];
|
|
59766
|
-
}
|
|
59767
|
-
var totalRows = mergedCells === null || mergedCells === void 0 ? void 0 : mergedCells.length;
|
|
59768
|
-
var totalCols = 0;
|
|
59769
|
-
for (var j = 0; j < mergedCells[0].length; j += 1) {
|
|
59770
|
-
var _mergedCells$0$j, _mergedCells$0$j$mc;
|
|
59771
|
-
totalCols += ((_mergedCells$0$j = mergedCells[0][j]) === null || _mergedCells$0$j === void 0 ? void 0 : (_mergedCells$0$j$mc = _mergedCells$0$j.mc) === null || _mergedCells$0$j$mc === void 0 ? void 0 : _mergedCells$0$j$mc.cs) || 1;
|
|
59772
|
-
}
|
|
59773
|
-
var result = Array.from({
|
|
59774
|
-
length: totalRows
|
|
59775
|
-
}, function () {
|
|
59776
|
-
return new Array(totalCols);
|
|
59777
|
-
});
|
|
59778
|
-
var currentRow = 0;
|
|
59779
|
-
for (var i = 0; i < mergedCells.length; i += 1) {
|
|
59780
|
-
var currentCol = 0;
|
|
59781
|
-
var rowHeight = 0;
|
|
59782
|
-
for (var _j7 = 0; _j7 < mergedCells[i].length; _j7 += 1) {
|
|
59783
|
-
var _cell$mc2, _cell$mc3;
|
|
59784
|
-
var cell = mergedCells[i][_j7];
|
|
59785
|
-
var rs = (cell === null || cell === void 0 ? void 0 : (_cell$mc2 = cell.mc) === null || _cell$mc2 === void 0 ? void 0 : _cell$mc2.rs) || 1;
|
|
59786
|
-
var cs = (cell === null || cell === void 0 ? void 0 : (_cell$mc3 = cell.mc) === null || _cell$mc3 === void 0 ? void 0 : _cell$mc3.cs) || 1;
|
|
59787
|
-
rowHeight = Math.max(rowHeight, rs);
|
|
59788
|
-
for (var r = 0; r < rs; r += 1) {
|
|
59789
|
-
for (var c = 0; c < cs; c += 1) {
|
|
59790
|
-
var mcR = currentRow + startRow;
|
|
59791
|
-
var mcC = currentCol + startCol;
|
|
59792
|
-
if (r === 0 && c === 0) {
|
|
59793
|
-
result[currentRow + r][currentCol + c] = _objectSpread2({}, cell);
|
|
59794
|
-
if (result[currentRow + r][currentCol + c].mc) {
|
|
59795
|
-
result[currentRow + r][currentCol + c].mc.r = mcR;
|
|
59796
|
-
result[currentRow + r][currentCol + c].mc.c = mcC;
|
|
59797
|
-
}
|
|
59798
|
-
} else {
|
|
59799
|
-
result[currentRow + r][currentCol + c] = {
|
|
59800
|
-
mc: {
|
|
59801
|
-
r: mcR,
|
|
59802
|
-
c: mcC
|
|
59803
|
-
}
|
|
59804
|
-
};
|
|
59805
|
-
}
|
|
59806
|
-
}
|
|
59807
|
-
}
|
|
59808
|
-
currentCol += cs;
|
|
59809
|
-
}
|
|
59810
|
-
currentRow += rowHeight;
|
|
59811
|
-
}
|
|
59812
|
-
return result;
|
|
59813
|
-
}
|
|
59814
59818
|
function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
59815
59819
|
return _handlePasteByLeanklin.apply(this, arguments);
|
|
59816
59820
|
}
|
|
@@ -59846,7 +59850,7 @@ function _handlePasteByLeanklin() {
|
|
|
59846
59850
|
}
|
|
59847
59851
|
index = getSheetIndex(ctx, ctx.currentSheetId);
|
|
59848
59852
|
ctx.luckysheetfile[index].config = ctx.config;
|
|
59849
|
-
data =
|
|
59853
|
+
data = copyData;
|
|
59850
59854
|
copyOne = data.length === 1 && data[0].length === 1 && !((_data$0$ = data[0][0]) === null || _data$0$ === void 0 ? void 0 : _data$0$.mc);
|
|
59851
59855
|
pasteData = copyOne ? [] : data;
|
|
59852
59856
|
if (copyOne) {
|
package/dist/index.js
CHANGED
|
@@ -36821,7 +36821,7 @@ function functionHTML(txt) {
|
|
|
36821
36821
|
} else if (matchConfig.dquote > 0) {
|
|
36822
36822
|
function_str += "".concat(str, "</span>");
|
|
36823
36823
|
} else if (str.indexOf("</span>") === -1 && str.length > 0) {
|
|
36824
|
-
var regx = /{.*?}/;
|
|
36824
|
+
var regx = /{{.*?}}/;
|
|
36825
36825
|
if (regx.test(___default['default'].trim(str))) {
|
|
36826
36826
|
var arraytxt = regx.exec(str)[0];
|
|
36827
36827
|
var arraystart = str.search(regx);
|
|
@@ -36829,7 +36829,7 @@ function functionHTML(txt) {
|
|
|
36829
36829
|
if (arraystart > 0) {
|
|
36830
36830
|
alltxt += "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(str.substr(0, arraystart), "</span>");
|
|
36831
36831
|
}
|
|
36832
|
-
alltxt += "<span dir=\"auto\" style=\"color:#
|
|
36832
|
+
alltxt += "<span dir=\"auto\" style=\"color:#3b82f4\" class=\"luckysheet-formula-text-var\">".concat(arraytxt, "</span>");
|
|
36833
36833
|
if (arraystart + arraytxt.length < str.length) {
|
|
36834
36834
|
alltxt += "<span dir=\"auto\" class=\"luckysheet-formula-text-color\">".concat(str.substr(arraystart + arraytxt.length, str.length), "</span>");
|
|
36835
36835
|
}
|
|
@@ -59662,14 +59662,32 @@ var getCellBorder = function getCellBorder(domStyle, row_index, col_index) {
|
|
|
59662
59662
|
};
|
|
59663
59663
|
};
|
|
59664
59664
|
var getCellMcBorder = function getCellMcBorder(ctx, domStyle, row_index, col_index, mc) {
|
|
59665
|
-
var keys = [["border-left", "borderLeftWidth", "borderLeftColor", "borderLeftStyle"
|
|
59665
|
+
var keys = [["border-left", "borderLeftWidth", "borderLeftColor", "borderLeftStyle", function (curIndex, rs) {
|
|
59666
|
+
return [curIndex, curIndex + rs - 1];
|
|
59667
|
+
}, function (curIndex) {
|
|
59668
|
+
return [curIndex, curIndex];
|
|
59669
|
+
}], ["border-top", "borderTopWidth", "borderTopColor", "borderTopStyle", function (curIndex) {
|
|
59670
|
+
return [curIndex, curIndex];
|
|
59671
|
+
}, function (curIndex, cs) {
|
|
59672
|
+
return [curIndex, curIndex + cs - 1];
|
|
59673
|
+
}], ["border-right", "borderRightWidth", "borderRightColor", "borderRightStyle", function (curIndex, rs) {
|
|
59674
|
+
return [curIndex, curIndex + rs - 1];
|
|
59675
|
+
}, function (curIndex, cs) {
|
|
59676
|
+
return [curIndex + cs - 1, curIndex + cs - 1];
|
|
59677
|
+
}], ["border-bottom", "borderBottomWidth", "borderBottomColor", "borderBottomStyle", function (curIndex, cs) {
|
|
59678
|
+
return [curIndex + cs - 1, curIndex + cs - 1];
|
|
59679
|
+
}, function (curIndex, cs) {
|
|
59680
|
+
return [curIndex, curIndex + cs - 1];
|
|
59681
|
+
}]];
|
|
59666
59682
|
var result = [];
|
|
59667
59683
|
for (var index = 0; index < keys.length; index += 1) {
|
|
59668
|
-
var _keys$index2 = _slicedToArray(keys[index],
|
|
59684
|
+
var _keys$index2 = _slicedToArray(keys[index], 6),
|
|
59669
59685
|
p = _keys$index2[0],
|
|
59670
59686
|
w = _keys$index2[1],
|
|
59671
59687
|
c = _keys$index2[2],
|
|
59672
|
-
s = _keys$index2[3]
|
|
59688
|
+
s = _keys$index2[3],
|
|
59689
|
+
getRow = _keys$index2[4],
|
|
59690
|
+
getColumn = _keys$index2[5];
|
|
59673
59691
|
if (parseFloat(domStyle[w]) > 0 && domStyle[s] !== "inset") {
|
|
59674
59692
|
var _getQKBorder = getQKBorder(domStyle[w], domStyle[s], domStyle[c]),
|
|
59675
59693
|
_getQKBorder2 = _slicedToArray(_getQKBorder, 2),
|
|
@@ -59681,8 +59699,8 @@ var getCellMcBorder = function getCellMcBorder(ctx, domStyle, row_index, col_ind
|
|
|
59681
59699
|
color: color,
|
|
59682
59700
|
style: style,
|
|
59683
59701
|
range: normalizeSelection(ctx, [{
|
|
59684
|
-
row:
|
|
59685
|
-
column:
|
|
59702
|
+
row: getRow(row_index, mc.rs),
|
|
59703
|
+
column: getColumn(col_index, mc.cs)
|
|
59686
59704
|
}])
|
|
59687
59705
|
});
|
|
59688
59706
|
}
|
|
@@ -59729,13 +59747,17 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59729
59747
|
}
|
|
59730
59748
|
var result = [];
|
|
59731
59749
|
var borderInfo = [];
|
|
59750
|
+
var startOffColIndexMap = {};
|
|
59732
59751
|
for (var index = 0; index < (rows === null || rows === void 0 ? void 0 : rows.length); index += 1) {
|
|
59733
59752
|
var row = rows[index];
|
|
59753
|
+
var isFirstNoRs = false;
|
|
59734
59754
|
var cells = row.querySelectorAll("td");
|
|
59735
59755
|
if (!result[index]) {
|
|
59736
59756
|
result[index] = [];
|
|
59737
59757
|
}
|
|
59758
|
+
var offsetColIndex = 0;
|
|
59738
59759
|
for (var cIndex = 0; cIndex < cells.length; cIndex += 1) {
|
|
59760
|
+
var _colIndex = startCol + offsetColIndex + (startOffColIndexMap[index] || 0);
|
|
59739
59761
|
var cell = cells[cIndex];
|
|
59740
59762
|
var m = cell === null || cell === void 0 ? void 0 : cell.textContent;
|
|
59741
59763
|
var v = cell.getAttribute("x:num");
|
|
@@ -59750,13 +59772,46 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59750
59772
|
if (colspan > 1 || rowspan > 1) {
|
|
59751
59773
|
mainCell.mc = {
|
|
59752
59774
|
rs: rowspan,
|
|
59753
|
-
cs: colspan
|
|
59775
|
+
cs: colspan,
|
|
59776
|
+
r: index + startRow,
|
|
59777
|
+
c: _colIndex
|
|
59754
59778
|
};
|
|
59755
|
-
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow,
|
|
59779
|
+
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow, _colIndex, mainCell.mc)));
|
|
59756
59780
|
} else {
|
|
59757
|
-
|
|
59781
|
+
isFirstNoRs = true;
|
|
59782
|
+
borderInfo.push(getCellBorder(style, index + startRow, _colIndex));
|
|
59758
59783
|
}
|
|
59759
59784
|
result[index].push(mainCell);
|
|
59785
|
+
if (rowspan > 1) {
|
|
59786
|
+
for (var rs_index = 1; rs_index < rowspan; rs_index += 1) {
|
|
59787
|
+
if (!result[index + rs_index]) {
|
|
59788
|
+
result[index + rs_index] = [];
|
|
59789
|
+
}
|
|
59790
|
+
result[index + rs_index].push({
|
|
59791
|
+
mc: {
|
|
59792
|
+
r: index + startRow,
|
|
59793
|
+
c: _colIndex
|
|
59794
|
+
}
|
|
59795
|
+
});
|
|
59796
|
+
if (!isFirstNoRs) {
|
|
59797
|
+
if (!startOffColIndexMap[index + rs_index]) {
|
|
59798
|
+
startOffColIndexMap[index + rs_index] = 0;
|
|
59799
|
+
}
|
|
59800
|
+
startOffColIndexMap[index + rs_index] += colspan || 1;
|
|
59801
|
+
}
|
|
59802
|
+
}
|
|
59803
|
+
}
|
|
59804
|
+
if (colspan > 1) {
|
|
59805
|
+
for (var cs_index = 1; cs_index < colspan; cs_index += 1) {
|
|
59806
|
+
result[index].push({
|
|
59807
|
+
mc: {
|
|
59808
|
+
r: index + startRow,
|
|
59809
|
+
c: _colIndex
|
|
59810
|
+
}
|
|
59811
|
+
});
|
|
59812
|
+
}
|
|
59813
|
+
}
|
|
59814
|
+
offsetColIndex += colspan || 1;
|
|
59760
59815
|
} else {
|
|
59761
59816
|
result[index].push({
|
|
59762
59817
|
m: m,
|
|
@@ -59770,57 +59825,6 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59770
59825
|
borderInfo: borderInfo
|
|
59771
59826
|
};
|
|
59772
59827
|
}
|
|
59773
|
-
function expandMergedCells(mergedCells, startRow, startCol) {
|
|
59774
|
-
if (!mergedCells || mergedCells.length === 0) {
|
|
59775
|
-
return [];
|
|
59776
|
-
}
|
|
59777
|
-
var totalRows = mergedCells === null || mergedCells === void 0 ? void 0 : mergedCells.length;
|
|
59778
|
-
var totalCols = 0;
|
|
59779
|
-
for (var j = 0; j < mergedCells[0].length; j += 1) {
|
|
59780
|
-
var _mergedCells$0$j, _mergedCells$0$j$mc;
|
|
59781
|
-
totalCols += ((_mergedCells$0$j = mergedCells[0][j]) === null || _mergedCells$0$j === void 0 ? void 0 : (_mergedCells$0$j$mc = _mergedCells$0$j.mc) === null || _mergedCells$0$j$mc === void 0 ? void 0 : _mergedCells$0$j$mc.cs) || 1;
|
|
59782
|
-
}
|
|
59783
|
-
var result = Array.from({
|
|
59784
|
-
length: totalRows
|
|
59785
|
-
}, function () {
|
|
59786
|
-
return new Array(totalCols);
|
|
59787
|
-
});
|
|
59788
|
-
var currentRow = 0;
|
|
59789
|
-
for (var i = 0; i < mergedCells.length; i += 1) {
|
|
59790
|
-
var currentCol = 0;
|
|
59791
|
-
var rowHeight = 0;
|
|
59792
|
-
for (var _j7 = 0; _j7 < mergedCells[i].length; _j7 += 1) {
|
|
59793
|
-
var _cell$mc2, _cell$mc3;
|
|
59794
|
-
var cell = mergedCells[i][_j7];
|
|
59795
|
-
var rs = (cell === null || cell === void 0 ? void 0 : (_cell$mc2 = cell.mc) === null || _cell$mc2 === void 0 ? void 0 : _cell$mc2.rs) || 1;
|
|
59796
|
-
var cs = (cell === null || cell === void 0 ? void 0 : (_cell$mc3 = cell.mc) === null || _cell$mc3 === void 0 ? void 0 : _cell$mc3.cs) || 1;
|
|
59797
|
-
rowHeight = Math.max(rowHeight, rs);
|
|
59798
|
-
for (var r = 0; r < rs; r += 1) {
|
|
59799
|
-
for (var c = 0; c < cs; c += 1) {
|
|
59800
|
-
var mcR = currentRow + startRow;
|
|
59801
|
-
var mcC = currentCol + startCol;
|
|
59802
|
-
if (r === 0 && c === 0) {
|
|
59803
|
-
result[currentRow + r][currentCol + c] = _objectSpread2({}, cell);
|
|
59804
|
-
if (result[currentRow + r][currentCol + c].mc) {
|
|
59805
|
-
result[currentRow + r][currentCol + c].mc.r = mcR;
|
|
59806
|
-
result[currentRow + r][currentCol + c].mc.c = mcC;
|
|
59807
|
-
}
|
|
59808
|
-
} else {
|
|
59809
|
-
result[currentRow + r][currentCol + c] = {
|
|
59810
|
-
mc: {
|
|
59811
|
-
r: mcR,
|
|
59812
|
-
c: mcC
|
|
59813
|
-
}
|
|
59814
|
-
};
|
|
59815
|
-
}
|
|
59816
|
-
}
|
|
59817
|
-
}
|
|
59818
|
-
currentCol += cs;
|
|
59819
|
-
}
|
|
59820
|
-
currentRow += rowHeight;
|
|
59821
|
-
}
|
|
59822
|
-
return result;
|
|
59823
|
-
}
|
|
59824
59828
|
function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
59825
59829
|
return _handlePasteByLeanklin.apply(this, arguments);
|
|
59826
59830
|
}
|
|
@@ -59856,7 +59860,7 @@ function _handlePasteByLeanklin() {
|
|
|
59856
59860
|
}
|
|
59857
59861
|
index = getSheetIndex(ctx, ctx.currentSheetId);
|
|
59858
59862
|
ctx.luckysheetfile[index].config = ctx.config;
|
|
59859
|
-
data =
|
|
59863
|
+
data = copyData;
|
|
59860
59864
|
copyOne = data.length === 1 && data[0].length === 1 && !((_data$0$ = data[0][0]) === null || _data$0$ === void 0 ? void 0 : _data$0$.mc);
|
|
59861
59865
|
pasteData = copyOne ? [] : data;
|
|
59862
59866
|
if (copyOne) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.33",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "father-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@leankylin-sheet/formula-parser": "3.1.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "3.1.33",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|