@fileverse-dev/fortune-core 1.1.74 → 1.1.75
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/modules/formula.js +2 -2
- package/es/modules/sheet.js +1 -1
- package/lib/modules/formula.js +2 -2
- package/lib/modules/sheet.js +1 -1
- package/package.json +1 -1
package/es/modules/formula.js
CHANGED
|
@@ -130,11 +130,11 @@ var FormulaCache = function () {
|
|
|
130
130
|
var splitedNumberString = cell.m.split(" ")[0];
|
|
131
131
|
return Number(splitedNumberString);
|
|
132
132
|
}
|
|
133
|
-
if (((_d = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _d === void 0 ? void 0 : _d.t) === "n" && !String(cell === null || cell === void 0 ? void 0 : cell.m).includes(
|
|
133
|
+
if (((_d = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _d === void 0 ? void 0 : _d.t) === "n" && !String(cell === null || cell === void 0 ? void 0 : cell.m).includes("%")) {
|
|
134
134
|
var n = Number(cell === null || cell === void 0 ? void 0 : cell.v);
|
|
135
135
|
return Number.isNaN(n) ? cell.v : n;
|
|
136
136
|
}
|
|
137
|
-
return String(cell === null || cell === void 0 ? void 0 : cell.m).includes(
|
|
137
|
+
return String(cell === null || cell === void 0 ? void 0 : cell.m).includes("%") ? cell === null || cell === void 0 ? void 0 : cell.m : cell === null || cell === void 0 ? void 0 : cell.v;
|
|
138
138
|
};
|
|
139
139
|
return FormulaCache;
|
|
140
140
|
}();
|
package/es/modules/sheet.js
CHANGED
|
@@ -184,7 +184,7 @@ export function editSheetName(ctx, editable) {
|
|
|
184
184
|
editable.innerText = oldtxt;
|
|
185
185
|
throw new Error(sheetconfig.sheetNamecannotIsEmptyError);
|
|
186
186
|
}
|
|
187
|
-
if (txt.
|
|
187
|
+
if (txt.charAt(0) === "'" || txt.charAt(txt.length - 1) === "'" || /[::\\/??*[\]]+/.test(txt)) {
|
|
188
188
|
editable.innerText = oldtxt;
|
|
189
189
|
throw new Error(sheetconfig.sheetNameSpecCharError);
|
|
190
190
|
}
|
package/lib/modules/formula.js
CHANGED
|
@@ -161,11 +161,11 @@ var FormulaCache = exports.FormulaCache = function () {
|
|
|
161
161
|
var splitedNumberString = cell.m.split(" ")[0];
|
|
162
162
|
return Number(splitedNumberString);
|
|
163
163
|
}
|
|
164
|
-
if (((_d = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _d === void 0 ? void 0 : _d.t) === "n" && !String(cell === null || cell === void 0 ? void 0 : cell.m).includes(
|
|
164
|
+
if (((_d = cell === null || cell === void 0 ? void 0 : cell.ct) === null || _d === void 0 ? void 0 : _d.t) === "n" && !String(cell === null || cell === void 0 ? void 0 : cell.m).includes("%")) {
|
|
165
165
|
var n = Number(cell === null || cell === void 0 ? void 0 : cell.v);
|
|
166
166
|
return Number.isNaN(n) ? cell.v : n;
|
|
167
167
|
}
|
|
168
|
-
return String(cell === null || cell === void 0 ? void 0 : cell.m).includes(
|
|
168
|
+
return String(cell === null || cell === void 0 ? void 0 : cell.m).includes("%") ? cell === null || cell === void 0 ? void 0 : cell.m : cell === null || cell === void 0 ? void 0 : cell.v;
|
|
169
169
|
};
|
|
170
170
|
return FormulaCache;
|
|
171
171
|
}();
|
package/lib/modules/sheet.js
CHANGED
|
@@ -197,7 +197,7 @@ function editSheetName(ctx, editable) {
|
|
|
197
197
|
editable.innerText = oldtxt;
|
|
198
198
|
throw new Error(sheetconfig.sheetNamecannotIsEmptyError);
|
|
199
199
|
}
|
|
200
|
-
if (txt.
|
|
200
|
+
if (txt.charAt(0) === "'" || txt.charAt(txt.length - 1) === "'" || /[::\\/??*[\]]+/.test(txt)) {
|
|
201
201
|
editable.innerText = oldtxt;
|
|
202
202
|
throw new Error(sheetconfig.sheetNameSpecCharError);
|
|
203
203
|
}
|