@fileverse-dev/fortune-react 1.1.47 → 1.1.48
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.
|
@@ -54,13 +54,13 @@ var InputBox = function InputBox() {
|
|
|
54
54
|
var preText = useRef("");
|
|
55
55
|
var placeRef = useRef("");
|
|
56
56
|
var inputBoxStyle = useMemo(function () {
|
|
57
|
-
if (
|
|
57
|
+
if (firstSelectionActiveCell && context.luckysheetCellUpdate.length > 0) {
|
|
58
58
|
var flowdata = getFlowdata(context);
|
|
59
59
|
if (!flowdata) return {};
|
|
60
60
|
return getStyleByCell(context, flowdata, firstSelectionActiveCell.row_focus, firstSelectionActiveCell.column_focus);
|
|
61
61
|
}
|
|
62
62
|
return {};
|
|
63
|
-
}, [context.luckysheetfile, context.currentSheetId, context.luckysheetCellUpdate,
|
|
63
|
+
}, [context.luckysheetfile, context.currentSheetId, context.luckysheetCellUpdate, firstSelectionActiveCell]);
|
|
64
64
|
useLayoutEffect(function () {
|
|
65
65
|
var _a;
|
|
66
66
|
if (!context.allowEdit) {
|
|
@@ -202,11 +202,6 @@ var InputBox = function InputBox() {
|
|
|
202
202
|
lastKeyDownEventRef.current = new KeyboardEvent(e.type, e.nativeEvent);
|
|
203
203
|
preText.current = inputRef.current.innerText;
|
|
204
204
|
var allowListNavigation = true;
|
|
205
|
-
if (e.key === "Delete" || e.key === "Backspace") {
|
|
206
|
-
setTimeout(function () {
|
|
207
|
-
moveCursorToEnd(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
|
|
208
|
-
}, 5);
|
|
209
|
-
}
|
|
210
205
|
var refCell = placeRef.current;
|
|
211
206
|
if (e.key === "ArrowUp") {
|
|
212
207
|
refCell = decrementRow(placeRef.current);
|
|
@@ -647,7 +647,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
647
647
|
if ((curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) != null) {
|
|
648
648
|
if (format != null) {
|
|
649
649
|
currentFmt = format.text;
|
|
650
|
-
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes(
|
|
650
|
+
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes("#,##0")) || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0" || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0.00") {
|
|
651
651
|
currentFmt = "Number";
|
|
652
652
|
} else {
|
|
653
653
|
currentFmt = defaultFormat[defaultFormat.length - 1].text;
|
|
@@ -63,13 +63,13 @@ var InputBox = function InputBox() {
|
|
|
63
63
|
var preText = (0, _react.useRef)("");
|
|
64
64
|
var placeRef = (0, _react.useRef)("");
|
|
65
65
|
var inputBoxStyle = (0, _react.useMemo)(function () {
|
|
66
|
-
if (
|
|
66
|
+
if (firstSelectionActiveCell && context.luckysheetCellUpdate.length > 0) {
|
|
67
67
|
var flowdata = (0, _fortuneCore.getFlowdata)(context);
|
|
68
68
|
if (!flowdata) return {};
|
|
69
69
|
return (0, _fortuneCore.getStyleByCell)(context, flowdata, firstSelectionActiveCell.row_focus, firstSelectionActiveCell.column_focus);
|
|
70
70
|
}
|
|
71
71
|
return {};
|
|
72
|
-
}, [context.luckysheetfile, context.currentSheetId, context.luckysheetCellUpdate,
|
|
72
|
+
}, [context.luckysheetfile, context.currentSheetId, context.luckysheetCellUpdate, firstSelectionActiveCell]);
|
|
73
73
|
(0, _react.useLayoutEffect)(function () {
|
|
74
74
|
var _a;
|
|
75
75
|
if (!context.allowEdit) {
|
|
@@ -211,11 +211,6 @@ var InputBox = function InputBox() {
|
|
|
211
211
|
lastKeyDownEventRef.current = new KeyboardEvent(e.type, e.nativeEvent);
|
|
212
212
|
preText.current = inputRef.current.innerText;
|
|
213
213
|
var allowListNavigation = true;
|
|
214
|
-
if (e.key === "Delete" || e.key === "Backspace") {
|
|
215
|
-
setTimeout(function () {
|
|
216
|
-
(0, _helper.moveCursorToEnd)(inputRef === null || inputRef === void 0 ? void 0 : inputRef.current);
|
|
217
|
-
}, 5);
|
|
218
|
-
}
|
|
219
214
|
var refCell = placeRef.current;
|
|
220
215
|
if (e.key === "ArrowUp") {
|
|
221
216
|
refCell = (0, _helper.decrementRow)(placeRef.current);
|
|
@@ -656,7 +656,7 @@ var Toolbar = function Toolbar(_a) {
|
|
|
656
656
|
if ((curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) != null) {
|
|
657
657
|
if (format != null) {
|
|
658
658
|
currentFmt = format.text;
|
|
659
|
-
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes(
|
|
659
|
+
} else if (((_a = curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === null || _a === void 0 ? void 0 : _a.includes("#,##0")) || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0" || (curr_2 === null || curr_2 === void 0 ? void 0 : curr_2.fa) === "0.00") {
|
|
660
660
|
currentFmt = "Number";
|
|
661
661
|
} else {
|
|
662
662
|
currentFmt = defaultFormat[defaultFormat.length - 1].text;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fileverse-dev/fortune-react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48",
|
|
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.1.
|
|
19
|
+
"@fileverse-dev/fortune-core": "1.1.48",
|
|
20
20
|
"@fileverse/ui": "^4.1.7-patch-21",
|
|
21
21
|
"@tippyjs/react": "^4.2.6",
|
|
22
22
|
"@types/regenerator-runtime": "^0.13.6",
|