@fileverse-dev/fortune-core 1.3.10-yjs-4 → 1.3.10-yjs-5
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/es/api/range.js +20 -0
- package/es/events/paste.js +23 -19
- package/es/modules/dataVerification.js +34 -1
- package/es/modules/dropCell.js +60 -44
- package/es/modules/formula.js +14 -0
- package/es/modules/searchReplace.js +58 -2
- package/es/modules/selection.js +15 -13
- package/es/modules/sort.js +23 -0
- package/es/modules/splitColumn.js +21 -0
- package/es/modules/toolbar.js +16 -2
- package/lib/api/range.js +20 -0
- package/lib/events/paste.js +23 -19
- package/lib/modules/dataVerification.js +34 -1
- package/lib/modules/dropCell.js +60 -44
- package/lib/modules/formula.js +14 -0
- package/lib/modules/searchReplace.js +58 -2
- package/lib/modules/selection.js +15 -13
- package/lib/modules/sort.js +23 -0
- package/lib/modules/splitColumn.js +21 -0
- package/lib/modules/toolbar.js +16 -2
- package/package.json +1 -1
|
@@ -23,14 +23,35 @@ function getNullData(rlen, clen) {
|
|
|
23
23
|
return arr;
|
|
24
24
|
}
|
|
25
25
|
function updateMoreCell(r, c, dataMatrix, ctx) {
|
|
26
|
+
var _a;
|
|
26
27
|
if (ctx.allowEdit === false) return;
|
|
27
28
|
var flowdata = (0, _context.getFlowdata)(ctx);
|
|
29
|
+
var cellChanges = [];
|
|
28
30
|
dataMatrix.forEach(function (datas, i) {
|
|
29
31
|
datas.forEach(function (data, j) {
|
|
32
|
+
var _a, _b, _c;
|
|
30
33
|
var v = dataMatrix[i][j];
|
|
31
34
|
(0, _cell.setCellValue)(ctx, r + i, c + j, flowdata, v);
|
|
35
|
+
if ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _a === void 0 ? void 0 : _a.updateCellYdoc) {
|
|
36
|
+
var rr = r + i;
|
|
37
|
+
var cc = c + j;
|
|
38
|
+
cellChanges.push({
|
|
39
|
+
sheetId: ctx.currentSheetId,
|
|
40
|
+
path: ["celldata"],
|
|
41
|
+
value: {
|
|
42
|
+
r: rr,
|
|
43
|
+
c: cc,
|
|
44
|
+
v: (_c = (_b = flowdata === null || flowdata === void 0 ? void 0 : flowdata[rr]) === null || _b === void 0 ? void 0 : _b[cc]) !== null && _c !== void 0 ? _c : null
|
|
45
|
+
},
|
|
46
|
+
key: "".concat(rr, "_").concat(cc),
|
|
47
|
+
type: "update"
|
|
48
|
+
});
|
|
49
|
+
}
|
|
32
50
|
});
|
|
33
51
|
});
|
|
52
|
+
if (cellChanges.length > 0 && ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _a === void 0 ? void 0 : _a.updateCellYdoc)) {
|
|
53
|
+
ctx.hooks.updateCellYdoc(cellChanges);
|
|
54
|
+
}
|
|
34
55
|
}
|
|
35
56
|
function getRegStr(regStr, splitSymbols) {
|
|
36
57
|
regStr = "";
|
package/lib/modules/toolbar.js
CHANGED
|
@@ -429,7 +429,8 @@ function activeFormulaInput(cellInput, fxInput, ctx, row_index, col_index, rowh,
|
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
431
|
function backFormulaInput(d, r, c, rowh, columnh, formula, ctx) {
|
|
432
|
-
var _a;
|
|
432
|
+
var _a, _b, _c;
|
|
433
|
+
var _d;
|
|
433
434
|
var f = "=".concat(formula.toUpperCase(), "(").concat((0, _cell.getRangetxt)(ctx, ctx.currentSheetId, {
|
|
434
435
|
row: rowh,
|
|
435
436
|
column: columnh
|
|
@@ -440,7 +441,20 @@ function backFormulaInput(d, r, c, rowh, columnh, formula, ctx) {
|
|
|
440
441
|
f: v[2]
|
|
441
442
|
};
|
|
442
443
|
(0, _cell.setCellValue)(ctx, r, c, d, value);
|
|
443
|
-
(_a = ctx.
|
|
444
|
+
if ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _a === void 0 ? void 0 : _a.updateCellYdoc) {
|
|
445
|
+
ctx.hooks.updateCellYdoc([{
|
|
446
|
+
sheetId: ctx.currentSheetId,
|
|
447
|
+
path: ["celldata"],
|
|
448
|
+
value: {
|
|
449
|
+
r: r,
|
|
450
|
+
c: c,
|
|
451
|
+
v: (_c = (_b = d === null || d === void 0 ? void 0 : d[r]) === null || _b === void 0 ? void 0 : _b[c]) !== null && _c !== void 0 ? _c : null
|
|
452
|
+
},
|
|
453
|
+
key: "".concat(r, "_").concat(c),
|
|
454
|
+
type: "update"
|
|
455
|
+
}]);
|
|
456
|
+
}
|
|
457
|
+
(_d = ctx.formulaCache).execFunctionExist || (_d.execFunctionExist = []);
|
|
444
458
|
ctx.formulaCache.execFunctionExist.push({
|
|
445
459
|
r: r,
|
|
446
460
|
c: c,
|