@leankylin-sheet/core 1.2.10 → 1.2.12
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 +18 -6
- package/dist/index.js +17 -5
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _, { isPlainObject } from 'lodash';
|
|
1
|
+
import _, { isPlainObject, pick } from 'lodash';
|
|
2
2
|
import numeral from 'numeral';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import { Parser, ERROR_REF } from '@leankylin-sheet/formula-parser';
|
|
@@ -67888,9 +67888,6 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
67888
67888
|
var cellMaxLength = d[0].length;
|
|
67889
67889
|
var addr = maxh - rowMaxLength + 1;
|
|
67890
67890
|
var addc = maxc - cellMaxLength + 1;
|
|
67891
|
-
if (addr > 0 || addc > 0) {
|
|
67892
|
-
expandRowsAndColumns(d, addr, addc);
|
|
67893
|
-
}
|
|
67894
67891
|
if (!d) return;
|
|
67895
67892
|
if (cfg.rowlen == null) {
|
|
67896
67893
|
cfg.rowlen = {};
|
|
@@ -68421,6 +68418,16 @@ function pasteHandlerOfCutPaste(ctx, copyRange) {
|
|
|
68421
68418
|
postPasteCut(ctx, source, target, copyRowlChange);
|
|
68422
68419
|
}
|
|
68423
68420
|
}
|
|
68421
|
+
function transofrmCellDataOfCopy(ctx, cellData, r, c) {
|
|
68422
|
+
var _currentData$data$r$c, _currentData$data, _currentData$data$r;
|
|
68423
|
+
var currentSheetId = ctx.currentSheetId,
|
|
68424
|
+
luckysheetfile = ctx.luckysheetfile;
|
|
68425
|
+
var currentData = luckysheetfile === null || luckysheetfile === void 0 ? void 0 : luckysheetfile.find(function (item) {
|
|
68426
|
+
return item.id === currentSheetId;
|
|
68427
|
+
});
|
|
68428
|
+
var originCell = (_currentData$data$r$c = (_currentData$data = currentData.data) === null || _currentData$data === void 0 ? void 0 : (_currentData$data$r = _currentData$data[r]) === null || _currentData$data$r === void 0 ? void 0 : _currentData$data$r[c]) !== null && _currentData$data$r$c !== void 0 ? _currentData$data$r$c : {};
|
|
68429
|
+
return _objectSpread2(_objectSpread2({}, originCell), pick(cellData, "v", "m"));
|
|
68430
|
+
}
|
|
68424
68431
|
function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
68425
68432
|
var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7, _ctx$luckysheet_copy_5;
|
|
68426
68433
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -68510,8 +68517,11 @@ function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
|
68510
68517
|
var cellMaxLength = d[0].length;
|
|
68511
68518
|
var addr = copyh + minh - rowMaxLength;
|
|
68512
68519
|
var addc = copyc + minc - cellMaxLength;
|
|
68513
|
-
if (addr > 0
|
|
68514
|
-
|
|
68520
|
+
if (addr > 0) {
|
|
68521
|
+
copyh -= addr;
|
|
68522
|
+
}
|
|
68523
|
+
if (addc > 0) {
|
|
68524
|
+
copyc -= addc;
|
|
68515
68525
|
}
|
|
68516
68526
|
var borderInfoCompute = getBorderInfoCompute(ctx, copySheetIndex);
|
|
68517
68527
|
var c_dataVerification = _.cloneDeep(ctx.luckysheetfile[getSheetIndex(ctx, copySheetIndex)].dataVerification) || {};
|
|
@@ -68597,6 +68607,7 @@ function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
|
68597
68607
|
var value = null;
|
|
68598
68608
|
if ((_copyData = copyData[h - mth]) === null || _copyData === void 0 ? void 0 : _copyData[c - mtc]) {
|
|
68599
68609
|
value = _.cloneDeep(copyData[h - mth][c - mtc]);
|
|
68610
|
+
value = transofrmCellDataOfCopy(ctx, value, h, c);
|
|
68600
68611
|
}
|
|
68601
68612
|
if (!_.isNil(value) && !_.isNil(value.f)) {
|
|
68602
68613
|
var func = value.f;
|
|
@@ -68925,6 +68936,7 @@ function handlePaste(ctx, e) {
|
|
|
68925
68936
|
while (c < colLen && !_.isNil(data[_r2][c])) {
|
|
68926
68937
|
c += 1;
|
|
68927
68938
|
}
|
|
68939
|
+
cell = transofrmCellDataOfCopy(ctx, cell, _r2, c);
|
|
68928
68940
|
if (c === colLen) {
|
|
68929
68941
|
return true;
|
|
68930
68942
|
}
|
package/dist/index.js
CHANGED
|
@@ -67898,9 +67898,6 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
67898
67898
|
var cellMaxLength = d[0].length;
|
|
67899
67899
|
var addr = maxh - rowMaxLength + 1;
|
|
67900
67900
|
var addc = maxc - cellMaxLength + 1;
|
|
67901
|
-
if (addr > 0 || addc > 0) {
|
|
67902
|
-
expandRowsAndColumns(d, addr, addc);
|
|
67903
|
-
}
|
|
67904
67901
|
if (!d) return;
|
|
67905
67902
|
if (cfg.rowlen == null) {
|
|
67906
67903
|
cfg.rowlen = {};
|
|
@@ -68431,6 +68428,16 @@ function pasteHandlerOfCutPaste(ctx, copyRange) {
|
|
|
68431
68428
|
postPasteCut(ctx, source, target, copyRowlChange);
|
|
68432
68429
|
}
|
|
68433
68430
|
}
|
|
68431
|
+
function transofrmCellDataOfCopy(ctx, cellData, r, c) {
|
|
68432
|
+
var _currentData$data$r$c, _currentData$data, _currentData$data$r;
|
|
68433
|
+
var currentSheetId = ctx.currentSheetId,
|
|
68434
|
+
luckysheetfile = ctx.luckysheetfile;
|
|
68435
|
+
var currentData = luckysheetfile === null || luckysheetfile === void 0 ? void 0 : luckysheetfile.find(function (item) {
|
|
68436
|
+
return item.id === currentSheetId;
|
|
68437
|
+
});
|
|
68438
|
+
var originCell = (_currentData$data$r$c = (_currentData$data = currentData.data) === null || _currentData$data === void 0 ? void 0 : (_currentData$data$r = _currentData$data[r]) === null || _currentData$data$r === void 0 ? void 0 : _currentData$data$r[c]) !== null && _currentData$data$r$c !== void 0 ? _currentData$data$r$c : {};
|
|
68439
|
+
return _objectSpread2(_objectSpread2({}, originCell), _.pick(cellData, "v", "m"));
|
|
68440
|
+
}
|
|
68434
68441
|
function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
68435
68442
|
var _ctx$luckysheet_selec6, _ctx$luckysheet_selec7, _ctx$luckysheet_copy_5;
|
|
68436
68443
|
var allowEdit = isAllowEdit(ctx);
|
|
@@ -68520,8 +68527,11 @@ function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
|
68520
68527
|
var cellMaxLength = d[0].length;
|
|
68521
68528
|
var addr = copyh + minh - rowMaxLength;
|
|
68522
68529
|
var addc = copyc + minc - cellMaxLength;
|
|
68523
|
-
if (addr > 0
|
|
68524
|
-
|
|
68530
|
+
if (addr > 0) {
|
|
68531
|
+
copyh -= addr;
|
|
68532
|
+
}
|
|
68533
|
+
if (addc > 0) {
|
|
68534
|
+
copyc -= addc;
|
|
68525
68535
|
}
|
|
68526
68536
|
var borderInfoCompute = getBorderInfoCompute(ctx, copySheetIndex);
|
|
68527
68537
|
var c_dataVerification = ___default['default'].cloneDeep(ctx.luckysheetfile[getSheetIndex(ctx, copySheetIndex)].dataVerification) || {};
|
|
@@ -68607,6 +68617,7 @@ function pasteHandlerOfCopyPaste(ctx, copyRange) {
|
|
|
68607
68617
|
var value = null;
|
|
68608
68618
|
if ((_copyData = copyData[h - mth]) === null || _copyData === void 0 ? void 0 : _copyData[c - mtc]) {
|
|
68609
68619
|
value = ___default['default'].cloneDeep(copyData[h - mth][c - mtc]);
|
|
68620
|
+
value = transofrmCellDataOfCopy(ctx, value, h, c);
|
|
68610
68621
|
}
|
|
68611
68622
|
if (!___default['default'].isNil(value) && !___default['default'].isNil(value.f)) {
|
|
68612
68623
|
var func = value.f;
|
|
@@ -68935,6 +68946,7 @@ function handlePaste(ctx, e) {
|
|
|
68935
68946
|
while (c < colLen && !___default['default'].isNil(data[_r2][c])) {
|
|
68936
68947
|
c += 1;
|
|
68937
68948
|
}
|
|
68949
|
+
cell = transofrmCellDataOfCopy(ctx, cell, _r2, c);
|
|
68938
68950
|
if (c === colLen) {
|
|
68939
68951
|
return true;
|
|
68940
68952
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"repository": "http://114.55.85.79:19999/leankylin-front/leankylin-sheet",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@leankylin-sheet/formula-parser": "^1.2.
|
|
13
|
+
"@leankylin-sheet/formula-parser": "^1.2.12",
|
|
14
14
|
"dayjs": "^1.11.0",
|
|
15
15
|
"immer": "^9.0.12",
|
|
16
16
|
"lodash": "^4.17.21",
|