@fileverse-dev/fortune-core 1.1.74 → 1.1.77

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.
@@ -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('%') ? cell === null || cell === void 0 ? void 0 : cell.m : cell === null || cell === void 0 ? void 0 : cell.v;
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
  }();
@@ -42,7 +42,7 @@ export declare function fixColumnStyleOverflowInFreeze(ctx: Context, c1: number,
42
42
  width?: number;
43
43
  display?: string;
44
44
  };
45
- export declare function calcSelectionInfo(ctx: Context, lang?: string | null): {
45
+ export declare function calcSelectionInfo(ctx: Context): {
46
46
  numberC: number;
47
47
  count: number;
48
48
  sum: number;
@@ -18,7 +18,6 @@ import { getBorderInfoCompute } from "./border";
18
18
  import { escapeHTMLTag, getSheetIndex, isAllowEdit, replaceHtml } from "../utils";
19
19
  import { hasPartMC } from "./validation";
20
20
  import { update } from "./format";
21
- import SSF from "./ssf";
22
21
  import { CFSplitRange } from "./ConditionFormat";
23
22
  import { clearCellError } from "./error-state-helpers";
24
23
  export var selectionCache = {
@@ -1900,7 +1899,7 @@ export function fixColumnStyleOverflowInFreeze(ctx, c1, c2, freeze) {
1900
1899
  }
1901
1900
  return ret;
1902
1901
  }
1903
- export function calcSelectionInfo(ctx, lang) {
1902
+ export function calcSelectionInfo(ctx) {
1904
1903
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1905
1904
  var selection = ctx.luckysheet_select_save;
1906
1905
  var numberC = 0;
@@ -1935,11 +1934,10 @@ export function calcSelectionInfo(ctx, lang) {
1935
1934
  }
1936
1935
  }
1937
1936
  }
1938
- var formatString = lang && !["zh", "zh_tw"].includes(lang) ? "0.00" : "0.00";
1939
- var average = SSF.format(formatString, sum / numberC);
1940
- sum = SSF.format(formatString, sum);
1941
- max = SSF.format(formatString, max);
1942
- min = SSF.format(formatString, min);
1937
+ var average = String(sum / numberC);
1938
+ sum = sum;
1939
+ max = max;
1940
+ min = min;
1943
1941
  return {
1944
1942
  numberC: numberC,
1945
1943
  count: count,
@@ -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.length > 31 || txt.charAt(0) === "'" || txt.charAt(txt.length - 1) === "'" || /[::\\/??*[\]]+/.test(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
  }
@@ -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('%') ? cell === null || cell === void 0 ? void 0 : cell.m : cell === null || cell === void 0 ? void 0 : cell.v;
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
  }();
@@ -42,7 +42,7 @@ export declare function fixColumnStyleOverflowInFreeze(ctx: Context, c1: number,
42
42
  width?: number;
43
43
  display?: string;
44
44
  };
45
- export declare function calcSelectionInfo(ctx: Context, lang?: string | null): {
45
+ export declare function calcSelectionInfo(ctx: Context): {
46
46
  numberC: number;
47
47
  count: number;
48
48
  sum: number;
@@ -40,7 +40,6 @@ var _border = require("./border");
40
40
  var _utils = require("../utils");
41
41
  var _validation = require("./validation");
42
42
  var _format = require("./format");
43
- var _ssf = _interopRequireDefault(require("./ssf"));
44
43
  var _ConditionFormat = require("./ConditionFormat");
45
44
  var _errorStateHelpers = require("./error-state-helpers");
46
45
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1935,7 +1934,7 @@ function fixColumnStyleOverflowInFreeze(ctx, c1, c2, freeze) {
1935
1934
  }
1936
1935
  return ret;
1937
1936
  }
1938
- function calcSelectionInfo(ctx, lang) {
1937
+ function calcSelectionInfo(ctx) {
1939
1938
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1940
1939
  var selection = ctx.luckysheet_select_save;
1941
1940
  var numberC = 0;
@@ -1970,11 +1969,10 @@ function calcSelectionInfo(ctx, lang) {
1970
1969
  }
1971
1970
  }
1972
1971
  }
1973
- var formatString = lang && !["zh", "zh_tw"].includes(lang) ? "0.00" : "0.00";
1974
- var average = _ssf.default.format(formatString, sum / numberC);
1975
- sum = _ssf.default.format(formatString, sum);
1976
- max = _ssf.default.format(formatString, max);
1977
- min = _ssf.default.format(formatString, min);
1972
+ var average = String(sum / numberC);
1973
+ sum = sum;
1974
+ max = max;
1975
+ min = min;
1978
1976
  return {
1979
1977
  numberC: numberC,
1980
1978
  count: count,
@@ -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.length > 31 || txt.charAt(0) === "'" || txt.charAt(txt.length - 1) === "'" || /[::\\/??*[\]]+/.test(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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.1.74",
3
+ "version": "1.1.77",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",