@fileverse-dev/fortune-react 1.3.12-mixed → 1.3.12-mixed-a
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.
|
@@ -363,7 +363,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
363
363
|
var history = globalCache.current.undoList.pop();
|
|
364
364
|
if (history) {
|
|
365
365
|
setContext(function (ctx_) {
|
|
366
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
366
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
367
367
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
368
368
|
var _a;
|
|
369
369
|
return (_a = onePatch.value) === null || _a === void 0 ? void 0 : _a.borderInfo;
|
|
@@ -398,15 +398,18 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
398
398
|
};
|
|
399
399
|
inversedOptions.addSheet.value.celldata = dataToCelldata((_e = inversedOptions.addSheet.value) === null || _e === void 0 ? void 0 : _e.data);
|
|
400
400
|
delete inversedOptions.addSheet.value.data;
|
|
401
|
+
if ((_f = ctx_.hooks) === null || _f === void 0 ? void 0 : _f.afterOrderChanges) {
|
|
402
|
+
ctx_.hooks.afterOrderChanges();
|
|
403
|
+
}
|
|
401
404
|
}
|
|
402
405
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
403
406
|
emitYjsFromPatches(ctx_, newContext, history.inversePatches);
|
|
404
407
|
var sheetIdxAfterUndo = getSheetIndex(newContext, newContext.currentSheetId);
|
|
405
|
-
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((
|
|
408
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((_g = newContext.luckysheetfile[sheetIdxAfterUndo]) === null || _g === void 0 ? void 0 : _g.config) != null ? {
|
|
406
409
|
config: newContext.luckysheetfile[sheetIdxAfterUndo].config
|
|
407
410
|
} : {});
|
|
408
411
|
if (isBorderUndo) {
|
|
409
|
-
var nwborderlist = (
|
|
412
|
+
var nwborderlist = (_j = (_h = nw === null || nw === void 0 ? void 0 : nw.config) === null || _h === void 0 ? void 0 : _h.borderInfo) === null || _j === void 0 ? void 0 : _j.slice(0, -1);
|
|
410
413
|
nw = __assign(__assign({}, nw), {
|
|
411
414
|
config: __assign(__assign({}, nw.config), {
|
|
412
415
|
borderInfo: nwborderlist
|
|
@@ -372,7 +372,7 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
372
372
|
var history = globalCache.current.undoList.pop();
|
|
373
373
|
if (history) {
|
|
374
374
|
setContext(function (ctx_) {
|
|
375
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
375
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
376
376
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
377
377
|
var _a;
|
|
378
378
|
return (_a = onePatch.value) === null || _a === void 0 ? void 0 : _a.borderInfo;
|
|
@@ -407,15 +407,18 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
407
407
|
};
|
|
408
408
|
inversedOptions.addSheet.value.celldata = dataToCelldata((_e = inversedOptions.addSheet.value) === null || _e === void 0 ? void 0 : _e.data);
|
|
409
409
|
delete inversedOptions.addSheet.value.data;
|
|
410
|
+
if ((_f = ctx_.hooks) === null || _f === void 0 ? void 0 : _f.afterOrderChanges) {
|
|
411
|
+
ctx_.hooks.afterOrderChanges();
|
|
412
|
+
}
|
|
410
413
|
}
|
|
411
414
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
412
415
|
emitYjsFromPatches(ctx_, newContext, history.inversePatches);
|
|
413
416
|
var sheetIdxAfterUndo = (0, _fortuneCore.getSheetIndex)(newContext, newContext.currentSheetId);
|
|
414
|
-
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((
|
|
417
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((_g = newContext.luckysheetfile[sheetIdxAfterUndo]) === null || _g === void 0 ? void 0 : _g.config) != null ? {
|
|
415
418
|
config: newContext.luckysheetfile[sheetIdxAfterUndo].config
|
|
416
419
|
} : {});
|
|
417
420
|
if (isBorderUndo) {
|
|
418
|
-
var nwborderlist = (
|
|
421
|
+
var nwborderlist = (_j = (_h = nw === null || nw === void 0 ? void 0 : nw.config) === null || _h === void 0 ? void 0 : _h.borderInfo) === null || _j === void 0 ? void 0 : _j.slice(0, -1);
|
|
419
422
|
nw = __assign(__assign({}, nw), {
|
|
420
423
|
config: __assign(__assign({}, nw.config), {
|
|
421
424
|
borderInfo: nwborderlist
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.3.12-mixed",
|
|
3
|
+
"version": "1.3.12-mixed-a",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"tsc": "tsc"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fileverse-dev/fortune-core": "1.3.12-mixed",
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.3.12-mixed-a",
|
|
20
20
|
"@fileverse/ui": "5.0.0",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|