@fileverse-dev/fortune-react 1.3.3 → 1.3.4-date-format-2
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.
|
@@ -144,7 +144,7 @@ var DataVerification = function DataVerification() {
|
|
|
144
144
|
var matchingCells = findMatchingCells(context, sourceCell.row, sourceCell.col);
|
|
145
145
|
if (matchingCells.length > 1) {
|
|
146
146
|
var allMatchingRange_1 = cellsToRangeString(context, matchingCells);
|
|
147
|
-
showDialog("
|
|
147
|
+
showDialog("There are ".concat(matchingCells.length, " cells with the same validation. Do you want to make changes to all of them?"), "yesno", "Apply Changes", "All other cells", "Just this instance", function () {
|
|
148
148
|
applyValidation(allMatchingRange_1);
|
|
149
149
|
hideDialog();
|
|
150
150
|
}, function () {
|
|
@@ -262,7 +262,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
262
262
|
var history = globalCache.current.undoList.pop();
|
|
263
263
|
if (history) {
|
|
264
264
|
setContext(function (ctx_) {
|
|
265
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
265
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
266
266
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
267
267
|
var _a;
|
|
268
268
|
return (_a = onePatch.value) === null || _a === void 0 ? void 0 : _a.borderInfo;
|
|
@@ -299,16 +299,19 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
299
299
|
delete inversedOptions.addSheet.value.data;
|
|
300
300
|
}
|
|
301
301
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
302
|
-
var
|
|
302
|
+
var sheetIdxAfterUndo = getSheetIndex(newContext, newContext.currentSheetId);
|
|
303
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((_f = newContext.luckysheetfile[sheetIdxAfterUndo]) === null || _f === void 0 ? void 0 : _f.config) != null ? {
|
|
304
|
+
config: newContext.luckysheetfile[sheetIdxAfterUndo].config
|
|
305
|
+
} : {});
|
|
303
306
|
if (isBorderUndo) {
|
|
304
|
-
var nwborderlist = (
|
|
307
|
+
var nwborderlist = (_h = (_g = nw === null || nw === void 0 ? void 0 : nw.config) === null || _g === void 0 ? void 0 : _g.borderInfo) === null || _h === void 0 ? void 0 : _h.slice(0, -1);
|
|
305
308
|
nw = __assign(__assign({}, nw), {
|
|
306
309
|
config: __assign(__assign({}, nw.config), {
|
|
307
310
|
borderInfo: nwborderlist
|
|
308
311
|
})
|
|
309
312
|
});
|
|
310
313
|
}
|
|
311
|
-
return
|
|
314
|
+
return nw;
|
|
312
315
|
});
|
|
313
316
|
}
|
|
314
317
|
}, [emitOp, globalCache]);
|
|
@@ -316,7 +319,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
316
319
|
var history = globalCache.current.redoList.pop();
|
|
317
320
|
if (history) {
|
|
318
321
|
setContext(function (ctx_) {
|
|
319
|
-
var _a, _b, _c;
|
|
322
|
+
var _a, _b, _c, _d;
|
|
320
323
|
var newContext = applyPatches(ctx_, history.patches);
|
|
321
324
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
322
325
|
var _a;
|
|
@@ -324,16 +327,19 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
324
327
|
});
|
|
325
328
|
globalCache.current.undoList.push(history);
|
|
326
329
|
emitOp(newContext, history.patches, history.options);
|
|
327
|
-
var
|
|
330
|
+
var sheetIdxAfterRedo = getSheetIndex(newContext, newContext.currentSheetId);
|
|
331
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterRedo != null && ((_a = newContext.luckysheetfile[sheetIdxAfterRedo]) === null || _a === void 0 ? void 0 : _a.config) != null ? {
|
|
332
|
+
config: newContext.luckysheetfile[sheetIdxAfterRedo].config
|
|
333
|
+
} : {});
|
|
328
334
|
if (isBorderUndo) {
|
|
329
|
-
var nwborderlist = ((
|
|
335
|
+
var nwborderlist = ((_c = (_b = nw === null || nw === void 0 ? void 0 : nw.config) === null || _b === void 0 ? void 0 : _b.borderInfo) !== null && _c !== void 0 ? _c : []).concat((_d = history.patches[0].value) === null || _d === void 0 ? void 0 : _d.borderInfo[0]);
|
|
330
336
|
nw = __assign(__assign({}, nw), {
|
|
331
337
|
config: __assign(__assign({}, nw.config), {
|
|
332
338
|
borderInfo: nwborderlist
|
|
333
339
|
})
|
|
334
340
|
});
|
|
335
341
|
}
|
|
336
|
-
return
|
|
342
|
+
return nw;
|
|
337
343
|
});
|
|
338
344
|
}
|
|
339
345
|
}, [emitOp, globalCache]);
|
|
@@ -153,7 +153,7 @@ var DataVerification = function DataVerification() {
|
|
|
153
153
|
var matchingCells = (0, _helpers.findMatchingCells)(context, sourceCell.row, sourceCell.col);
|
|
154
154
|
if (matchingCells.length > 1) {
|
|
155
155
|
var allMatchingRange_1 = (0, _helpers.cellsToRangeString)(context, matchingCells);
|
|
156
|
-
showDialog("
|
|
156
|
+
showDialog("There are ".concat(matchingCells.length, " cells with the same validation. Do you want to make changes to all of them?"), "yesno", "Apply Changes", "All other cells", "Just this instance", function () {
|
|
157
157
|
applyValidation(allMatchingRange_1);
|
|
158
158
|
hideDialog();
|
|
159
159
|
}, function () {
|
|
@@ -271,7 +271,7 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
271
271
|
var history = globalCache.current.undoList.pop();
|
|
272
272
|
if (history) {
|
|
273
273
|
setContext(function (ctx_) {
|
|
274
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
274
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
275
275
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
276
276
|
var _a;
|
|
277
277
|
return (_a = onePatch.value) === null || _a === void 0 ? void 0 : _a.borderInfo;
|
|
@@ -308,16 +308,19 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
308
308
|
delete inversedOptions.addSheet.value.data;
|
|
309
309
|
}
|
|
310
310
|
emitOp(newContext, history.inversePatches, inversedOptions, true);
|
|
311
|
-
var
|
|
311
|
+
var sheetIdxAfterUndo = (0, _fortuneCore.getSheetIndex)(newContext, newContext.currentSheetId);
|
|
312
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterUndo != null && ((_f = newContext.luckysheetfile[sheetIdxAfterUndo]) === null || _f === void 0 ? void 0 : _f.config) != null ? {
|
|
313
|
+
config: newContext.luckysheetfile[sheetIdxAfterUndo].config
|
|
314
|
+
} : {});
|
|
312
315
|
if (isBorderUndo) {
|
|
313
|
-
var nwborderlist = (
|
|
316
|
+
var nwborderlist = (_h = (_g = nw === null || nw === void 0 ? void 0 : nw.config) === null || _g === void 0 ? void 0 : _g.borderInfo) === null || _h === void 0 ? void 0 : _h.slice(0, -1);
|
|
314
317
|
nw = __assign(__assign({}, nw), {
|
|
315
318
|
config: __assign(__assign({}, nw.config), {
|
|
316
319
|
borderInfo: nwborderlist
|
|
317
320
|
})
|
|
318
321
|
});
|
|
319
322
|
}
|
|
320
|
-
return
|
|
323
|
+
return nw;
|
|
321
324
|
});
|
|
322
325
|
}
|
|
323
326
|
}, [emitOp, globalCache]);
|
|
@@ -325,7 +328,7 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
325
328
|
var history = globalCache.current.redoList.pop();
|
|
326
329
|
if (history) {
|
|
327
330
|
setContext(function (ctx_) {
|
|
328
|
-
var _a, _b, _c;
|
|
331
|
+
var _a, _b, _c, _d;
|
|
329
332
|
var newContext = (0, _immer.applyPatches)(ctx_, history.patches);
|
|
330
333
|
var isBorderUndo = history.patches.some(function (onePatch) {
|
|
331
334
|
var _a;
|
|
@@ -333,16 +336,19 @@ var Workbook = /*#__PURE__*/_react.default.forwardRef(function (_a, ref) {
|
|
|
333
336
|
});
|
|
334
337
|
globalCache.current.undoList.push(history);
|
|
335
338
|
emitOp(newContext, history.patches, history.options);
|
|
336
|
-
var
|
|
339
|
+
var sheetIdxAfterRedo = (0, _fortuneCore.getSheetIndex)(newContext, newContext.currentSheetId);
|
|
340
|
+
var nw = __assign(__assign({}, newContext), sheetIdxAfterRedo != null && ((_a = newContext.luckysheetfile[sheetIdxAfterRedo]) === null || _a === void 0 ? void 0 : _a.config) != null ? {
|
|
341
|
+
config: newContext.luckysheetfile[sheetIdxAfterRedo].config
|
|
342
|
+
} : {});
|
|
337
343
|
if (isBorderUndo) {
|
|
338
|
-
var nwborderlist = ((
|
|
344
|
+
var nwborderlist = ((_c = (_b = nw === null || nw === void 0 ? void 0 : nw.config) === null || _b === void 0 ? void 0 : _b.borderInfo) !== null && _c !== void 0 ? _c : []).concat((_d = history.patches[0].value) === null || _d === void 0 ? void 0 : _d.borderInfo[0]);
|
|
339
345
|
nw = __assign(__assign({}, nw), {
|
|
340
346
|
config: __assign(__assign({}, nw.config), {
|
|
341
347
|
borderInfo: nwborderlist
|
|
342
348
|
})
|
|
343
349
|
});
|
|
344
350
|
}
|
|
345
|
-
return
|
|
351
|
+
return nw;
|
|
346
352
|
});
|
|
347
353
|
}
|
|
348
354
|
}, [emitOp, globalCache]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4-date-format-2",
|
|
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.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.3.4-date-format-2",
|
|
20
20
|
"@fileverse/ui": "5.0.0",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|