@leankylin-sheet/core 7.0.28 → 7.0.29
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/dist/index.esm.js +15 -3
- package/dist/index.js +15 -3
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -42217,7 +42217,7 @@ function getRangetxt(ctx, sheetId, range, currentId) {
|
|
|
42217
42217
|
var index = getSheetIndex(ctx, sheetId);
|
|
42218
42218
|
if (index == null) return "";
|
|
42219
42219
|
sheettxt = ctx.luckysheetfile[index].name.replace(/'/g, "''");
|
|
42220
|
-
if (/^[
|
|
42220
|
+
if (/^[A-Za-z0-9_\u4E00-\u9FFF]+$/.test(sheettxt)) {
|
|
42221
42221
|
sheettxt += "!";
|
|
42222
42222
|
} else {
|
|
42223
42223
|
sheettxt = "'".concat(sheettxt, "'!");
|
|
@@ -47268,8 +47268,20 @@ function editSheetName(ctx, editable) {
|
|
|
47268
47268
|
var calc_r = calc.r;
|
|
47269
47269
|
var calc_c = calc.c;
|
|
47270
47270
|
var f = data === null || data === void 0 ? void 0 : (_data$calc_r = data[calc_r]) === null || _data$calc_r === void 0 ? void 0 : (_data$calc_r$calc_c = _data$calc_r[calc_c]) === null || _data$calc_r$calc_c === void 0 ? void 0 : _data$calc_r$calc_c.f;
|
|
47271
|
-
if (f
|
|
47272
|
-
|
|
47271
|
+
if (f) {
|
|
47272
|
+
var oldRefQuoted = "'".concat(oldtxt.replace(/'/g, "''"), "'!");
|
|
47273
|
+
var oldRefPlain = "".concat(oldtxt, "!");
|
|
47274
|
+
var newRef = /^[A-Za-z0-9_\u4E00-\u9FFF]+$/.test(txt) ? "".concat(txt, "!") : "'".concat(txt.replace(/'/g, "''"), "'!");
|
|
47275
|
+
var newF = f;
|
|
47276
|
+
if (newF.includes(oldRefQuoted)) {
|
|
47277
|
+
newF = newF.split(oldRefQuoted).join(newRef);
|
|
47278
|
+
}
|
|
47279
|
+
if (newF.includes(oldRefPlain)) {
|
|
47280
|
+
newF = newF.split(oldRefPlain).join(newRef);
|
|
47281
|
+
}
|
|
47282
|
+
if (newF !== f) {
|
|
47283
|
+
data[calc_r][calc_c].f = newF;
|
|
47284
|
+
}
|
|
47273
47285
|
}
|
|
47274
47286
|
}
|
|
47275
47287
|
}
|
package/dist/index.js
CHANGED
|
@@ -42227,7 +42227,7 @@ function getRangetxt(ctx, sheetId, range, currentId) {
|
|
|
42227
42227
|
var index = getSheetIndex(ctx, sheetId);
|
|
42228
42228
|
if (index == null) return "";
|
|
42229
42229
|
sheettxt = ctx.luckysheetfile[index].name.replace(/'/g, "''");
|
|
42230
|
-
if (/^[
|
|
42230
|
+
if (/^[A-Za-z0-9_\u4E00-\u9FFF]+$/.test(sheettxt)) {
|
|
42231
42231
|
sheettxt += "!";
|
|
42232
42232
|
} else {
|
|
42233
42233
|
sheettxt = "'".concat(sheettxt, "'!");
|
|
@@ -47278,8 +47278,20 @@ function editSheetName(ctx, editable) {
|
|
|
47278
47278
|
var calc_r = calc.r;
|
|
47279
47279
|
var calc_c = calc.c;
|
|
47280
47280
|
var f = data === null || data === void 0 ? void 0 : (_data$calc_r = data[calc_r]) === null || _data$calc_r === void 0 ? void 0 : (_data$calc_r$calc_c = _data$calc_r[calc_c]) === null || _data$calc_r$calc_c === void 0 ? void 0 : _data$calc_r$calc_c.f;
|
|
47281
|
-
if (f
|
|
47282
|
-
|
|
47281
|
+
if (f) {
|
|
47282
|
+
var oldRefQuoted = "'".concat(oldtxt.replace(/'/g, "''"), "'!");
|
|
47283
|
+
var oldRefPlain = "".concat(oldtxt, "!");
|
|
47284
|
+
var newRef = /^[A-Za-z0-9_\u4E00-\u9FFF]+$/.test(txt) ? "".concat(txt, "!") : "'".concat(txt.replace(/'/g, "''"), "'!");
|
|
47285
|
+
var newF = f;
|
|
47286
|
+
if (newF.includes(oldRefQuoted)) {
|
|
47287
|
+
newF = newF.split(oldRefQuoted).join(newRef);
|
|
47288
|
+
}
|
|
47289
|
+
if (newF.includes(oldRefPlain)) {
|
|
47290
|
+
newF = newF.split(oldRefPlain).join(newRef);
|
|
47291
|
+
}
|
|
47292
|
+
if (newF !== f) {
|
|
47293
|
+
data[calc_r][calc_c].f = newF;
|
|
47294
|
+
}
|
|
47283
47295
|
}
|
|
47284
47296
|
}
|
|
47285
47297
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leankylin-sheet/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.29",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "father-build"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@leankylin-sheet/formula-parser": "7.0.
|
|
16
|
+
"@leankylin-sheet/formula-parser": "7.0.29",
|
|
17
17
|
"dayjs": "^1.11.0",
|
|
18
18
|
"immer": "^9.0.12",
|
|
19
19
|
"lodash": "^4.17.21",
|