@fileverse-dev/fortune-core 1.1.49 → 1.1.50
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/keyboard.js
CHANGED
|
@@ -355,7 +355,7 @@ export function handleArrowKey(ctx, e) {
|
|
|
355
355
|
var spans = doc.querySelectorAll("span");
|
|
356
356
|
var lastSpan = spans[spans.length - 1];
|
|
357
357
|
var notFunctionInit = !((_b = document.getElementById("luckysheet-rich-text-editor")) === null || _b === void 0 ? void 0 : _b.innerText.includes("("));
|
|
358
|
-
if ((lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText.includes(")")) || notFunctionInit && /^[a-zA-Z]+$/.test(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) && !_.includes(["="], lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
358
|
+
if ((lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText.includes(")")) || (lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) === '""' || notFunctionInit && /^[a-zA-Z]+$/.test(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) && !_.includes(["="], lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
359
359
|
return;
|
|
360
360
|
}
|
|
361
361
|
}
|
package/es/modules/formula.js
CHANGED
|
@@ -28,7 +28,6 @@ import { locale } from "../locale";
|
|
|
28
28
|
import { colors } from "./color";
|
|
29
29
|
import { colLocation, mousePosition, rowLocation } from "./location";
|
|
30
30
|
import { cancelFunctionrangeSelected, seletedHighlistByindex, spillSortResult } from ".";
|
|
31
|
-
import { isLetterNumberPattern, removeLastSpan } from "../utils/index";
|
|
32
31
|
var functionHTMLIndex = 0;
|
|
33
32
|
var rangeIndexes = [];
|
|
34
33
|
var operatorPriority = {
|
|
@@ -1949,14 +1948,6 @@ export function functionStrChange(txt, type, rc, orient, stindex, step) {
|
|
|
1949
1948
|
}
|
|
1950
1949
|
export function rangeSetValue(ctx, cellInput, selected, fxInput) {
|
|
1951
1950
|
var _a, _b, _c, _d, _e;
|
|
1952
|
-
var parser = new DOMParser();
|
|
1953
|
-
var doc = parser.parseFromString("<div>".concat(cellInput.innerHTML, "</div>"), "text/html");
|
|
1954
|
-
var spans = doc.querySelectorAll("span");
|
|
1955
|
-
var lastSpan = spans[spans.length - 1];
|
|
1956
|
-
if (lastSpan && isLetterNumberPattern(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
1957
|
-
var htmlR = removeLastSpan(cellInput.innerHTML);
|
|
1958
|
-
cellInput.innerHTML = "".concat(htmlR);
|
|
1959
|
-
}
|
|
1960
1951
|
var $editor = cellInput;
|
|
1961
1952
|
var $copyTo = fxInput;
|
|
1962
1953
|
if (((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id) === "luckysheet-functionbox-cell") {
|
package/lib/events/keyboard.js
CHANGED
|
@@ -365,7 +365,7 @@ function handleArrowKey(ctx, e) {
|
|
|
365
365
|
var spans = doc.querySelectorAll("span");
|
|
366
366
|
var lastSpan = spans[spans.length - 1];
|
|
367
367
|
var notFunctionInit = !((_b = document.getElementById("luckysheet-rich-text-editor")) === null || _b === void 0 ? void 0 : _b.innerText.includes("("));
|
|
368
|
-
if ((lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText.includes(")")) || notFunctionInit && /^[a-zA-Z]+$/.test(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) && !_lodash.default.includes(["="], lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
368
|
+
if ((lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText.includes(")")) || (lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) === '""' || notFunctionInit && /^[a-zA-Z]+$/.test(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText) && !_lodash.default.includes(["="], lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
371
|
}
|
package/lib/modules/formula.js
CHANGED
|
@@ -38,7 +38,6 @@ var _locale = require("../locale");
|
|
|
38
38
|
var _color = require("./color");
|
|
39
39
|
var _location = require("./location");
|
|
40
40
|
var _2 = require(".");
|
|
41
|
-
var _index = require("../utils/index");
|
|
42
41
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
43
42
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
44
43
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
@@ -1979,14 +1978,6 @@ function functionStrChange(txt, type, rc, orient, stindex, step) {
|
|
|
1979
1978
|
}
|
|
1980
1979
|
function rangeSetValue(ctx, cellInput, selected, fxInput) {
|
|
1981
1980
|
var _a, _b, _c, _d, _e;
|
|
1982
|
-
var parser = new DOMParser();
|
|
1983
|
-
var doc = parser.parseFromString("<div>".concat(cellInput.innerHTML, "</div>"), "text/html");
|
|
1984
|
-
var spans = doc.querySelectorAll("span");
|
|
1985
|
-
var lastSpan = spans[spans.length - 1];
|
|
1986
|
-
if (lastSpan && (0, _index.isLetterNumberPattern)(lastSpan === null || lastSpan === void 0 ? void 0 : lastSpan.innerText)) {
|
|
1987
|
-
var htmlR = (0, _index.removeLastSpan)(cellInput.innerHTML);
|
|
1988
|
-
cellInput.innerHTML = "".concat(htmlR);
|
|
1989
|
-
}
|
|
1990
1981
|
var $editor = cellInput;
|
|
1991
1982
|
var $copyTo = fxInput;
|
|
1992
1983
|
if (((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id) === "luckysheet-functionbox-cell") {
|