@leankylin-sheet/core 4.0.2 → 4.0.4
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 +21 -12
- package/dist/index.js +21 -12
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -41398,7 +41398,6 @@ function moveHighlightCell(ctx, postion, index, type) {
|
|
|
41398
41398
|
y: moveY
|
|
41399
41399
|
};
|
|
41400
41400
|
normalizeSelection(ctx, ctx.luckysheet_select_save);
|
|
41401
|
-
scrollToHighlightCell(ctx, row_index, col_index);
|
|
41402
41401
|
} else if (type === "rangeOfFormula") {
|
|
41403
41402
|
var _last = ctx.formulaCache.func_selectedrange;
|
|
41404
41403
|
if (!_last) return;
|
|
@@ -46412,7 +46411,9 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46412
46411
|
continue;
|
|
46413
46412
|
}
|
|
46414
46413
|
var result = execfunction(ctx, (_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index$1].data[r][c]) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : _ctx$luckysheetfile$i2.f, r, c, id);
|
|
46415
|
-
setCellValue$1(ctx, r, c, result[1], null
|
|
46414
|
+
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46415
|
+
id: id
|
|
46416
|
+
});
|
|
46416
46417
|
insertUpdateFunctionGroup(ctx, r, c, id);
|
|
46417
46418
|
}
|
|
46418
46419
|
}
|
|
@@ -56415,7 +56416,6 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
56415
56416
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
56416
56417
|
var _cache$searchDialog;
|
|
56417
56418
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
56418
|
-
if (ctx.filterContextMenu != null) return;
|
|
56419
56419
|
var scrollLeft = scrollbarX.scrollLeft;
|
|
56420
56420
|
var scrollTop = scrollbarY.scrollTop;
|
|
56421
56421
|
if (e.deltaY !== 0) {
|
|
@@ -56934,8 +56934,6 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
56934
56934
|
if (!afterCellMouseMove) {
|
|
56935
56935
|
return;
|
|
56936
56936
|
}
|
|
56937
|
-
ctx.contextMenu = {};
|
|
56938
|
-
ctx.filterContextMenu = undefined;
|
|
56939
56937
|
var flowdata = getFlowdata(ctx);
|
|
56940
56938
|
if (!flowdata) return;
|
|
56941
56939
|
var rect = container.getBoundingClientRect();
|
|
@@ -59750,11 +59748,14 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59750
59748
|
var rows = htmlDoc.querySelectorAll("tbody tr");
|
|
59751
59749
|
if (!rows || rows.length < 1) {
|
|
59752
59750
|
return {
|
|
59753
|
-
data: [[clipboardData.getData("text")]]
|
|
59751
|
+
data: [[clipboardData.getData("text")]],
|
|
59752
|
+
borderInfo: [],
|
|
59753
|
+
merge: {}
|
|
59754
59754
|
};
|
|
59755
59755
|
}
|
|
59756
59756
|
var result = [];
|
|
59757
59757
|
var borderInfo = [];
|
|
59758
|
+
var merge = {};
|
|
59758
59759
|
var startOffColIndexMap = {};
|
|
59759
59760
|
for (var index = 0; index < (rows === null || rows === void 0 ? void 0 : rows.length); index += 1) {
|
|
59760
59761
|
var row = rows[index];
|
|
@@ -59786,6 +59787,7 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59786
59787
|
r: index + startRow,
|
|
59787
59788
|
c: _colIndex
|
|
59788
59789
|
};
|
|
59790
|
+
merge["".concat(index + startRow, "_").concat(_colIndex)] = mainCell.mc;
|
|
59789
59791
|
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow, _colIndex, mainCell.mc)));
|
|
59790
59792
|
} else {
|
|
59791
59793
|
isFirstNoRs = true;
|
|
@@ -59832,7 +59834,8 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59832
59834
|
}
|
|
59833
59835
|
return {
|
|
59834
59836
|
data: result,
|
|
59835
|
-
borderInfo: borderInfo
|
|
59837
|
+
borderInfo: borderInfo,
|
|
59838
|
+
merge: merge
|
|
59836
59839
|
};
|
|
59837
59840
|
}
|
|
59838
59841
|
function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
@@ -59841,7 +59844,7 @@ function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
|
59841
59844
|
function _handlePasteByLeanklin() {
|
|
59842
59845
|
_handlePasteByLeanklin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e, copyRich) {
|
|
59843
59846
|
var _ctx$luckysheet_selec8, _data$0$;
|
|
59844
|
-
var allowEdit, selectRange, rows, columns, _getClipboardData, copyData, borderInfo, _ctx$config$borderInf, index, data, copyOne, pasteData, r, rIndex, c, row, column, range;
|
|
59847
|
+
var allowEdit, selectRange, rows, columns, _getClipboardData, copyData, borderInfo, merge, _ctx$config$borderInf, index, data, copyOne, pasteData, r, rIndex, c, row, column, range;
|
|
59845
59848
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
59846
59849
|
while (1) switch (_context2.prev = _context2.next) {
|
|
59847
59850
|
case 0:
|
|
@@ -59861,13 +59864,19 @@ function _handlePasteByLeanklin() {
|
|
|
59861
59864
|
case 6:
|
|
59862
59865
|
rows = selectRange.row;
|
|
59863
59866
|
columns = selectRange.column;
|
|
59864
|
-
_getClipboardData = getClipboardData(ctx, e, copyRich, rows[0], columns[0]), copyData = _getClipboardData.data, borderInfo = _getClipboardData.borderInfo;
|
|
59867
|
+
_getClipboardData = getClipboardData(ctx, e, copyRich, rows[0], columns[0]), copyData = _getClipboardData.data, borderInfo = _getClipboardData.borderInfo, merge = _getClipboardData.merge;
|
|
59865
59868
|
if (!ctx.config.borderInfo) {
|
|
59866
59869
|
ctx.config.borderInfo = [];
|
|
59867
59870
|
}
|
|
59868
59871
|
if (copyRich) {
|
|
59869
59872
|
(_ctx$config$borderInf = ctx.config.borderInfo).push.apply(_ctx$config$borderInf, _toConsumableArray(borderInfo));
|
|
59870
59873
|
}
|
|
59874
|
+
if (!ctx.config.merge) {
|
|
59875
|
+
ctx.config.merge = {};
|
|
59876
|
+
}
|
|
59877
|
+
if (copyRich) {
|
|
59878
|
+
ctx.config.merge = Object.assign(ctx.config.merge, merge);
|
|
59879
|
+
}
|
|
59871
59880
|
index = getSheetIndex(ctx, ctx.currentSheetId);
|
|
59872
59881
|
ctx.luckysheetfile[index].config = ctx.config;
|
|
59873
59882
|
data = copyData;
|
|
@@ -59889,14 +59898,14 @@ function _handlePasteByLeanklin() {
|
|
|
59889
59898
|
column: column
|
|
59890
59899
|
};
|
|
59891
59900
|
if (isAllowEdit(ctx, [range])) {
|
|
59892
|
-
_context2.next =
|
|
59901
|
+
_context2.next = 24;
|
|
59893
59902
|
break;
|
|
59894
59903
|
}
|
|
59895
59904
|
return _context2.abrupt("return");
|
|
59896
|
-
case
|
|
59905
|
+
case 24:
|
|
59897
59906
|
setCellValuesByRange(ctx, pasteData, range, null);
|
|
59898
59907
|
ctx.luckysheet_select_save = [range];
|
|
59899
|
-
case
|
|
59908
|
+
case 26:
|
|
59900
59909
|
case "end":
|
|
59901
59910
|
return _context2.stop();
|
|
59902
59911
|
}
|
package/dist/index.js
CHANGED
|
@@ -41408,7 +41408,6 @@ function moveHighlightCell(ctx, postion, index, type) {
|
|
|
41408
41408
|
y: moveY
|
|
41409
41409
|
};
|
|
41410
41410
|
normalizeSelection(ctx, ctx.luckysheet_select_save);
|
|
41411
|
-
scrollToHighlightCell(ctx, row_index, col_index);
|
|
41412
41411
|
} else if (type === "rangeOfFormula") {
|
|
41413
41412
|
var _last = ctx.formulaCache.func_selectedrange;
|
|
41414
41413
|
if (!_last) return;
|
|
@@ -46422,7 +46421,9 @@ function calculateSheetFromula(ctx, id) {
|
|
|
46422
46421
|
continue;
|
|
46423
46422
|
}
|
|
46424
46423
|
var result = execfunction(ctx, (_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index$1].data[r][c]) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : _ctx$luckysheetfile$i2.f, r, c, id);
|
|
46425
|
-
setCellValue$1(ctx, r, c, result[1], null
|
|
46424
|
+
setCellValue$1(ctx, r, c, result[1], null, {
|
|
46425
|
+
id: id
|
|
46426
|
+
});
|
|
46426
46427
|
insertUpdateFunctionGroup(ctx, r, c, id);
|
|
46427
46428
|
}
|
|
46428
46429
|
}
|
|
@@ -56425,7 +56426,6 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
|
|
|
56425
56426
|
function handleGlobalWheel(ctx, e, cache, scrollbarX, scrollbarY) {
|
|
56426
56427
|
var _cache$searchDialog;
|
|
56427
56428
|
if (((_cache$searchDialog = cache.searchDialog) === null || _cache$searchDialog === void 0 ? void 0 : _cache$searchDialog.mouseEnter) && ctx.showSearch && ctx.showReplace) return;
|
|
56428
|
-
if (ctx.filterContextMenu != null) return;
|
|
56429
56429
|
var scrollLeft = scrollbarX.scrollLeft;
|
|
56430
56430
|
var scrollTop = scrollbarY.scrollTop;
|
|
56431
56431
|
if (e.deltaY !== 0) {
|
|
@@ -56944,8 +56944,6 @@ function handleCellAreaMouseMove(ctx, globalCache, e, container) {
|
|
|
56944
56944
|
if (!afterCellMouseMove) {
|
|
56945
56945
|
return;
|
|
56946
56946
|
}
|
|
56947
|
-
ctx.contextMenu = {};
|
|
56948
|
-
ctx.filterContextMenu = undefined;
|
|
56949
56947
|
var flowdata = getFlowdata(ctx);
|
|
56950
56948
|
if (!flowdata) return;
|
|
56951
56949
|
var rect = container.getBoundingClientRect();
|
|
@@ -59760,11 +59758,14 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59760
59758
|
var rows = htmlDoc.querySelectorAll("tbody tr");
|
|
59761
59759
|
if (!rows || rows.length < 1) {
|
|
59762
59760
|
return {
|
|
59763
|
-
data: [[clipboardData.getData("text")]]
|
|
59761
|
+
data: [[clipboardData.getData("text")]],
|
|
59762
|
+
borderInfo: [],
|
|
59763
|
+
merge: {}
|
|
59764
59764
|
};
|
|
59765
59765
|
}
|
|
59766
59766
|
var result = [];
|
|
59767
59767
|
var borderInfo = [];
|
|
59768
|
+
var merge = {};
|
|
59768
59769
|
var startOffColIndexMap = {};
|
|
59769
59770
|
for (var index = 0; index < (rows === null || rows === void 0 ? void 0 : rows.length); index += 1) {
|
|
59770
59771
|
var row = rows[index];
|
|
@@ -59796,6 +59797,7 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59796
59797
|
r: index + startRow,
|
|
59797
59798
|
c: _colIndex
|
|
59798
59799
|
};
|
|
59800
|
+
merge["".concat(index + startRow, "_").concat(_colIndex)] = mainCell.mc;
|
|
59799
59801
|
borderInfo.push.apply(borderInfo, _toConsumableArray(getCellMcBorder(ctx, style, index + startRow, _colIndex, mainCell.mc)));
|
|
59800
59802
|
} else {
|
|
59801
59803
|
isFirstNoRs = true;
|
|
@@ -59842,7 +59844,8 @@ function getClipboardData(ctx, e, copyRich, startRow, startCol) {
|
|
|
59842
59844
|
}
|
|
59843
59845
|
return {
|
|
59844
59846
|
data: result,
|
|
59845
|
-
borderInfo: borderInfo
|
|
59847
|
+
borderInfo: borderInfo,
|
|
59848
|
+
merge: merge
|
|
59846
59849
|
};
|
|
59847
59850
|
}
|
|
59848
59851
|
function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
@@ -59851,7 +59854,7 @@ function handlePasteByLeanklin(_x2, _x3, _x4) {
|
|
|
59851
59854
|
function _handlePasteByLeanklin() {
|
|
59852
59855
|
_handlePasteByLeanklin = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ctx, e, copyRich) {
|
|
59853
59856
|
var _ctx$luckysheet_selec8, _data$0$;
|
|
59854
|
-
var allowEdit, selectRange, rows, columns, _getClipboardData, copyData, borderInfo, _ctx$config$borderInf, index, data, copyOne, pasteData, r, rIndex, c, row, column, range;
|
|
59857
|
+
var allowEdit, selectRange, rows, columns, _getClipboardData, copyData, borderInfo, merge, _ctx$config$borderInf, index, data, copyOne, pasteData, r, rIndex, c, row, column, range;
|
|
59855
59858
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
59856
59859
|
while (1) switch (_context2.prev = _context2.next) {
|
|
59857
59860
|
case 0:
|
|
@@ -59871,13 +59874,19 @@ function _handlePasteByLeanklin() {
|
|
|
59871
59874
|
case 6:
|
|
59872
59875
|
rows = selectRange.row;
|
|
59873
59876
|
columns = selectRange.column;
|
|
59874
|
-
_getClipboardData = getClipboardData(ctx, e, copyRich, rows[0], columns[0]), copyData = _getClipboardData.data, borderInfo = _getClipboardData.borderInfo;
|
|
59877
|
+
_getClipboardData = getClipboardData(ctx, e, copyRich, rows[0], columns[0]), copyData = _getClipboardData.data, borderInfo = _getClipboardData.borderInfo, merge = _getClipboardData.merge;
|
|
59875
59878
|
if (!ctx.config.borderInfo) {
|
|
59876
59879
|
ctx.config.borderInfo = [];
|
|
59877
59880
|
}
|
|
59878
59881
|
if (copyRich) {
|
|
59879
59882
|
(_ctx$config$borderInf = ctx.config.borderInfo).push.apply(_ctx$config$borderInf, _toConsumableArray(borderInfo));
|
|
59880
59883
|
}
|
|
59884
|
+
if (!ctx.config.merge) {
|
|
59885
|
+
ctx.config.merge = {};
|
|
59886
|
+
}
|
|
59887
|
+
if (copyRich) {
|
|
59888
|
+
ctx.config.merge = Object.assign(ctx.config.merge, merge);
|
|
59889
|
+
}
|
|
59881
59890
|
index = getSheetIndex(ctx, ctx.currentSheetId);
|
|
59882
59891
|
ctx.luckysheetfile[index].config = ctx.config;
|
|
59883
59892
|
data = copyData;
|
|
@@ -59899,14 +59908,14 @@ function _handlePasteByLeanklin() {
|
|
|
59899
59908
|
column: column
|
|
59900
59909
|
};
|
|
59901
59910
|
if (isAllowEdit(ctx, [range])) {
|
|
59902
|
-
_context2.next =
|
|
59911
|
+
_context2.next = 24;
|
|
59903
59912
|
break;
|
|
59904
59913
|
}
|
|
59905
59914
|
return _context2.abrupt("return");
|
|
59906
|
-
case
|
|
59915
|
+
case 24:
|
|
59907
59916
|
setCellValuesByRange(ctx, pasteData, range, null);
|
|
59908
59917
|
ctx.luckysheet_select_save = [range];
|
|
59909
|
-
case
|
|
59918
|
+
case 26:
|
|
59910
59919
|
case "end":
|
|
59911
59920
|
return _context2.stop();
|
|
59912
59921
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
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": "4.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "4.0.4",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|