@fileverse-dev/fortune-core 1.2.90-ydoc-13 → 1.2.90-ydoc-14
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/events/paste.js +9 -9
- package/es/modules/hyperlink.js +14 -0
- package/es/modules/selection.js +1 -1
- package/es/modules/toolbar.js +4 -4
- package/es/settings.d.ts +1 -1
- package/lib/events/paste.js +9 -9
- package/lib/modules/hyperlink.js +14 -0
- package/lib/modules/selection.js +1 -1
- package/lib/modules/toolbar.js +4 -4
- package/lib/settings.d.ts +1 -1
- package/package.json +1 -1
package/es/events/paste.js
CHANGED
|
@@ -208,14 +208,14 @@ var handleFormulaOnPaste = function handleFormulaOnPaste(ctx, d) {
|
|
|
208
208
|
d[r] = x;
|
|
209
209
|
changes.push({
|
|
210
210
|
sheetId: ctx.currentSheetId,
|
|
211
|
-
path: [
|
|
211
|
+
path: ["celldata"],
|
|
212
212
|
value: {
|
|
213
213
|
r: r,
|
|
214
214
|
c: c,
|
|
215
215
|
v: d[r][c]
|
|
216
216
|
},
|
|
217
|
-
key: r
|
|
218
|
-
type:
|
|
217
|
+
key: "".concat(r, "_").concat(c),
|
|
218
|
+
type: "update"
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -323,14 +323,14 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
323
323
|
}
|
|
324
324
|
changes.push({
|
|
325
325
|
sheetId: ctx.currentSheetId,
|
|
326
|
-
path: [
|
|
326
|
+
path: ["celldata"],
|
|
327
327
|
value: {
|
|
328
328
|
r: h,
|
|
329
329
|
c: c,
|
|
330
330
|
v: d[h][c]
|
|
331
331
|
},
|
|
332
|
-
key: h
|
|
333
|
-
type:
|
|
332
|
+
key: "".concat(h, "_").concat(c),
|
|
333
|
+
type: "update"
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
d[h] = x;
|
|
@@ -465,14 +465,14 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
465
465
|
}
|
|
466
466
|
changes.push(changes.push({
|
|
467
467
|
sheetId: ctx.currentSheetId,
|
|
468
|
-
path: [
|
|
468
|
+
path: ["celldata"],
|
|
469
469
|
value: {
|
|
470
470
|
r: r,
|
|
471
471
|
c: c,
|
|
472
472
|
v: d[r][c]
|
|
473
473
|
},
|
|
474
|
-
key: r
|
|
475
|
-
type:
|
|
474
|
+
key: "".concat(r, "_").concat(c),
|
|
475
|
+
type: "update"
|
|
476
476
|
}));
|
|
477
477
|
}
|
|
478
478
|
d[r + curR] = x;
|
package/es/modules/hyperlink.js
CHANGED
|
@@ -39,6 +39,7 @@ export function getCellHyperlink(ctx, r, c) {
|
|
|
39
39
|
return undefined;
|
|
40
40
|
}
|
|
41
41
|
export function saveHyperlink(ctx, r, c, linkText, linkType, linkAddress) {
|
|
42
|
+
var _a, _b;
|
|
42
43
|
var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId);
|
|
43
44
|
var flowdata = getFlowdata(ctx);
|
|
44
45
|
if (sheetIndex != null && flowdata != null && linkType && linkAddress) {
|
|
@@ -59,6 +60,19 @@ export function saveHyperlink(ctx, r, c, linkText, linkType, linkAddress) {
|
|
|
59
60
|
};
|
|
60
61
|
flowdata[r][c] = cell;
|
|
61
62
|
ctx.linkCard = undefined;
|
|
63
|
+
if ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _a === void 0 ? void 0 : _a.updateCellYdoc) {
|
|
64
|
+
(_b = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _b === void 0 ? void 0 : _b.updateCellYdoc([{
|
|
65
|
+
sheetId: ctx.currentSheetId,
|
|
66
|
+
path: ["celldata"],
|
|
67
|
+
value: {
|
|
68
|
+
r: r,
|
|
69
|
+
c: c,
|
|
70
|
+
v: cell
|
|
71
|
+
},
|
|
72
|
+
key: "".concat(r, "_").concat(c),
|
|
73
|
+
type: "update"
|
|
74
|
+
}]);
|
|
75
|
+
}
|
|
62
76
|
}
|
|
63
77
|
}
|
|
64
78
|
export function removeHyperlink(ctx, r, c) {
|
package/es/modules/selection.js
CHANGED
package/es/modules/toolbar.js
CHANGED
|
@@ -76,14 +76,14 @@ export function updateFormatCell(ctx, d, attr, foucsStatus, row_st, row_ed, col_
|
|
|
76
76
|
}
|
|
77
77
|
changes.push({
|
|
78
78
|
sheetId: ctx.currentSheetId,
|
|
79
|
-
path: [
|
|
79
|
+
path: ["celldata"],
|
|
80
80
|
value: {
|
|
81
81
|
r: r,
|
|
82
82
|
c: c,
|
|
83
83
|
v: d[r][c]
|
|
84
84
|
},
|
|
85
|
-
key: r
|
|
86
|
-
type:
|
|
85
|
+
key: "".concat(r, "_").concat(c),
|
|
86
|
+
type: "update"
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
if ((_x = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _x === void 0 ? void 0 : _x.updateCellYdoc) {
|
|
@@ -215,7 +215,7 @@ export function updateFormatCell(ctx, d, attr, foucsStatus, row_st, row_ed, col_
|
|
|
215
215
|
}
|
|
216
216
|
changes.push({
|
|
217
217
|
sheetId: ctx.currentSheetId,
|
|
218
|
-
path: [
|
|
218
|
+
path: ["celldata"],
|
|
219
219
|
value: {
|
|
220
220
|
r: r,
|
|
221
221
|
c: c,
|
package/es/settings.d.ts
CHANGED
package/lib/events/paste.js
CHANGED
|
@@ -221,14 +221,14 @@ var handleFormulaOnPaste = function handleFormulaOnPaste(ctx, d) {
|
|
|
221
221
|
d[r] = x;
|
|
222
222
|
changes.push({
|
|
223
223
|
sheetId: ctx.currentSheetId,
|
|
224
|
-
path: [
|
|
224
|
+
path: ["celldata"],
|
|
225
225
|
value: {
|
|
226
226
|
r: r,
|
|
227
227
|
c: c,
|
|
228
228
|
v: d[r][c]
|
|
229
229
|
},
|
|
230
|
-
key: r
|
|
231
|
-
type:
|
|
230
|
+
key: "".concat(r, "_").concat(c),
|
|
231
|
+
type: "update"
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}
|
|
@@ -336,14 +336,14 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
336
336
|
}
|
|
337
337
|
changes.push({
|
|
338
338
|
sheetId: ctx.currentSheetId,
|
|
339
|
-
path: [
|
|
339
|
+
path: ["celldata"],
|
|
340
340
|
value: {
|
|
341
341
|
r: h,
|
|
342
342
|
c: c,
|
|
343
343
|
v: d[h][c]
|
|
344
344
|
},
|
|
345
|
-
key: h
|
|
346
|
-
type:
|
|
345
|
+
key: "".concat(h, "_").concat(c),
|
|
346
|
+
type: "update"
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
349
|
d[h] = x;
|
|
@@ -478,14 +478,14 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
478
478
|
}
|
|
479
479
|
changes.push(changes.push({
|
|
480
480
|
sheetId: ctx.currentSheetId,
|
|
481
|
-
path: [
|
|
481
|
+
path: ["celldata"],
|
|
482
482
|
value: {
|
|
483
483
|
r: r,
|
|
484
484
|
c: c,
|
|
485
485
|
v: d[r][c]
|
|
486
486
|
},
|
|
487
|
-
key: r
|
|
488
|
-
type:
|
|
487
|
+
key: "".concat(r, "_").concat(c),
|
|
488
|
+
type: "update"
|
|
489
489
|
}));
|
|
490
490
|
}
|
|
491
491
|
d[r + curR] = x;
|
package/lib/modules/hyperlink.js
CHANGED
|
@@ -55,6 +55,7 @@ function getCellHyperlink(ctx, r, c) {
|
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
57
|
function saveHyperlink(ctx, r, c, linkText, linkType, linkAddress) {
|
|
58
|
+
var _a, _b;
|
|
58
59
|
var sheetIndex = (0, _utils.getSheetIndex)(ctx, ctx.currentSheetId);
|
|
59
60
|
var flowdata = (0, _context.getFlowdata)(ctx);
|
|
60
61
|
if (sheetIndex != null && flowdata != null && linkType && linkAddress) {
|
|
@@ -75,6 +76,19 @@ function saveHyperlink(ctx, r, c, linkText, linkType, linkAddress) {
|
|
|
75
76
|
};
|
|
76
77
|
flowdata[r][c] = cell;
|
|
77
78
|
ctx.linkCard = undefined;
|
|
79
|
+
if ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _a === void 0 ? void 0 : _a.updateCellYdoc) {
|
|
80
|
+
(_b = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _b === void 0 ? void 0 : _b.updateCellYdoc([{
|
|
81
|
+
sheetId: ctx.currentSheetId,
|
|
82
|
+
path: ["celldata"],
|
|
83
|
+
value: {
|
|
84
|
+
r: r,
|
|
85
|
+
c: c,
|
|
86
|
+
v: cell
|
|
87
|
+
},
|
|
88
|
+
key: "".concat(r, "_").concat(c),
|
|
89
|
+
type: "update"
|
|
90
|
+
}]);
|
|
91
|
+
}
|
|
78
92
|
}
|
|
79
93
|
}
|
|
80
94
|
function removeHyperlink(ctx, r, c) {
|
package/lib/modules/selection.js
CHANGED
package/lib/modules/toolbar.js
CHANGED
|
@@ -109,14 +109,14 @@ function updateFormatCell(ctx, d, attr, foucsStatus, row_st, row_ed, col_st, col
|
|
|
109
109
|
}
|
|
110
110
|
changes.push({
|
|
111
111
|
sheetId: ctx.currentSheetId,
|
|
112
|
-
path: [
|
|
112
|
+
path: ["celldata"],
|
|
113
113
|
value: {
|
|
114
114
|
r: r,
|
|
115
115
|
c: c,
|
|
116
116
|
v: d[r][c]
|
|
117
117
|
},
|
|
118
|
-
key: r
|
|
119
|
-
type:
|
|
118
|
+
key: "".concat(r, "_").concat(c),
|
|
119
|
+
type: "update"
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
if ((_x = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _x === void 0 ? void 0 : _x.updateCellYdoc) {
|
|
@@ -248,7 +248,7 @@ function updateFormatCell(ctx, d, attr, foucsStatus, row_st, row_ed, col_st, col
|
|
|
248
248
|
}
|
|
249
249
|
changes.push({
|
|
250
250
|
sheetId: ctx.currentSheetId,
|
|
251
|
-
path: [
|
|
251
|
+
path: ["celldata"],
|
|
252
252
|
value: {
|
|
253
253
|
r: r,
|
|
254
254
|
c: c,
|
package/lib/settings.d.ts
CHANGED