@extend-ai/react-xlsx 0.20.0 → 0.20.1
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/README.md +1 -0
- package/dist/{chart-renderer-AAVZ34BF.cjs → chart-renderer-K2VM257E.cjs} +5 -5
- package/dist/{chart-renderer-AAVZ34BF.cjs.map → chart-renderer-K2VM257E.cjs.map} +1 -1
- package/dist/{chart-renderer-NM5UVCTO.cjs → chart-renderer-K6GORT3R.cjs} +5 -5
- package/dist/{chart-renderer-NM5UVCTO.cjs.map → chart-renderer-K6GORT3R.cjs.map} +1 -1
- package/dist/{chunk-MCFUTO4J.cjs → chunk-2MVEKDY2.cjs} +4 -4
- package/dist/{chunk-MCFUTO4J.cjs.map → chunk-2MVEKDY2.cjs.map} +1 -1
- package/dist/{chunk-6K3NSKDJ.cjs → chunk-54YBFWL3.cjs} +4 -4
- package/dist/{chunk-6K3NSKDJ.cjs.map → chunk-54YBFWL3.cjs.map} +1 -1
- package/dist/{chunk-T5WZHPIN.cjs → chunk-AD4CGQN2.cjs} +2 -2
- package/dist/{chunk-T5WZHPIN.cjs.map → chunk-AD4CGQN2.cjs.map} +1 -1
- package/dist/{chunk-QN3D3JS2.js → chunk-GXJO6CK6.js} +123 -29
- package/dist/chunk-GXJO6CK6.js.map +1 -0
- package/dist/{chunk-2YBG7XQ3.cjs → chunk-HAHCVXCU.cjs} +910 -816
- package/dist/chunk-HAHCVXCU.cjs.map +1 -0
- package/dist/index.cjs +605 -527
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +102 -24
- package/dist/index.js.map +1 -1
- package/dist/{internal-DrXSHYJZ.d.cts → internal-trWFv9In.d.cts} +3 -0
- package/dist/{internal-DrXSHYJZ.d.ts → internal-trWFv9In.d.ts} +3 -0
- package/dist/internal.cjs +4 -4
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{region-map-geography-6TGXBY3V.cjs → region-map-geography-VEN5CPRS.cjs} +2 -2
- package/dist/{region-map-geography-6TGXBY3V.cjs.map → region-map-geography-VEN5CPRS.cjs.map} +1 -1
- package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs → spreadsheet-font-assets-6FKCVICP.cjs} +2 -2
- package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs.map → spreadsheet-font-assets-6FKCVICP.cjs.map} +1 -1
- package/dist/{surface-regl-AY7JZVYY.cjs → surface-regl-2NNG62KS.cjs} +2 -2
- package/dist/{surface-regl-AY7JZVYY.cjs.map → surface-regl-2NNG62KS.cjs.map} +1 -1
- package/dist/{surface-regl-5Z6IVOID.cjs → surface-regl-SUJ2TFZA.cjs} +2 -2
- package/dist/{surface-regl-5Z6IVOID.cjs.map → surface-regl-SUJ2TFZA.cjs.map} +1 -1
- package/dist/vanilla.cjs +4 -4
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +1 -1
- package/dist/xlsx-worker.js +67 -1
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2YBG7XQ3.cjs.map +0 -1
- package/dist/chunk-QN3D3JS2.js.map +0 -1
|
@@ -42,9 +42,9 @@ function createChartModule(importModule) {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
var chartRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./chart-renderer-
|
|
46
|
-
var regionMapResources = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./region-map-geography-
|
|
47
|
-
var surfaceRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./surface-regl-
|
|
45
|
+
var chartRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./chart-renderer-K2VM257E.cjs"))));
|
|
46
|
+
var regionMapResources = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./region-map-geography-VEN5CPRS.cjs"))));
|
|
47
|
+
var surfaceRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./surface-regl-2NNG62KS.cjs"))));
|
|
48
48
|
function preloadChartRenderers(chartsBySheet) {
|
|
49
49
|
let hasCharts = false;
|
|
50
50
|
let hasMaps = false;
|
|
@@ -71,4 +71,4 @@ function preloadChartRenderers(chartsBySheet) {
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
exports.useChartModule = useChartModule; exports.chartRenderer = chartRenderer; exports.regionMapResources = regionMapResources; exports.surfaceRenderer = surfaceRenderer; exports.preloadChartRenderers = preloadChartRenderers;
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-2MVEKDY2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-2MVEKDY2.cjs","../src/use-chart-module.ts","../src/chart-loader.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACFO,SAAS,cAAA,CAAkB,QAAA,EAA0B;AAC1D,EAAA,MAAM,SAAA,EAAiB,kCAAA,QAAqB,CAAS,SAAA,EAAW,QAAA,CAAS,WAAA,EAAa,QAAA,CAAS,iBAAiB,CAAA;AAChH,EAAM,iCAAA,CAAU,EAAA,GAAM;AACpB,IAAA,KAAK,QAAA,CAAS,IAAA,CAAK,CAAA,CAAE,KAAA,CAAM,CAAA,EAAA,GAAM;AAAA,IAAC,CAAC,CAAA;AAAA,EACrC,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AACb,EAAA,GAAA,CAAI,QAAA,CAAS,KAAA,EAAO,MAAM,QAAA,CAAS,KAAA;AACnC,EAAA,OAAO,QAAA,CAAS,MAAA;AAClB;ADKA;AAC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js","sourcesContent":[null,"import * as React from \"react\";\nimport type { ChartModule } from \"./chart-loader\";\n\nexport function useChartModule<T>(resource: ChartModule<T>) {\n const snapshot = React.useSyncExternalStore(resource.subscribe, resource.getSnapshot, resource.getServerSnapshot);\n React.useEffect(() => {\n void resource.load().catch(() => {});\n }, [resource]);\n if (snapshot.error) throw snapshot.error;\n return snapshot.module;\n}\n","import type { XlsxChart } from \"./types\";\n\ntype ModuleSnapshot<T> = { module: T | null; error: unknown };\n\nexport type ChartModule<T> = {\n load: () => Promise<T>;\n getSnapshot: () => ModuleSnapshot<T>;\n getServerSnapshot: () => ModuleSnapshot<T>;\n subscribe: (listener: () => void) => () => void;\n};\n\nfunction createChartModule<T>(importModule: () => Promise<T>): ChartModule<T> {\n const initialSnapshot: ModuleSnapshot<T> = { module: null, error: null };\n let snapshot = initialSnapshot;\n let promise: Promise<T> | undefined;\n const listeners = new Set<() => void>();\n const publish = (next: ModuleSnapshot<T>) => {\n snapshot = next;\n listeners.forEach((listener) => listener());\n };\n\n return {\n load: () => promise ??= importModule().then((module) => {\n publish({ module, error: null });\n return module;\n }, (error: unknown) => {\n publish({ module: null, error: error instanceof Error ? error : new Error(\"Unable to load chart module.\") });\n throw error;\n }),\n getSnapshot: () => snapshot,\n getServerSnapshot: () => initialSnapshot,\n subscribe: (listener) => {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n }\n };\n}\n\nexport const chartRenderer = createChartModule(() => import(\"./chart-renderer\"));\nexport const regionMapResources = createChartModule(() => import(\"./region-map-geography\"));\nexport const surfaceRenderer = createChartModule(() => import(\"./surface-regl\"));\n\nexport function preloadChartRenderers(chartsBySheet: readonly (readonly XlsxChart[])[]) {\n let hasCharts = false;\n let hasMaps = false;\n let hasSurfaces = false;\n for (const charts of chartsBySheet) {\n for (const chart of charts) {\n hasCharts = true;\n hasMaps ||= chart.chartType === \"RegionMap\";\n hasSurfaces ||= chart.chartType === \"Surface\";\n }\n }\n\n if (hasCharts) void chartRenderer.load().catch(() => {});\n if (hasMaps) void regionMapResources.load().catch(() => {});\n if (hasSurfaces) void surfaceRenderer.load().catch(() => {});\n}\n"]}
|
|
@@ -38,13 +38,13 @@ function createChartModule(importModule) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
var chartRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./chart-renderer-
|
|
42
|
-
var regionMapResources = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./region-map-geography-
|
|
43
|
-
var surfaceRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./surface-regl-
|
|
41
|
+
var chartRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./chart-renderer-K6GORT3R.cjs"))));
|
|
42
|
+
var regionMapResources = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./region-map-geography-VEN5CPRS.cjs"))));
|
|
43
|
+
var surfaceRenderer = createChartModule(() => Promise.resolve().then(() => _interopRequireWildcard(require("./surface-regl-SUJ2TFZA.cjs"))));
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
exports.useChartModule = useChartModule; exports.regionMapResources = regionMapResources; exports.surfaceRenderer = surfaceRenderer;
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-54YBFWL3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-54YBFWL3.cjs","../src/use-chart-module.ts","../src/chart-loader.ts"],"names":[],"mappings":"AAAA;ACAA,2EAAuB;AAGhB,SAAS,cAAA,CAAkB,QAAA,EAA0B;AAC1D,EAAA,MAAM,SAAA,EAAiB,KAAA,CAAA,oBAAA,CAAqB,QAAA,CAAS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,CAAM,8BAA8B,EAAE,CAAC,CAAA;AAC3G,MAAA,MAAM,KAAA;AAAA,IACR,CAAC,CAAA;AAAA,IACD,WAAA,EAAa,CAAA,EAAA,GAAM,QAAA;AAAA,IACnB,iBAAA,EAAmB,CAAA,EAAA,GAAM,eAAA;AAAA,IACzB,SAAA,EAAW,CAAC,QAAA,EAAA,GAAa;AACvB,MAAA,SAAA,CAAU,GAAA,CAAI,QAAQ,CAAA;AACtB,MAAA,OAAO,CAAA,EAAA,GAAM;AAAE,QAAA,SAAA,CAAU,MAAA,CAAO,QAAQ,CAAA;AAAA,MAAG,CAAA;AAAA,IAC7C;AAAA,EACF,CAAA;AACF;AAEO,IAAM,cAAA,EAAgB,iBAAA,CAAkB,CAAA,EAAA,GAAM,4DAAA,CAAO,+BAAkB,GAAC,CAAA;AACxE,IAAM,mBAAA,EAAqB,iBAAA,CAAkB,CAAA,EAAA,GAAM,4DAAA,CAAO,qCAAwB,GAAC,CAAA;AACnF,IAAM,gBAAA,EAAkB,iBAAA,CAAkB,CAAA,EAAA,GAAM,4DAAA,CAAO,6BAAgB,GAAC,CAAA;AFG/E;AACA;AACE;AACA;AACA;AACF,oIAAC","file":"/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-54YBFWL3.cjs","sourcesContent":[null,"import * as React from \"react\";\nimport type { ChartModule } from \"./chart-loader\";\n\nexport function useChartModule<T>(resource: ChartModule<T>) {\n const snapshot = React.useSyncExternalStore(resource.subscribe, resource.getSnapshot, resource.getServerSnapshot);\n React.useEffect(() => {\n void resource.load().catch(() => {});\n }, [resource]);\n if (snapshot.error) throw snapshot.error;\n return snapshot.module;\n}\n","import type { XlsxChart } from \"./types\";\n\ntype ModuleSnapshot<T> = { module: T | null; error: unknown };\n\nexport type ChartModule<T> = {\n load: () => Promise<T>;\n getSnapshot: () => ModuleSnapshot<T>;\n getServerSnapshot: () => ModuleSnapshot<T>;\n subscribe: (listener: () => void) => () => void;\n};\n\nfunction createChartModule<T>(importModule: () => Promise<T>): ChartModule<T> {\n const initialSnapshot: ModuleSnapshot<T> = { module: null, error: null };\n let snapshot = initialSnapshot;\n let promise: Promise<T> | undefined;\n const listeners = new Set<() => void>();\n const publish = (next: ModuleSnapshot<T>) => {\n snapshot = next;\n listeners.forEach((listener) => listener());\n };\n\n return {\n load: () => promise ??= importModule().then((module) => {\n publish({ module, error: null });\n return module;\n }, (error: unknown) => {\n publish({ module: null, error: error instanceof Error ? error : new Error(\"Unable to load chart module.\") });\n throw error;\n }),\n getSnapshot: () => snapshot,\n getServerSnapshot: () => initialSnapshot,\n subscribe: (listener) => {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n }\n };\n}\n\nexport const chartRenderer = createChartModule(() => import(\"./chart-renderer\"));\nexport const regionMapResources = createChartModule(() => import(\"./region-map-geography\"));\nexport const surfaceRenderer = createChartModule(() => import(\"./surface-regl\"));\n\nexport function preloadChartRenderers(chartsBySheet: readonly (readonly XlsxChart[])[]) {\n let hasCharts = false;\n let hasMaps = false;\n let hasSurfaces = false;\n for (const charts of chartsBySheet) {\n for (const chart of charts) {\n hasCharts = true;\n hasMaps ||= chart.chartType === \"RegionMap\";\n hasSurfaces ||= chart.chartType === \"Surface\";\n }\n }\n\n if (hasCharts) void chartRenderer.load().catch(() => {});\n if (hasMaps) void regionMapResources.load().catch(() => {});\n if (hasSurfaces) void surfaceRenderer.load().catch(() => {});\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.32_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js
|
|
2
2
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
3
3
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
exports.importMetaUrl = importMetaUrl;
|
|
8
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-AD4CGQN2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-AD4CGQN2.cjs","../../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.32_typescript@5.9.3/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":"AAAA;ACKA,IAAM,iBAAA,EAAmB,CAAA,EAAA,GACvB,OAAO,SAAA,IAAa,YAAA,EAChB,IAAI,GAAA,CAAI,CAAA,KAAA,EAAQ,UAAU,CAAA,CAAA;AAK8B;ADT4B;AACA;AACA;AACA","file":"/home/runner/work/react-xlsx/react-xlsx/packages/react-xlsx/dist/chunk-AD4CGQN2.cjs","sourcesContent":[null,"// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"]}
|
|
@@ -212,6 +212,85 @@ function getSheetsWasmModule() {
|
|
|
212
212
|
return wasmModulePromise;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
// src/number-locale.ts
|
|
216
|
+
var separators = /* @__PURE__ */ new Map();
|
|
217
|
+
function parseLocaleNumber(text, locale) {
|
|
218
|
+
if (locale === "en-US") return void 0;
|
|
219
|
+
const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);
|
|
220
|
+
const decimal = parts.find((part) => part.type === "decimal")?.value ?? ".";
|
|
221
|
+
const group = parts.find((part) => part.type === "group")?.value ?? ",";
|
|
222
|
+
let normalized = text.trim();
|
|
223
|
+
const percent = normalized.endsWith("%");
|
|
224
|
+
if (percent) normalized = normalized.slice(0, -1).trim();
|
|
225
|
+
normalized = group.trim() === "" ? normalized.replace(/[ \u00a0\u202f]/g, "") : normalized.split(group).join("");
|
|
226
|
+
normalized = normalized.replace(decimal, ".");
|
|
227
|
+
if (!/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(normalized)) return void 0;
|
|
228
|
+
const value = Number(normalized) / (percent ? 100 : 1);
|
|
229
|
+
return Number.isFinite(value) ? value : void 0;
|
|
230
|
+
}
|
|
231
|
+
function localizeCellNumber(worksheet, row, col, text, locale = "en-US") {
|
|
232
|
+
if (locale === "en-US" || !text) return text;
|
|
233
|
+
const value = worksheet.getCalculatedValueAt(row, col);
|
|
234
|
+
try {
|
|
235
|
+
if (!value.is_number) return text;
|
|
236
|
+
} finally {
|
|
237
|
+
value.free();
|
|
238
|
+
}
|
|
239
|
+
const style = worksheet.getCellStyleAt(row, col);
|
|
240
|
+
const format = style?.numberFormat;
|
|
241
|
+
if (format?.isDateFormat) return text;
|
|
242
|
+
let symbols = separators.get(locale);
|
|
243
|
+
if (!symbols) {
|
|
244
|
+
const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);
|
|
245
|
+
symbols = {
|
|
246
|
+
decimal: parts.find((part) => part.type === "decimal")?.value ?? ".",
|
|
247
|
+
group: parts.find((part) => part.type === "group")?.value ?? ","
|
|
248
|
+
};
|
|
249
|
+
if (separators.size >= 100) separators.clear();
|
|
250
|
+
separators.set(locale, symbols);
|
|
251
|
+
}
|
|
252
|
+
if (symbols.decimal === "." && symbols.group === ",") return text;
|
|
253
|
+
const protectedPositions = /* @__PURE__ */ new Set();
|
|
254
|
+
const code = format?.formatString ?? "";
|
|
255
|
+
const literalPattern = /"[^"]*"|\\.|\[[^\]]*\]/g;
|
|
256
|
+
const firstPlaceholder = code.replace(literalPattern, (token) => " ".repeat(token.length)).search(/[0#?]/);
|
|
257
|
+
const literals = [...code.matchAll(literalPattern)];
|
|
258
|
+
let suffixEnd = text.length;
|
|
259
|
+
let prefixStart = 0;
|
|
260
|
+
const protect = (token, suffix) => {
|
|
261
|
+
const literal = token.startsWith('"') ? token.slice(1, -1) : token.startsWith("\\") ? token.slice(1) : token.startsWith("[$") ? token.slice(2, -1).split("-")[0] : "";
|
|
262
|
+
if (!literal) return;
|
|
263
|
+
const offset = suffix ? text.lastIndexOf(literal, suffixEnd - literal.length) : text.indexOf(literal, prefixStart);
|
|
264
|
+
if (offset >= 0) {
|
|
265
|
+
for (let i = offset; i < offset + literal.length; i++) protectedPositions.add(i);
|
|
266
|
+
if (suffix) suffixEnd = offset;
|
|
267
|
+
else prefixStart = offset + literal.length;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
for (const token of literals.filter((token2) => token2.index < firstPlaceholder)) protect(token[0], false);
|
|
271
|
+
for (const token of literals.filter((token2) => token2.index >= firstPlaceholder).reverse()) protect(token[0], true);
|
|
272
|
+
return text.replace(
|
|
273
|
+
/\d[\d,]*(?:\.\d*)?|\.\d+/g,
|
|
274
|
+
(number, offset) => number.replace(/[.,]/g, (separator, index) => protectedPositions.has(offset + index) ? separator : separator === "." ? symbols.decimal : symbols.group)
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
function localizeRows(worksheet, rows, locale = "en-US") {
|
|
278
|
+
if (locale === "en-US" || !Array.isArray(rows)) return;
|
|
279
|
+
for (const row of rows) {
|
|
280
|
+
for (const cell of row.cells ?? []) {
|
|
281
|
+
if (!cell.isMergedSecondary && typeof cell.value === "string") {
|
|
282
|
+
const value = worksheet.getCalculatedValueAt(row.index, cell.col);
|
|
283
|
+
try {
|
|
284
|
+
cell.numericValue = value.is_number ? value.asNumber() : null;
|
|
285
|
+
} finally {
|
|
286
|
+
value.free();
|
|
287
|
+
}
|
|
288
|
+
cell.value = localizeCellNumber(worksheet, row.index, cell.col, cell.value, locale);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
215
294
|
// src/spreadsheet-fonts.ts
|
|
216
295
|
var fontLoadPromise;
|
|
217
296
|
var SPREADSHEET_FALLBACK_FONT = "React XLSX Carlito";
|
|
@@ -6954,10 +7033,10 @@ var XlsxWorkerClient = class {
|
|
|
6954
7033
|
type: "load"
|
|
6955
7034
|
}, [workerBuffer]);
|
|
6956
7035
|
}
|
|
6957
|
-
getCellSnapshot(workbookSheetIndex, row, col) {
|
|
7036
|
+
getCellSnapshot(workbookSheetIndex, row, col, locale) {
|
|
6958
7037
|
return this.request({
|
|
6959
7038
|
id: 0,
|
|
6960
|
-
payload: { col, row, workbookSheetIndex },
|
|
7039
|
+
payload: { col, row, workbookSheetIndex, locale },
|
|
6961
7040
|
type: "getCellSnapshot"
|
|
6962
7041
|
});
|
|
6963
7042
|
}
|
|
@@ -6974,10 +7053,10 @@ var XlsxWorkerClient = class {
|
|
|
6974
7053
|
type: "parseCharts"
|
|
6975
7054
|
}, [workerBuffer]);
|
|
6976
7055
|
}
|
|
6977
|
-
getRowsBatch(workbookSheetIndex, startRow, rowCount) {
|
|
7056
|
+
getRowsBatch(workbookSheetIndex, startRow, rowCount, locale) {
|
|
6978
7057
|
return this.request({
|
|
6979
7058
|
id: 0,
|
|
6980
|
-
payload: { rowCount, startRow, workbookSheetIndex },
|
|
7059
|
+
payload: { rowCount, startRow, workbookSheetIndex, locale },
|
|
6981
7060
|
type: "getRowsBatch"
|
|
6982
7061
|
});
|
|
6983
7062
|
}
|
|
@@ -8101,7 +8180,7 @@ function cloneCellStyle(style) {
|
|
|
8101
8180
|
return style;
|
|
8102
8181
|
}
|
|
8103
8182
|
}
|
|
8104
|
-
function coerceUserEnteredValue(value) {
|
|
8183
|
+
function coerceUserEnteredValue(value, locale = "en-US") {
|
|
8105
8184
|
const trimmed = value.trim();
|
|
8106
8185
|
if (!trimmed) {
|
|
8107
8186
|
return "";
|
|
@@ -8112,6 +8191,8 @@ function coerceUserEnteredValue(value) {
|
|
|
8112
8191
|
if (/^(true|false)$/i.test(trimmed)) {
|
|
8113
8192
|
return trimmed.toLowerCase() === "true";
|
|
8114
8193
|
}
|
|
8194
|
+
const localizedNumber = parseLocaleNumber(trimmed, locale);
|
|
8195
|
+
if (localizedNumber !== void 0) return localizedNumber;
|
|
8115
8196
|
if (/^[+-]?(?:\d+\.?\d*|\.\d+)$/.test(trimmed)) {
|
|
8116
8197
|
const parsed = Number(trimmed);
|
|
8117
8198
|
if (Number.isFinite(parsed)) {
|
|
@@ -8531,6 +8612,7 @@ function useXlsxViewerController(options) {
|
|
|
8531
8612
|
deferLoadingAboveBytes = DEFAULT_DEFER_LOADING_ABOVE_BYTES,
|
|
8532
8613
|
file,
|
|
8533
8614
|
fileName,
|
|
8615
|
+
locale = "en-US",
|
|
8534
8616
|
maxFileSizeBytes = DEFAULT_MAX_FILE_SIZE_BYTES,
|
|
8535
8617
|
readOnly: requestedReadOnly = false,
|
|
8536
8618
|
readOnlyAboveBytes = 0,
|
|
@@ -9345,14 +9427,14 @@ function useXlsxViewerController(options) {
|
|
|
9345
9427
|
formula: ""
|
|
9346
9428
|
});
|
|
9347
9429
|
}
|
|
9348
|
-
return getWorkerClient().getCellSnapshot(workbookSheetIndex, row, col);
|
|
9349
|
-
}, [getWorkerClient, isWorkerBacked]);
|
|
9430
|
+
return getWorkerClient().getCellSnapshot(workbookSheetIndex, row, col, locale);
|
|
9431
|
+
}, [getWorkerClient, isWorkerBacked, locale]);
|
|
9350
9432
|
const getRowsBatchAsync = q((workbookSheetIndex, startRow, rowCount) => {
|
|
9351
9433
|
if (!isWorkerBacked) {
|
|
9352
9434
|
return Promise.resolve(null);
|
|
9353
9435
|
}
|
|
9354
|
-
return getWorkerClient().getRowsBatch(workbookSheetIndex, startRow, rowCount);
|
|
9355
|
-
}, [getWorkerClient, isWorkerBacked]);
|
|
9436
|
+
return getWorkerClient().getRowsBatch(workbookSheetIndex, startRow, rowCount, locale);
|
|
9437
|
+
}, [getWorkerClient, isWorkerBacked, locale]);
|
|
9356
9438
|
const visibleSheetIndexByWorkbookSheetIndex = T(
|
|
9357
9439
|
() => new Map(sheets.map((sheet, index) => [sheet.workbookSheetIndex, index])),
|
|
9358
9440
|
[sheets]
|
|
@@ -9565,7 +9647,7 @@ function useXlsxViewerController(options) {
|
|
|
9565
9647
|
}, [activeSheet?.showGridLines, activeSheet?.workbookSheetIndex]);
|
|
9566
9648
|
const getCellDisplayValue2 = q((cell) => {
|
|
9567
9649
|
if (cell && activeSheet) {
|
|
9568
|
-
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9650
|
+
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9569
9651
|
if (workerSnapshot) {
|
|
9570
9652
|
return workerSnapshot.displayValue;
|
|
9571
9653
|
}
|
|
@@ -9578,7 +9660,7 @@ function useXlsxViewerController(options) {
|
|
|
9578
9660
|
const cachedFormulaValue = formula ? activeSheet?.cachedFormulaValues?.[cellAddressToA1(cell)] : void 0;
|
|
9579
9661
|
const formatted = worksheet.getFormattedValueAt(cell.row, cell.col);
|
|
9580
9662
|
if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
|
|
9581
|
-
return decodeHtmlEntities(formatted);
|
|
9663
|
+
return localizeCellNumber(worksheet, cell.row, cell.col, decodeHtmlEntities(formatted), locale);
|
|
9582
9664
|
}
|
|
9583
9665
|
const calculated = worksheet.getCalculatedValueAt(cell.row, cell.col);
|
|
9584
9666
|
if (formula && cachedFormulaValue !== void 0 && calculated.is_error) {
|
|
@@ -9591,10 +9673,10 @@ function useXlsxViewerController(options) {
|
|
|
9591
9673
|
return "";
|
|
9592
9674
|
}
|
|
9593
9675
|
return calculated.toString();
|
|
9594
|
-
}, [activeSheet, getActiveWorksheet]);
|
|
9676
|
+
}, [activeSheet, getActiveWorksheet, locale]);
|
|
9595
9677
|
const getCellFormula = q((cell) => {
|
|
9596
9678
|
if (cell && activeSheet) {
|
|
9597
|
-
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9679
|
+
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9598
9680
|
if (workerSnapshot) {
|
|
9599
9681
|
return workerSnapshot.formula;
|
|
9600
9682
|
}
|
|
@@ -9604,7 +9686,7 @@ function useXlsxViewerController(options) {
|
|
|
9604
9686
|
return "";
|
|
9605
9687
|
}
|
|
9606
9688
|
return worksheet.getFormulaAt(cell.row, cell.col) ?? "";
|
|
9607
|
-
}, [activeSheet, getActiveWorksheet]);
|
|
9689
|
+
}, [activeSheet, getActiveWorksheet, locale]);
|
|
9608
9690
|
const getClipboardData = q(() => {
|
|
9609
9691
|
const worksheet = getActiveWorksheet();
|
|
9610
9692
|
const targetRange = selection ?? (activeCell ? { start: activeCell, end: activeCell } : null);
|
|
@@ -9724,7 +9806,7 @@ function useXlsxViewerController(options) {
|
|
|
9724
9806
|
if (!isWorkerBacked || !deferredMetadataSheet || !deferredMetadataCell) {
|
|
9725
9807
|
return;
|
|
9726
9808
|
}
|
|
9727
|
-
const cacheKey = `${deferredMetadataSheet.workbookSheetIndex}:${deferredMetadataCell.row}:${deferredMetadataCell.col}`;
|
|
9809
|
+
const cacheKey = `${locale}:${deferredMetadataSheet.workbookSheetIndex}:${deferredMetadataCell.row}:${deferredMetadataCell.col}`;
|
|
9728
9810
|
if (workerCellSnapshotCacheRef.current.has(cacheKey)) {
|
|
9729
9811
|
return;
|
|
9730
9812
|
}
|
|
@@ -9748,7 +9830,7 @@ function useXlsxViewerController(options) {
|
|
|
9748
9830
|
return () => {
|
|
9749
9831
|
isCurrent = false;
|
|
9750
9832
|
};
|
|
9751
|
-
}, [deferredMetadataCell, deferredMetadataSheet, getCellSnapshotAsync, isWorkerBacked]);
|
|
9833
|
+
}, [deferredMetadataCell, deferredMetadataSheet, getCellSnapshotAsync, isWorkerBacked, locale]);
|
|
9752
9834
|
const activeCellAddress = T(() => activeCell ? cellAddressToA1(activeCell) : null, [activeCell]);
|
|
9753
9835
|
const selectedRangeAddress = T(() => selection ? rangeToA1(selection) : null, [selection]);
|
|
9754
9836
|
const selectedValue = T(
|
|
@@ -10605,7 +10687,8 @@ function useXlsxViewerController(options) {
|
|
|
10605
10687
|
if (!before) {
|
|
10606
10688
|
return;
|
|
10607
10689
|
}
|
|
10608
|
-
|
|
10690
|
+
if (locale !== "en-US" && value === getCellDisplayValue2(cell)) return;
|
|
10691
|
+
const nextValue = coerceUserEnteredValue(value, locale);
|
|
10609
10692
|
worksheet.setCell(cellAddressToA1(cell), nextValue);
|
|
10610
10693
|
const after = captureCellMutationState(cell);
|
|
10611
10694
|
if (!after) {
|
|
@@ -10614,7 +10697,7 @@ function useXlsxViewerController(options) {
|
|
|
10614
10697
|
maybeRecalculateWorkbook(workbook);
|
|
10615
10698
|
refreshWorkbookState(workbook);
|
|
10616
10699
|
recordCellEditHistory(cell, before, after);
|
|
10617
|
-
}, [captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
10700
|
+
}, [captureCellMutationState, getActiveWorksheet, getCellDisplayValue2, locale, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
10618
10701
|
const setCellFormula = q((cell, formula) => {
|
|
10619
10702
|
const worksheet = getActiveWorksheet();
|
|
10620
10703
|
if (readOnly || !worksheet || !workbook) {
|
|
@@ -10955,7 +11038,7 @@ function useXlsxViewerController(options) {
|
|
|
10955
11038
|
cell: nextCell
|
|
10956
11039
|
});
|
|
10957
11040
|
} else {
|
|
10958
|
-
const nextValue = coerceUserEnteredValue(rawValue);
|
|
11041
|
+
const nextValue = coerceUserEnteredValue(rawValue, locale);
|
|
10959
11042
|
worksheet.setCell(cellAddressToA1(nextCell), nextValue);
|
|
10960
11043
|
const after = captureCellMutationState(nextCell);
|
|
10961
11044
|
if (!after) {
|
|
@@ -10983,7 +11066,7 @@ function useXlsxViewerController(options) {
|
|
|
10983
11066
|
selectionAnchorRef.current = targetCell;
|
|
10984
11067
|
recordRangeEditHistory(mutations, nextRange, targetCell);
|
|
10985
11068
|
return true;
|
|
10986
|
-
}, [activeCell, captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
11069
|
+
}, [activeCell, captureCellMutationState, getActiveWorksheet, locale, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
10987
11070
|
const pasteStructuredClipboardData = q((serializedPayload) => {
|
|
10988
11071
|
const worksheet = getActiveWorksheet();
|
|
10989
11072
|
const targetCell = activeCell ?? selection?.start ?? null;
|
|
@@ -11256,6 +11339,7 @@ function useXlsxViewerController(options) {
|
|
|
11256
11339
|
deferredLoadFileSize,
|
|
11257
11340
|
defineNamedRange,
|
|
11258
11341
|
displayFileName,
|
|
11342
|
+
locale,
|
|
11259
11343
|
download,
|
|
11260
11344
|
exportCsv,
|
|
11261
11345
|
exportXlsx,
|
|
@@ -11379,6 +11463,7 @@ function useXlsxViewerController(options) {
|
|
|
11379
11463
|
deferredLoadFileSize,
|
|
11380
11464
|
defineNamedRange,
|
|
11381
11465
|
displayFileName,
|
|
11466
|
+
locale,
|
|
11382
11467
|
download,
|
|
11383
11468
|
error,
|
|
11384
11469
|
exportCsv,
|
|
@@ -16139,12 +16224,12 @@ function canCellTextOverflow(data) {
|
|
|
16139
16224
|
function canReceiveOverflowText(data) {
|
|
16140
16225
|
return !data.isMergedSecondary && !data.colSpan && data.value.length === 0;
|
|
16141
16226
|
}
|
|
16142
|
-
function getCellDisplayValue(worksheet, row, col, activeSheet) {
|
|
16227
|
+
function getCellDisplayValue(worksheet, row, col, activeSheet, locale = "en-US") {
|
|
16143
16228
|
const formula = worksheet.getFormulaAt(row, col);
|
|
16144
16229
|
const cachedFormulaValue = formula ? activeSheet?.cachedFormulaValues?.[cellAddressToA12({ row, col })] : void 0;
|
|
16145
16230
|
const formatted = worksheet.getFormattedValueAt(row, col);
|
|
16146
16231
|
if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
|
|
16147
|
-
return decodeHtmlEntities2(formatted);
|
|
16232
|
+
return localizeCellNumber(worksheet, row, col, decodeHtmlEntities2(formatted), locale);
|
|
16148
16233
|
}
|
|
16149
16234
|
const cellValue = worksheet.getCalculatedValueAt(row, col);
|
|
16150
16235
|
if (formula && cachedFormulaValue !== void 0 && cellValue.is_error) {
|
|
@@ -16194,6 +16279,7 @@ function getBatchedCellNumericValue(cell) {
|
|
|
16194
16279
|
if (!cell) {
|
|
16195
16280
|
return null;
|
|
16196
16281
|
}
|
|
16282
|
+
if (cell.numericValue !== void 0) return cell.numericValue;
|
|
16197
16283
|
const text = cell.value.trim();
|
|
16198
16284
|
if (text.length === 0) {
|
|
16199
16285
|
return null;
|
|
@@ -16531,6 +16617,7 @@ function buildWorksheetBatchWindow(rows, activeSheet, startRow, endRow) {
|
|
|
16531
16617
|
const formula = typeof cellEntry.formula === "string" ? cellEntry.formula : null;
|
|
16532
16618
|
cells.set(`${row}:${col}`, {
|
|
16533
16619
|
formula,
|
|
16620
|
+
numericValue: typeof cellEntry.numericValue === "number" ? cellEntry.numericValue : cellEntry.numericValue === null ? null : void 0,
|
|
16534
16621
|
generalAlignment: cellEntry.generalAlignment === "right" || cellEntry.generalAlignment === "center" ? cellEntry.generalAlignment : "left",
|
|
16535
16622
|
hyperlink: normalizeBatchedHyperlink(cellEntry.hyperlink),
|
|
16536
16623
|
isMergedSecondary: cellEntry.isMergedSecondary === true,
|
|
@@ -18661,6 +18748,7 @@ function XlsxGrid({
|
|
|
18661
18748
|
getRowsBatchAsync,
|
|
18662
18749
|
getClipboardData,
|
|
18663
18750
|
getCellDisplayValue: getControllerCellDisplayValue,
|
|
18751
|
+
locale,
|
|
18664
18752
|
getFormControlItems,
|
|
18665
18753
|
highlightedRanges,
|
|
18666
18754
|
images,
|
|
@@ -19424,7 +19512,8 @@ function XlsxGrid({
|
|
|
19424
19512
|
activeSheet?.visibleCols,
|
|
19425
19513
|
displayColLimit,
|
|
19426
19514
|
worksheet,
|
|
19427
|
-
revision
|
|
19515
|
+
revision,
|
|
19516
|
+
locale
|
|
19428
19517
|
]
|
|
19429
19518
|
);
|
|
19430
19519
|
const actualRowHeights = T(
|
|
@@ -19455,7 +19544,7 @@ function XlsxGrid({
|
|
|
19455
19544
|
if (worksheet.isColumnHidden(col) || worksheet.isMergedSecondary(row, col)) {
|
|
19456
19545
|
continue;
|
|
19457
19546
|
}
|
|
19458
|
-
const cellValue = worksheet.getFormattedValueAt(row, col);
|
|
19547
|
+
const cellValue = localizeCellNumber(worksheet, row, col, worksheet.getFormattedValueAt(row, col), locale);
|
|
19459
19548
|
if (!cellValue) {
|
|
19460
19549
|
continue;
|
|
19461
19550
|
}
|
|
@@ -19530,7 +19619,8 @@ function XlsxGrid({
|
|
|
19530
19619
|
displayColLimit,
|
|
19531
19620
|
palette,
|
|
19532
19621
|
worksheet,
|
|
19533
|
-
revision
|
|
19622
|
+
revision,
|
|
19623
|
+
locale
|
|
19534
19624
|
]
|
|
19535
19625
|
);
|
|
19536
19626
|
const displayActualColWidths = T(
|
|
@@ -20740,11 +20830,12 @@ function XlsxGrid({
|
|
|
20740
20830
|
includeStyles: true,
|
|
20741
20831
|
useFormattedValues: true
|
|
20742
20832
|
});
|
|
20833
|
+
localizeRows(worksheet, rows, locale);
|
|
20743
20834
|
return buildWorksheetBatchWindow(rows, activeSheet ?? null, viewportRequest.startRow, viewportRequest.endRow);
|
|
20744
20835
|
} catch {
|
|
20745
20836
|
return null;
|
|
20746
20837
|
}
|
|
20747
|
-
}, [activeSheet, getRowsBatchAsync, shouldVirtualizeRows, viewportRequest, worksheet]);
|
|
20838
|
+
}, [activeSheet, getRowsBatchAsync, shouldVirtualizeRows, viewportRequest, worksheet, locale]);
|
|
20748
20839
|
h(() => {
|
|
20749
20840
|
if (!shouldVirtualizeRows || !getRowsBatchAsync || !activeSheet || !viewportRequest) {
|
|
20750
20841
|
setAsyncViewportRowBatch(null);
|
|
@@ -20786,7 +20877,7 @@ function XlsxGrid({
|
|
|
20786
20877
|
const viewportRowBatch = getRowsBatchAsync ? asyncViewportRowBatch : syncViewportRowBatch;
|
|
20787
20878
|
h(() => {
|
|
20788
20879
|
setAsyncViewportRowBatch(null);
|
|
20789
|
-
}, [activeSheetIndex, revision]);
|
|
20880
|
+
}, [activeSheetIndex, revision, locale]);
|
|
20790
20881
|
const sparklinesByCell = T(() => {
|
|
20791
20882
|
const map = /* @__PURE__ */ new Map();
|
|
20792
20883
|
for (const sparkline of activeSheet?.sparklines ?? []) {
|
|
@@ -20811,6 +20902,7 @@ function XlsxGrid({
|
|
|
20811
20902
|
getCellStyle,
|
|
20812
20903
|
palette,
|
|
20813
20904
|
revision,
|
|
20905
|
+
locale,
|
|
20814
20906
|
selectedChartElement,
|
|
20815
20907
|
selectedChartId,
|
|
20816
20908
|
viewportRowBatch,
|
|
@@ -20825,6 +20917,7 @@ function XlsxGrid({
|
|
|
20825
20917
|
getCellStyle,
|
|
20826
20918
|
palette,
|
|
20827
20919
|
revision,
|
|
20920
|
+
locale,
|
|
20828
20921
|
selectedChartElement,
|
|
20829
20922
|
selectedChartId,
|
|
20830
20923
|
viewportRowBatch,
|
|
@@ -20921,7 +21014,7 @@ function XlsxGrid({
|
|
|
20921
21014
|
let displayValue = null;
|
|
20922
21015
|
const readDisplayValue = () => {
|
|
20923
21016
|
if (displayValue === null) {
|
|
20924
|
-
displayValue = batchCoversRow || !worksheet ? batchedCell?.value ?? "" : getCellDisplayValue(worksheet, row, col, activeSheet);
|
|
21017
|
+
displayValue = batchCoversRow || !worksheet ? batchedCell?.value ?? "" : getCellDisplayValue(worksheet, row, col, activeSheet, locale);
|
|
20925
21018
|
}
|
|
20926
21019
|
return displayValue;
|
|
20927
21020
|
};
|
|
@@ -21114,6 +21207,7 @@ function XlsxGrid({
|
|
|
21114
21207
|
activeSheet,
|
|
21115
21208
|
activeSheetChartHighlights,
|
|
21116
21209
|
cellRenderCacheInvalidationKey,
|
|
21210
|
+
locale,
|
|
21117
21211
|
colIndexByActual,
|
|
21118
21212
|
colPrefixSums,
|
|
21119
21213
|
displayDefaultColWidth,
|
|
@@ -26975,4 +27069,4 @@ export {
|
|
|
26975
27069
|
__createContentNode,
|
|
26976
27070
|
__createContentRoot
|
|
26977
27071
|
};
|
|
26978
|
-
//# sourceMappingURL=chunk-
|
|
27072
|
+
//# sourceMappingURL=chunk-GXJO6CK6.js.map
|