@extend-ai/react-xlsx 0.20.1 → 0.20.2
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/{chart-renderer-K2VM257E.cjs → chart-renderer-3QDNTMRN.cjs} +525 -603
- package/dist/chart-renderer-3QDNTMRN.cjs.map +1 -0
- package/dist/{chart-renderer-RXO7WP4Q.js → chart-renderer-7DTEXXG6.js} +19 -97
- package/dist/chart-renderer-7DTEXXG6.js.map +1 -0
- package/dist/{chart-renderer-KGLAI4DN.js → chart-renderer-F355CYSE.js} +13 -92
- package/dist/chart-renderer-F355CYSE.js.map +1 -0
- package/dist/{chart-renderer-K6GORT3R.cjs → chart-renderer-LGW4EH4M.cjs} +286 -365
- package/dist/chart-renderer-LGW4EH4M.cjs.map +1 -0
- package/dist/{chunk-WSQDFXDW.js → chunk-3LMOGW6A.js} +22 -6
- package/dist/chunk-3LMOGW6A.js.map +1 -0
- package/dist/chunk-A4S3AMON.js +108 -0
- package/dist/chunk-A4S3AMON.js.map +1 -0
- package/dist/chunk-AJT23BDP.js +111 -0
- package/dist/chunk-AJT23BDP.js.map +1 -0
- package/dist/{chunk-CJBI5F6V.cjs → chunk-AZWBTFJI.cjs} +12 -93
- package/dist/chunk-AZWBTFJI.cjs.map +1 -0
- package/dist/{chunk-54YBFWL3.cjs → chunk-D2UA4P6N.cjs} +14 -3
- package/dist/chunk-D2UA4P6N.cjs.map +1 -0
- package/dist/{chunk-GXJO6CK6.js → chunk-GXYDJPHM.js} +40 -12
- package/dist/chunk-GXYDJPHM.js.map +1 -0
- package/dist/chunk-IDNIGBUM.cjs +108 -0
- package/dist/chunk-IDNIGBUM.cjs.map +1 -0
- package/dist/{chunk-3JTCYAUX.js → chunk-IYGZTLDY.js} +14 -3
- package/dist/chunk-IYGZTLDY.js.map +1 -0
- package/dist/chunk-M55TBS4X.cjs +111 -0
- package/dist/chunk-M55TBS4X.cjs.map +1 -0
- package/dist/{chunk-2MVEKDY2.cjs → chunk-OCF75R75.cjs} +25 -9
- package/dist/chunk-OCF75R75.cjs.map +1 -0
- package/dist/{chunk-NBH72POD.js → chunk-PUI6QI4U.js} +11 -92
- package/dist/chunk-PUI6QI4U.js.map +1 -0
- package/dist/{chunk-HAHCVXCU.cjs → chunk-ZJ76CZAL.cjs} +787 -759
- package/dist/chunk-ZJ76CZAL.cjs.map +1 -0
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/dist/{internal-trWFv9In.d.cts → internal-BJsg5os3.d.cts} +10 -0
- package/dist/{internal-trWFv9In.d.ts → internal-BJsg5os3.d.ts} +10 -0
- package/dist/internal.cjs +5 -4
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +4 -3
- package/dist/preact-LICENSE.txt +21 -0
- package/dist/region-map-geography-24TXETDP.cjs +184 -0
- package/dist/region-map-geography-24TXETDP.cjs.map +1 -0
- package/dist/region-map-geography-OR6DHAF7.js +182 -0
- package/dist/region-map-geography-OR6DHAF7.js.map +1 -0
- package/dist/shared-chart-3STFRVWT.js +215 -0
- package/dist/shared-chart-3STFRVWT.js.map +1 -0
- package/dist/shared-chart-BFQNYOIQ.js +221 -0
- package/dist/shared-chart-BFQNYOIQ.js.map +1 -0
- package/dist/shared-chart-DVC5S2P6.cjs +222 -0
- package/dist/shared-chart-DVC5S2P6.cjs.map +1 -0
- package/dist/shared-chart-MFQSQG4K.cjs +216 -0
- package/dist/shared-chart-MFQSQG4K.cjs.map +1 -0
- package/dist/{surface-regl-2NNG62KS.cjs → surface-regl-BBJ6OIKK.cjs} +14 -12
- package/dist/surface-regl-BBJ6OIKK.cjs.map +1 -0
- package/dist/{surface-regl-TJUWTLAZ.js → surface-regl-R2N54JT2.js} +7 -5
- package/dist/{surface-regl-TJUWTLAZ.js.map → surface-regl-R2N54JT2.js.map} +1 -1
- package/dist/us-atlas-LICENSE.txt +13 -0
- package/dist/vanilla.cjs +5 -4
- package/dist/vanilla.cjs.map +1 -1
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +4 -3
- package/dist/world-atlas-LICENSE.txt +13 -0
- package/dist/xlsx-worker.js +15 -0
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +7 -6
- package/dist/chart-renderer-K2VM257E.cjs.map +0 -1
- package/dist/chart-renderer-K6GORT3R.cjs.map +0 -1
- package/dist/chart-renderer-KGLAI4DN.js.map +0 -1
- package/dist/chart-renderer-RXO7WP4Q.js.map +0 -1
- package/dist/chunk-2MVEKDY2.cjs.map +0 -1
- package/dist/chunk-3JTCYAUX.js.map +0 -1
- package/dist/chunk-54YBFWL3.cjs.map +0 -1
- package/dist/chunk-CJBI5F6V.cjs.map +0 -1
- package/dist/chunk-GXJO6CK6.js.map +0 -1
- package/dist/chunk-HAHCVXCU.cjs.map +0 -1
- package/dist/chunk-NBH72POD.js.map +0 -1
- package/dist/chunk-WSQDFXDW.js.map +0 -1
- package/dist/region-map-geography-VEN5CPRS.cjs +0 -184
- package/dist/region-map-geography-VEN5CPRS.cjs.map +0 -1
- package/dist/region-map-geography-YD54DI3H.js +0 -182
- package/dist/region-map-geography-YD54DI3H.js.map +0 -1
- package/dist/surface-regl-2NNG62KS.cjs.map +0 -1
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunk2MVEKDY2cjs = require('./chunk-2MVEKDY2.cjs');
|
|
7
6
|
|
|
7
|
+
var _chunkOCF75R75cjs = require('./chunk-OCF75R75.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
var _chunk5ERNVHSOcjs = require('./chunk-5ERNVHSO.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
@@ -27,7 +28,9 @@ var _chunk2MVEKDY2cjs = require('./chunk-2MVEKDY2.cjs');
|
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
var _chunkAZWBTFJIcjs = require('./chunk-AZWBTFJI.cjs');
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
var _chunkAD4CGQN2cjs = require('./chunk-AD4CGQN2.cjs');
|
|
@@ -1116,11 +1119,11 @@ function applyBuiltinSurfaceDefaults(chart, themePalette) {
|
|
|
1116
1119
|
if (chart.chartType !== "Surface") {
|
|
1117
1120
|
return;
|
|
1118
1121
|
}
|
|
1119
|
-
const builtin = _optionalChain([chart, 'access', _77 => _77.raw, 'optionalAccess', _78 => _78.hasCustomChartColorStyle]) !== true ?
|
|
1122
|
+
const builtin = _optionalChain([chart, 'access', _77 => _77.raw, 'optionalAccess', _78 => _78.hasCustomChartColorStyle]) !== true ? _chunk5ERNVHSOcjs.getBuiltinChartSurfaceStyle.call(void 0, chart.chartStyleId) : void 0;
|
|
1120
1123
|
const colors = _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _79 => _79.colorsByIndex]), () => ( {}));
|
|
1121
|
-
const wallFill = _nullishCoalesce(
|
|
1122
|
-
const floorFill = _nullishCoalesce(
|
|
1123
|
-
const gridlineColor =
|
|
1124
|
+
const wallFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _80 => _80.wall, 'access', _81 => _81.fill]), colors), () => ( (chart.wireframe ? "#d0d0d0" : "#d9d9df")));
|
|
1125
|
+
const floorFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _82 => _82.floor, 'access', _83 => _83.fill]), colors), () => ( wallFill));
|
|
1126
|
+
const gridlineColor = _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _84 => _84.majorGridline]), colors);
|
|
1124
1127
|
for (const axis of [chart.categoryAxis, chart.valueAxis, chart.seriesAxis]) {
|
|
1125
1128
|
if (axis && !axis.majorGridlineColor) axis.majorGridlineColor = gridlineColor;
|
|
1126
1129
|
}
|
|
@@ -1167,9 +1170,9 @@ function applyBuiltinChartDefaults(chart, themePalette) {
|
|
|
1167
1170
|
chart.fontFamily = _nullishCoalesce(chart.fontFamily, () => ( minorTypeface));
|
|
1168
1171
|
chart.titleFontFamily = _nullishCoalesce(_nullishCoalesce(chart.titleFontFamily, () => ( chart.fontFamily)), () => ( minorTypeface));
|
|
1169
1172
|
const themeColors = _optionalChain([themePalette, 'optionalAccess', _97 => _97.colorsByIndex]);
|
|
1170
|
-
const useBuiltin = _optionalChain([chart, 'access', _98 => _98.raw, 'optionalAccess', _99 => _99.hasCustomChartColorStyle]) !== true && themeColors &&
|
|
1173
|
+
const useBuiltin = _optionalChain([chart, 'access', _98 => _98.raw, 'optionalAccess', _99 => _99.hasCustomChartColorStyle]) !== true && themeColors && _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, 0, 1) !== void 0;
|
|
1171
1174
|
const colorCount = Math.max(1, chart.series.length, _nullishCoalesce(_optionalChain([chart, 'access', _100 => _100.typeGroups, 'optionalAccess', _101 => _101.reduce, 'call', _102 => _102((total, group) => total + group.series.length, 0)]), () => ( 0)));
|
|
1172
|
-
const seriesPalette = useBuiltin && chart.chartType !== "Surface" ? Array.from({ length: colorCount }, (_2, index) => _nullishCoalesce(
|
|
1175
|
+
const seriesPalette = useBuiltin && chart.chartType !== "Surface" ? Array.from({ length: colorCount }, (_2, index) => _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, index, colorCount), themeColors), () => ( SERIES_COLORS[index % SERIES_COLORS.length]))) : _optionalChain([chart, 'access', _103 => _103.chartColorPalette, 'optionalAccess', _104 => _104.length]) ? chart.chartColorPalette : buildThemeSeriesPalette(themePalette);
|
|
1173
1176
|
chart.chartColorPalette = seriesPalette;
|
|
1174
1177
|
chart.raw = { ...chart.raw, builtinThemeColors: useBuiltin ? themeColors : void 0 };
|
|
1175
1178
|
const applySeriesDefaults = (series, index) => {
|
|
@@ -1852,6 +1855,21 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
|
|
|
1852
1855
|
chart.axes = [...chart.axes, seriesAxis];
|
|
1853
1856
|
}
|
|
1854
1857
|
}
|
|
1858
|
+
const kind = chartTypeNode.localName === "lineChart" && chart.chartType === "Line" ? "line" : chartTypeNode.localName === "barChart" && chart.chartType === "ColumnClustered" ? "bar" : null;
|
|
1859
|
+
const groupCount = Array.from(plotArea.children).filter((entry) => entry.localName.endsWith("Chart")).length;
|
|
1860
|
+
if (kind && groupCount === 1 && !chart.is3d && !plotArea.querySelector("trendline, errBars, dropLines, hiLowLines, upDownBars, dateAx, multiLvlStrRef, pictureOptions") && getLocalChildren(chartTypeNode, "ser").length === chart.series.length) {
|
|
1861
|
+
chart.renderSource = {
|
|
1862
|
+
kind,
|
|
1863
|
+
xml: chartXml,
|
|
1864
|
+
themeColors: themePalette ? Object.fromEntries(Object.entries(THEME_COLOR_INDEX_BY_NAME).flatMap(([key, index]) => {
|
|
1865
|
+
const color = themePalette.colorsByIndex[index];
|
|
1866
|
+
return color ? [[key, color]] : [];
|
|
1867
|
+
})) : void 0,
|
|
1868
|
+
themeOverrideXml: _nullishCoalesce(readArchiveText(archive, relationships.get("http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride")), () => ( void 0)),
|
|
1869
|
+
styleXml: _nullishCoalesce(readArchiveText(archive, relationships.get(CHART_STYLE_REL_TYPE)), () => ( void 0)),
|
|
1870
|
+
colorStyleXml: _nullishCoalesce(readArchiveText(archive, relationships.get(CHART_COLOR_STYLE_REL_TYPE)), () => ( void 0))
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1855
1873
|
applyChartSeriesStyleFromXml(chart, chartTypeNode, themePalette);
|
|
1856
1874
|
applyFallbackSeriesStyles();
|
|
1857
1875
|
applyBuiltinChartDefaults(chart, themePalette);
|
|
@@ -8624,66 +8642,66 @@ function useXlsxViewerController(options) {
|
|
|
8624
8642
|
src,
|
|
8625
8643
|
useWorker = true
|
|
8626
8644
|
} = options;
|
|
8627
|
-
const [isLoading, setIsLoading] =
|
|
8628
|
-
const [error, setError] =
|
|
8629
|
-
const [workbook, setWorkbook] =
|
|
8630
|
-
const [sheets, setSheets] =
|
|
8631
|
-
const [chartsByWorkbookSheetIndex, setChartsByWorkbookSheetIndex] =
|
|
8632
|
-
const [chartsheets, setChartsheets] =
|
|
8633
|
-
const [tabs, setTabs] =
|
|
8634
|
-
const [isChartsLoading, setIsChartsLoading] =
|
|
8635
|
-
const [workerTablesByWorkbookSheetIndex, setWorkerTablesByWorkbookSheetIndex] =
|
|
8636
|
-
const [formControlsByWorkbookSheetIndex, setFormControlsByWorkbookSheetIndex] =
|
|
8637
|
-
const [imagesByWorkbookSheetIndex, setImagesByWorkbookSheetIndex] =
|
|
8638
|
-
const [shapesByWorkbookSheetIndex, setShapesByWorkbookSheetIndex] =
|
|
8639
|
-
const [activeSheetIndex, setActiveSheetIndexState] =
|
|
8640
|
-
const [activeTabIndex, setActiveTabIndexState] =
|
|
8641
|
-
const [zoomScaleOverridesByTabId, setZoomScaleOverridesByTabId] =
|
|
8642
|
-
const [activeCell, setActiveCell] =
|
|
8643
|
-
const [selection, setSelection] =
|
|
8644
|
-
const [highlightedRanges, setHighlightedRanges] =
|
|
8645
|
-
const [selectedChartId, setSelectedChartId] =
|
|
8646
|
-
const [selectedChartElement, setSelectedChartElement] =
|
|
8647
|
-
const [selectedImageId, setSelectedImageId] =
|
|
8648
|
-
const [revision, setRevision] =
|
|
8649
|
-
const selectionAnchorRef =
|
|
8650
|
-
const undoStackRef =
|
|
8651
|
-
const redoStackRef =
|
|
8652
|
-
const isApplyingHistoryRef =
|
|
8653
|
-
const [historyRevision, setHistoryRevision] =
|
|
8654
|
-
const [shouldAutoCalculate, setShouldAutoCalculate] =
|
|
8655
|
-
const [workerCellSnapshotRevision, setWorkerCellSnapshotRevision] =
|
|
8656
|
-
const [isWorkerBacked, setIsWorkerBacked] =
|
|
8657
|
-
const [sortState, setSortState] =
|
|
8658
|
-
const [forcedReadOnly, setForcedReadOnly] =
|
|
8659
|
-
const deferredBufferRef =
|
|
8660
|
-
const [deferredLoadFileSize, setDeferredLoadFileSize] =
|
|
8661
|
-
const imageAssetsRef =
|
|
8662
|
-
const chartAssetsRef =
|
|
8663
|
-
const chartLoadRequestTokenRef =
|
|
8664
|
-
const chartDisplayFallbackCleanupRef =
|
|
8665
|
-
const sheetOriginsRef =
|
|
8666
|
-
const workerClientRef =
|
|
8667
|
-
const workerCellSnapshotCacheRef =
|
|
8668
|
-
const displayFileName =
|
|
8645
|
+
const [isLoading, setIsLoading] = _chunkAZWBTFJIcjs.d.call(void 0, Boolean(_nullishCoalesce(file, () => ( src))));
|
|
8646
|
+
const [error, setError] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8647
|
+
const [workbook, setWorkbook] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8648
|
+
const [sheets, setSheets] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8649
|
+
const [chartsByWorkbookSheetIndex, setChartsByWorkbookSheetIndex] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8650
|
+
const [chartsheets, setChartsheets] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8651
|
+
const [tabs, setTabs] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8652
|
+
const [isChartsLoading, setIsChartsLoading] = _chunkAZWBTFJIcjs.d.call(void 0, false);
|
|
8653
|
+
const [workerTablesByWorkbookSheetIndex, setWorkerTablesByWorkbookSheetIndex] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8654
|
+
const [formControlsByWorkbookSheetIndex, setFormControlsByWorkbookSheetIndex] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8655
|
+
const [imagesByWorkbookSheetIndex, setImagesByWorkbookSheetIndex] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8656
|
+
const [shapesByWorkbookSheetIndex, setShapesByWorkbookSheetIndex] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8657
|
+
const [activeSheetIndex, setActiveSheetIndexState] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
8658
|
+
const [activeTabIndex, setActiveTabIndexState] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
8659
|
+
const [zoomScaleOverridesByTabId, setZoomScaleOverridesByTabId] = _chunkAZWBTFJIcjs.d.call(void 0, {});
|
|
8660
|
+
const [activeCell, setActiveCell] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8661
|
+
const [selection, setSelection] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8662
|
+
const [highlightedRanges, setHighlightedRanges] = _chunkAZWBTFJIcjs.d.call(void 0, []);
|
|
8663
|
+
const [selectedChartId, setSelectedChartId] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8664
|
+
const [selectedChartElement, setSelectedChartElement] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8665
|
+
const [selectedImageId, setSelectedImageId] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8666
|
+
const [revision, setRevision] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
8667
|
+
const selectionAnchorRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8668
|
+
const undoStackRef = _chunkAZWBTFJIcjs.A.call(void 0, []);
|
|
8669
|
+
const redoStackRef = _chunkAZWBTFJIcjs.A.call(void 0, []);
|
|
8670
|
+
const isApplyingHistoryRef = _chunkAZWBTFJIcjs.A.call(void 0, false);
|
|
8671
|
+
const [historyRevision, setHistoryRevision] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
8672
|
+
const [shouldAutoCalculate, setShouldAutoCalculate] = _chunkAZWBTFJIcjs.d.call(void 0, false);
|
|
8673
|
+
const [workerCellSnapshotRevision, setWorkerCellSnapshotRevision] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
8674
|
+
const [isWorkerBacked, setIsWorkerBacked] = _chunkAZWBTFJIcjs.d.call(void 0, false);
|
|
8675
|
+
const [sortState, setSortState] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8676
|
+
const [forcedReadOnly, setForcedReadOnly] = _chunkAZWBTFJIcjs.d.call(void 0, false);
|
|
8677
|
+
const deferredBufferRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8678
|
+
const [deferredLoadFileSize, setDeferredLoadFileSize] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
8679
|
+
const imageAssetsRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8680
|
+
const chartAssetsRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8681
|
+
const chartLoadRequestTokenRef = _chunkAZWBTFJIcjs.A.call(void 0, 0);
|
|
8682
|
+
const chartDisplayFallbackCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8683
|
+
const sheetOriginsRef = _chunkAZWBTFJIcjs.A.call(void 0, []);
|
|
8684
|
+
const workerClientRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
8685
|
+
const workerCellSnapshotCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
8686
|
+
const displayFileName = _chunkAZWBTFJIcjs.T.call(void 0, () => resolveDisplayFileName(src, fileName), [fileName, src]);
|
|
8669
8687
|
const shouldDeferLoading = deferLoadingAboveBytes > 0;
|
|
8670
8688
|
const readOnly = requestedReadOnly || forcedReadOnly;
|
|
8671
8689
|
const canResizeReadOnly = requestedReadOnly && allowResizeInReadOnly && !forcedReadOnly;
|
|
8672
8690
|
const workerSupported = useWorker && typeof Worker !== "undefined" && canUseConfiguredWasmSourceInWorker();
|
|
8673
8691
|
const canUseWorkerForRequestedReadOnly = requestedReadOnly;
|
|
8674
|
-
const shouldForceReadOnlyForBuffer =
|
|
8675
|
-
const shouldUseWorkerForReadOnlyLoad =
|
|
8676
|
-
const disposeWorkerClient =
|
|
8692
|
+
const shouldForceReadOnlyForBuffer = _chunkAZWBTFJIcjs.q.call(void 0, (bufferByteLength) => !requestedReadOnly && readOnlyAboveBytes > 0 && bufferByteLength > readOnlyAboveBytes, [readOnlyAboveBytes, requestedReadOnly]);
|
|
8693
|
+
const shouldUseWorkerForReadOnlyLoad = _chunkAZWBTFJIcjs.q.call(void 0, (willForceReadOnly) => workerSupported && (willForceReadOnly || canUseWorkerForRequestedReadOnly), [canUseWorkerForRequestedReadOnly, workerSupported]);
|
|
8694
|
+
const disposeWorkerClient = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
8677
8695
|
_optionalChain([workerClientRef, 'access', _628 => _628.current, 'optionalAccess', _629 => _629.dispose, 'call', _630 => _630()]);
|
|
8678
8696
|
workerClientRef.current = null;
|
|
8679
8697
|
}, []);
|
|
8680
|
-
const getWorkerClient =
|
|
8698
|
+
const getWorkerClient = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
8681
8699
|
if (!workerClientRef.current) {
|
|
8682
8700
|
workerClientRef.current = new XlsxWorkerClient();
|
|
8683
8701
|
}
|
|
8684
8702
|
return workerClientRef.current;
|
|
8685
8703
|
}, []);
|
|
8686
|
-
const clearImageAssets =
|
|
8704
|
+
const clearImageAssets = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
8687
8705
|
revokeWorkbookImageAssets(imageAssetsRef.current);
|
|
8688
8706
|
imageAssetsRef.current = null;
|
|
8689
8707
|
sheetOriginsRef.current = [];
|
|
@@ -8691,7 +8709,7 @@ function useXlsxViewerController(options) {
|
|
|
8691
8709
|
setImagesByWorkbookSheetIndex([]);
|
|
8692
8710
|
setShapesByWorkbookSheetIndex([]);
|
|
8693
8711
|
}, []);
|
|
8694
|
-
const clearChartAssets =
|
|
8712
|
+
const clearChartAssets = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
8695
8713
|
chartLoadRequestTokenRef.current += 1;
|
|
8696
8714
|
_optionalChain([chartDisplayFallbackCleanupRef, 'access', _631 => _631.current, 'optionalCall', _632 => _632()]);
|
|
8697
8715
|
chartDisplayFallbackCleanupRef.current = null;
|
|
@@ -8701,7 +8719,7 @@ function useXlsxViewerController(options) {
|
|
|
8701
8719
|
setTabs([]);
|
|
8702
8720
|
setIsChartsLoading(false);
|
|
8703
8721
|
}, []);
|
|
8704
|
-
const setImageAssets =
|
|
8722
|
+
const setImageAssets = _chunkAZWBTFJIcjs.q.call(void 0, (assets) => {
|
|
8705
8723
|
revokeWorkbookImageAssets(imageAssetsRef.current);
|
|
8706
8724
|
imageAssetsRef.current = assets;
|
|
8707
8725
|
sheetOriginsRef.current = _nullishCoalesce(_optionalChain([assets, 'optionalAccess', _633 => _633.sheetOrigins, 'access', _634 => _634.slice, 'call', _635 => _635()]), () => ( []));
|
|
@@ -8709,18 +8727,18 @@ function useXlsxViewerController(options) {
|
|
|
8709
8727
|
setImagesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _637 => _637.imagesByWorkbookSheetIndex]), () => ( [])));
|
|
8710
8728
|
setShapesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _638 => _638.shapesByWorkbookSheetIndex]), () => ( [])));
|
|
8711
8729
|
}, []);
|
|
8712
|
-
const setChartAssets =
|
|
8730
|
+
const setChartAssets = _chunkAZWBTFJIcjs.q.call(void 0, (assets) => {
|
|
8713
8731
|
chartAssetsRef.current = assets;
|
|
8714
8732
|
setChartsByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _639 => _639.chartsByWorkbookSheetIndex]), () => ( [])));
|
|
8715
8733
|
setChartsheets(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _640 => _640.chartsheets]), () => ( [])));
|
|
8716
8734
|
setTabs(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _641 => _641.tabs]), () => ( [])));
|
|
8717
8735
|
setIsChartsLoading(false);
|
|
8718
8736
|
}, []);
|
|
8719
|
-
const shouldFallbackFromWorkerError =
|
|
8737
|
+
const shouldFallbackFromWorkerError = _chunkAZWBTFJIcjs.q.call(void 0, (error2) => {
|
|
8720
8738
|
const message = error2 instanceof Error ? error2.message : String(_nullishCoalesce(error2, () => ( "")));
|
|
8721
8739
|
return error2 instanceof XlsxWorkerUnavailableError || message.includes("DOMParser is not defined") || message.includes("XMLSerializer is not defined") || message.includes("Worker chart payload incomplete");
|
|
8722
8740
|
}, []);
|
|
8723
|
-
const hasIncompleteWorkerChartSnapshot =
|
|
8741
|
+
const hasIncompleteWorkerChartSnapshot = _chunkAZWBTFJIcjs.q.call(void 0, (snapshot) => {
|
|
8724
8742
|
for (const sheetCharts of snapshot.chartsByWorkbookSheetIndex) {
|
|
8725
8743
|
for (const chart of sheetCharts) {
|
|
8726
8744
|
if (chart.chartType !== "Bubble") {
|
|
@@ -8742,7 +8760,7 @@ function useXlsxViewerController(options) {
|
|
|
8742
8760
|
}
|
|
8743
8761
|
return false;
|
|
8744
8762
|
}, []);
|
|
8745
|
-
const ensureChartAssetsHydrated =
|
|
8763
|
+
const ensureChartAssetsHydrated = _chunkAZWBTFJIcjs.q.call(void 0, (targetWorkbook, targetSheets) => {
|
|
8746
8764
|
const currentAssets = chartAssetsRef.current;
|
|
8747
8765
|
if (currentAssets && (currentAssets.chartOriginsById.size > 0 || !targetWorkbook || !imageAssetsRef.current)) {
|
|
8748
8766
|
return currentAssets;
|
|
@@ -8759,7 +8777,7 @@ function useXlsxViewerController(options) {
|
|
|
8759
8777
|
chartAssetsRef.current = assets;
|
|
8760
8778
|
return assets;
|
|
8761
8779
|
}, [showHiddenSheets]);
|
|
8762
|
-
const startChartDisplayHydration =
|
|
8780
|
+
const startChartDisplayHydration = _chunkAZWBTFJIcjs.q.call(void 0, (buffer, targetWorkbook, targetSheets) => {
|
|
8763
8781
|
const effectiveSkipXmlParsing = shouldSkipXmlParsingForWorkbook(new Uint8Array(buffer), skipXmlParsing);
|
|
8764
8782
|
const visibleSheetIndexByWorkbookSheetIndex2 = buildVisibleSheetIndexMap(targetSheets);
|
|
8765
8783
|
const quickAssets = loadWorkbookChartAssets(targetWorkbook, null, visibleSheetIndexByWorkbookSheetIndex2, showHiddenSheets);
|
|
@@ -8860,7 +8878,7 @@ function useXlsxViewerController(options) {
|
|
|
8860
8878
|
triggerFallback();
|
|
8861
8879
|
});
|
|
8862
8880
|
}, [getWorkerClient, hasIncompleteWorkerChartSnapshot, setChartAssets, showHiddenSheets, skipXmlParsing, workerSupported]);
|
|
8863
|
-
const loadWorkbookOnMainThread =
|
|
8881
|
+
const loadWorkbookOnMainThread = _chunkAZWBTFJIcjs.q.call(void 0, async (buffer) => {
|
|
8864
8882
|
const nextParsedWorkbook = await parseWorkbookBuffer(buffer);
|
|
8865
8883
|
const bytes = new Uint8Array(buffer);
|
|
8866
8884
|
const nextImageAssets = loadWorkbookImageAssets(
|
|
@@ -8873,7 +8891,7 @@ function useXlsxViewerController(options) {
|
|
|
8873
8891
|
parsedWorkbook: nextParsedWorkbook
|
|
8874
8892
|
};
|
|
8875
8893
|
}, [skipXmlParsing]);
|
|
8876
|
-
const refreshWorkbookState =
|
|
8894
|
+
const refreshWorkbookState = _chunkAZWBTFJIcjs.q.call(void 0, (targetWorkbook) => {
|
|
8877
8895
|
const currentFormControls = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _644 => _644.current, 'optionalAccess', _645 => _645.formControlsByWorkbookSheetIndex]), () => ( []));
|
|
8878
8896
|
const nextFormControls = refreshWorkbookFormControls(
|
|
8879
8897
|
targetWorkbook,
|
|
@@ -8904,13 +8922,13 @@ function useXlsxViewerController(options) {
|
|
|
8904
8922
|
);
|
|
8905
8923
|
setRevision((current) => current + 1);
|
|
8906
8924
|
}, [setChartAssets, showHiddenSheets]);
|
|
8907
|
-
|
|
8925
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => () => {
|
|
8908
8926
|
_optionalChain([chartDisplayFallbackCleanupRef, 'access', _658 => _658.current, 'optionalCall', _659 => _659()]);
|
|
8909
8927
|
chartDisplayFallbackCleanupRef.current = null;
|
|
8910
8928
|
revokeWorkbookImageAssets(imageAssetsRef.current);
|
|
8911
8929
|
disposeWorkerClient();
|
|
8912
8930
|
}, [disposeWorkerClient]);
|
|
8913
|
-
|
|
8931
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
8914
8932
|
if (!file && !src) {
|
|
8915
8933
|
disposeWorkerClient();
|
|
8916
8934
|
setForcedReadOnly(false);
|
|
@@ -9107,20 +9125,20 @@ function useXlsxViewerController(options) {
|
|
|
9107
9125
|
]);
|
|
9108
9126
|
const activeTab = _nullishCoalesce(tabs[activeTabIndex], () => ( null));
|
|
9109
9127
|
const activeSheet = _optionalChain([activeTab, 'optionalAccess', _661 => _661.kind]) === "sheet" ? _nullishCoalesce(sheets[_nullishCoalesce(activeTab.sheetIndex, () => ( -1))], () => ( null)) : null;
|
|
9110
|
-
const deferredMetadataCell =
|
|
9111
|
-
const deferredMetadataSheet =
|
|
9128
|
+
const deferredMetadataCell = _chunkAZWBTFJIcjs.w.call(void 0, activeCell);
|
|
9129
|
+
const deferredMetadataSheet = _chunkAZWBTFJIcjs.w.call(void 0, activeSheet);
|
|
9112
9130
|
const activeZoomTabKey = _nullishCoalesce(_optionalChain([activeTab, 'optionalAccess', _662 => _662.id]), () => ( DEFAULT_ZOOM_TAB_KEY));
|
|
9113
|
-
const defaultZoomScale =
|
|
9131
|
+
const defaultZoomScale = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9114
9132
|
() => resolveDefaultZoomScale(activeTab, activeSheet),
|
|
9115
9133
|
[activeSheet, activeTab]
|
|
9116
9134
|
);
|
|
9117
|
-
const zoomScale =
|
|
9135
|
+
const zoomScale = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9118
9136
|
() => clampZoomScale(_nullishCoalesce(zoomScaleOverridesByTabId[activeZoomTabKey], () => ( defaultZoomScale))),
|
|
9119
9137
|
[activeZoomTabKey, defaultZoomScale, zoomScaleOverridesByTabId]
|
|
9120
9138
|
);
|
|
9121
9139
|
const canZoomIn = zoomScale < MAX_ZOOM_SCALE;
|
|
9122
9140
|
const canZoomOut = zoomScale > MIN_ZOOM_SCALE;
|
|
9123
|
-
|
|
9141
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
9124
9142
|
setActiveCell(null);
|
|
9125
9143
|
setSelection(null);
|
|
9126
9144
|
setSelectedChartId(null);
|
|
@@ -9129,7 +9147,7 @@ function useXlsxViewerController(options) {
|
|
|
9129
9147
|
selectionAnchorRef.current = null;
|
|
9130
9148
|
setSortState(null);
|
|
9131
9149
|
}, [activeTabIndex]);
|
|
9132
|
-
const setActiveSheetIndex =
|
|
9150
|
+
const setActiveSheetIndex = _chunkAZWBTFJIcjs.q.call(void 0, (index) => {
|
|
9133
9151
|
setActiveSheetIndexState((currentIndex) => {
|
|
9134
9152
|
if (index < 0 || index >= sheets.length) {
|
|
9135
9153
|
return currentIndex;
|
|
@@ -9142,7 +9160,7 @@ function useXlsxViewerController(options) {
|
|
|
9142
9160
|
return index;
|
|
9143
9161
|
});
|
|
9144
9162
|
}, [sheets, tabs]);
|
|
9145
|
-
const setActiveTabIndex =
|
|
9163
|
+
const setActiveTabIndex = _chunkAZWBTFJIcjs.q.call(void 0, (index) => {
|
|
9146
9164
|
setActiveTabIndexState((currentIndex) => {
|
|
9147
9165
|
if (index < 0 || index >= tabs.length) {
|
|
9148
9166
|
return currentIndex;
|
|
@@ -9154,7 +9172,7 @@ function useXlsxViewerController(options) {
|
|
|
9154
9172
|
return index;
|
|
9155
9173
|
});
|
|
9156
9174
|
}, [tabs]);
|
|
9157
|
-
const highlightRanges =
|
|
9175
|
+
const highlightRanges = _chunkAZWBTFJIcjs.q.call(void 0, (references, options2 = {}) => {
|
|
9158
9176
|
const inputs = typeof references === "string" ? [references] : references;
|
|
9159
9177
|
if (!Array.isArray(inputs) || isLoading || error) {
|
|
9160
9178
|
return false;
|
|
@@ -9188,8 +9206,8 @@ function useXlsxViewerController(options) {
|
|
|
9188
9206
|
}
|
|
9189
9207
|
return true;
|
|
9190
9208
|
}, [activeSheetIndex, error, isLoading, setActiveSheetIndex, sheets]);
|
|
9191
|
-
const clearHighlightedRanges =
|
|
9192
|
-
const setZoomScale =
|
|
9209
|
+
const clearHighlightedRanges = _chunkAZWBTFJIcjs.q.call(void 0, () => setHighlightedRanges([]), []);
|
|
9210
|
+
const setZoomScale = _chunkAZWBTFJIcjs.q.call(void 0, (nextZoomScale) => {
|
|
9193
9211
|
const normalizedZoomScale = clampZoomScale(nextZoomScale);
|
|
9194
9212
|
setZoomScaleOverridesByTabId((current) => {
|
|
9195
9213
|
if (current[activeZoomTabKey] === normalizedZoomScale) {
|
|
@@ -9201,7 +9219,7 @@ function useXlsxViewerController(options) {
|
|
|
9201
9219
|
};
|
|
9202
9220
|
});
|
|
9203
9221
|
}, [activeZoomTabKey]);
|
|
9204
|
-
const resetZoom =
|
|
9222
|
+
const resetZoom = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9205
9223
|
setZoomScaleOverridesByTabId((current) => {
|
|
9206
9224
|
if (current[activeZoomTabKey] === void 0) {
|
|
9207
9225
|
return current;
|
|
@@ -9211,13 +9229,13 @@ function useXlsxViewerController(options) {
|
|
|
9211
9229
|
return next;
|
|
9212
9230
|
});
|
|
9213
9231
|
}, [activeZoomTabKey]);
|
|
9214
|
-
const zoomIn =
|
|
9232
|
+
const zoomIn = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9215
9233
|
setZoomScale(resolveNextZoomScale(zoomScale, 1));
|
|
9216
9234
|
}, [setZoomScale, zoomScale]);
|
|
9217
|
-
const zoomOut =
|
|
9235
|
+
const zoomOut = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9218
9236
|
setZoomScale(resolveNextZoomScale(zoomScale, -1));
|
|
9219
9237
|
}, [setZoomScale, zoomScale]);
|
|
9220
|
-
|
|
9238
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
9221
9239
|
setActiveTabIndexState((current) => {
|
|
9222
9240
|
if (tabs.length === 0) {
|
|
9223
9241
|
return 0;
|
|
@@ -9225,7 +9243,7 @@ function useXlsxViewerController(options) {
|
|
|
9225
9243
|
return Math.min(current, tabs.length - 1);
|
|
9226
9244
|
});
|
|
9227
9245
|
}, [tabs.length]);
|
|
9228
|
-
const continueDeferredLoad =
|
|
9246
|
+
const continueDeferredLoad = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9229
9247
|
const deferredBuffer = deferredBufferRef.current;
|
|
9230
9248
|
if (!deferredBuffer) {
|
|
9231
9249
|
return;
|
|
@@ -9390,7 +9408,7 @@ function useXlsxViewerController(options) {
|
|
|
9390
9408
|
shouldForceReadOnlyForBuffer,
|
|
9391
9409
|
shouldUseWorkerForReadOnlyLoad
|
|
9392
9410
|
]);
|
|
9393
|
-
const maybeRecalculateWorkbook =
|
|
9411
|
+
const maybeRecalculateWorkbook = _chunkAZWBTFJIcjs.q.call(void 0, (targetWorkbook) => {
|
|
9394
9412
|
if (!shouldAutoCalculate) {
|
|
9395
9413
|
return;
|
|
9396
9414
|
}
|
|
@@ -9399,13 +9417,13 @@ function useXlsxViewerController(options) {
|
|
|
9399
9417
|
setShouldAutoCalculate(false);
|
|
9400
9418
|
}
|
|
9401
9419
|
}, [shouldAutoCalculate]);
|
|
9402
|
-
const getActiveWorksheet =
|
|
9420
|
+
const getActiveWorksheet = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9403
9421
|
if (!workbook || !activeSheet) {
|
|
9404
9422
|
return null;
|
|
9405
9423
|
}
|
|
9406
9424
|
return workbook.getSheet(activeSheet.workbookSheetIndex);
|
|
9407
9425
|
}, [activeSheet, workbook]);
|
|
9408
|
-
const getFormControlWorksheet =
|
|
9426
|
+
const getFormControlWorksheet = _chunkAZWBTFJIcjs.q.call(void 0, (sheetIndex = activeSheetIndex) => {
|
|
9409
9427
|
const targetSheet = sheets[sheetIndex];
|
|
9410
9428
|
if (!workbook || !targetSheet) {
|
|
9411
9429
|
return null;
|
|
@@ -9419,11 +9437,11 @@ function useXlsxViewerController(options) {
|
|
|
9419
9437
|
return null;
|
|
9420
9438
|
}
|
|
9421
9439
|
}, [activeSheetIndex, sheets, workbook]);
|
|
9422
|
-
const tables =
|
|
9440
|
+
const tables = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9423
9441
|
() => isWorkerBacked ? _nullishCoalesce(workerTablesByWorkbookSheetIndex[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _671 => _671.workbookSheetIndex]), () => ( -1))], () => ( [])) : mapWorksheetTables(getActiveWorksheet(), _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _672 => _672.autoFilterRanges]), () => ( []))),
|
|
9424
9442
|
[_optionalChain([activeSheet, 'optionalAccess', _673 => _673.autoFilterRanges]), _optionalChain([activeSheet, 'optionalAccess', _674 => _674.workbookSheetIndex]), getActiveWorksheet, isWorkerBacked, revision, workerTablesByWorkbookSheetIndex]
|
|
9425
9443
|
);
|
|
9426
|
-
const getCellSnapshotAsync =
|
|
9444
|
+
const getCellSnapshotAsync = _chunkAZWBTFJIcjs.q.call(void 0, (workbookSheetIndex, row, col) => {
|
|
9427
9445
|
if (!isWorkerBacked) {
|
|
9428
9446
|
return Promise.resolve({
|
|
9429
9447
|
displayValue: "",
|
|
@@ -9432,42 +9450,42 @@ function useXlsxViewerController(options) {
|
|
|
9432
9450
|
}
|
|
9433
9451
|
return getWorkerClient().getCellSnapshot(workbookSheetIndex, row, col, locale);
|
|
9434
9452
|
}, [getWorkerClient, isWorkerBacked, locale]);
|
|
9435
|
-
const getRowsBatchAsync =
|
|
9453
|
+
const getRowsBatchAsync = _chunkAZWBTFJIcjs.q.call(void 0, (workbookSheetIndex, startRow, rowCount) => {
|
|
9436
9454
|
if (!isWorkerBacked) {
|
|
9437
9455
|
return Promise.resolve(null);
|
|
9438
9456
|
}
|
|
9439
9457
|
return getWorkerClient().getRowsBatch(workbookSheetIndex, startRow, rowCount, locale);
|
|
9440
9458
|
}, [getWorkerClient, isWorkerBacked, locale]);
|
|
9441
|
-
const visibleSheetIndexByWorkbookSheetIndex =
|
|
9459
|
+
const visibleSheetIndexByWorkbookSheetIndex = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9442
9460
|
() => new Map(sheets.map((sheet, index) => [sheet.workbookSheetIndex, index])),
|
|
9443
9461
|
[sheets]
|
|
9444
9462
|
);
|
|
9445
|
-
const mapPublicChart =
|
|
9463
|
+
const mapPublicChart = _chunkAZWBTFJIcjs.q.call(void 0, (chart) => {
|
|
9446
9464
|
const visibleSheetIndex = visibleSheetIndexByWorkbookSheetIndex.get(chart.workbookSheetIndex);
|
|
9447
9465
|
return {
|
|
9448
9466
|
...chart,
|
|
9449
9467
|
sheetIndex: _nullishCoalesce(visibleSheetIndex, () => ( chart.workbookSheetIndex))
|
|
9450
9468
|
};
|
|
9451
9469
|
}, [visibleSheetIndexByWorkbookSheetIndex]);
|
|
9452
|
-
const mapPublicImage =
|
|
9470
|
+
const mapPublicImage = _chunkAZWBTFJIcjs.q.call(void 0, (image) => {
|
|
9453
9471
|
const visibleSheetIndex = visibleSheetIndexByWorkbookSheetIndex.get(image.workbookSheetIndex);
|
|
9454
9472
|
return {
|
|
9455
9473
|
...image,
|
|
9456
9474
|
sheetIndex: _nullishCoalesce(visibleSheetIndex, () => ( image.workbookSheetIndex))
|
|
9457
9475
|
};
|
|
9458
9476
|
}, [visibleSheetIndexByWorkbookSheetIndex]);
|
|
9459
|
-
const mapPublicFormControl =
|
|
9477
|
+
const mapPublicFormControl = _chunkAZWBTFJIcjs.q.call(void 0, (control) => {
|
|
9460
9478
|
const visibleSheetIndex = visibleSheetIndexByWorkbookSheetIndex.get(control.workbookSheetIndex);
|
|
9461
9479
|
return {
|
|
9462
9480
|
...control,
|
|
9463
9481
|
sheetIndex: _nullishCoalesce(visibleSheetIndex, () => ( control.workbookSheetIndex))
|
|
9464
9482
|
};
|
|
9465
9483
|
}, [visibleSheetIndexByWorkbookSheetIndex]);
|
|
9466
|
-
const publicChartsByWorkbookSheetIndex =
|
|
9484
|
+
const publicChartsByWorkbookSheetIndex = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9467
9485
|
() => chartsByWorkbookSheetIndex.map((sheetCharts) => sheetCharts.map(mapPublicChart)),
|
|
9468
9486
|
[chartsByWorkbookSheetIndex, mapPublicChart]
|
|
9469
9487
|
);
|
|
9470
|
-
const publicChartById =
|
|
9488
|
+
const publicChartById = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
9471
9489
|
const lookup = /* @__PURE__ */ new Map();
|
|
9472
9490
|
for (const sheetCharts of publicChartsByWorkbookSheetIndex) {
|
|
9473
9491
|
for (const chart of sheetCharts) {
|
|
@@ -9476,29 +9494,29 @@ function useXlsxViewerController(options) {
|
|
|
9476
9494
|
}
|
|
9477
9495
|
return lookup;
|
|
9478
9496
|
}, [publicChartsByWorkbookSheetIndex]);
|
|
9479
|
-
const getSheetCharts =
|
|
9497
|
+
const getSheetCharts = _chunkAZWBTFJIcjs.q.call(void 0, (sheetIndex = activeSheetIndex) => {
|
|
9480
9498
|
const targetSheet = sheets[sheetIndex];
|
|
9481
9499
|
if (!targetSheet) {
|
|
9482
9500
|
return [];
|
|
9483
9501
|
}
|
|
9484
9502
|
return _nullishCoalesce(publicChartsByWorkbookSheetIndex[targetSheet.workbookSheetIndex], () => ( []));
|
|
9485
9503
|
}, [activeSheetIndex, publicChartsByWorkbookSheetIndex, sheets]);
|
|
9486
|
-
const getChartById =
|
|
9504
|
+
const getChartById = _chunkAZWBTFJIcjs.q.call(void 0, (id) => {
|
|
9487
9505
|
return _nullishCoalesce(publicChartById.get(id), () => ( null));
|
|
9488
9506
|
}, [publicChartById]);
|
|
9489
|
-
const getChartsheetById =
|
|
9490
|
-
const charts =
|
|
9507
|
+
const getChartsheetById = _chunkAZWBTFJIcjs.q.call(void 0, (id) => _nullishCoalesce(chartsheets.find((chartsheet) => chartsheet.id === id), () => ( null)), [chartsheets]);
|
|
9508
|
+
const charts = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
9491
9509
|
if (_optionalChain([activeTab, 'optionalAccess', _675 => _675.kind]) === "chartsheet" && typeof activeTab.chartsheetIndex === "number") {
|
|
9492
9510
|
const chartsheet = chartsheets[activeTab.chartsheetIndex];
|
|
9493
9511
|
return (_nullishCoalesce(_optionalChain([chartsheet, 'optionalAccess', _676 => _676.chartIds]), () => ( []))).map((id) => getChartById(id)).filter((value) => Boolean(value));
|
|
9494
9512
|
}
|
|
9495
9513
|
return getSheetCharts(activeSheetIndex);
|
|
9496
9514
|
}, [activeSheetIndex, activeTab, chartsheets, getChartById, getSheetCharts]);
|
|
9497
|
-
const selectedChart =
|
|
9515
|
+
const selectedChart = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9498
9516
|
() => selectedChartId ? getChartById(selectedChartId) : null,
|
|
9499
9517
|
[getChartById, selectedChartId]
|
|
9500
9518
|
);
|
|
9501
|
-
|
|
9519
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
9502
9520
|
if (!selectedChartId) {
|
|
9503
9521
|
if (selectedChartElement) {
|
|
9504
9522
|
setSelectedChartElement(null);
|
|
@@ -9525,40 +9543,40 @@ function useXlsxViewerController(options) {
|
|
|
9525
9543
|
}
|
|
9526
9544
|
}
|
|
9527
9545
|
}, [selectedChart, selectedChartElement, selectedChartId]);
|
|
9528
|
-
const selectChart =
|
|
9546
|
+
const selectChart = _chunkAZWBTFJIcjs.q.call(void 0, (id) => {
|
|
9529
9547
|
setSelectedImageId(null);
|
|
9530
9548
|
setSelectedChartId(id);
|
|
9531
9549
|
setSelectedChartElement(id ? { chartId: id, kind: "chart" } : null);
|
|
9532
9550
|
}, []);
|
|
9533
|
-
const clearSelectedChart =
|
|
9551
|
+
const clearSelectedChart = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9534
9552
|
setSelectedChartId(null);
|
|
9535
9553
|
setSelectedChartElement(null);
|
|
9536
9554
|
}, []);
|
|
9537
|
-
const clearSelectedChartElement =
|
|
9555
|
+
const clearSelectedChartElement = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9538
9556
|
setSelectedChartElement(selectedChartId ? { chartId: selectedChartId, kind: "chart" } : null);
|
|
9539
9557
|
}, [selectedChartId]);
|
|
9540
|
-
const selectChartElement =
|
|
9558
|
+
const selectChartElement = _chunkAZWBTFJIcjs.q.call(void 0, (selection2) => {
|
|
9541
9559
|
setSelectedImageId(null);
|
|
9542
9560
|
setSelectedChartId(_nullishCoalesce(_optionalChain([selection2, 'optionalAccess', _677 => _677.chartId]), () => ( null)));
|
|
9543
9561
|
setSelectedChartElement(selection2);
|
|
9544
9562
|
}, []);
|
|
9545
|
-
const getSheetImages =
|
|
9563
|
+
const getSheetImages = _chunkAZWBTFJIcjs.q.call(void 0, (sheetIndex = activeSheetIndex) => {
|
|
9546
9564
|
const targetSheet = sheets[sheetIndex];
|
|
9547
9565
|
if (!targetSheet) {
|
|
9548
9566
|
return [];
|
|
9549
9567
|
}
|
|
9550
9568
|
return (_nullishCoalesce(imagesByWorkbookSheetIndex[targetSheet.workbookSheetIndex], () => ( []))).map(mapPublicImage);
|
|
9551
9569
|
}, [activeSheetIndex, imagesByWorkbookSheetIndex, mapPublicImage, sheets]);
|
|
9552
|
-
const images =
|
|
9553
|
-
const getSheetFormControls =
|
|
9570
|
+
const images = _chunkAZWBTFJIcjs.T.call(void 0, () => getSheetImages(activeSheetIndex), [activeSheetIndex, getSheetImages]);
|
|
9571
|
+
const getSheetFormControls = _chunkAZWBTFJIcjs.q.call(void 0, (sheetIndex = activeSheetIndex) => {
|
|
9554
9572
|
const targetSheet = sheets[sheetIndex];
|
|
9555
9573
|
if (!targetSheet) {
|
|
9556
9574
|
return [];
|
|
9557
9575
|
}
|
|
9558
9576
|
return (_nullishCoalesce(formControlsByWorkbookSheetIndex[targetSheet.workbookSheetIndex], () => ( []))).map(mapPublicFormControl);
|
|
9559
9577
|
}, [activeSheetIndex, formControlsByWorkbookSheetIndex, mapPublicFormControl, sheets]);
|
|
9560
|
-
const formControls =
|
|
9561
|
-
const getFormControlItems =
|
|
9578
|
+
const formControls = _chunkAZWBTFJIcjs.T.call(void 0, () => getSheetFormControls(activeSheetIndex), [activeSheetIndex, getSheetFormControls]);
|
|
9579
|
+
const getFormControlItems = _chunkAZWBTFJIcjs.q.call(void 0, (controlIndex, sheetIndex = activeSheetIndex) => {
|
|
9562
9580
|
const target = getFormControlWorksheet(sheetIndex);
|
|
9563
9581
|
if (!workbook || !target) {
|
|
9564
9582
|
const targetSheet = sheets[sheetIndex];
|
|
@@ -9586,7 +9604,7 @@ function useXlsxViewerController(options) {
|
|
|
9586
9604
|
}
|
|
9587
9605
|
return items;
|
|
9588
9606
|
}, [activeSheetIndex, formControlsByWorkbookSheetIndex, getFormControlWorksheet, sheets, workbook]);
|
|
9589
|
-
const getSheetShapes =
|
|
9607
|
+
const getSheetShapes = _chunkAZWBTFJIcjs.q.call(void 0, (sheetIndex = activeSheetIndex) => {
|
|
9590
9608
|
const targetSheet = sheets[sheetIndex];
|
|
9591
9609
|
if (!targetSheet) {
|
|
9592
9610
|
return [];
|
|
@@ -9599,8 +9617,8 @@ function useXlsxViewerController(options) {
|
|
|
9599
9617
|
};
|
|
9600
9618
|
});
|
|
9601
9619
|
}, [activeSheetIndex, shapesByWorkbookSheetIndex, sheets, visibleSheetIndexByWorkbookSheetIndex]);
|
|
9602
|
-
const shapes =
|
|
9603
|
-
const getImageById =
|
|
9620
|
+
const shapes = _chunkAZWBTFJIcjs.T.call(void 0, () => getSheetShapes(activeSheetIndex), [activeSheetIndex, getSheetShapes]);
|
|
9621
|
+
const getImageById = _chunkAZWBTFJIcjs.q.call(void 0, (id) => {
|
|
9604
9622
|
for (const sheetImages of imagesByWorkbookSheetIndex) {
|
|
9605
9623
|
const match = _optionalChain([sheetImages, 'optionalAccess', _685 => _685.find, 'call', _686 => _686((image) => image.id === id)]);
|
|
9606
9624
|
if (match) {
|
|
@@ -9609,19 +9627,19 @@ function useXlsxViewerController(options) {
|
|
|
9609
9627
|
}
|
|
9610
9628
|
return null;
|
|
9611
9629
|
}, [imagesByWorkbookSheetIndex, mapPublicImage]);
|
|
9612
|
-
const selectedImage =
|
|
9630
|
+
const selectedImage = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9613
9631
|
() => selectedImageId ? getImageById(selectedImageId) : null,
|
|
9614
9632
|
[getImageById, selectedImageId]
|
|
9615
9633
|
);
|
|
9616
|
-
const selectImage =
|
|
9634
|
+
const selectImage = _chunkAZWBTFJIcjs.q.call(void 0, (id) => {
|
|
9617
9635
|
setSelectedChartId(null);
|
|
9618
9636
|
setSelectedChartElement(null);
|
|
9619
9637
|
setSelectedImageId(id);
|
|
9620
9638
|
}, []);
|
|
9621
|
-
const clearSelectedImage =
|
|
9639
|
+
const clearSelectedImage = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9622
9640
|
setSelectedImageId(null);
|
|
9623
9641
|
}, []);
|
|
9624
|
-
const getColumnWidthPx =
|
|
9642
|
+
const getColumnWidthPx = _chunkAZWBTFJIcjs.q.call(void 0, (worksheet, col) => {
|
|
9625
9643
|
const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _687 => _687.current, 'optionalAccess', _688 => _688.sheetStatesByWorkbookSheetIndex, 'access', _689 => _689[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _690 => _690.workbookSheetIndex]), () => ( -1))]]), () => ( null));
|
|
9626
9644
|
const width = worksheet.getColumnWidth(col);
|
|
9627
9645
|
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _691 => _691.showGridLines]), () => ( true));
|
|
@@ -9636,7 +9654,7 @@ function useXlsxViewerController(options) {
|
|
|
9636
9654
|
showGridLines
|
|
9637
9655
|
);
|
|
9638
9656
|
}, [_optionalChain([activeSheet, 'optionalAccess', _696 => _696.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _697 => _697.workbookSheetIndex])]);
|
|
9639
|
-
const getRowHeightPx =
|
|
9657
|
+
const getRowHeightPx = _chunkAZWBTFJIcjs.q.call(void 0, (worksheet, row) => {
|
|
9640
9658
|
const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _698 => _698.current, 'optionalAccess', _699 => _699.sheetStatesByWorkbookSheetIndex, 'access', _700 => _700[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _701 => _701.workbookSheetIndex]), () => ( -1))]]), () => ( null));
|
|
9641
9659
|
const height = worksheet.getRowHeight(row);
|
|
9642
9660
|
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _702 => _702.showGridLines]), () => ( true));
|
|
@@ -9648,7 +9666,7 @@ function useXlsxViewerController(options) {
|
|
|
9648
9666
|
showGridLines
|
|
9649
9667
|
);
|
|
9650
9668
|
}, [_optionalChain([activeSheet, 'optionalAccess', _706 => _706.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _707 => _707.workbookSheetIndex])]);
|
|
9651
|
-
const getCellDisplayValue2 =
|
|
9669
|
+
const getCellDisplayValue2 = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
9652
9670
|
if (cell && activeSheet) {
|
|
9653
9671
|
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9654
9672
|
if (workerSnapshot) {
|
|
@@ -9677,7 +9695,7 @@ function useXlsxViewerController(options) {
|
|
|
9677
9695
|
}
|
|
9678
9696
|
return calculated.toString();
|
|
9679
9697
|
}, [activeSheet, getActiveWorksheet, locale]);
|
|
9680
|
-
const getCellFormula =
|
|
9698
|
+
const getCellFormula = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
9681
9699
|
if (cell && activeSheet) {
|
|
9682
9700
|
const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
|
|
9683
9701
|
if (workerSnapshot) {
|
|
@@ -9690,7 +9708,7 @@ function useXlsxViewerController(options) {
|
|
|
9690
9708
|
}
|
|
9691
9709
|
return _nullishCoalesce(worksheet.getFormulaAt(cell.row, cell.col), () => ( ""));
|
|
9692
9710
|
}, [activeSheet, getActiveWorksheet, locale]);
|
|
9693
|
-
const getClipboardData =
|
|
9711
|
+
const getClipboardData = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9694
9712
|
const worksheet = getActiveWorksheet();
|
|
9695
9713
|
const targetRange = _nullishCoalesce(selection, () => ( (activeCell ? { start: activeCell, end: activeCell } : null)));
|
|
9696
9714
|
if (!worksheet || !targetRange) {
|
|
@@ -9805,7 +9823,7 @@ function useXlsxViewerController(options) {
|
|
|
9805
9823
|
text: rows.join("\n")
|
|
9806
9824
|
};
|
|
9807
9825
|
}, [activeCell, getActiveWorksheet, getCellDisplayValue2, selection]);
|
|
9808
|
-
|
|
9826
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
9809
9827
|
if (!isWorkerBacked || !deferredMetadataSheet || !deferredMetadataCell) {
|
|
9810
9828
|
return;
|
|
9811
9829
|
}
|
|
@@ -9834,24 +9852,24 @@ function useXlsxViewerController(options) {
|
|
|
9834
9852
|
isCurrent = false;
|
|
9835
9853
|
};
|
|
9836
9854
|
}, [deferredMetadataCell, deferredMetadataSheet, getCellSnapshotAsync, isWorkerBacked, locale]);
|
|
9837
|
-
const activeCellAddress =
|
|
9838
|
-
const selectedRangeAddress =
|
|
9839
|
-
const selectedValue =
|
|
9855
|
+
const activeCellAddress = _chunkAZWBTFJIcjs.T.call(void 0, () => activeCell ? cellAddressToA1(activeCell) : null, [activeCell]);
|
|
9856
|
+
const selectedRangeAddress = _chunkAZWBTFJIcjs.T.call(void 0, () => selection ? rangeToA1(selection) : null, [selection]);
|
|
9857
|
+
const selectedValue = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9840
9858
|
() => getCellDisplayValue2(deferredMetadataCell),
|
|
9841
9859
|
[deferredMetadataCell, getCellDisplayValue2, revision, workerCellSnapshotRevision]
|
|
9842
9860
|
);
|
|
9843
|
-
const selectedCellFormula =
|
|
9861
|
+
const selectedCellFormula = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
9844
9862
|
() => getCellFormula(deferredMetadataCell),
|
|
9845
9863
|
[deferredMetadataCell, getCellFormula, revision, workerCellSnapshotRevision]
|
|
9846
9864
|
);
|
|
9847
|
-
const getChartSeriesFormula =
|
|
9848
|
-
const selectedChartFormula =
|
|
9865
|
+
const getChartSeriesFormula = _chunkAZWBTFJIcjs.q.call(void 0, (chartId, seriesIndex) => buildChartSeriesFormula(getChartById(chartId), seriesIndex), [getChartById]);
|
|
9866
|
+
const selectedChartFormula = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
9849
9867
|
if (!selectedChartElement || selectedChartElement.kind === "chart" || selectedChartElement.seriesIndex < 0) {
|
|
9850
9868
|
return null;
|
|
9851
9869
|
}
|
|
9852
9870
|
return getChartSeriesFormula(selectedChartElement.chartId, selectedChartElement.seriesIndex);
|
|
9853
9871
|
}, [getChartSeriesFormula, selectedChartElement]);
|
|
9854
|
-
const selectedFormulaTarget =
|
|
9872
|
+
const selectedFormulaTarget = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
9855
9873
|
if (selectedChartFormula && selectedChartElement && selectedChartElement.kind !== "chart") {
|
|
9856
9874
|
return {
|
|
9857
9875
|
chartId: selectedChartElement.chartId,
|
|
@@ -9870,11 +9888,11 @@ function useXlsxViewerController(options) {
|
|
|
9870
9888
|
const canLoadDeferred = !isLoading && isLoadDeferred;
|
|
9871
9889
|
const canUndo = !readOnly && undoStackRef.current.length > 0;
|
|
9872
9890
|
const canRedo = !readOnly && redoStackRef.current.length > 0;
|
|
9873
|
-
const createSavedWorkbookBytes =
|
|
9891
|
+
const createSavedWorkbookBytes = _chunkAZWBTFJIcjs.q.call(void 0, (targetWorkbook) => {
|
|
9874
9892
|
const sanitizedBytes = sanitizeSavedWorkbookBytes(targetWorkbook.saveXlsxBytes());
|
|
9875
9893
|
return mergeWorkbookImageAssets(sanitizedBytes, imageAssetsRef.current, sheetOriginsRef.current);
|
|
9876
9894
|
}, []);
|
|
9877
|
-
const createHistoryEntry =
|
|
9895
|
+
const createHistoryEntry = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9878
9896
|
if (!workbook) {
|
|
9879
9897
|
return null;
|
|
9880
9898
|
}
|
|
@@ -9886,7 +9904,7 @@ function useXlsxViewerController(options) {
|
|
|
9886
9904
|
selection
|
|
9887
9905
|
};
|
|
9888
9906
|
}, [activeCell, activeSheetIndex, createSavedWorkbookBytes, selection, workbook]);
|
|
9889
|
-
const captureCellMutationState =
|
|
9907
|
+
const captureCellMutationState = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
9890
9908
|
const worksheet = getActiveWorksheet();
|
|
9891
9909
|
if (!worksheet) {
|
|
9892
9910
|
return null;
|
|
@@ -9897,7 +9915,7 @@ function useXlsxViewerController(options) {
|
|
|
9897
9915
|
value: worksheet.getCellAt(cell.row, cell.col).toJs()
|
|
9898
9916
|
};
|
|
9899
9917
|
}, [getActiveWorksheet]);
|
|
9900
|
-
const restoreHistoryEntry =
|
|
9918
|
+
const restoreHistoryEntry = _chunkAZWBTFJIcjs.q.call(void 0, async (entry) => {
|
|
9901
9919
|
const wasmModule = await getSheetsWasmModule();
|
|
9902
9920
|
const nextWorkbook = wasmModule.Workbook.fromBytes(cloneBytes2(entry.bytes));
|
|
9903
9921
|
const nextImageAssets = loadWorkbookImageAssets(entry.bytes, nextWorkbook);
|
|
@@ -9928,7 +9946,7 @@ function useXlsxViewerController(options) {
|
|
|
9928
9946
|
selectionAnchorRef.current = entry.selection ? normalizeRange(entry.selection).start : entry.activeCell;
|
|
9929
9947
|
setRevision((current) => current + 1);
|
|
9930
9948
|
}, [setChartAssets, setImageAssets]);
|
|
9931
|
-
const applyCellEditHistoryEntry =
|
|
9949
|
+
const applyCellEditHistoryEntry = _chunkAZWBTFJIcjs.q.call(void 0, (entry, direction) => {
|
|
9932
9950
|
if (!workbook) {
|
|
9933
9951
|
return;
|
|
9934
9952
|
}
|
|
@@ -9949,7 +9967,7 @@ function useXlsxViewerController(options) {
|
|
|
9949
9967
|
selectionAnchorRef.current = nextSelection ? normalizeRange(nextSelection).start : nextActiveCell;
|
|
9950
9968
|
isApplyingHistoryRef.current = false;
|
|
9951
9969
|
}, [maybeRecalculateWorkbook, refreshWorkbookState, sheets, workbook]);
|
|
9952
|
-
const applyRangeEditHistoryEntry =
|
|
9970
|
+
const applyRangeEditHistoryEntry = _chunkAZWBTFJIcjs.q.call(void 0, (entry, direction) => {
|
|
9953
9971
|
if (!workbook) {
|
|
9954
9972
|
return;
|
|
9955
9973
|
}
|
|
@@ -9971,7 +9989,7 @@ function useXlsxViewerController(options) {
|
|
|
9971
9989
|
selectionAnchorRef.current = nextSelection ? normalizeRange(nextSelection).start : nextActiveCell;
|
|
9972
9990
|
isApplyingHistoryRef.current = false;
|
|
9973
9991
|
}, [maybeRecalculateWorkbook, refreshWorkbookState, sheets, workbook]);
|
|
9974
|
-
const recordHistoryBeforeMutation =
|
|
9992
|
+
const recordHistoryBeforeMutation = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
9975
9993
|
if (isApplyingHistoryRef.current) {
|
|
9976
9994
|
return;
|
|
9977
9995
|
}
|
|
@@ -9983,7 +10001,7 @@ function useXlsxViewerController(options) {
|
|
|
9983
10001
|
redoStackRef.current = [];
|
|
9984
10002
|
setHistoryRevision((current) => current + 1);
|
|
9985
10003
|
}, [createHistoryEntry]);
|
|
9986
|
-
const addFormControl =
|
|
10004
|
+
const addFormControl = _chunkAZWBTFJIcjs.q.call(void 0, (input, sheetIndex = activeSheetIndex) => {
|
|
9987
10005
|
const target = getFormControlWorksheet(sheetIndex);
|
|
9988
10006
|
if (readOnly || !workbook || !target) {
|
|
9989
10007
|
return null;
|
|
@@ -10004,7 +10022,7 @@ function useXlsxViewerController(options) {
|
|
|
10004
10022
|
refreshWorkbookState(workbook);
|
|
10005
10023
|
return controlIndex;
|
|
10006
10024
|
}, [activeSheetIndex, getFormControlWorksheet, maybeRecalculateWorkbook, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, workbook]);
|
|
10007
|
-
const updateFormControl =
|
|
10025
|
+
const updateFormControl = _chunkAZWBTFJIcjs.q.call(void 0, (controlIndex, patch, sheetIndex = activeSheetIndex) => {
|
|
10008
10026
|
const target = getFormControlWorksheet(sheetIndex);
|
|
10009
10027
|
const currentControl = _optionalChain([target, 'optionalAccess', _733 => _733.worksheet, 'access', _734 => _734.formControls, 'access', _735 => _735[controlIndex]]);
|
|
10010
10028
|
if (readOnly || !workbook || !target || !currentControl) {
|
|
@@ -10062,7 +10080,7 @@ function useXlsxViewerController(options) {
|
|
|
10062
10080
|
refreshWorkbookState(workbook);
|
|
10063
10081
|
return true;
|
|
10064
10082
|
}, [activeSheetIndex, getFormControlWorksheet, maybeRecalculateWorkbook, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, workbook]);
|
|
10065
|
-
const removeFormControl =
|
|
10083
|
+
const removeFormControl = _chunkAZWBTFJIcjs.q.call(void 0, (controlIndex, sheetIndex = activeSheetIndex) => {
|
|
10066
10084
|
const target = getFormControlWorksheet(sheetIndex);
|
|
10067
10085
|
if (readOnly || !workbook || !target || !target.worksheet.formControls[controlIndex]) {
|
|
10068
10086
|
return false;
|
|
@@ -10078,7 +10096,7 @@ function useXlsxViewerController(options) {
|
|
|
10078
10096
|
refreshWorkbookState(workbook);
|
|
10079
10097
|
return true;
|
|
10080
10098
|
}, [activeSheetIndex, getFormControlWorksheet, maybeRecalculateWorkbook, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, workbook]);
|
|
10081
|
-
const recordCellEditHistory =
|
|
10099
|
+
const recordCellEditHistory = _chunkAZWBTFJIcjs.q.call(void 0, (cell, before, after) => {
|
|
10082
10100
|
if (!activeSheet || isApplyingHistoryRef.current) {
|
|
10083
10101
|
return;
|
|
10084
10102
|
}
|
|
@@ -10096,7 +10114,7 @@ function useXlsxViewerController(options) {
|
|
|
10096
10114
|
redoStackRef.current = [];
|
|
10097
10115
|
setHistoryRevision((current) => current + 1);
|
|
10098
10116
|
}, [activeCell, activeSheet, selection]);
|
|
10099
|
-
const recordRangeEditHistory =
|
|
10117
|
+
const recordRangeEditHistory = _chunkAZWBTFJIcjs.q.call(void 0, (mutations, selectionAfter, activeCellAfter) => {
|
|
10100
10118
|
if (!activeSheet || isApplyingHistoryRef.current || mutations.length === 0) {
|
|
10101
10119
|
return;
|
|
10102
10120
|
}
|
|
@@ -10112,7 +10130,7 @@ function useXlsxViewerController(options) {
|
|
|
10112
10130
|
redoStackRef.current = [];
|
|
10113
10131
|
setHistoryRevision((current) => current + 1);
|
|
10114
10132
|
}, [activeCell, activeSheet, selection]);
|
|
10115
|
-
const sortTable =
|
|
10133
|
+
const sortTable = _chunkAZWBTFJIcjs.q.call(void 0, (tableName, columnIndex, direction) => {
|
|
10116
10134
|
const worksheet = getActiveWorksheet();
|
|
10117
10135
|
const targetTable = tables.find((table) => table.name === tableName || table.displayName === tableName);
|
|
10118
10136
|
if (!worksheet || !workbook || !activeSheet || !targetTable) {
|
|
@@ -10206,7 +10224,7 @@ function useXlsxViewerController(options) {
|
|
|
10206
10224
|
tables,
|
|
10207
10225
|
workbook
|
|
10208
10226
|
]);
|
|
10209
|
-
const download =
|
|
10227
|
+
const download = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10210
10228
|
if (file) {
|
|
10211
10229
|
downloadArrayBuffer(file, displayFileName);
|
|
10212
10230
|
return;
|
|
@@ -10215,27 +10233,27 @@ function useXlsxViewerController(options) {
|
|
|
10215
10233
|
downloadUrl(src, displayFileName);
|
|
10216
10234
|
}
|
|
10217
10235
|
}, [displayFileName, file, src]);
|
|
10218
|
-
const getXlsxBytes =
|
|
10236
|
+
const getXlsxBytes = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10219
10237
|
if (!workbook) {
|
|
10220
10238
|
return null;
|
|
10221
10239
|
}
|
|
10222
10240
|
return createSavedWorkbookBytes(workbook);
|
|
10223
10241
|
}, [createSavedWorkbookBytes, workbook]);
|
|
10224
|
-
const exportXlsx =
|
|
10242
|
+
const exportXlsx = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10225
10243
|
const bytes = getXlsxBytes();
|
|
10226
10244
|
if (!bytes) {
|
|
10227
10245
|
return;
|
|
10228
10246
|
}
|
|
10229
10247
|
downloadBytes(bytes, `${fileStem(displayFileName)}.xlsx`, XLSX_MIME_TYPE);
|
|
10230
10248
|
}, [displayFileName, getXlsxBytes]);
|
|
10231
|
-
const exportCsv =
|
|
10249
|
+
const exportCsv = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10232
10250
|
if (!workbook) {
|
|
10233
10251
|
return;
|
|
10234
10252
|
}
|
|
10235
10253
|
const activeSheetName = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _750 => _750.name]), () => ( "sheet"));
|
|
10236
10254
|
downloadText(workbook.saveCsvString(), `${fileStem(displayFileName)}-${activeSheetName}.csv`, CSV_MIME_TYPE);
|
|
10237
10255
|
}, [_optionalChain([activeSheet, 'optionalAccess', _751 => _751.name]), displayFileName, workbook]);
|
|
10238
|
-
const recalculate =
|
|
10256
|
+
const recalculate = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10239
10257
|
if (!workbook) {
|
|
10240
10258
|
return;
|
|
10241
10259
|
}
|
|
@@ -10246,7 +10264,7 @@ function useXlsxViewerController(options) {
|
|
|
10246
10264
|
}
|
|
10247
10265
|
setShouldAutoCalculate(false);
|
|
10248
10266
|
}, [refreshWorkbookState, workbook]);
|
|
10249
|
-
const applyReadOnlyResizeOverride =
|
|
10267
|
+
const applyReadOnlyResizeOverride = _chunkAZWBTFJIcjs.q.call(void 0, (axis, actualIndex, sizePx) => {
|
|
10250
10268
|
if (!activeSheet) {
|
|
10251
10269
|
return;
|
|
10252
10270
|
}
|
|
@@ -10289,7 +10307,7 @@ function useXlsxViewerController(options) {
|
|
|
10289
10307
|
}));
|
|
10290
10308
|
setRevision((current) => current + 1);
|
|
10291
10309
|
}, [activeSheet]);
|
|
10292
|
-
const resizeColumn =
|
|
10310
|
+
const resizeColumn = _chunkAZWBTFJIcjs.q.call(void 0, (col, widthPx) => {
|
|
10293
10311
|
if (readOnly && !canResizeReadOnly || !activeSheet) {
|
|
10294
10312
|
return;
|
|
10295
10313
|
}
|
|
@@ -10317,7 +10335,7 @@ function useXlsxViewerController(options) {
|
|
|
10317
10335
|
refreshWorkbookState,
|
|
10318
10336
|
workbook
|
|
10319
10337
|
]);
|
|
10320
|
-
const resizeRow =
|
|
10338
|
+
const resizeRow = _chunkAZWBTFJIcjs.q.call(void 0, (row, heightPx) => {
|
|
10321
10339
|
if (readOnly && !canResizeReadOnly || !activeSheet) {
|
|
10322
10340
|
return;
|
|
10323
10341
|
}
|
|
@@ -10345,7 +10363,7 @@ function useXlsxViewerController(options) {
|
|
|
10345
10363
|
refreshWorkbookState,
|
|
10346
10364
|
workbook
|
|
10347
10365
|
]);
|
|
10348
|
-
const resolveAnchoredObjectRect =
|
|
10366
|
+
const resolveAnchoredObjectRect = _chunkAZWBTFJIcjs.q.call(void 0, (anchor, worksheet) => {
|
|
10349
10367
|
const resolveAxisSum = (index, getSize) => {
|
|
10350
10368
|
let total = 0;
|
|
10351
10369
|
for (let cursor = 0; cursor < index; cursor += 1) {
|
|
@@ -10380,7 +10398,7 @@ function useXlsxViewerController(options) {
|
|
|
10380
10398
|
width: Math.max(1, right - left)
|
|
10381
10399
|
};
|
|
10382
10400
|
}, [getColumnWidthPx, getRowHeightPx]);
|
|
10383
|
-
const setChartRect =
|
|
10401
|
+
const setChartRect = _chunkAZWBTFJIcjs.q.call(void 0, (id, rect, layout) => {
|
|
10384
10402
|
const hydratedChartAssets = ensureChartAssetsHydrated(workbook, sheets);
|
|
10385
10403
|
console.info("[react-xlsx debug] setChartRect", {
|
|
10386
10404
|
hasActiveSheet: Boolean(activeSheet),
|
|
@@ -10429,7 +10447,7 @@ function useXlsxViewerController(options) {
|
|
|
10429
10447
|
sheets,
|
|
10430
10448
|
workbook
|
|
10431
10449
|
]);
|
|
10432
|
-
const setImageRect =
|
|
10450
|
+
const setImageRect = _chunkAZWBTFJIcjs.q.call(void 0, (id, rect, layout) => {
|
|
10433
10451
|
if (readOnly || !workbook || !activeSheet || !imageAssetsRef.current) {
|
|
10434
10452
|
return;
|
|
10435
10453
|
}
|
|
@@ -10459,7 +10477,7 @@ function useXlsxViewerController(options) {
|
|
|
10459
10477
|
recordHistoryBeforeMutation,
|
|
10460
10478
|
workbook
|
|
10461
10479
|
]);
|
|
10462
|
-
const moveChartBy =
|
|
10480
|
+
const moveChartBy = _chunkAZWBTFJIcjs.q.call(void 0, (id, deltaX, deltaY) => {
|
|
10463
10481
|
const currentChart = getChartById(id);
|
|
10464
10482
|
if (!currentChart || currentChart.editable === false) {
|
|
10465
10483
|
return;
|
|
@@ -10475,7 +10493,7 @@ function useXlsxViewerController(options) {
|
|
|
10475
10493
|
top: currentRect.top + deltaY
|
|
10476
10494
|
});
|
|
10477
10495
|
}, [getActiveWorksheet, getChartById, resolveAnchoredObjectRect, setChartRect]);
|
|
10478
|
-
const moveImageBy =
|
|
10496
|
+
const moveImageBy = _chunkAZWBTFJIcjs.q.call(void 0, (id, deltaX, deltaY) => {
|
|
10479
10497
|
const currentImage = getImageById(id);
|
|
10480
10498
|
if (!currentImage || currentImage.editable === false) {
|
|
10481
10499
|
return;
|
|
@@ -10528,7 +10546,7 @@ function useXlsxViewerController(options) {
|
|
|
10528
10546
|
top: currentRect.top + deltaY
|
|
10529
10547
|
});
|
|
10530
10548
|
}, [getActiveWorksheet, getColumnWidthPx, getImageById, getRowHeightPx, setImageRect]);
|
|
10531
|
-
const resizeChartBy =
|
|
10549
|
+
const resizeChartBy = _chunkAZWBTFJIcjs.q.call(void 0, (id, handle, deltaX, deltaY) => {
|
|
10532
10550
|
const currentChart = getChartById(id);
|
|
10533
10551
|
if (!currentChart || currentChart.editable === false) {
|
|
10534
10552
|
return;
|
|
@@ -10540,7 +10558,7 @@ function useXlsxViewerController(options) {
|
|
|
10540
10558
|
const currentRect = resolveAnchoredObjectRect(currentChart.anchor, worksheet);
|
|
10541
10559
|
setChartRect(id, resizeImageRect(currentRect, handle, deltaX, deltaY, 48));
|
|
10542
10560
|
}, [getActiveWorksheet, getChartById, resolveAnchoredObjectRect, setChartRect]);
|
|
10543
|
-
const resizeImageBy =
|
|
10561
|
+
const resizeImageBy = _chunkAZWBTFJIcjs.q.call(void 0, (id, handle, deltaX, deltaY) => {
|
|
10544
10562
|
const currentImage = getImageById(id);
|
|
10545
10563
|
if (!currentImage || currentImage.editable === false) {
|
|
10546
10564
|
return;
|
|
@@ -10569,7 +10587,7 @@ function useXlsxViewerController(options) {
|
|
|
10569
10587
|
const nextRect = resizeImageRect({ height, left, top, width }, handle, deltaX, deltaY);
|
|
10570
10588
|
setImageRect(id, nextRect);
|
|
10571
10589
|
}, [getActiveWorksheet, getColumnWidthPx, getImageById, getRowHeightPx, setImageRect]);
|
|
10572
|
-
const updateChart =
|
|
10590
|
+
const updateChart = _chunkAZWBTFJIcjs.q.call(void 0, (id, patch) => {
|
|
10573
10591
|
const currentChart = getChartById(id);
|
|
10574
10592
|
const hydratedChartAssets = ensureChartAssetsHydrated(workbook, sheets);
|
|
10575
10593
|
if (readOnly || !currentChart) {
|
|
@@ -10582,10 +10600,14 @@ function useXlsxViewerController(options) {
|
|
|
10582
10600
|
if (imageAssetsRef.current && hydratedChartAssets) {
|
|
10583
10601
|
updateWorkbookChartDefinition(imageAssetsRef.current, hydratedChartAssets, id, patch);
|
|
10584
10602
|
}
|
|
10585
|
-
setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) =>
|
|
10603
|
+
setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) => {
|
|
10604
|
+
if (chart.id !== id) return chart;
|
|
10605
|
+
const appearanceUnchanged = Object.keys(patch).every((key) => key === "anchor" || key === "title");
|
|
10606
|
+
return { ...chart, renderSource: appearanceUnchanged ? chart.renderSource : void 0, ...patch };
|
|
10607
|
+
})));
|
|
10586
10608
|
setRevision((current) => current + 1);
|
|
10587
10609
|
}, [ensureChartAssetsHydrated, getChartById, readOnly, recordHistoryBeforeMutation, sheets, workbook]);
|
|
10588
|
-
const setChartSeriesFormula =
|
|
10610
|
+
const setChartSeriesFormula = _chunkAZWBTFJIcjs.q.call(void 0, (chartId, seriesIndex, formula) => {
|
|
10589
10611
|
if (readOnly) {
|
|
10590
10612
|
return false;
|
|
10591
10613
|
}
|
|
@@ -10597,7 +10619,7 @@ function useXlsxViewerController(options) {
|
|
|
10597
10619
|
if (!nextChart) {
|
|
10598
10620
|
return false;
|
|
10599
10621
|
}
|
|
10600
|
-
updateChart(chartId, { series: nextChart.series });
|
|
10622
|
+
updateChart(chartId, { series: nextChart.series, renderSource: chart.renderSource });
|
|
10601
10623
|
const selectedSeries = nextChart.series[seriesIndex];
|
|
10602
10624
|
if (selectedSeries) {
|
|
10603
10625
|
setSelectedChartElement((current) => current && current.chartId === chartId && current.kind !== "chart" ? {
|
|
@@ -10608,7 +10630,7 @@ function useXlsxViewerController(options) {
|
|
|
10608
10630
|
}
|
|
10609
10631
|
return true;
|
|
10610
10632
|
}, [getChartById, readOnly, updateChart, workbook]);
|
|
10611
|
-
const selectCell =
|
|
10633
|
+
const selectCell = _chunkAZWBTFJIcjs.q.call(void 0, (cell, options2) => {
|
|
10612
10634
|
setSelectedChartId(null);
|
|
10613
10635
|
setSelectedChartElement(null);
|
|
10614
10636
|
setSelectedImageId(null);
|
|
@@ -10620,7 +10642,7 @@ function useXlsxViewerController(options) {
|
|
|
10620
10642
|
selectionAnchorRef.current = cell;
|
|
10621
10643
|
setSelection({ start: cell, end: cell });
|
|
10622
10644
|
}, []);
|
|
10623
|
-
const selectRange =
|
|
10645
|
+
const selectRange = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
10624
10646
|
const normalized = normalizeRange(range);
|
|
10625
10647
|
setSelectedChartId(null);
|
|
10626
10648
|
setSelectedChartElement(null);
|
|
@@ -10629,7 +10651,7 @@ function useXlsxViewerController(options) {
|
|
|
10629
10651
|
setActiveCell(normalized.end);
|
|
10630
10652
|
setSelection(normalized);
|
|
10631
10653
|
}, []);
|
|
10632
|
-
const clearSelection =
|
|
10654
|
+
const clearSelection = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10633
10655
|
selectionAnchorRef.current = null;
|
|
10634
10656
|
setActiveCell(null);
|
|
10635
10657
|
setSelection(null);
|
|
@@ -10637,7 +10659,7 @@ function useXlsxViewerController(options) {
|
|
|
10637
10659
|
setSelectedChartElement(null);
|
|
10638
10660
|
setSelectedImageId(null);
|
|
10639
10661
|
}, []);
|
|
10640
|
-
const clearSelectedCells =
|
|
10662
|
+
const clearSelectedCells = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10641
10663
|
const worksheet = getActiveWorksheet();
|
|
10642
10664
|
const targetRange = _nullishCoalesce(selection, () => ( (activeCell ? { start: activeCell, end: activeCell } : null)));
|
|
10643
10665
|
if (readOnly || !worksheet || !workbook || !targetRange) {
|
|
@@ -10681,7 +10703,7 @@ function useXlsxViewerController(options) {
|
|
|
10681
10703
|
selection,
|
|
10682
10704
|
workbook
|
|
10683
10705
|
]);
|
|
10684
|
-
const setCellValue =
|
|
10706
|
+
const setCellValue = _chunkAZWBTFJIcjs.q.call(void 0, (cell, value) => {
|
|
10685
10707
|
const worksheet = getActiveWorksheet();
|
|
10686
10708
|
if (readOnly || !worksheet || !workbook) {
|
|
10687
10709
|
return;
|
|
@@ -10701,7 +10723,7 @@ function useXlsxViewerController(options) {
|
|
|
10701
10723
|
refreshWorkbookState(workbook);
|
|
10702
10724
|
recordCellEditHistory(cell, before, after);
|
|
10703
10725
|
}, [captureCellMutationState, getActiveWorksheet, getCellDisplayValue2, locale, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
10704
|
-
const setCellFormula =
|
|
10726
|
+
const setCellFormula = _chunkAZWBTFJIcjs.q.call(void 0, (cell, formula) => {
|
|
10705
10727
|
const worksheet = getActiveWorksheet();
|
|
10706
10728
|
if (readOnly || !worksheet || !workbook) {
|
|
10707
10729
|
return;
|
|
@@ -10724,7 +10746,7 @@ function useXlsxViewerController(options) {
|
|
|
10724
10746
|
refreshWorkbookState(workbook);
|
|
10725
10747
|
recordCellEditHistory(cell, before, after);
|
|
10726
10748
|
}, [captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
10727
|
-
const setCellStyle =
|
|
10749
|
+
const setCellStyle = _chunkAZWBTFJIcjs.q.call(void 0, (cell, style) => {
|
|
10728
10750
|
const worksheet = getActiveWorksheet();
|
|
10729
10751
|
if (readOnly || !worksheet || !workbook) {
|
|
10730
10752
|
return;
|
|
@@ -10741,19 +10763,19 @@ function useXlsxViewerController(options) {
|
|
|
10741
10763
|
refreshWorkbookState(workbook);
|
|
10742
10764
|
recordCellEditHistory(cell, before, after);
|
|
10743
10765
|
}, [captureCellMutationState, getActiveWorksheet, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
10744
|
-
const setSelectedCellValue =
|
|
10766
|
+
const setSelectedCellValue = _chunkAZWBTFJIcjs.q.call(void 0, (value) => {
|
|
10745
10767
|
if (!activeCell) {
|
|
10746
10768
|
return;
|
|
10747
10769
|
}
|
|
10748
10770
|
setCellValue(activeCell, value);
|
|
10749
10771
|
}, [activeCell, setCellValue]);
|
|
10750
|
-
const setSelectedCellFormula =
|
|
10772
|
+
const setSelectedCellFormula = _chunkAZWBTFJIcjs.q.call(void 0, (formula) => {
|
|
10751
10773
|
if (!activeCell) {
|
|
10752
10774
|
return;
|
|
10753
10775
|
}
|
|
10754
10776
|
setCellFormula(activeCell, formula);
|
|
10755
10777
|
}, [activeCell, setCellFormula]);
|
|
10756
|
-
const setSelectedFormula =
|
|
10778
|
+
const setSelectedFormula = _chunkAZWBTFJIcjs.q.call(void 0, (formula) => {
|
|
10757
10779
|
if (_optionalChain([selectedFormulaTarget, 'optionalAccess', _763 => _763.kind]) === "chartSeries") {
|
|
10758
10780
|
return setChartSeriesFormula(selectedFormulaTarget.chartId, selectedFormulaTarget.seriesIndex, formula);
|
|
10759
10781
|
}
|
|
@@ -10763,13 +10785,13 @@ function useXlsxViewerController(options) {
|
|
|
10763
10785
|
setCellFormula(activeCell, formula);
|
|
10764
10786
|
return true;
|
|
10765
10787
|
}, [activeCell, selectedFormulaTarget, setCellFormula, setChartSeriesFormula]);
|
|
10766
|
-
const setSelectedCellStyle =
|
|
10788
|
+
const setSelectedCellStyle = _chunkAZWBTFJIcjs.q.call(void 0, (style) => {
|
|
10767
10789
|
if (!activeCell) {
|
|
10768
10790
|
return;
|
|
10769
10791
|
}
|
|
10770
10792
|
setCellStyle(activeCell, style);
|
|
10771
10793
|
}, [activeCell, setCellStyle]);
|
|
10772
|
-
const setRangeStyle =
|
|
10794
|
+
const setRangeStyle = _chunkAZWBTFJIcjs.q.call(void 0, (range, style) => {
|
|
10773
10795
|
const worksheet = getActiveWorksheet();
|
|
10774
10796
|
if (readOnly || !worksheet || !workbook) {
|
|
10775
10797
|
return;
|
|
@@ -10808,7 +10830,7 @@ function useXlsxViewerController(options) {
|
|
|
10808
10830
|
refreshWorkbookState(workbook);
|
|
10809
10831
|
recordRangeEditHistory(mutations, selection, activeCell);
|
|
10810
10832
|
}, [activeCell, captureCellMutationState, getActiveWorksheet, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
10811
|
-
const fillSelection =
|
|
10833
|
+
const fillSelection = _chunkAZWBTFJIcjs.q.call(void 0, (targetRange) => {
|
|
10812
10834
|
const worksheet = getActiveWorksheet();
|
|
10813
10835
|
if (readOnly || !worksheet || !workbook || !selection) {
|
|
10814
10836
|
return;
|
|
@@ -10862,7 +10884,7 @@ function useXlsxViewerController(options) {
|
|
|
10862
10884
|
selectionAnchorRef.current = nextRange.start;
|
|
10863
10885
|
recordRangeEditHistory(mutations, nextRange, nextRange.end);
|
|
10864
10886
|
}, [captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
10865
|
-
const mergeSelection =
|
|
10887
|
+
const mergeSelection = _chunkAZWBTFJIcjs.q.call(void 0, (mode = "cells") => {
|
|
10866
10888
|
const worksheet = getActiveWorksheet();
|
|
10867
10889
|
if (readOnly || !worksheet || !selection || !workbook) {
|
|
10868
10890
|
return;
|
|
@@ -10897,7 +10919,7 @@ function useXlsxViewerController(options) {
|
|
|
10897
10919
|
setSelection(range);
|
|
10898
10920
|
setActiveCell(range.start);
|
|
10899
10921
|
}, [getActiveWorksheet, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, selection, workbook]);
|
|
10900
|
-
const unmergeSelection =
|
|
10922
|
+
const unmergeSelection = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10901
10923
|
const worksheet = getActiveWorksheet();
|
|
10902
10924
|
if (readOnly || !worksheet || !selection || !workbook) {
|
|
10903
10925
|
return;
|
|
@@ -10911,7 +10933,7 @@ function useXlsxViewerController(options) {
|
|
|
10911
10933
|
}
|
|
10912
10934
|
refreshWorkbookState(workbook);
|
|
10913
10935
|
}, [getActiveWorksheet, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, selection, workbook]);
|
|
10914
|
-
const addSheet =
|
|
10936
|
+
const addSheet = _chunkAZWBTFJIcjs.q.call(void 0, (name) => {
|
|
10915
10937
|
if (readOnly || !workbook) {
|
|
10916
10938
|
return;
|
|
10917
10939
|
}
|
|
@@ -10956,7 +10978,7 @@ function useXlsxViewerController(options) {
|
|
|
10956
10978
|
}
|
|
10957
10979
|
setRevision((current) => current + 1);
|
|
10958
10980
|
}, [readOnly, recordHistoryBeforeMutation, setChartAssets, workbook]);
|
|
10959
|
-
const removeActiveSheet =
|
|
10981
|
+
const removeActiveSheet = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
10960
10982
|
if (readOnly || !workbook || !activeSheet) {
|
|
10961
10983
|
return;
|
|
10962
10984
|
}
|
|
@@ -10990,7 +11012,7 @@ function useXlsxViewerController(options) {
|
|
|
10990
11012
|
setActiveSheetIndexState((current) => Math.max(0, Math.min(current, nextSheets.length - 1)));
|
|
10991
11013
|
setRevision((current) => current + 1);
|
|
10992
11014
|
}, [activeSheet, readOnly, recordHistoryBeforeMutation, setChartAssets, workbook]);
|
|
10993
|
-
const defineNamedRange =
|
|
11015
|
+
const defineNamedRange = _chunkAZWBTFJIcjs.q.call(void 0, (name, range) => {
|
|
10994
11016
|
if (readOnly || !workbook) {
|
|
10995
11017
|
return;
|
|
10996
11018
|
}
|
|
@@ -11006,7 +11028,7 @@ function useXlsxViewerController(options) {
|
|
|
11006
11028
|
workbook.defineName(trimmed, rangeToA1(targetRange));
|
|
11007
11029
|
setRevision((current) => current + 1);
|
|
11008
11030
|
}, [readOnly, recordHistoryBeforeMutation, selection, workbook]);
|
|
11009
|
-
const pasteText =
|
|
11031
|
+
const pasteText = _chunkAZWBTFJIcjs.q.call(void 0, (text) => {
|
|
11010
11032
|
const worksheet = getActiveWorksheet();
|
|
11011
11033
|
const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _789 => _789.start]))), () => ( null));
|
|
11012
11034
|
if (readOnly || !worksheet || !workbook || !targetCell || !text) {
|
|
@@ -11070,7 +11092,7 @@ function useXlsxViewerController(options) {
|
|
|
11070
11092
|
recordRangeEditHistory(mutations, nextRange, targetCell);
|
|
11071
11093
|
return true;
|
|
11072
11094
|
}, [activeCell, captureCellMutationState, getActiveWorksheet, locale, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
11073
|
-
const pasteStructuredClipboardData =
|
|
11095
|
+
const pasteStructuredClipboardData = _chunkAZWBTFJIcjs.q.call(void 0, (serializedPayload) => {
|
|
11074
11096
|
const worksheet = getActiveWorksheet();
|
|
11075
11097
|
const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _790 => _790.start]))), () => ( null));
|
|
11076
11098
|
if (readOnly || !worksheet || !workbook || !targetCell || !serializedPayload) {
|
|
@@ -11170,7 +11192,7 @@ function useXlsxViewerController(options) {
|
|
|
11170
11192
|
selection,
|
|
11171
11193
|
workbook
|
|
11172
11194
|
]);
|
|
11173
|
-
const copySelectionToClipboard =
|
|
11195
|
+
const copySelectionToClipboard = _chunkAZWBTFJIcjs.q.call(void 0, async () => {
|
|
11174
11196
|
if (typeof navigator === "undefined" || !navigator.clipboard) {
|
|
11175
11197
|
return false;
|
|
11176
11198
|
}
|
|
@@ -11233,7 +11255,7 @@ function useXlsxViewerController(options) {
|
|
|
11233
11255
|
await navigator.clipboard.writeText(clipboardData.text);
|
|
11234
11256
|
return true;
|
|
11235
11257
|
}, [activeSheet, getClipboardData, getRowsBatchAsync, isWorkerBacked, selection]);
|
|
11236
|
-
const pasteFromClipboard =
|
|
11258
|
+
const pasteFromClipboard = _chunkAZWBTFJIcjs.q.call(void 0, async () => {
|
|
11237
11259
|
if (readOnly || typeof navigator === "undefined" || !navigator.clipboard) {
|
|
11238
11260
|
return false;
|
|
11239
11261
|
}
|
|
@@ -11255,7 +11277,7 @@ function useXlsxViewerController(options) {
|
|
|
11255
11277
|
}
|
|
11256
11278
|
return pasteText(await navigator.clipboard.readText());
|
|
11257
11279
|
}, [pasteStructuredClipboardData, pasteText, readOnly]);
|
|
11258
|
-
const undo =
|
|
11280
|
+
const undo = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
11259
11281
|
if (readOnly || !workbook || undoStackRef.current.length === 0) {
|
|
11260
11282
|
return;
|
|
11261
11283
|
}
|
|
@@ -11282,7 +11304,7 @@ function useXlsxViewerController(options) {
|
|
|
11282
11304
|
setHistoryRevision((current) => current + 1);
|
|
11283
11305
|
void restoreHistoryEntry(entry);
|
|
11284
11306
|
}, [applyCellEditHistoryEntry, applyRangeEditHistoryEntry, createHistoryEntry, readOnly, restoreHistoryEntry, workbook]);
|
|
11285
|
-
const redo =
|
|
11307
|
+
const redo = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
11286
11308
|
if (readOnly || !workbook || redoStackRef.current.length === 0) {
|
|
11287
11309
|
return;
|
|
11288
11310
|
}
|
|
@@ -11309,7 +11331,7 @@ function useXlsxViewerController(options) {
|
|
|
11309
11331
|
setHistoryRevision((current) => current + 1);
|
|
11310
11332
|
void restoreHistoryEntry(entry);
|
|
11311
11333
|
}, [applyCellEditHistoryEntry, applyRangeEditHistoryEntry, createHistoryEntry, readOnly, restoreHistoryEntry, workbook]);
|
|
11312
|
-
return
|
|
11334
|
+
return _chunkAZWBTFJIcjs.T.call(void 0,
|
|
11313
11335
|
() => ({
|
|
11314
11336
|
activeCell,
|
|
11315
11337
|
activeCellAddress,
|
|
@@ -11569,11 +11591,11 @@ function createRoot(container) {
|
|
|
11569
11591
|
return {
|
|
11570
11592
|
// eslint-disable-next-line
|
|
11571
11593
|
render: function(children) {
|
|
11572
|
-
|
|
11594
|
+
_chunkAZWBTFJIcjs.nn.call(void 0, children, container);
|
|
11573
11595
|
},
|
|
11574
11596
|
// eslint-disable-next-line
|
|
11575
11597
|
unmount: function() {
|
|
11576
|
-
|
|
11598
|
+
_chunkAZWBTFJIcjs.pn.call(void 0, container);
|
|
11577
11599
|
}
|
|
11578
11600
|
};
|
|
11579
11601
|
}
|
|
@@ -12505,25 +12527,25 @@ function calculateRange({
|
|
|
12505
12527
|
}
|
|
12506
12528
|
|
|
12507
12529
|
// ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.23_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-virtual/dist/esm/index.js
|
|
12508
|
-
var useIsomorphicLayoutEffect = typeof document !== "undefined" ?
|
|
12530
|
+
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? _chunkAZWBTFJIcjs._ : _chunkAZWBTFJIcjs.h;
|
|
12509
12531
|
function useVirtualizerBase({
|
|
12510
12532
|
useFlushSync = true,
|
|
12511
12533
|
...options
|
|
12512
12534
|
}) {
|
|
12513
|
-
const rerender =
|
|
12535
|
+
const rerender = _chunkAZWBTFJIcjs.y.call(void 0, () => ({}), {})[1];
|
|
12514
12536
|
const resolvedOptions = {
|
|
12515
12537
|
...options,
|
|
12516
12538
|
onChange: (instance2, sync) => {
|
|
12517
12539
|
var _a;
|
|
12518
12540
|
if (useFlushSync && sync) {
|
|
12519
|
-
|
|
12541
|
+
_chunkAZWBTFJIcjs.bn.call(void 0, rerender);
|
|
12520
12542
|
} else {
|
|
12521
12543
|
rerender();
|
|
12522
12544
|
}
|
|
12523
12545
|
(_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
|
|
12524
12546
|
}
|
|
12525
12547
|
};
|
|
12526
|
-
const [instance] =
|
|
12548
|
+
const [instance] = _chunkAZWBTFJIcjs.d.call(void 0,
|
|
12527
12549
|
() => new Virtualizer(resolvedOptions)
|
|
12528
12550
|
);
|
|
12529
12551
|
instance.setOptions(resolvedOptions);
|
|
@@ -13284,14 +13306,14 @@ function XlsxContextMenu({
|
|
|
13284
13306
|
contextMenuClassName,
|
|
13285
13307
|
contextMenuStyle
|
|
13286
13308
|
}) {
|
|
13287
|
-
const rootRef =
|
|
13288
|
-
const controllerRef =
|
|
13309
|
+
const rootRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
13310
|
+
const controllerRef = _chunkAZWBTFJIcjs.A.call(void 0, controller);
|
|
13289
13311
|
controllerRef.current = controller;
|
|
13290
|
-
const aliveRef =
|
|
13291
|
-
const runningRef =
|
|
13292
|
-
const [busy, setBusy] =
|
|
13293
|
-
const [error, setError] =
|
|
13294
|
-
const [location, setLocation] =
|
|
13312
|
+
const aliveRef = _chunkAZWBTFJIcjs.A.call(void 0, true);
|
|
13313
|
+
const runningRef = _chunkAZWBTFJIcjs.A.call(void 0, false);
|
|
13314
|
+
const [busy, setBusy] = _chunkAZWBTFJIcjs.d.call(void 0, false);
|
|
13315
|
+
const [error, setError] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
13316
|
+
const [location, setLocation] = _chunkAZWBTFJIcjs.d.call(void 0, position);
|
|
13295
13317
|
const modifier = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform) ? "\u2318" : "Ctrl+";
|
|
13296
13318
|
const table = controller.tables.find(({ start, end }) => context.cell.row >= start.row && context.cell.row <= end.row && context.cell.col >= start.col && context.cell.col <= end.col);
|
|
13297
13319
|
const range = expandHighlightedRange(context.selection, _nullishCoalesce(_optionalChain([controller, 'access', _809 => _809.activeSheet, 'optionalAccess', _810 => _810.mergedRanges]), () => ( [])));
|
|
@@ -13318,7 +13340,7 @@ function XlsxContextMenu({
|
|
|
13318
13340
|
{ id: "selectColumn", label: "Select column" },
|
|
13319
13341
|
{ id: "selectAll", label: "Select all", shortcut: `${modifier}A` }
|
|
13320
13342
|
];
|
|
13321
|
-
|
|
13343
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
13322
13344
|
const root = rootRef.current;
|
|
13323
13345
|
if (!root) return;
|
|
13324
13346
|
const update = () => {
|
|
@@ -13334,7 +13356,7 @@ function XlsxContextMenu({
|
|
|
13334
13356
|
(_nullishCoalesce(root.querySelector('[role="menuitem"]:not(:disabled):not([aria-disabled="true"])'), () => ( root))).focus();
|
|
13335
13357
|
return () => observer.disconnect();
|
|
13336
13358
|
}, [position]);
|
|
13337
|
-
|
|
13359
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
13338
13360
|
aliveRef.current = true;
|
|
13339
13361
|
const outside = (event) => {
|
|
13340
13362
|
if (!_optionalChain([rootRef, 'access', _811 => _811.current, 'optionalAccess', _812 => _812.contains, 'call', _813 => _813(event.target)])) closeMenu(false);
|
|
@@ -13445,9 +13467,9 @@ function XlsxContextMenu({
|
|
|
13445
13467
|
if (aliveRef.current) setBusy(false);
|
|
13446
13468
|
}
|
|
13447
13469
|
};
|
|
13448
|
-
const defaultNode = actions.map((action) => /* @__PURE__ */
|
|
13449
|
-
action.separatorBefore && /* @__PURE__ */
|
|
13450
|
-
/* @__PURE__ */
|
|
13470
|
+
const defaultNode = actions.map((action) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
13471
|
+
action.separatorBefore && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { className: "react-xlsx-context-menu-separator", role: "separator" }),
|
|
13472
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
13451
13473
|
"button",
|
|
13452
13474
|
{
|
|
13453
13475
|
className: "react-xlsx-context-menu-item",
|
|
@@ -13461,15 +13483,15 @@ function XlsxContextMenu({
|
|
|
13461
13483
|
tabIndex: -1,
|
|
13462
13484
|
type: "button",
|
|
13463
13485
|
children: [
|
|
13464
|
-
/* @__PURE__ */
|
|
13465
|
-
action.shortcut && /* @__PURE__ */
|
|
13486
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { children: action.label }),
|
|
13487
|
+
action.shortcut && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { className: "react-xlsx-context-menu-shortcut", children: action.shortcut })
|
|
13466
13488
|
]
|
|
13467
13489
|
}
|
|
13468
13490
|
)
|
|
13469
13491
|
] }, action.id));
|
|
13470
13492
|
const content = renderContextMenu ? renderContextMenu({ context, actions, runAction, closeMenu, position: location, isDark: isDarkViewerPalette(palette), busy, error, defaultNode }) : defaultNode;
|
|
13471
|
-
return
|
|
13472
|
-
/* @__PURE__ */
|
|
13493
|
+
return _chunkAZWBTFJIcjs.$.call(void 0,
|
|
13494
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
13473
13495
|
"div",
|
|
13474
13496
|
{
|
|
13475
13497
|
"aria-label": "Spreadsheet context menu",
|
|
@@ -13518,9 +13540,9 @@ function XlsxContextMenu({
|
|
|
13518
13540
|
},
|
|
13519
13541
|
tabIndex: -1,
|
|
13520
13542
|
children: [
|
|
13521
|
-
/* @__PURE__ */
|
|
13543
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "style", { children: menuStyles }),
|
|
13522
13544
|
content,
|
|
13523
|
-
error && /* @__PURE__ */
|
|
13545
|
+
error && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { role: "alert", style: { padding: "8px 10px", maxWidth: 280, color: palette.danger }, children: error })
|
|
13524
13546
|
]
|
|
13525
13547
|
}
|
|
13526
13548
|
),
|
|
@@ -13529,29 +13551,35 @@ function XlsxContextMenu({
|
|
|
13529
13551
|
}
|
|
13530
13552
|
|
|
13531
13553
|
// src/lazy-chart.tsx
|
|
13532
|
-
var ChartLoadBoundary = (_class2 = class extends
|
|
13554
|
+
var ChartLoadBoundary = (_class2 = class extends _chunkAZWBTFJIcjs.C {constructor(...args2) { super(...args2); _class2.prototype.__init8.call(this); }
|
|
13533
13555
|
__init8() {this.state = { failed: false }}
|
|
13534
13556
|
static getDerivedStateFromError() {
|
|
13535
13557
|
return { failed: true };
|
|
13536
13558
|
}
|
|
13537
13559
|
render() {
|
|
13538
13560
|
if (this.state.failed) {
|
|
13539
|
-
return /* @__PURE__ */
|
|
13561
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { role: "status", children: "Unable to load chart." });
|
|
13540
13562
|
}
|
|
13541
13563
|
return this.props.children;
|
|
13542
13564
|
}
|
|
13543
13565
|
}, _class2);
|
|
13544
13566
|
function MapChartSvg({ renderer, loadingFallback, ...props }) {
|
|
13545
|
-
const resources =
|
|
13546
|
-
return resources ? /* @__PURE__ */
|
|
13567
|
+
const resources = _chunkOCF75R75cjs.useChartModule.call(void 0, _chunkOCF75R75cjs.regionMapResources);
|
|
13568
|
+
return resources ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, renderer.MemoChartSvg, { ...props }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: loadingFallback("map") });
|
|
13569
|
+
}
|
|
13570
|
+
function LegacyChartSvg({ loadingFallback, ...props }) {
|
|
13571
|
+
const renderer = _chunkOCF75R75cjs.useChartModule.call(void 0, _chunkOCF75R75cjs.chartRenderer);
|
|
13572
|
+
if (!renderer) return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: loadingFallback("renderer") });
|
|
13573
|
+
return props.chart.chartType === "RegionMap" ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, MapChartSvg, { ...props, renderer, loadingFallback }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, renderer.MemoChartSvg, { ...props });
|
|
13547
13574
|
}
|
|
13548
|
-
function
|
|
13549
|
-
const
|
|
13550
|
-
if (!
|
|
13551
|
-
|
|
13575
|
+
function SharedChart(props) {
|
|
13576
|
+
const module = _chunkOCF75R75cjs.useChartModule.call(void 0, _chunkOCF75R75cjs.officeChartRenderer);
|
|
13577
|
+
if (!module) return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: props.loadingFallback("renderer") });
|
|
13578
|
+
const fallback = /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, LegacyChartSvg, { ...props });
|
|
13579
|
+
return module.renderer ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, module.SharedChartSvg, { ...props, renderer: module.renderer, fallback }) : fallback;
|
|
13552
13580
|
}
|
|
13553
13581
|
function MemoChartSvg(props) {
|
|
13554
|
-
return /* @__PURE__ */
|
|
13582
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, ChartLoadBoundary, { children: props.chart.renderSource ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, SharedChart, { ...props, source: props.chart.renderSource }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, LegacyChartSvg, { ...props }) }, props.chart.id);
|
|
13555
13583
|
}
|
|
13556
13584
|
|
|
13557
13585
|
// src/XlsxViewer.tsx
|
|
@@ -14364,8 +14392,8 @@ function lightenColor(color, ratio) {
|
|
|
14364
14392
|
function darkenColor(color, ratio) {
|
|
14365
14393
|
return mixRgbColor(color, "#000000", ratio);
|
|
14366
14394
|
}
|
|
14367
|
-
var ViewerContext =
|
|
14368
|
-
var ViewerAppearanceContext =
|
|
14395
|
+
var ViewerContext = _chunkAZWBTFJIcjs.X.call(void 0, null);
|
|
14396
|
+
var ViewerAppearanceContext = _chunkAZWBTFJIcjs.X.call(void 0, { isDark: false });
|
|
14369
14397
|
function classNames(...values) {
|
|
14370
14398
|
return values.filter(Boolean).join(" ");
|
|
14371
14399
|
}
|
|
@@ -15677,7 +15705,7 @@ function resolveShapeLineEndMarker(type, markerId, color, strokeWidth, rect, vie
|
|
|
15677
15705
|
}
|
|
15678
15706
|
const pxToUserSpace = (viewBox.width / Math.max(1, rect.width) + viewBox.height / Math.max(1, rect.height)) / 2;
|
|
15679
15707
|
const markerSize = Math.max(pxToUserSpace * 8, pxToUserSpace * strokeWidth * 4);
|
|
15680
|
-
return /* @__PURE__ */
|
|
15708
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
15681
15709
|
"marker",
|
|
15682
15710
|
{
|
|
15683
15711
|
id: markerId,
|
|
@@ -15689,13 +15717,13 @@ function resolveShapeLineEndMarker(type, markerId, color, strokeWidth, rect, vie
|
|
|
15689
15717
|
refX: markerSize,
|
|
15690
15718
|
refY: markerSize / 2,
|
|
15691
15719
|
viewBox: `0 0 ${markerSize} ${markerSize}`,
|
|
15692
|
-
children: /* @__PURE__ */
|
|
15720
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: `M 0 0 L ${markerSize} ${markerSize / 2} L 0 ${markerSize} z`, fill: color })
|
|
15693
15721
|
},
|
|
15694
15722
|
markerId
|
|
15695
15723
|
);
|
|
15696
15724
|
}
|
|
15697
15725
|
function renderShapeParagraph(paragraph, index, fallbackAlign = "left", textScale = 1) {
|
|
15698
|
-
return /* @__PURE__ */
|
|
15726
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
15699
15727
|
"p",
|
|
15700
15728
|
{
|
|
15701
15729
|
style: {
|
|
@@ -15703,7 +15731,7 @@ function renderShapeParagraph(paragraph, index, fallbackAlign = "left", textScal
|
|
|
15703
15731
|
textAlign: _nullishCoalesce(paragraph.align, () => ( fallbackAlign)),
|
|
15704
15732
|
whiteSpace: "pre-wrap"
|
|
15705
15733
|
},
|
|
15706
|
-
children: paragraph.runs.map((run, runIndex) => /* @__PURE__ */
|
|
15734
|
+
children: paragraph.runs.map((run, runIndex) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
15707
15735
|
"span",
|
|
15708
15736
|
{
|
|
15709
15737
|
style: {
|
|
@@ -15769,7 +15797,7 @@ function resolveImageHandleStyle(position, stroke, surface, scale = 1) {
|
|
|
15769
15797
|
return style;
|
|
15770
15798
|
}
|
|
15771
15799
|
function useViewerPalette(isDark = false, headerBackgroundColor, headerTextColor) {
|
|
15772
|
-
return
|
|
15800
|
+
return _chunkAZWBTFJIcjs.T.call(void 0,
|
|
15773
15801
|
() => resolveViewerPalette(isDark, headerBackgroundColor, headerTextColor),
|
|
15774
15802
|
[headerBackgroundColor, headerTextColor, isDark]
|
|
15775
15803
|
);
|
|
@@ -16484,10 +16512,10 @@ function renderSparkline(sparkline, values, palette) {
|
|
|
16484
16512
|
const gap = normalizedValues.length > 1 ? (innerWidth - segmentWidth * normalizedValues.length) / (normalizedValues.length - 1) : 0;
|
|
16485
16513
|
const positiveY = 4.5;
|
|
16486
16514
|
const negativeY = height - 4.5;
|
|
16487
|
-
return /* @__PURE__ */
|
|
16515
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "svg", { "aria-hidden": "true", height, style: { display: "block", overflow: "visible", width: "100%" }, viewBox: `0 0 ${width} ${height}`, width: "100%", children: normalizedValues.map((entry, index) => {
|
|
16488
16516
|
const left = 1 + index * (segmentWidth + Math.max(0, gap));
|
|
16489
16517
|
const y2 = entry.value >= 0 ? positiveY : negativeY;
|
|
16490
|
-
return /* @__PURE__ */
|
|
16518
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
16491
16519
|
"line",
|
|
16492
16520
|
{
|
|
16493
16521
|
stroke: seriesColor,
|
|
@@ -16509,15 +16537,15 @@ function renderSparkline(sparkline, values, palette) {
|
|
|
16509
16537
|
const zeroY = 2 + innerHeight - clampSparklineValue(0, minValue2, maxValue2) * innerHeight;
|
|
16510
16538
|
const barWidth = Math.max(2, innerWidth / Math.max(normalizedValues.length * 1.8, 1));
|
|
16511
16539
|
const gap = normalizedValues.length > 1 ? (innerWidth - barWidth * normalizedValues.length) / (normalizedValues.length - 1) : 0;
|
|
16512
|
-
return /* @__PURE__ */
|
|
16513
|
-
/* @__PURE__ */
|
|
16540
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "svg", { "aria-hidden": "true", height, style: { display: "block", overflow: "visible", width: "100%" }, viewBox: `0 0 ${width} ${height}`, width: "100%", children: [
|
|
16541
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "line", { stroke: palette.border, strokeWidth: 1, x1: 1, x2: width - 1, y1: zeroY, y2: zeroY }),
|
|
16514
16542
|
normalizedValues.map((entry, index) => {
|
|
16515
16543
|
const left = 1 + index * (barWidth + Math.max(0, gap));
|
|
16516
16544
|
const y2 = 2 + innerHeight - clampSparklineValue(entry.value, minValue2, maxValue2) * innerHeight;
|
|
16517
16545
|
const top = Math.min(y2, zeroY);
|
|
16518
16546
|
const barHeight = Math.max(1, Math.abs(y2 - zeroY));
|
|
16519
16547
|
const fill = entry.value < 0 ? negativeColor : seriesColor;
|
|
16520
|
-
return /* @__PURE__ */
|
|
16548
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
16521
16549
|
"rect",
|
|
16522
16550
|
{
|
|
16523
16551
|
fill,
|
|
@@ -16543,8 +16571,8 @@ function renderSparkline(sparkline, values, palette) {
|
|
|
16543
16571
|
}).join(" ");
|
|
16544
16572
|
const highValue = Math.max(...points.map((entry) => entry.value));
|
|
16545
16573
|
const lowValue = Math.min(...points.map((entry) => entry.value));
|
|
16546
|
-
return /* @__PURE__ */
|
|
16547
|
-
/* @__PURE__ */
|
|
16574
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "svg", { "aria-hidden": "true", height, style: { display: "block", overflow: "visible", width: "100%" }, viewBox: `0 0 ${width} ${height}`, width: "100%", children: [
|
|
16575
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: path, fill: "none", stroke: seriesColor, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.6 }),
|
|
16548
16576
|
sparkline.markers ? points.map((entry, index) => {
|
|
16549
16577
|
const x2 = 1 + index * xStep;
|
|
16550
16578
|
const y2 = 2 + innerHeight - clampSparklineValue(entry.value, minValue, maxValue) * innerHeight;
|
|
@@ -16560,7 +16588,7 @@ function renderSparkline(sparkline, values, palette) {
|
|
|
16560
16588
|
} else if (entry.value < 0 && sparkline.negative && sparkline.negativeColor) {
|
|
16561
16589
|
fill = sparkline.negativeColor;
|
|
16562
16590
|
}
|
|
16563
|
-
return /* @__PURE__ */
|
|
16591
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "circle", { cx: x2, cy: y2, fill, r: 1.75 }, `spark-point-${index}`);
|
|
16564
16592
|
}) : null
|
|
16565
16593
|
] });
|
|
16566
16594
|
}
|
|
@@ -16921,7 +16949,7 @@ function DefaultTableHeaderMenu({
|
|
|
16921
16949
|
sortAscending,
|
|
16922
16950
|
sortDescending
|
|
16923
16951
|
}) {
|
|
16924
|
-
return /* @__PURE__ */
|
|
16952
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
16925
16953
|
"div",
|
|
16926
16954
|
{
|
|
16927
16955
|
style: {
|
|
@@ -16935,7 +16963,7 @@ function DefaultTableHeaderMenu({
|
|
|
16935
16963
|
padding: 6
|
|
16936
16964
|
},
|
|
16937
16965
|
children: [
|
|
16938
|
-
/* @__PURE__ */
|
|
16966
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
16939
16967
|
"button",
|
|
16940
16968
|
{
|
|
16941
16969
|
onClick: sortAscending,
|
|
@@ -16953,7 +16981,7 @@ function DefaultTableHeaderMenu({
|
|
|
16953
16981
|
children: "Sort A to Z"
|
|
16954
16982
|
}
|
|
16955
16983
|
),
|
|
16956
|
-
/* @__PURE__ */
|
|
16984
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
16957
16985
|
"button",
|
|
16958
16986
|
{
|
|
16959
16987
|
onClick: sortDescending,
|
|
@@ -17000,7 +17028,7 @@ function SegmentedControl({
|
|
|
17000
17028
|
palette,
|
|
17001
17029
|
value
|
|
17002
17030
|
}) {
|
|
17003
|
-
return /* @__PURE__ */
|
|
17031
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17004
17032
|
"div",
|
|
17005
17033
|
{
|
|
17006
17034
|
"aria-label": "Workbook sheets",
|
|
@@ -17018,7 +17046,7 @@ function SegmentedControl({
|
|
|
17018
17046
|
children: items.map((item) => {
|
|
17019
17047
|
const selected = item.id === value;
|
|
17020
17048
|
const isHidden = item.visibility === "hidden" || item.visibility === "veryHidden";
|
|
17021
|
-
return /* @__PURE__ */
|
|
17049
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17022
17050
|
"button",
|
|
17023
17051
|
{
|
|
17024
17052
|
"aria-selected": selected,
|
|
@@ -17064,8 +17092,8 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17064
17092
|
zoomOut,
|
|
17065
17093
|
zoomScale
|
|
17066
17094
|
} = controller;
|
|
17067
|
-
return /* @__PURE__ */
|
|
17068
|
-
/* @__PURE__ */
|
|
17095
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
17096
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17069
17097
|
"div",
|
|
17070
17098
|
{
|
|
17071
17099
|
style: {
|
|
@@ -17080,7 +17108,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17080
17108
|
padding: "0 16px"
|
|
17081
17109
|
},
|
|
17082
17110
|
children: [
|
|
17083
|
-
/* @__PURE__ */
|
|
17111
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { minWidth: 0 }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17084
17112
|
"div",
|
|
17085
17113
|
{
|
|
17086
17114
|
style: {
|
|
@@ -17094,8 +17122,8 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17094
17122
|
children: displayFileName
|
|
17095
17123
|
}
|
|
17096
17124
|
) }),
|
|
17097
|
-
/* @__PURE__ */
|
|
17098
|
-
/* @__PURE__ */
|
|
17125
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { alignItems: "center", display: "flex", gap: 8 }, children: [
|
|
17126
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17099
17127
|
"div",
|
|
17100
17128
|
{
|
|
17101
17129
|
style: {
|
|
@@ -17107,7 +17135,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17107
17135
|
overflow: "hidden"
|
|
17108
17136
|
},
|
|
17109
17137
|
children: [
|
|
17110
|
-
/* @__PURE__ */
|
|
17138
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17111
17139
|
"button",
|
|
17112
17140
|
{
|
|
17113
17141
|
disabled: !canZoomOut,
|
|
@@ -17125,7 +17153,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17125
17153
|
children: "-"
|
|
17126
17154
|
}
|
|
17127
17155
|
),
|
|
17128
|
-
/* @__PURE__ */
|
|
17156
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17129
17157
|
"button",
|
|
17130
17158
|
{
|
|
17131
17159
|
onClick: resetZoom,
|
|
@@ -17145,7 +17173,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17145
17173
|
children: formatZoomScale(zoomScale)
|
|
17146
17174
|
}
|
|
17147
17175
|
),
|
|
17148
|
-
/* @__PURE__ */
|
|
17176
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17149
17177
|
"button",
|
|
17150
17178
|
{
|
|
17151
17179
|
disabled: !canZoomIn,
|
|
@@ -17166,7 +17194,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17166
17194
|
]
|
|
17167
17195
|
}
|
|
17168
17196
|
),
|
|
17169
|
-
canDownload ? /* @__PURE__ */
|
|
17197
|
+
canDownload ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17170
17198
|
"button",
|
|
17171
17199
|
{
|
|
17172
17200
|
"aria-label": "Download workbook",
|
|
@@ -17195,7 +17223,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17195
17223
|
]
|
|
17196
17224
|
}
|
|
17197
17225
|
),
|
|
17198
|
-
tabs.length > 1 ? /* @__PURE__ */
|
|
17226
|
+
tabs.length > 1 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17199
17227
|
"div",
|
|
17200
17228
|
{
|
|
17201
17229
|
style: {
|
|
@@ -17204,7 +17232,7 @@ function DefaultToolbar({ controller, palette }) {
|
|
|
17204
17232
|
overflowX: "auto",
|
|
17205
17233
|
padding: "8px 12px"
|
|
17206
17234
|
},
|
|
17207
|
-
children: /* @__PURE__ */
|
|
17235
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17208
17236
|
SegmentedControl,
|
|
17209
17237
|
{
|
|
17210
17238
|
items: tabs.map((tab, index) => ({
|
|
@@ -17232,7 +17260,7 @@ function resolveToolbar(toolbar, showDefaultToolbar, controller, palette) {
|
|
|
17232
17260
|
if (!showDefaultToolbar) {
|
|
17233
17261
|
return null;
|
|
17234
17262
|
}
|
|
17235
|
-
return /* @__PURE__ */
|
|
17263
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, DefaultToolbar, { controller, palette });
|
|
17236
17264
|
}
|
|
17237
17265
|
function renderError(errorState, error, palette) {
|
|
17238
17266
|
if (typeof errorState === "function") {
|
|
@@ -17241,7 +17269,7 @@ function renderError(errorState, error, palette) {
|
|
|
17241
17269
|
if (errorState !== void 0) {
|
|
17242
17270
|
return errorState;
|
|
17243
17271
|
}
|
|
17244
|
-
return /* @__PURE__ */
|
|
17272
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17245
17273
|
"div",
|
|
17246
17274
|
{
|
|
17247
17275
|
style: {
|
|
@@ -17265,7 +17293,7 @@ function renderLoading(loadingComponent, loadingState, palette) {
|
|
|
17265
17293
|
if (loadingState !== void 0) {
|
|
17266
17294
|
return loadingState;
|
|
17267
17295
|
}
|
|
17268
|
-
return /* @__PURE__ */
|
|
17296
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17269
17297
|
"div",
|
|
17270
17298
|
{
|
|
17271
17299
|
style: {
|
|
@@ -17284,7 +17312,7 @@ function renderEmpty(emptyState, palette) {
|
|
|
17284
17312
|
if (emptyState !== void 0) {
|
|
17285
17313
|
return emptyState;
|
|
17286
17314
|
}
|
|
17287
|
-
return /* @__PURE__ */
|
|
17315
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17288
17316
|
"div",
|
|
17289
17317
|
{
|
|
17290
17318
|
style: {
|
|
@@ -17315,7 +17343,7 @@ function formatBinaryBytes2(bytes) {
|
|
|
17315
17343
|
return `${value >= 10 || unitIndex === 0 ? value.toFixed(0) : value.toFixed(1)} ${units[unitIndex]}`;
|
|
17316
17344
|
}
|
|
17317
17345
|
function renderFileTooLarge(fileTooLargeState, renderProps, palette) {
|
|
17318
|
-
const defaultNode = /* @__PURE__ */
|
|
17346
|
+
const defaultNode = /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17319
17347
|
"div",
|
|
17320
17348
|
{
|
|
17321
17349
|
style: {
|
|
@@ -17331,8 +17359,8 @@ function renderFileTooLarge(fileTooLargeState, renderProps, palette) {
|
|
|
17331
17359
|
textAlign: "center"
|
|
17332
17360
|
},
|
|
17333
17361
|
children: [
|
|
17334
|
-
/* @__PURE__ */
|
|
17335
|
-
/* @__PURE__ */
|
|
17362
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { color: palette.text, fontWeight: 600 }, children: renderProps.displayFileName }),
|
|
17363
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { children: [
|
|
17336
17364
|
"File size ",
|
|
17337
17365
|
formatBinaryBytes2(renderProps.fileSizeBytes),
|
|
17338
17366
|
" exceeds the configured limit of",
|
|
@@ -17366,7 +17394,7 @@ function renderDefaultChartLoadingCard(rect) {
|
|
|
17366
17394
|
const bars = [18, 32, 24];
|
|
17367
17395
|
const barWidth = Math.max(8, Math.min(12, Math.round(rect.width * 0.018)));
|
|
17368
17396
|
const barGap = 8;
|
|
17369
|
-
return /* @__PURE__ */
|
|
17397
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17370
17398
|
"div",
|
|
17371
17399
|
{
|
|
17372
17400
|
style: {
|
|
@@ -17380,7 +17408,7 @@ function renderDefaultChartLoadingCard(rect) {
|
|
|
17380
17408
|
padding: 12,
|
|
17381
17409
|
width: "100%"
|
|
17382
17410
|
},
|
|
17383
|
-
children: /* @__PURE__ */
|
|
17411
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17384
17412
|
"div",
|
|
17385
17413
|
{
|
|
17386
17414
|
style: {
|
|
@@ -17389,7 +17417,7 @@ function renderDefaultChartLoadingCard(rect) {
|
|
|
17389
17417
|
gap: barGap,
|
|
17390
17418
|
justifyContent: "center"
|
|
17391
17419
|
},
|
|
17392
|
-
children: bars.map((heightPx, index) => /* @__PURE__ */
|
|
17420
|
+
children: bars.map((heightPx, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17393
17421
|
"div",
|
|
17394
17422
|
{
|
|
17395
17423
|
style: {
|
|
@@ -17432,7 +17460,7 @@ function formatBytes(value) {
|
|
|
17432
17460
|
return `${size >= 10 || unitIndex === 0 ? size.toFixed(0) : size.toFixed(1)} ${units[unitIndex]}`;
|
|
17433
17461
|
}
|
|
17434
17462
|
function renderDeferredLoad(controller, palette) {
|
|
17435
|
-
return /* @__PURE__ */
|
|
17463
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17436
17464
|
"div",
|
|
17437
17465
|
{
|
|
17438
17466
|
style: {
|
|
@@ -17443,7 +17471,7 @@ function renderDeferredLoad(controller, palette) {
|
|
|
17443
17471
|
justifyContent: "center",
|
|
17444
17472
|
padding: 24
|
|
17445
17473
|
},
|
|
17446
|
-
children: /* @__PURE__ */
|
|
17474
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17447
17475
|
"div",
|
|
17448
17476
|
{
|
|
17449
17477
|
style: {
|
|
@@ -17456,14 +17484,14 @@ function renderDeferredLoad(controller, palette) {
|
|
|
17456
17484
|
width: "100%"
|
|
17457
17485
|
},
|
|
17458
17486
|
children: [
|
|
17459
|
-
/* @__PURE__ */
|
|
17460
|
-
/* @__PURE__ */
|
|
17487
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { fontSize: 16, fontWeight: 600 }, children: "Large workbook detected" }),
|
|
17488
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { color: palette.mutedText, fontSize: 13, lineHeight: 1.5, marginTop: 8 }, children: [
|
|
17461
17489
|
"This workbook is ",
|
|
17462
17490
|
formatBytes(_nullishCoalesce(controller.deferredLoadFileSize, () => ( 0))),
|
|
17463
17491
|
". Loading it immediately can block the main thread and freeze the page."
|
|
17464
17492
|
] }),
|
|
17465
|
-
/* @__PURE__ */
|
|
17466
|
-
/* @__PURE__ */
|
|
17493
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { color: palette.mutedText, fontSize: 13, lineHeight: 1.5, marginTop: 8 }, children: "Best practice is to gate large files or move parsing into a worker. You can still load it manually below." }),
|
|
17494
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { display: "flex", gap: 10, marginTop: 16 }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17467
17495
|
"button",
|
|
17468
17496
|
{
|
|
17469
17497
|
onClick: controller.continueDeferredLoad,
|
|
@@ -17905,7 +17933,7 @@ function renderConditionalIcon(icon, scale = 1) {
|
|
|
17905
17933
|
if (icon.shape === "arrow") {
|
|
17906
17934
|
const fill = _nullishCoalesce(icon.color, () => ( "#111827"));
|
|
17907
17935
|
const stroke = _nullishCoalesce(icon.borderColor, () => ( darkenColor(fill, 0.32)));
|
|
17908
|
-
return /* @__PURE__ */
|
|
17936
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17909
17937
|
"svg",
|
|
17910
17938
|
{
|
|
17911
17939
|
"aria-hidden": "true",
|
|
@@ -17913,7 +17941,7 @@ function renderConditionalIcon(icon, scale = 1) {
|
|
|
17913
17941
|
style: { display: "block" },
|
|
17914
17942
|
viewBox: "0 0 16 16",
|
|
17915
17943
|
width: iconSize,
|
|
17916
|
-
children: /* @__PURE__ */
|
|
17944
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "g", { transform: `rotate(${_nullishCoalesce(icon.rotationDeg, () => ( 0))} 8 8)`, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17917
17945
|
"path",
|
|
17918
17946
|
{
|
|
17919
17947
|
d: "M2.5 8 L8.4 2.4 L8.4 5.2 L13.5 5.2 L13.5 10.8 L8.4 10.8 L8.4 13.6 Z",
|
|
@@ -17927,7 +17955,7 @@ function renderConditionalIcon(icon, scale = 1) {
|
|
|
17927
17955
|
);
|
|
17928
17956
|
}
|
|
17929
17957
|
if (icon.glyph) {
|
|
17930
|
-
return /* @__PURE__ */
|
|
17958
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17931
17959
|
"span",
|
|
17932
17960
|
{
|
|
17933
17961
|
style: {
|
|
@@ -17945,7 +17973,7 @@ function renderConditionalIcon(icon, scale = 1) {
|
|
|
17945
17973
|
}
|
|
17946
17974
|
);
|
|
17947
17975
|
}
|
|
17948
|
-
return /* @__PURE__ */
|
|
17976
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
17949
17977
|
"span",
|
|
17950
17978
|
{
|
|
17951
17979
|
style: {
|
|
@@ -18039,9 +18067,9 @@ function renderCheckboxControl(checked, palette, scale = 1, mixed = false) {
|
|
|
18039
18067
|
const stroke = paletteIsDark(palette) ? "#cbd5e1" : "#475569";
|
|
18040
18068
|
const fill = checked || mixed ? paletteIsDark(palette) ? "#60a5fa" : "#2563eb" : "transparent";
|
|
18041
18069
|
const check = paletteIsDark(palette) ? "#020617" : "#ffffff";
|
|
18042
|
-
return /* @__PURE__ */
|
|
18043
|
-
/* @__PURE__ */
|
|
18044
|
-
mixed ? /* @__PURE__ */
|
|
18070
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "svg", { "aria-hidden": "true", height: 14 * scale, style: { display: "block" }, viewBox: "0 0 16 16", width: 14 * scale, children: [
|
|
18071
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "rect", { fill, height: 11, rx: 2, ry: 2, stroke, strokeWidth: 1.2, width: 11, x: 2.5, y: 2.5 }),
|
|
18072
|
+
mixed ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "path", { d: "M5 8h6", fill: "none", stroke: check, strokeLinecap: "round", strokeWidth: 1.8 }) : checked ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18045
18073
|
"path",
|
|
18046
18074
|
{
|
|
18047
18075
|
d: "M5 8.1 7.1 10.2 11.3 5.8",
|
|
@@ -18057,9 +18085,9 @@ function renderCheckboxControl(checked, palette, scale = 1, mixed = false) {
|
|
|
18057
18085
|
function renderRadioControl(checked, palette, scale = 1) {
|
|
18058
18086
|
const stroke = paletteIsDark(palette) ? "#cbd5e1" : "#475569";
|
|
18059
18087
|
const dot = paletteIsDark(palette) ? "#60a5fa" : "#2563eb";
|
|
18060
|
-
return /* @__PURE__ */
|
|
18061
|
-
/* @__PURE__ */
|
|
18062
|
-
checked ? /* @__PURE__ */
|
|
18088
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "svg", { "aria-hidden": "true", height: 14 * scale, style: { display: "block" }, viewBox: "0 0 16 16", width: 14 * scale, children: [
|
|
18089
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "circle", { cx: 8, cy: 8, fill: "transparent", r: 5.5, stroke, strokeWidth: 1.2 }),
|
|
18090
|
+
checked ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "circle", { cx: 8, cy: 8, fill: dot, r: 2.75 }) : null
|
|
18063
18091
|
] });
|
|
18064
18092
|
}
|
|
18065
18093
|
function resolveFormControlLabel(control) {
|
|
@@ -18303,8 +18331,8 @@ function GridRow({
|
|
|
18303
18331
|
zoomFactor
|
|
18304
18332
|
}) {
|
|
18305
18333
|
const gutterSeparatorShadow = `inset -1px 0 0 ${palette.border}, inset 0 -1px 0 ${palette.border}`;
|
|
18306
|
-
return /* @__PURE__ */
|
|
18307
|
-
/* @__PURE__ */
|
|
18334
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "tr", { "data-xlsx-row": actualRow, style: { height: rowHeight }, children: [
|
|
18335
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18308
18336
|
"td",
|
|
18309
18337
|
{
|
|
18310
18338
|
ref: (element) => onRowHeaderRef(actualRow, element),
|
|
@@ -18329,8 +18357,8 @@ function GridRow({
|
|
|
18329
18357
|
width: rowHeaderWidth,
|
|
18330
18358
|
zIndex: stickyTop !== void 0 ? frozenRowHeaderZIndex : rowHeaderZIndex
|
|
18331
18359
|
},
|
|
18332
|
-
children: /* @__PURE__ */
|
|
18333
|
-
/* @__PURE__ */
|
|
18360
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { position: "relative" }, children: [
|
|
18361
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18334
18362
|
"span",
|
|
18335
18363
|
{
|
|
18336
18364
|
style: {
|
|
@@ -18341,7 +18369,7 @@ function GridRow({
|
|
|
18341
18369
|
children: actualRow + 1
|
|
18342
18370
|
}
|
|
18343
18371
|
),
|
|
18344
|
-
/* @__PURE__ */
|
|
18372
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18345
18373
|
"div",
|
|
18346
18374
|
{
|
|
18347
18375
|
onPointerDown: (event) => onRowResizePointerDown(event, actualRow, rowHeight),
|
|
@@ -18360,7 +18388,7 @@ function GridRow({
|
|
|
18360
18388
|
] })
|
|
18361
18389
|
}
|
|
18362
18390
|
),
|
|
18363
|
-
leadingSpacerWidth > 0 ? /* @__PURE__ */
|
|
18391
|
+
leadingSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18364
18392
|
"td",
|
|
18365
18393
|
{
|
|
18366
18394
|
"aria-hidden": "true",
|
|
@@ -18502,7 +18530,7 @@ function GridRow({
|
|
|
18502
18530
|
width: "max-content"
|
|
18503
18531
|
} : null;
|
|
18504
18532
|
const title = [_optionalChain([cellData, 'access', _989 => _989.hyperlink, 'optionalAccess', _990 => _990.tooltip]), _optionalChain([cellData, 'access', _991 => _991.validation, 'optionalAccess', _992 => _992.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
|
|
18505
|
-
return /* @__PURE__ */
|
|
18533
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18506
18534
|
"td",
|
|
18507
18535
|
{
|
|
18508
18536
|
"data-xlsx-cell": `${actualRow}:${actualCol}`,
|
|
@@ -18519,7 +18547,7 @@ function GridRow({
|
|
|
18519
18547
|
style: cellStyle,
|
|
18520
18548
|
title,
|
|
18521
18549
|
children: [
|
|
18522
|
-
cellData.chartHighlight ? /* @__PURE__ */
|
|
18550
|
+
cellData.chartHighlight ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18523
18551
|
"div",
|
|
18524
18552
|
{
|
|
18525
18553
|
"aria-hidden": "true",
|
|
@@ -18536,7 +18564,7 @@ function GridRow({
|
|
|
18536
18564
|
}
|
|
18537
18565
|
}
|
|
18538
18566
|
) : null,
|
|
18539
|
-
cellData.conditionalDataBar ? /* @__PURE__ */
|
|
18567
|
+
cellData.conditionalDataBar ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18540
18568
|
"div",
|
|
18541
18569
|
{
|
|
18542
18570
|
"aria-hidden": "true",
|
|
@@ -18551,7 +18579,7 @@ function GridRow({
|
|
|
18551
18579
|
top: 4 * zoomFactor,
|
|
18552
18580
|
zIndex: 0
|
|
18553
18581
|
},
|
|
18554
|
-
children: /* @__PURE__ */
|
|
18582
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18555
18583
|
"div",
|
|
18556
18584
|
{
|
|
18557
18585
|
style: {
|
|
@@ -18567,7 +18595,7 @@ function GridRow({
|
|
|
18567
18595
|
}
|
|
18568
18596
|
) : null,
|
|
18569
18597
|
adornment,
|
|
18570
|
-
cellData.conditionalIcon ? /* @__PURE__ */
|
|
18598
|
+
cellData.conditionalIcon ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18571
18599
|
"div",
|
|
18572
18600
|
{
|
|
18573
18601
|
"aria-hidden": "true",
|
|
@@ -18585,7 +18613,7 @@ function GridRow({
|
|
|
18585
18613
|
children: renderConditionalIcon(cellData.conditionalIcon, zoomFactor)
|
|
18586
18614
|
}
|
|
18587
18615
|
) : null,
|
|
18588
|
-
isEditing ? /* @__PURE__ */
|
|
18616
|
+
isEditing ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18589
18617
|
"input",
|
|
18590
18618
|
{
|
|
18591
18619
|
autoFocus: true,
|
|
@@ -18621,7 +18649,7 @@ function GridRow({
|
|
|
18621
18649
|
},
|
|
18622
18650
|
value: editingValue
|
|
18623
18651
|
}
|
|
18624
|
-
) : isSpilling ? /* @__PURE__ */
|
|
18652
|
+
) : isSpilling ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18625
18653
|
"div",
|
|
18626
18654
|
{
|
|
18627
18655
|
style: {
|
|
@@ -18635,7 +18663,7 @@ function GridRow({
|
|
|
18635
18663
|
},
|
|
18636
18664
|
children: cellData.value
|
|
18637
18665
|
}
|
|
18638
|
-
) : cellData.sparkline ? /* @__PURE__ */
|
|
18666
|
+
) : cellData.sparkline ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18639
18667
|
"div",
|
|
18640
18668
|
{
|
|
18641
18669
|
style: {
|
|
@@ -18648,7 +18676,7 @@ function GridRow({
|
|
|
18648
18676
|
},
|
|
18649
18677
|
children: renderSparkline(cellData.sparkline.config, cellData.sparkline.values, palette)
|
|
18650
18678
|
}
|
|
18651
|
-
) : cellData.checkboxState != null ? /* @__PURE__ */
|
|
18679
|
+
) : cellData.checkboxState != null ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18652
18680
|
"div",
|
|
18653
18681
|
{
|
|
18654
18682
|
style: {
|
|
@@ -18661,13 +18689,13 @@ function GridRow({
|
|
|
18661
18689
|
},
|
|
18662
18690
|
children: renderCheckboxControl(cellData.checkboxState, palette, zoomFactor)
|
|
18663
18691
|
}
|
|
18664
|
-
) : /* @__PURE__ */
|
|
18692
|
+
) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: cellContentStyle, children: rotatedTextStyle ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: { ...rotatedTextBounds, flex: "0 0 auto", position: "relative" }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: rotatedTextStyle, children: cellData.value }) }) : wrappedTextStyle ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: wrappedTextStyle, children: cellData.value }) : cellData.value })
|
|
18665
18693
|
]
|
|
18666
18694
|
},
|
|
18667
18695
|
key
|
|
18668
18696
|
);
|
|
18669
18697
|
}),
|
|
18670
|
-
trailingSpacerWidth > 0 ? /* @__PURE__ */
|
|
18698
|
+
trailingSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
18671
18699
|
"td",
|
|
18672
18700
|
{
|
|
18673
18701
|
"aria-hidden": "true",
|
|
@@ -18681,7 +18709,7 @@ function GridRow({
|
|
|
18681
18709
|
) : null
|
|
18682
18710
|
] });
|
|
18683
18711
|
}
|
|
18684
|
-
var MemoGridRow =
|
|
18712
|
+
var MemoGridRow = _chunkAZWBTFJIcjs.N.call(void 0, GridRow, (prev, next) => {
|
|
18685
18713
|
if (prev.actualRow !== next.actualRow || prev.rowHeight !== next.rowHeight || prev.headerLabelLiveScale !== next.headerLabelLiveScale || prev.palette !== next.palette || prev.readOnly !== next.readOnly || prev.visibleCols !== next.visibleCols || prev.leadingSpacerWidth !== next.leadingSpacerWidth || prev.rowHeaderWidth !== next.rowHeaderWidth || prev.stickyLeftByCol !== next.stickyLeftByCol || prev.stickyTop !== next.stickyTop || prev.trailingSpacerWidth !== next.trailingSpacerWidth || prev.zoomFactor !== next.zoomFactor || prev.getCellData !== next.getCellData || prev.onCellClick !== next.onCellClick || prev.onCellDoubleClick !== next.onCellDoubleClick || prev.onCellPointerDown !== next.onCellPointerDown || prev.onEditingBlur !== next.onEditingBlur || prev.onEditingCancel !== next.onEditingCancel || prev.onEditingCommit !== next.onEditingCommit || prev.onEditingNavigate !== next.onEditingNavigate || prev.onEditingValueChange !== next.onEditingValueChange || prev.onRowHeaderRef !== next.onRowHeaderRef || prev.onRowPointerDown !== next.onRowPointerDown || prev.onRowResizePointerDown !== next.onRowResizePointerDown || prev.renderCellAdornment !== next.renderCellAdornment) {
|
|
18686
18714
|
return false;
|
|
18687
18715
|
}
|
|
@@ -18795,180 +18823,180 @@ function XlsxGrid({
|
|
|
18795
18823
|
workbook,
|
|
18796
18824
|
zoomScale
|
|
18797
18825
|
} = controller;
|
|
18798
|
-
|
|
18799
|
-
if (showImages)
|
|
18800
|
-
}, [charts, showImages]);
|
|
18801
|
-
const formControlItemsById =
|
|
18826
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
18827
|
+
if (showImages && !isChartsLoading) _chunkOCF75R75cjs.preloadChartRenderers.call(void 0, [charts]);
|
|
18828
|
+
}, [charts, isChartsLoading, showImages]);
|
|
18829
|
+
const formControlItemsById = _chunkAZWBTFJIcjs.T.call(void 0, () => new Map(
|
|
18802
18830
|
formControls.flatMap((control) => control.controlIndex !== void 0 && (control.kind === "dropdown" || control.kind === "listbox") ? [[control.id, getFormControlItems(control.controlIndex, control.sheetIndex)]] : [])
|
|
18803
18831
|
), [formControls, getFormControlItems]);
|
|
18804
|
-
const [contextMenu, setContextMenu] =
|
|
18805
|
-
|
|
18832
|
+
const [contextMenu, setContextMenu] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18833
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
18806
18834
|
setContextMenu(null);
|
|
18807
18835
|
}, [activeTabIndex, workbook, readOnly, enableContextMenu]);
|
|
18808
|
-
|
|
18836
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
18809
18837
|
if (contextMenu && (!selection || !rangesEqual(normalizeRange2(selection), contextMenu.context.selection))) {
|
|
18810
18838
|
setContextMenu(null);
|
|
18811
18839
|
}
|
|
18812
18840
|
}, [contextMenu, selection]);
|
|
18813
18841
|
const canResizeHeaders = !readOnly || allowResizeInReadOnly;
|
|
18814
|
-
const scrollRef =
|
|
18815
|
-
const scrolledHighlightRef =
|
|
18816
|
-
const wrapperRef =
|
|
18817
|
-
const tableRef =
|
|
18818
|
-
const gridKeyboardActiveRef =
|
|
18819
|
-
const gridKeyboardHandlerRef =
|
|
18820
|
-
const axisSelectionRef =
|
|
18821
|
-
const scrollBodyCanvasRef =
|
|
18822
|
-
const topBodyCanvasRef =
|
|
18823
|
-
const leftBodyCanvasRef =
|
|
18824
|
-
const cornerBodyCanvasRef =
|
|
18825
|
-
const bodyBlitBufferCanvasRef =
|
|
18842
|
+
const scrollRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18843
|
+
const scrolledHighlightRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18844
|
+
const wrapperRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18845
|
+
const tableRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18846
|
+
const gridKeyboardActiveRef = _chunkAZWBTFJIcjs.A.call(void 0, false);
|
|
18847
|
+
const gridKeyboardHandlerRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18848
|
+
const axisSelectionRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18849
|
+
const scrollBodyCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18850
|
+
const topBodyCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18851
|
+
const leftBodyCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18852
|
+
const cornerBodyCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18853
|
+
const bodyBlitBufferCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18826
18854
|
corner: null,
|
|
18827
18855
|
left: null,
|
|
18828
18856
|
scroll: null,
|
|
18829
18857
|
top: null
|
|
18830
18858
|
});
|
|
18831
|
-
const headerBlitBufferCanvasRef =
|
|
18859
|
+
const headerBlitBufferCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18832
18860
|
left: null,
|
|
18833
18861
|
top: null
|
|
18834
18862
|
});
|
|
18835
|
-
const topFrozenHeaderCanvasRef =
|
|
18836
|
-
const topScrollHeaderCanvasRef =
|
|
18837
|
-
const leftFrozenHeaderCanvasRef =
|
|
18838
|
-
const leftScrollHeaderCanvasRef =
|
|
18839
|
-
const cornerHeaderCanvasRef =
|
|
18840
|
-
const canvasScrollOverlayContentRef =
|
|
18841
|
-
const canvasTopOverlayContentRef =
|
|
18842
|
-
const canvasLeftOverlayContentRef =
|
|
18843
|
-
const canvasCornerOverlayContentRef =
|
|
18844
|
-
const canvasImageCacheRef =
|
|
18845
|
-
const selectionOverlayRef =
|
|
18846
|
-
const selectionPaneContentRefs =
|
|
18847
|
-
const selectionPaneOverlayRefs =
|
|
18848
|
-
const selectionPaneFillHandleRefs =
|
|
18849
|
-
const canvasSelectionLayerRef =
|
|
18850
|
-
const activeValidationOverlayRef =
|
|
18851
|
-
const fillHandleRef =
|
|
18852
|
-
const tableMenuRef =
|
|
18853
|
-
const colElementRefs =
|
|
18854
|
-
const colHeaderCellRefs =
|
|
18855
|
-
const rowElementRefs =
|
|
18856
|
-
const rowHeaderCellRefs =
|
|
18857
|
-
const columnPreviewRef =
|
|
18858
|
-
const rowPreviewRef =
|
|
18859
|
-
const activeCellRef =
|
|
18860
|
-
const selectedChartIdRef =
|
|
18861
|
-
const selectedImageIdRef =
|
|
18862
|
-
const pendingSelectionCommitRef =
|
|
18863
|
-
const selectionCommitFrameRef =
|
|
18864
|
-
const selectionRef =
|
|
18865
|
-
const editingCellRef =
|
|
18866
|
-
const commitEditingRef =
|
|
18863
|
+
const topFrozenHeaderCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18864
|
+
const topScrollHeaderCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18865
|
+
const leftFrozenHeaderCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18866
|
+
const leftScrollHeaderCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18867
|
+
const cornerHeaderCanvasRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18868
|
+
const canvasScrollOverlayContentRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18869
|
+
const canvasTopOverlayContentRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18870
|
+
const canvasLeftOverlayContentRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18871
|
+
const canvasCornerOverlayContentRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18872
|
+
const canvasImageCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18873
|
+
const selectionOverlayRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18874
|
+
const selectionPaneContentRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18875
|
+
const selectionPaneOverlayRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18876
|
+
const selectionPaneFillHandleRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18877
|
+
const canvasSelectionLayerRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18878
|
+
const activeValidationOverlayRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18879
|
+
const fillHandleRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18880
|
+
const tableMenuRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18881
|
+
const colElementRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18882
|
+
const colHeaderCellRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18883
|
+
const rowElementRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18884
|
+
const rowHeaderCellRefs = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18885
|
+
const columnPreviewRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18886
|
+
const rowPreviewRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18887
|
+
const activeCellRef = _chunkAZWBTFJIcjs.A.call(void 0, activeCell);
|
|
18888
|
+
const selectedChartIdRef = _chunkAZWBTFJIcjs.A.call(void 0, selectedChartId);
|
|
18889
|
+
const selectedImageIdRef = _chunkAZWBTFJIcjs.A.call(void 0, selectedImageId);
|
|
18890
|
+
const pendingSelectionCommitRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18891
|
+
const selectionCommitFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18892
|
+
const selectionRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18893
|
+
const editingCellRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18894
|
+
const commitEditingRef = _chunkAZWBTFJIcjs.A.call(void 0, () => {
|
|
18867
18895
|
});
|
|
18868
|
-
const editingInputRef =
|
|
18869
|
-
const readOnlyRef =
|
|
18870
|
-
const committedZoomScaleRef =
|
|
18871
|
-
const gestureZoomScaleRef =
|
|
18872
|
-
const liveGestureZoomRef =
|
|
18873
|
-
const pendingLiveGestureZoomStateRef =
|
|
18874
|
-
const liveGestureZoomFrameRef =
|
|
18875
|
-
const liveGestureZoomTransformFrameRef =
|
|
18876
|
-
const pendingZoomAnchorRef =
|
|
18877
|
-
const liveZoomCommitTimerRef =
|
|
18878
|
-
const pendingLiveZoomCommitRef =
|
|
18879
|
-
const gestureScrollerRectRef =
|
|
18880
|
-
const touchPinchStateRef =
|
|
18881
|
-
const safariPinchStartZoomRef =
|
|
18882
|
-
const canvasTransformStyleCacheRef =
|
|
18883
|
-
const displayedSelectionRef =
|
|
18884
|
-
const firstVisibleColRef =
|
|
18885
|
-
const lastVisibleColRef =
|
|
18886
|
-
const firstVisibleRowRef =
|
|
18887
|
-
const lastVisibleRowRef =
|
|
18888
|
-
const cellRenderCacheRef =
|
|
18889
|
-
const cellBaseRawStyleCacheRef =
|
|
18890
|
-
const mergedBorderOverlayCacheRef =
|
|
18891
|
-
const conditionalFormatMetricsCacheRef =
|
|
18892
|
-
const resizeStateRef =
|
|
18893
|
-
const resizeFrameRef =
|
|
18894
|
-
const pendingResizePreviewRef =
|
|
18895
|
-
const selectionDragRef =
|
|
18896
|
-
const pendingSelectionDragRef =
|
|
18897
|
-
const fillDragRef =
|
|
18898
|
-
const selectionDragCleanupRef =
|
|
18899
|
-
const pendingSelectionDragCleanupRef =
|
|
18900
|
-
const fillDragCleanupRef =
|
|
18901
|
-
const cachedScrollerRectRef =
|
|
18902
|
-
const installImageInteractionListenersRef =
|
|
18903
|
-
const installChartInteractionListenersRef =
|
|
18904
|
-
const imageInteractionCleanupRef =
|
|
18905
|
-
const imageInteractionRef =
|
|
18906
|
-
const chartInteractionCleanupRef =
|
|
18907
|
-
const chartInteractionRef =
|
|
18908
|
-
const [editingCell, setEditingCell] =
|
|
18909
|
-
const [editingValue, setEditingValue] =
|
|
18910
|
-
const [openTableMenu, setOpenTableMenu] =
|
|
18911
|
-
const [fillPreviewRange, setFillPreviewRange] =
|
|
18912
|
-
const [chartPreviewRect, setChartPreviewRect] =
|
|
18913
|
-
const [liveGestureZoom, setLiveGestureZoom] =
|
|
18914
|
-
const [canvasImageLoadVersion, setCanvasImageLoadVersion] =
|
|
18915
|
-
const liveDrawingViewportRef =
|
|
18896
|
+
const editingInputRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18897
|
+
const readOnlyRef = _chunkAZWBTFJIcjs.A.call(void 0, readOnly);
|
|
18898
|
+
const committedZoomScaleRef = _chunkAZWBTFJIcjs.A.call(void 0, zoomScale);
|
|
18899
|
+
const gestureZoomScaleRef = _chunkAZWBTFJIcjs.A.call(void 0, zoomScale);
|
|
18900
|
+
const liveGestureZoomRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18901
|
+
const pendingLiveGestureZoomStateRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18902
|
+
const liveGestureZoomFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18903
|
+
const liveGestureZoomTransformFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18904
|
+
const pendingZoomAnchorRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18905
|
+
const liveZoomCommitTimerRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18906
|
+
const pendingLiveZoomCommitRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18907
|
+
const gestureScrollerRectRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18908
|
+
const touchPinchStateRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18909
|
+
const safariPinchStartZoomRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18910
|
+
const canvasTransformStyleCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new WeakMap());
|
|
18911
|
+
const displayedSelectionRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18912
|
+
const firstVisibleColRef = _chunkAZWBTFJIcjs.A.call(void 0, void 0);
|
|
18913
|
+
const lastVisibleColRef = _chunkAZWBTFJIcjs.A.call(void 0, void 0);
|
|
18914
|
+
const firstVisibleRowRef = _chunkAZWBTFJIcjs.A.call(void 0, void 0);
|
|
18915
|
+
const lastVisibleRowRef = _chunkAZWBTFJIcjs.A.call(void 0, void 0);
|
|
18916
|
+
const cellRenderCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18917
|
+
const cellBaseRawStyleCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18918
|
+
const mergedBorderOverlayCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18919
|
+
const conditionalFormatMetricsCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, /* @__PURE__ */ new Map());
|
|
18920
|
+
const resizeStateRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18921
|
+
const resizeFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18922
|
+
const pendingResizePreviewRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18923
|
+
const selectionDragRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18924
|
+
const pendingSelectionDragRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18925
|
+
const fillDragRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18926
|
+
const selectionDragCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18927
|
+
const pendingSelectionDragCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18928
|
+
const fillDragCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18929
|
+
const cachedScrollerRectRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18930
|
+
const installImageInteractionListenersRef = _chunkAZWBTFJIcjs.A.call(void 0, installImageInteractionListeners);
|
|
18931
|
+
const installChartInteractionListenersRef = _chunkAZWBTFJIcjs.A.call(void 0, installChartInteractionListeners);
|
|
18932
|
+
const imageInteractionCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18933
|
+
const imageInteractionRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18934
|
+
const chartInteractionCleanupRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18935
|
+
const chartInteractionRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18936
|
+
const [editingCell, setEditingCell] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18937
|
+
const [editingValue, setEditingValue] = _chunkAZWBTFJIcjs.d.call(void 0, "");
|
|
18938
|
+
const [openTableMenu, setOpenTableMenu] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18939
|
+
const [fillPreviewRange, setFillPreviewRange] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18940
|
+
const [chartPreviewRect, setChartPreviewRect] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18941
|
+
const [liveGestureZoom, setLiveGestureZoom] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18942
|
+
const [canvasImageLoadVersion, setCanvasImageLoadVersion] = _chunkAZWBTFJIcjs.d.call(void 0, 0);
|
|
18943
|
+
const liveDrawingViewportRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18916
18944
|
height: 0,
|
|
18917
18945
|
left: 0,
|
|
18918
18946
|
top: 0,
|
|
18919
18947
|
width: 0
|
|
18920
18948
|
});
|
|
18921
|
-
const canvasLayoutMetricsRef =
|
|
18949
|
+
const canvasLayoutMetricsRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18922
18950
|
displayHeaderHeight: HEADER_HEIGHT,
|
|
18923
18951
|
displayRowHeaderWidth: ROW_HEADER_WIDTH,
|
|
18924
18952
|
frozenPaneBottom: HEADER_HEIGHT,
|
|
18925
18953
|
frozenPaneRight: ROW_HEADER_WIDTH
|
|
18926
18954
|
});
|
|
18927
|
-
const paintedDrawingViewportRef =
|
|
18955
|
+
const paintedDrawingViewportRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18928
18956
|
height: 0,
|
|
18929
18957
|
left: 0,
|
|
18930
18958
|
top: 0,
|
|
18931
18959
|
width: 0
|
|
18932
18960
|
});
|
|
18933
|
-
const paintedBodyCanvasSignatureRef =
|
|
18934
|
-
const paintedHeaderCanvasSignatureRef =
|
|
18935
|
-
const pendingDrawingViewportRef =
|
|
18936
|
-
const drawingViewportFrameRef =
|
|
18937
|
-
const initialScrollKeyRef =
|
|
18938
|
-
const chartPreviewRectRef =
|
|
18939
|
-
const skipNextChartClickRef =
|
|
18940
|
-
const paneDrawingNodesCacheRef =
|
|
18941
|
-
const [drawingViewport, setDrawingViewport] =
|
|
18961
|
+
const paintedBodyCanvasSignatureRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18962
|
+
const paintedHeaderCanvasSignatureRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18963
|
+
const pendingDrawingViewportRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18964
|
+
const drawingViewportFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18965
|
+
const initialScrollKeyRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18966
|
+
const chartPreviewRectRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18967
|
+
const skipNextChartClickRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18968
|
+
const paneDrawingNodesCacheRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18969
|
+
const [drawingViewport, setDrawingViewport] = _chunkAZWBTFJIcjs.d.call(void 0, {
|
|
18942
18970
|
height: 0,
|
|
18943
18971
|
left: 0,
|
|
18944
18972
|
top: 0,
|
|
18945
18973
|
width: 0
|
|
18946
18974
|
});
|
|
18947
|
-
const drawingViewportStateRef =
|
|
18975
|
+
const drawingViewportStateRef = _chunkAZWBTFJIcjs.A.call(void 0, {
|
|
18948
18976
|
height: 0,
|
|
18949
18977
|
left: 0,
|
|
18950
18978
|
top: 0,
|
|
18951
18979
|
width: 0
|
|
18952
18980
|
});
|
|
18953
|
-
const [resizeGuide, setResizeGuide] =
|
|
18954
|
-
const selectionPreviewRangeRef =
|
|
18955
|
-
const [imagePreviewRect, setImagePreviewRect] =
|
|
18956
|
-
const imagePreviewRectRef =
|
|
18957
|
-
const imagePreviewFrameRef =
|
|
18958
|
-
const pendingImagePreviewRef =
|
|
18959
|
-
const chartPreviewFrameRef =
|
|
18960
|
-
const pendingChartPreviewRef =
|
|
18961
|
-
const skipNextImageClickRef =
|
|
18962
|
-
const [pendingNavigation, setPendingNavigation] =
|
|
18963
|
-
const interactionModeRef =
|
|
18964
|
-
const setInteractionMode =
|
|
18981
|
+
const [resizeGuide, setResizeGuide] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18982
|
+
const selectionPreviewRangeRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18983
|
+
const [imagePreviewRect, setImagePreviewRect] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18984
|
+
const imagePreviewRectRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18985
|
+
const imagePreviewFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18986
|
+
const pendingImagePreviewRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18987
|
+
const chartPreviewFrameRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18988
|
+
const pendingChartPreviewRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18989
|
+
const skipNextImageClickRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
18990
|
+
const [pendingNavigation, setPendingNavigation] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
18991
|
+
const interactionModeRef = _chunkAZWBTFJIcjs.A.call(void 0, "idle");
|
|
18992
|
+
const setInteractionMode = _chunkAZWBTFJIcjs.q.call(void 0, (mode) => {
|
|
18965
18993
|
interactionModeRef.current = mode;
|
|
18966
18994
|
}, []);
|
|
18967
|
-
const worksheet =
|
|
18995
|
+
const worksheet = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
18968
18996
|
() => getActiveWorksheet(),
|
|
18969
18997
|
[activeSheetIndex, getActiveWorksheet, revision]
|
|
18970
18998
|
);
|
|
18971
|
-
const mergedRegions =
|
|
18999
|
+
const mergedRegions = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
18972
19000
|
const regions = [];
|
|
18973
19001
|
const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess', _997 => _997.mergedRegions])) ? worksheet.mergedRegions : [];
|
|
18974
19002
|
for (const entry of rawMergedRegions) {
|
|
@@ -18987,14 +19015,14 @@ function XlsxGrid({
|
|
|
18987
19015
|
}
|
|
18988
19016
|
return regions;
|
|
18989
19017
|
}, [worksheet]);
|
|
18990
|
-
const findMergedRange =
|
|
19018
|
+
const findMergedRange = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
18991
19019
|
() => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1002 => _1002.mergedRanges]), () => ( mergedRegions))),
|
|
18992
19020
|
[_optionalChain([activeSheet, 'optionalAccess', _1003 => _1003.mergedRanges]), mergedRegions]
|
|
18993
19021
|
);
|
|
18994
|
-
const resolveMergeAnchorCell =
|
|
19022
|
+
const resolveMergeAnchorCell = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
18995
19023
|
return _nullishCoalesce(_optionalChain([findMergedRange, 'call', _1004 => _1004(cell), 'optionalAccess', _1005 => _1005.start]), () => ( cell));
|
|
18996
19024
|
}, [findMergedRange]);
|
|
18997
|
-
const resolveCellSelectionRange =
|
|
19025
|
+
const resolveCellSelectionRange = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
18998
19026
|
const normalized = normalizeRange2(range);
|
|
18999
19027
|
const start = resolveMergeAnchorCell(normalized.start);
|
|
19000
19028
|
const end = resolveMergeAnchorCell(normalized.end);
|
|
@@ -19003,15 +19031,15 @@ function XlsxGrid({
|
|
|
19003
19031
|
}
|
|
19004
19032
|
return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1006 => _1006.mergedRanges]), () => ( mergedRegions)));
|
|
19005
19033
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1007 => _1007.mergedRanges]), mergedRegions, resolveMergeAnchorCell]);
|
|
19006
|
-
const highlightedCellRanges =
|
|
19034
|
+
const highlightedCellRanges = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19007
19035
|
() => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess', _1008 => _1008.workbookSheetIndex]) === highlight.workbookSheetIndex ? [{ highlight, index, range: expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1009 => _1009.mergedRanges]), () => ( mergedRegions))) }] : []),
|
|
19008
19036
|
[_optionalChain([activeSheet, 'optionalAccess', _1010 => _1010.mergedRanges]), _optionalChain([activeSheet, 'optionalAccess', _1011 => _1011.workbookSheetIndex]), highlightedRanges, mergedRegions]
|
|
19009
19037
|
);
|
|
19010
|
-
const normalizedSelection =
|
|
19011
|
-
const zoomFactor =
|
|
19012
|
-
const previousZoomFactorRef =
|
|
19038
|
+
const normalizedSelection = _chunkAZWBTFJIcjs.T.call(void 0, () => selection ? normalizeRange2(selection) : null, [selection]);
|
|
19039
|
+
const zoomFactor = _chunkAZWBTFJIcjs.T.call(void 0, () => Math.max(0.1, zoomScale / 100), [zoomScale]);
|
|
19040
|
+
const previousZoomFactorRef = _chunkAZWBTFJIcjs.A.call(void 0, zoomFactor);
|
|
19013
19041
|
const effectiveTables = tables;
|
|
19014
|
-
const [displayRowLimit, setDisplayRowLimit] =
|
|
19042
|
+
const [displayRowLimit, setDisplayRowLimit] = _chunkAZWBTFJIcjs.d.call(void 0,
|
|
19015
19043
|
() => resolveInitialDisplayExtent(
|
|
19016
19044
|
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1012 => _1012.maxUsedRow]), () => ( -1)),
|
|
19017
19045
|
MIN_OPEN_GRID_ROWS,
|
|
@@ -19020,7 +19048,7 @@ function XlsxGrid({
|
|
|
19020
19048
|
INITIAL_WORKER_GRID_ROWS
|
|
19021
19049
|
)
|
|
19022
19050
|
);
|
|
19023
|
-
const [displayColLimit, setDisplayColLimit] =
|
|
19051
|
+
const [displayColLimit, setDisplayColLimit] = _chunkAZWBTFJIcjs.d.call(void 0,
|
|
19024
19052
|
() => resolveInitialDisplayExtent(
|
|
19025
19053
|
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1013 => _1013.maxUsedCol]), () => ( -1)),
|
|
19026
19054
|
MIN_OPEN_GRID_COLS,
|
|
@@ -19029,14 +19057,14 @@ function XlsxGrid({
|
|
|
19029
19057
|
INITIAL_WORKER_GRID_COLS
|
|
19030
19058
|
)
|
|
19031
19059
|
);
|
|
19032
|
-
const hiddenRowSet =
|
|
19033
|
-
const hiddenColSet =
|
|
19060
|
+
const hiddenRowSet = _chunkAZWBTFJIcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1014 => _1014.hiddenRows]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1015 => _1015.hiddenRows])]);
|
|
19061
|
+
const hiddenColSet = _chunkAZWBTFJIcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1016 => _1016.hiddenCols]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1017 => _1017.hiddenCols])]);
|
|
19034
19062
|
const displayDefaultRowHeight = DEFAULT_ROW_HEIGHT2 * zoomFactor;
|
|
19035
19063
|
const displayDefaultColWidth = DEFAULT_COL_WIDTH2 * zoomFactor;
|
|
19036
19064
|
const displayHeaderHeight = HEADER_HEIGHT * zoomFactor;
|
|
19037
19065
|
const displayRowHeaderWidth = ROW_HEADER_WIDTH * zoomFactor;
|
|
19038
19066
|
const displayImageMinSize = IMAGE_MIN_SIZE_PX * zoomFactor;
|
|
19039
|
-
const applyCanvasViewportCompensation =
|
|
19067
|
+
const applyCanvasViewportCompensation = _chunkAZWBTFJIcjs.q.call(void 0, (liveViewport) => {
|
|
19040
19068
|
const nextLiveViewport = _nullishCoalesce(liveViewport, () => ( liveDrawingViewportRef.current));
|
|
19041
19069
|
const paintedViewport = paintedDrawingViewportRef.current;
|
|
19042
19070
|
const {
|
|
@@ -19253,7 +19281,7 @@ function XlsxGrid({
|
|
|
19253
19281
|
0
|
|
19254
19282
|
);
|
|
19255
19283
|
}, [experimentalCanvas, zoomScale]);
|
|
19256
|
-
const updateLiveGestureZoomState =
|
|
19284
|
+
const updateLiveGestureZoomState = _chunkAZWBTFJIcjs.q.call(void 0, (nextState) => {
|
|
19257
19285
|
const previousState = liveGestureZoomRef.current;
|
|
19258
19286
|
const resolvedState = typeof nextState === "function" ? nextState(previousState) : nextState;
|
|
19259
19287
|
liveGestureZoomRef.current = resolvedState;
|
|
@@ -19285,13 +19313,13 @@ function XlsxGrid({
|
|
|
19285
19313
|
setLiveGestureZoom(pendingState);
|
|
19286
19314
|
});
|
|
19287
19315
|
}, [applyCanvasViewportCompensation, experimentalCanvas]);
|
|
19288
|
-
const clearLiveZoomCommitTimer =
|
|
19316
|
+
const clearLiveZoomCommitTimer = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
19289
19317
|
if (liveZoomCommitTimerRef.current !== null) {
|
|
19290
19318
|
window.clearTimeout(liveZoomCommitTimerRef.current);
|
|
19291
19319
|
liveZoomCommitTimerRef.current = null;
|
|
19292
19320
|
}
|
|
19293
19321
|
}, []);
|
|
19294
|
-
const clearLiveGestureZoom =
|
|
19322
|
+
const clearLiveGestureZoom = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
19295
19323
|
clearLiveZoomCommitTimer();
|
|
19296
19324
|
pendingLiveZoomCommitRef.current = null;
|
|
19297
19325
|
pendingZoomAnchorRef.current = null;
|
|
@@ -19301,7 +19329,7 @@ function XlsxGrid({
|
|
|
19301
19329
|
gestureZoomScaleRef.current = committedZoomScaleRef.current;
|
|
19302
19330
|
updateLiveGestureZoomState(null);
|
|
19303
19331
|
}, [clearLiveZoomCommitTimer, updateLiveGestureZoomState]);
|
|
19304
|
-
const updateLiveGestureZoomTarget =
|
|
19332
|
+
const updateLiveGestureZoomTarget = _chunkAZWBTFJIcjs.q.call(void 0, (nextZoomScale, anchor) => {
|
|
19305
19333
|
const clampedZoomScale = clampValue(nextZoomScale, minZoomScale, maxZoomScale);
|
|
19306
19334
|
gestureZoomScaleRef.current = clampedZoomScale;
|
|
19307
19335
|
pendingLiveZoomCommitRef.current = null;
|
|
@@ -19311,7 +19339,7 @@ function XlsxGrid({
|
|
|
19311
19339
|
targetZoomScale: clampedZoomScale
|
|
19312
19340
|
}));
|
|
19313
19341
|
}, [maxZoomScale, minZoomScale, updateLiveGestureZoomState]);
|
|
19314
|
-
const commitLiveGestureZoom =
|
|
19342
|
+
const commitLiveGestureZoom = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
19315
19343
|
clearLiveZoomCommitTimer();
|
|
19316
19344
|
const currentLiveGestureZoom = liveGestureZoomRef.current;
|
|
19317
19345
|
if (!currentLiveGestureZoom) {
|
|
@@ -19334,14 +19362,14 @@ function XlsxGrid({
|
|
|
19334
19362
|
gestureZoomScaleRef.current = nextCommittedZoomScale;
|
|
19335
19363
|
setZoomScale(nextCommittedZoomScale);
|
|
19336
19364
|
}, [clearLiveGestureZoom, clearLiveZoomCommitTimer, maxZoomScale, minZoomScale, setZoomScale]);
|
|
19337
|
-
const scheduleLiveGestureZoomCommit =
|
|
19365
|
+
const scheduleLiveGestureZoomCommit = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
19338
19366
|
clearLiveZoomCommitTimer();
|
|
19339
19367
|
liveZoomCommitTimerRef.current = window.setTimeout(() => {
|
|
19340
19368
|
liveZoomCommitTimerRef.current = null;
|
|
19341
19369
|
commitLiveGestureZoom();
|
|
19342
19370
|
}, LIVE_ZOOM_COMMIT_IDLE_MS);
|
|
19343
19371
|
}, [clearLiveZoomCommitTimer, commitLiveGestureZoom]);
|
|
19344
|
-
const syncDrawingViewport =
|
|
19372
|
+
const syncDrawingViewport = _chunkAZWBTFJIcjs.q.call(void 0, (scroller, options) => {
|
|
19345
19373
|
if (!scroller) {
|
|
19346
19374
|
return;
|
|
19347
19375
|
}
|
|
@@ -19391,21 +19419,21 @@ function XlsxGrid({
|
|
|
19391
19419
|
setDrawingViewport((current) => current.left === pendingViewport.left && current.top === pendingViewport.top && current.width === pendingViewport.width && current.height === pendingViewport.height ? current : pendingViewport);
|
|
19392
19420
|
});
|
|
19393
19421
|
}, [applyCanvasViewportCompensation]);
|
|
19394
|
-
const setGlobalCursor =
|
|
19422
|
+
const setGlobalCursor = _chunkAZWBTFJIcjs.q.call(void 0, (cursor) => {
|
|
19395
19423
|
document.body.style.cursor = cursor;
|
|
19396
19424
|
document.documentElement.style.cursor = cursor;
|
|
19397
19425
|
if (scrollRef.current) {
|
|
19398
19426
|
scrollRef.current.style.cursor = cursor;
|
|
19399
19427
|
}
|
|
19400
19428
|
}, []);
|
|
19401
|
-
const clearGlobalCursor =
|
|
19429
|
+
const clearGlobalCursor = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
19402
19430
|
document.body.style.cursor = "";
|
|
19403
19431
|
document.documentElement.style.cursor = "";
|
|
19404
19432
|
if (scrollRef.current) {
|
|
19405
19433
|
scrollRef.current.style.cursor = "";
|
|
19406
19434
|
}
|
|
19407
19435
|
}, []);
|
|
19408
|
-
const getBodyBlitBufferCanvas =
|
|
19436
|
+
const getBodyBlitBufferCanvas = _chunkAZWBTFJIcjs.q.call(void 0, (pane) => {
|
|
19409
19437
|
let bufferCanvas = bodyBlitBufferCanvasRef.current[pane];
|
|
19410
19438
|
if (!bufferCanvas && typeof document !== "undefined") {
|
|
19411
19439
|
bufferCanvas = document.createElement("canvas");
|
|
@@ -19413,7 +19441,7 @@ function XlsxGrid({
|
|
|
19413
19441
|
}
|
|
19414
19442
|
return bufferCanvas;
|
|
19415
19443
|
}, []);
|
|
19416
|
-
const getHeaderBlitBufferCanvas =
|
|
19444
|
+
const getHeaderBlitBufferCanvas = _chunkAZWBTFJIcjs.q.call(void 0, (axis) => {
|
|
19417
19445
|
let bufferCanvas = headerBlitBufferCanvasRef.current[axis];
|
|
19418
19446
|
if (!bufferCanvas && typeof document !== "undefined") {
|
|
19419
19447
|
bufferCanvas = document.createElement("canvas");
|
|
@@ -19421,7 +19449,7 @@ function XlsxGrid({
|
|
|
19421
19449
|
}
|
|
19422
19450
|
return bufferCanvas;
|
|
19423
19451
|
}, []);
|
|
19424
|
-
const visibleRows =
|
|
19452
|
+
const visibleRows = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
19425
19453
|
return buildVisibleAxisIndices(
|
|
19426
19454
|
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1029 => _1029.visibleRows]), () => ( [])),
|
|
19427
19455
|
displayRowLimit,
|
|
@@ -19429,7 +19457,7 @@ function XlsxGrid({
|
|
|
19429
19457
|
hiddenRowSet
|
|
19430
19458
|
);
|
|
19431
19459
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1031 => _1031.maxUsedRow]), _optionalChain([activeSheet, 'optionalAccess', _1032 => _1032.visibleRows]), displayRowLimit, hiddenRowSet]);
|
|
19432
|
-
const visibleCols =
|
|
19460
|
+
const visibleCols = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
19433
19461
|
return buildVisibleAxisIndices(
|
|
19434
19462
|
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1033 => _1033.visibleCols]), () => ( [])),
|
|
19435
19463
|
displayColLimit,
|
|
@@ -19437,21 +19465,21 @@ function XlsxGrid({
|
|
|
19437
19465
|
hiddenColSet
|
|
19438
19466
|
);
|
|
19439
19467
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1035 => _1035.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1036 => _1036.visibleCols]), displayColLimit, hiddenColSet]);
|
|
19440
|
-
const frozenRows =
|
|
19468
|
+
const frozenRows = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
19441
19469
|
const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1037 => _1037.freezePanes, 'optionalAccess', _1038 => _1038.row]), () => ( 0));
|
|
19442
19470
|
if (freezeRow <= 0) {
|
|
19443
19471
|
return [];
|
|
19444
19472
|
}
|
|
19445
19473
|
return visibleRows.filter((row) => row < freezeRow);
|
|
19446
19474
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1039 => _1039.freezePanes, 'optionalAccess', _1040 => _1040.row]), visibleRows]);
|
|
19447
|
-
const frozenCols =
|
|
19475
|
+
const frozenCols = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
19448
19476
|
const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1041 => _1041.freezePanes, 'optionalAccess', _1042 => _1042.col]), () => ( 0));
|
|
19449
19477
|
if (freezeCol <= 0) {
|
|
19450
19478
|
return [];
|
|
19451
19479
|
}
|
|
19452
19480
|
return visibleCols.filter((col) => col < freezeCol);
|
|
19453
19481
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1043 => _1043.freezePanes, 'optionalAccess', _1044 => _1044.col]), visibleCols]);
|
|
19454
|
-
const actualColWidths =
|
|
19482
|
+
const actualColWidths = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19455
19483
|
() => {
|
|
19456
19484
|
const widths = new Array(displayColLimit).fill(0);
|
|
19457
19485
|
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1045 => _1045.showGridLines]), () => ( true));
|
|
@@ -19519,7 +19547,7 @@ function XlsxGrid({
|
|
|
19519
19547
|
locale
|
|
19520
19548
|
]
|
|
19521
19549
|
);
|
|
19522
|
-
const actualRowHeights =
|
|
19550
|
+
const actualRowHeights = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19523
19551
|
() => {
|
|
19524
19552
|
const heights = new Array(displayRowLimit).fill(0);
|
|
19525
19553
|
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1065 => _1065.showGridLines]), () => ( true));
|
|
@@ -19626,48 +19654,48 @@ function XlsxGrid({
|
|
|
19626
19654
|
locale
|
|
19627
19655
|
]
|
|
19628
19656
|
);
|
|
19629
|
-
const displayActualColWidths =
|
|
19657
|
+
const displayActualColWidths = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19630
19658
|
() => actualColWidths.map((width) => width * zoomFactor),
|
|
19631
19659
|
[actualColWidths, zoomFactor]
|
|
19632
19660
|
);
|
|
19633
|
-
const displayActualRowHeights =
|
|
19661
|
+
const displayActualRowHeights = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19634
19662
|
() => actualRowHeights.map((height) => height * zoomFactor),
|
|
19635
19663
|
[actualRowHeights, zoomFactor]
|
|
19636
19664
|
);
|
|
19637
|
-
const displayEffectiveColWidths =
|
|
19665
|
+
const displayEffectiveColWidths = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19638
19666
|
() => visibleCols.map((col) => _nullishCoalesce(displayActualColWidths[col], () => ( displayDefaultColWidth))),
|
|
19639
19667
|
[displayActualColWidths, displayDefaultColWidth, visibleCols]
|
|
19640
19668
|
);
|
|
19641
|
-
const displayEffectiveRowHeights =
|
|
19669
|
+
const displayEffectiveRowHeights = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19642
19670
|
() => visibleRows.map((row) => _nullishCoalesce(displayActualRowHeights[row], () => ( displayDefaultRowHeight))),
|
|
19643
19671
|
[displayActualRowHeights, displayDefaultRowHeight, visibleRows]
|
|
19644
19672
|
);
|
|
19645
|
-
const rowIndexByActual =
|
|
19646
|
-
const colIndexByActual =
|
|
19647
|
-
const visibleRowsRef =
|
|
19648
|
-
const visibleColsRef =
|
|
19649
|
-
const effectiveRowHeightsRef =
|
|
19650
|
-
const effectiveColWidthsRef =
|
|
19651
|
-
const rowPrefixSums =
|
|
19652
|
-
const colPrefixSums =
|
|
19653
|
-
const actualRowPrefixSums =
|
|
19654
|
-
const actualColPrefixSums =
|
|
19655
|
-
const stickyTopByRow =
|
|
19673
|
+
const rowIndexByActual = _chunkAZWBTFJIcjs.T.call(void 0, () => new Map(visibleRows.map((row, index) => [row, index])), [visibleRows]);
|
|
19674
|
+
const colIndexByActual = _chunkAZWBTFJIcjs.T.call(void 0, () => new Map(visibleCols.map((col, index) => [col, index])), [visibleCols]);
|
|
19675
|
+
const visibleRowsRef = _chunkAZWBTFJIcjs.A.call(void 0, visibleRows);
|
|
19676
|
+
const visibleColsRef = _chunkAZWBTFJIcjs.A.call(void 0, visibleCols);
|
|
19677
|
+
const effectiveRowHeightsRef = _chunkAZWBTFJIcjs.A.call(void 0, displayEffectiveRowHeights);
|
|
19678
|
+
const effectiveColWidthsRef = _chunkAZWBTFJIcjs.A.call(void 0, displayEffectiveColWidths);
|
|
19679
|
+
const rowPrefixSums = _chunkAZWBTFJIcjs.T.call(void 0, () => buildPrefixSums(displayEffectiveRowHeights), [displayEffectiveRowHeights]);
|
|
19680
|
+
const colPrefixSums = _chunkAZWBTFJIcjs.T.call(void 0, () => buildPrefixSums(displayEffectiveColWidths), [displayEffectiveColWidths]);
|
|
19681
|
+
const actualRowPrefixSums = _chunkAZWBTFJIcjs.T.call(void 0, () => buildPrefixSums(displayActualRowHeights), [displayActualRowHeights]);
|
|
19682
|
+
const actualColPrefixSums = _chunkAZWBTFJIcjs.T.call(void 0, () => buildPrefixSums(displayActualColWidths), [displayActualColWidths]);
|
|
19683
|
+
const stickyTopByRow = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19656
19684
|
() => buildStickyOffsets(frozenRows, displayActualRowHeights, displayHeaderHeight),
|
|
19657
19685
|
[displayActualRowHeights, displayHeaderHeight, frozenRows]
|
|
19658
19686
|
);
|
|
19659
|
-
const stickyLeftByCol =
|
|
19687
|
+
const stickyLeftByCol = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19660
19688
|
() => buildStickyOffsets(frozenCols, displayActualColWidths, displayRowHeaderWidth),
|
|
19661
19689
|
[displayActualColWidths, displayRowHeaderWidth, frozenCols]
|
|
19662
19690
|
);
|
|
19663
|
-
const frozenPaneBottom =
|
|
19691
|
+
const frozenPaneBottom = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19664
19692
|
() => frozenRows.length > 0 ? frozenRows.reduce(
|
|
19665
19693
|
(max, row) => Math.max(max, (_nullishCoalesce(stickyTopByRow.get(row), () => ( displayHeaderHeight))) + (_nullishCoalesce(displayActualRowHeights[row], () => ( displayDefaultRowHeight)))),
|
|
19666
19694
|
displayHeaderHeight
|
|
19667
19695
|
) : displayHeaderHeight,
|
|
19668
19696
|
[displayActualRowHeights, displayDefaultRowHeight, displayHeaderHeight, frozenRows, stickyTopByRow]
|
|
19669
19697
|
);
|
|
19670
|
-
const frozenPaneRight =
|
|
19698
|
+
const frozenPaneRight = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19671
19699
|
() => frozenCols.length > 0 ? frozenCols.reduce(
|
|
19672
19700
|
(max, col) => Math.max(max, (_nullishCoalesce(stickyLeftByCol.get(col), () => ( displayRowHeaderWidth))) + (_nullishCoalesce(displayActualColWidths[col], () => ( displayDefaultColWidth)))),
|
|
19673
19701
|
displayRowHeaderWidth
|
|
@@ -19680,20 +19708,20 @@ function XlsxGrid({
|
|
|
19680
19708
|
frozenPaneBottom,
|
|
19681
19709
|
frozenPaneRight
|
|
19682
19710
|
};
|
|
19683
|
-
const rowPrefixSumsRef =
|
|
19684
|
-
const colPrefixSumsRef =
|
|
19711
|
+
const rowPrefixSumsRef = _chunkAZWBTFJIcjs.A.call(void 0, rowPrefixSums);
|
|
19712
|
+
const colPrefixSumsRef = _chunkAZWBTFJIcjs.A.call(void 0, colPrefixSums);
|
|
19685
19713
|
const firstVisibleRow = visibleRows[0];
|
|
19686
19714
|
const lastVisibleRow = visibleRows[visibleRows.length - 1];
|
|
19687
19715
|
const firstVisibleCol = visibleCols[0];
|
|
19688
19716
|
const lastVisibleCol = visibleCols[visibleCols.length - 1];
|
|
19689
19717
|
const displayedSelection = _nullishCoalesce(fillPreviewRange, () => ( normalizedSelection));
|
|
19690
|
-
const toLogicalRect =
|
|
19718
|
+
const toLogicalRect = _chunkAZWBTFJIcjs.q.call(void 0, (rect) => ({
|
|
19691
19719
|
height: rect.height / zoomFactor,
|
|
19692
19720
|
left: rect.left / zoomFactor,
|
|
19693
19721
|
top: rect.top / zoomFactor,
|
|
19694
19722
|
width: rect.width / zoomFactor
|
|
19695
19723
|
}), [zoomFactor]);
|
|
19696
|
-
const drawingExtents =
|
|
19724
|
+
const drawingExtents = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
19697
19725
|
const imageExtents = images.reduce(
|
|
19698
19726
|
(current, image) => {
|
|
19699
19727
|
const extents = resolveImageAnchorExtents(image);
|
|
@@ -19732,17 +19760,17 @@ function XlsxGrid({
|
|
|
19732
19760
|
const shouldVirtualizeRows = visibleRows.length > 0;
|
|
19733
19761
|
const shouldVirtualizeCols = visibleCols.length > 0 && frozenCols.length === 0;
|
|
19734
19762
|
const shouldUseDomVirtualizer = !experimentalCanvas;
|
|
19735
|
-
const getScrollElement =
|
|
19736
|
-
const estimateRowSize =
|
|
19763
|
+
const getScrollElement = _chunkAZWBTFJIcjs.q.call(void 0, () => scrollRef.current, []);
|
|
19764
|
+
const estimateRowSize = _chunkAZWBTFJIcjs.q.call(void 0,
|
|
19737
19765
|
(index) => _nullishCoalesce(displayEffectiveRowHeights[index], () => ( displayDefaultRowHeight)),
|
|
19738
19766
|
[displayDefaultRowHeight, displayEffectiveRowHeights]
|
|
19739
19767
|
);
|
|
19740
|
-
const getRowItemKey =
|
|
19741
|
-
const estimateColSize =
|
|
19768
|
+
const getRowItemKey = _chunkAZWBTFJIcjs.q.call(void 0, (index) => _nullishCoalesce(visibleRows[index], () => ( index)), [visibleRows]);
|
|
19769
|
+
const estimateColSize = _chunkAZWBTFJIcjs.q.call(void 0,
|
|
19742
19770
|
(index) => _nullishCoalesce(displayEffectiveColWidths[index], () => ( displayDefaultColWidth)),
|
|
19743
19771
|
[displayDefaultColWidth, displayEffectiveColWidths]
|
|
19744
19772
|
);
|
|
19745
|
-
const getColItemKey =
|
|
19773
|
+
const getColItemKey = _chunkAZWBTFJIcjs.q.call(void 0, (index) => _nullishCoalesce(visibleCols[index], () => ( index)), [visibleCols]);
|
|
19746
19774
|
const rowVirtualizer = useVirtualizer({
|
|
19747
19775
|
count: visibleRows.length,
|
|
19748
19776
|
enabled: shouldUseDomVirtualizer,
|
|
@@ -19762,15 +19790,15 @@ function XlsxGrid({
|
|
|
19762
19790
|
});
|
|
19763
19791
|
const currentRowVirtualItems = shouldUseDomVirtualizer ? rowVirtualizer.getVirtualItems() : EMPTY_VIRTUAL_ITEMS;
|
|
19764
19792
|
const currentColVirtualItems = shouldUseDomVirtualizer ? colVirtualizer.getVirtualItems() : EMPTY_VIRTUAL_ITEMS;
|
|
19765
|
-
const frozenRowVirtualIndices =
|
|
19793
|
+
const frozenRowVirtualIndices = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19766
19794
|
() => frozenRows.map((row) => rowIndexByActual.get(row)).filter((index) => index !== void 0),
|
|
19767
19795
|
[frozenRows, rowIndexByActual]
|
|
19768
19796
|
);
|
|
19769
|
-
const frozenColVirtualIndices =
|
|
19797
|
+
const frozenColVirtualIndices = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19770
19798
|
() => frozenCols.map((col) => colIndexByActual.get(col)).filter((index) => index !== void 0),
|
|
19771
19799
|
[colIndexByActual, frozenCols]
|
|
19772
19800
|
);
|
|
19773
|
-
const indexedMergedRegions =
|
|
19801
|
+
const indexedMergedRegions = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19774
19802
|
() => mergedRegions.flatMap((region) => {
|
|
19775
19803
|
const startRowIndex = rowIndexByActual.get(region.start.row);
|
|
19776
19804
|
const endRowIndex = rowIndexByActual.get(region.end.row);
|
|
@@ -19788,41 +19816,41 @@ function XlsxGrid({
|
|
|
19788
19816
|
}),
|
|
19789
19817
|
[colIndexByActual, mergedRegions, rowIndexByActual]
|
|
19790
19818
|
);
|
|
19791
|
-
const domBaseRowIndices =
|
|
19819
|
+
const domBaseRowIndices = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19792
19820
|
() => Array.from(/* @__PURE__ */ new Set([
|
|
19793
19821
|
...currentRowVirtualItems.map((virtualRow) => virtualRow.index),
|
|
19794
19822
|
...frozenRowVirtualIndices
|
|
19795
19823
|
])).sort((left, right) => left - right),
|
|
19796
19824
|
[currentRowVirtualItems, frozenRowVirtualIndices]
|
|
19797
19825
|
);
|
|
19798
|
-
const domBaseColIndices =
|
|
19826
|
+
const domBaseColIndices = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19799
19827
|
() => Array.from(/* @__PURE__ */ new Set([
|
|
19800
19828
|
...shouldVirtualizeCols ? currentColVirtualItems.map((virtualCol) => virtualCol.index) : visibleCols.map((_2, index) => index),
|
|
19801
19829
|
...frozenColVirtualIndices
|
|
19802
19830
|
])).sort((left, right) => left - right),
|
|
19803
19831
|
[currentColVirtualItems, frozenColVirtualIndices, shouldVirtualizeCols, visibleCols]
|
|
19804
19832
|
);
|
|
19805
|
-
const domExpandedWindow =
|
|
19833
|
+
const domExpandedWindow = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19806
19834
|
() => expandMergeAwareWindow(domBaseRowIndices, domBaseColIndices, indexedMergedRegions),
|
|
19807
19835
|
[domBaseColIndices, domBaseRowIndices, indexedMergedRegions]
|
|
19808
19836
|
);
|
|
19809
|
-
const rowVirtualItemByIndex =
|
|
19837
|
+
const rowVirtualItemByIndex = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19810
19838
|
() => new Map(currentRowVirtualItems.map((virtualRow) => [virtualRow.index, virtualRow])),
|
|
19811
19839
|
[currentRowVirtualItems]
|
|
19812
19840
|
);
|
|
19813
|
-
const colVirtualItemByIndex =
|
|
19841
|
+
const colVirtualItemByIndex = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19814
19842
|
() => new Map(currentColVirtualItems.map((virtualCol) => [virtualCol.index, virtualCol])),
|
|
19815
19843
|
[currentColVirtualItems]
|
|
19816
19844
|
);
|
|
19817
|
-
const maxRowDisplayLimit =
|
|
19845
|
+
const maxRowDisplayLimit = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19818
19846
|
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1091 => _1091.maxUsedRow]), () => ( -1)), MIN_OPEN_GRID_ROWS, OPEN_GRID_ROW_PADDING),
|
|
19819
19847
|
[_optionalChain([activeSheet, 'optionalAccess', _1092 => _1092.maxUsedRow])]
|
|
19820
19848
|
);
|
|
19821
|
-
const maxColDisplayLimit =
|
|
19849
|
+
const maxColDisplayLimit = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
19822
19850
|
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1093 => _1093.maxUsedCol]), () => ( -1)), MIN_OPEN_GRID_COLS, OPEN_GRID_COL_PADDING),
|
|
19823
19851
|
[_optionalChain([activeSheet, 'optionalAccess', _1094 => _1094.maxUsedCol])]
|
|
19824
19852
|
);
|
|
19825
|
-
|
|
19853
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19826
19854
|
if (!isWorkerBacked) {
|
|
19827
19855
|
return;
|
|
19828
19856
|
}
|
|
@@ -19845,16 +19873,16 @@ function XlsxGrid({
|
|
|
19845
19873
|
visibleCols.length,
|
|
19846
19874
|
visibleRows.length
|
|
19847
19875
|
]);
|
|
19848
|
-
|
|
19876
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19849
19877
|
activeCellRef.current = activeCell;
|
|
19850
19878
|
}, [activeCell]);
|
|
19851
|
-
|
|
19879
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19852
19880
|
selectedChartIdRef.current = selectedChartId;
|
|
19853
19881
|
}, [selectedChartId]);
|
|
19854
|
-
|
|
19882
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19855
19883
|
selectedImageIdRef.current = selectedImageId;
|
|
19856
19884
|
}, [selectedImageId]);
|
|
19857
|
-
|
|
19885
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19858
19886
|
committedZoomScaleRef.current = zoomScale;
|
|
19859
19887
|
if (pendingLiveZoomCommitRef.current !== null && zoomScale === pendingLiveZoomCommitRef.current) {
|
|
19860
19888
|
pendingLiveZoomCommitRef.current = null;
|
|
@@ -19874,17 +19902,17 @@ function XlsxGrid({
|
|
|
19874
19902
|
gestureZoomScaleRef.current = zoomScale;
|
|
19875
19903
|
}
|
|
19876
19904
|
}, [clearLiveGestureZoom, clearLiveZoomCommitTimer, updateLiveGestureZoomState, zoomScale]);
|
|
19877
|
-
|
|
19905
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
19878
19906
|
drawingViewportStateRef.current = drawingViewport;
|
|
19879
19907
|
applyCanvasViewportCompensation();
|
|
19880
19908
|
}, [applyCanvasViewportCompensation, drawingViewport]);
|
|
19881
|
-
|
|
19909
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19882
19910
|
selectionRef.current = normalizedSelection;
|
|
19883
19911
|
}, [normalizedSelection]);
|
|
19884
|
-
|
|
19912
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19885
19913
|
editingCellRef.current = editingCell;
|
|
19886
19914
|
}, [editingCell]);
|
|
19887
|
-
|
|
19915
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
19888
19916
|
if (!editingCell) {
|
|
19889
19917
|
return;
|
|
19890
19918
|
}
|
|
@@ -19896,20 +19924,20 @@ function XlsxGrid({
|
|
|
19896
19924
|
const caret = input.value.length;
|
|
19897
19925
|
input.setSelectionRange(caret, caret);
|
|
19898
19926
|
}, [editingCell]);
|
|
19899
|
-
|
|
19927
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19900
19928
|
readOnlyRef.current = readOnly;
|
|
19901
19929
|
}, [readOnly]);
|
|
19902
|
-
|
|
19930
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
19903
19931
|
installImageInteractionListenersRef.current = installImageInteractionListeners;
|
|
19904
19932
|
installChartInteractionListenersRef.current = installChartInteractionListeners;
|
|
19905
19933
|
});
|
|
19906
|
-
|
|
19934
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19907
19935
|
chartPreviewRectRef.current = chartPreviewRect;
|
|
19908
19936
|
}, [chartPreviewRect]);
|
|
19909
|
-
|
|
19937
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19910
19938
|
imagePreviewRectRef.current = imagePreviewRect;
|
|
19911
19939
|
}, [imagePreviewRect]);
|
|
19912
|
-
|
|
19940
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => () => {
|
|
19913
19941
|
if (selectionCommitFrameRef.current !== null) {
|
|
19914
19942
|
window.cancelAnimationFrame(selectionCommitFrameRef.current);
|
|
19915
19943
|
selectionCommitFrameRef.current = null;
|
|
@@ -19936,7 +19964,7 @@ function XlsxGrid({
|
|
|
19936
19964
|
chartPreviewFrameRef.current = null;
|
|
19937
19965
|
}
|
|
19938
19966
|
}, [clearLiveZoomCommitTimer]);
|
|
19939
|
-
const scheduleImagePreviewRect =
|
|
19967
|
+
const scheduleImagePreviewRect = _chunkAZWBTFJIcjs.q.call(void 0, (preview) => {
|
|
19940
19968
|
pendingImagePreviewRef.current = preview;
|
|
19941
19969
|
if (imagePreviewFrameRef.current !== null) {
|
|
19942
19970
|
return;
|
|
@@ -19952,7 +19980,7 @@ function XlsxGrid({
|
|
|
19952
19980
|
setImagePreviewRect(nextPreview);
|
|
19953
19981
|
});
|
|
19954
19982
|
}, []);
|
|
19955
|
-
const scheduleChartPreviewRect =
|
|
19983
|
+
const scheduleChartPreviewRect = _chunkAZWBTFJIcjs.q.call(void 0, (preview) => {
|
|
19956
19984
|
pendingChartPreviewRef.current = preview;
|
|
19957
19985
|
if (chartPreviewFrameRef.current !== null) {
|
|
19958
19986
|
return;
|
|
@@ -19968,10 +19996,10 @@ function XlsxGrid({
|
|
|
19968
19996
|
setChartPreviewRect(nextPreview);
|
|
19969
19997
|
});
|
|
19970
19998
|
}, []);
|
|
19971
|
-
|
|
19999
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19972
20000
|
displayedSelectionRef.current = _nullishCoalesce(selectionPreviewRangeRef.current, () => ( displayedSelection));
|
|
19973
20001
|
}, [displayedSelection]);
|
|
19974
|
-
|
|
20002
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19975
20003
|
const previewRange = selectionPreviewRangeRef.current;
|
|
19976
20004
|
if (!previewRange || pendingSelectionDragRef.current || selectionDragRef.current || fillDragRef.current) {
|
|
19977
20005
|
return;
|
|
@@ -19986,13 +20014,13 @@ function XlsxGrid({
|
|
|
19986
20014
|
displayedSelectionRef.current = null;
|
|
19987
20015
|
}
|
|
19988
20016
|
}, [displayedSelection, normalizedSelection]);
|
|
19989
|
-
|
|
20017
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19990
20018
|
firstVisibleColRef.current = firstVisibleCol;
|
|
19991
20019
|
lastVisibleColRef.current = lastVisibleCol;
|
|
19992
20020
|
firstVisibleRowRef.current = firstVisibleRow;
|
|
19993
20021
|
lastVisibleRowRef.current = lastVisibleRow;
|
|
19994
20022
|
}, [firstVisibleCol, firstVisibleRow, lastVisibleCol, lastVisibleRow]);
|
|
19995
|
-
|
|
20023
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
19996
20024
|
visibleRowsRef.current = visibleRows;
|
|
19997
20025
|
visibleColsRef.current = visibleCols;
|
|
19998
20026
|
effectiveRowHeightsRef.current = displayEffectiveRowHeights;
|
|
@@ -20000,7 +20028,7 @@ function XlsxGrid({
|
|
|
20000
20028
|
rowPrefixSumsRef.current = rowPrefixSums;
|
|
20001
20029
|
colPrefixSumsRef.current = colPrefixSums;
|
|
20002
20030
|
}, [colPrefixSums, displayEffectiveColWidths, displayEffectiveRowHeights, rowPrefixSums, visibleCols, visibleRows]);
|
|
20003
|
-
|
|
20031
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
20004
20032
|
const scroller = scrollRef.current;
|
|
20005
20033
|
const previousZoomFactor = previousZoomFactorRef.current;
|
|
20006
20034
|
if (!scroller || previousZoomFactor === zoomFactor) {
|
|
@@ -20023,10 +20051,10 @@ function XlsxGrid({
|
|
|
20023
20051
|
}
|
|
20024
20052
|
syncDrawingViewport(scroller, { immediate: true });
|
|
20025
20053
|
}, [shouldUseDomVirtualizer, syncDrawingViewport, zoomFactor]);
|
|
20026
|
-
|
|
20054
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
20027
20055
|
syncDrawingViewport(scrollRef.current, { immediate: true });
|
|
20028
20056
|
}, [activeSheet, activeTabIndex, displayColLimit, displayRowLimit, highlightedCellRanges, syncDrawingViewport, zoomFactor]);
|
|
20029
|
-
|
|
20057
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
20030
20058
|
const scroller = scrollRef.current;
|
|
20031
20059
|
if (!scroller) {
|
|
20032
20060
|
return;
|
|
@@ -20043,7 +20071,7 @@ function XlsxGrid({
|
|
|
20043
20071
|
observer.disconnect();
|
|
20044
20072
|
};
|
|
20045
20073
|
}, [activeSheet, syncDrawingViewport]);
|
|
20046
|
-
|
|
20074
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20047
20075
|
setDisplayRowLimit(
|
|
20048
20076
|
resolveInitialDisplayExtent(
|
|
20049
20077
|
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1099 => _1099.maxUsedRow]), () => ( -1)),
|
|
@@ -20063,7 +20091,7 @@ function XlsxGrid({
|
|
|
20063
20091
|
)
|
|
20064
20092
|
);
|
|
20065
20093
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1101 => _1101.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1102 => _1102.maxUsedRow]), activeSheetIndex, isWorkerBacked]);
|
|
20066
|
-
|
|
20094
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20067
20095
|
const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1103 => _1103.end, 'access', _1104 => _1104.row]), () => ( -1));
|
|
20068
20096
|
const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1105 => _1105.end, 'access', _1106 => _1106.col]), () => ( -1));
|
|
20069
20097
|
const nextRowLimit = Math.max(
|
|
@@ -20101,7 +20129,7 @@ function XlsxGrid({
|
|
|
20101
20129
|
_optionalChain([normalizedSelection, 'optionalAccess', _1113 => _1113.end, 'access', _1114 => _1114.col]),
|
|
20102
20130
|
_optionalChain([normalizedSelection, 'optionalAccess', _1115 => _1115.end, 'access', _1116 => _1116.row])
|
|
20103
20131
|
]);
|
|
20104
|
-
|
|
20132
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20105
20133
|
const initialScrollKey = [
|
|
20106
20134
|
displayFileName,
|
|
20107
20135
|
activeSheetIndex,
|
|
@@ -20153,20 +20181,20 @@ function XlsxGrid({
|
|
|
20153
20181
|
visibleCols,
|
|
20154
20182
|
visibleRows
|
|
20155
20183
|
]);
|
|
20156
|
-
|
|
20184
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20157
20185
|
clearLiveGestureZoom();
|
|
20158
20186
|
}, [activeTabIndex, clearLiveGestureZoom]);
|
|
20159
|
-
|
|
20187
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20160
20188
|
setOpenTableMenu(null);
|
|
20161
20189
|
}, [activeSheet, activeSheetIndex]);
|
|
20162
|
-
|
|
20190
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20163
20191
|
if (!pendingNavigation || pendingNavigation.sheetIndex !== activeSheetIndex) {
|
|
20164
20192
|
return;
|
|
20165
20193
|
}
|
|
20166
20194
|
selectCell(pendingNavigation.cell);
|
|
20167
20195
|
setPendingNavigation(null);
|
|
20168
20196
|
}, [activeSheetIndex, pendingNavigation, selectCell]);
|
|
20169
|
-
|
|
20197
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20170
20198
|
if (shouldUseDomVirtualizer && shouldVirtualizeRows) {
|
|
20171
20199
|
rowVirtualizer.measure();
|
|
20172
20200
|
}
|
|
@@ -20182,7 +20210,7 @@ function XlsxGrid({
|
|
|
20182
20210
|
visibleCols.length,
|
|
20183
20211
|
visibleRows.length
|
|
20184
20212
|
]);
|
|
20185
|
-
const handleScrollerScroll =
|
|
20213
|
+
const handleScrollerScroll = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
20186
20214
|
const currentScroller = event.currentTarget;
|
|
20187
20215
|
cachedScrollerRectRef.current = null;
|
|
20188
20216
|
gestureScrollerRectRef.current = null;
|
|
@@ -20200,7 +20228,7 @@ function XlsxGrid({
|
|
|
20200
20228
|
);
|
|
20201
20229
|
}
|
|
20202
20230
|
}, [maxColDisplayLimit, maxRowDisplayLimit, readOnly, syncDrawingViewport]);
|
|
20203
|
-
|
|
20231
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20204
20232
|
const scroller = scrollRef.current;
|
|
20205
20233
|
if (!scroller || !enableGestureZoom) {
|
|
20206
20234
|
clearLiveGestureZoom();
|
|
@@ -20371,7 +20399,7 @@ function XlsxGrid({
|
|
|
20371
20399
|
updateLiveGestureZoomState,
|
|
20372
20400
|
updateLiveGestureZoomTarget
|
|
20373
20401
|
]);
|
|
20374
|
-
|
|
20402
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20375
20403
|
if (!openTableMenu) {
|
|
20376
20404
|
return;
|
|
20377
20405
|
}
|
|
@@ -20393,7 +20421,7 @@ function XlsxGrid({
|
|
|
20393
20421
|
window.removeEventListener("keydown", handleKeyDown);
|
|
20394
20422
|
};
|
|
20395
20423
|
}, [openTableMenu]);
|
|
20396
|
-
const resolvePointerCellFromGeometry =
|
|
20424
|
+
const resolvePointerCellFromGeometry = _chunkAZWBTFJIcjs.q.call(void 0, (clientX, clientY) => {
|
|
20397
20425
|
const wrapper = wrapperRef.current;
|
|
20398
20426
|
const scroller = scrollRef.current;
|
|
20399
20427
|
const visibleRowsCurrent = visibleRowsRef.current;
|
|
@@ -20437,7 +20465,7 @@ function XlsxGrid({
|
|
|
20437
20465
|
}
|
|
20438
20466
|
return geometryCell;
|
|
20439
20467
|
}, [displayHeaderHeight, displayRowHeaderWidth, frozenPaneBottom, frozenPaneRight]);
|
|
20440
|
-
const resolvePointerCellFromHitTest =
|
|
20468
|
+
const resolvePointerCellFromHitTest = _chunkAZWBTFJIcjs.q.call(void 0, (clientX, clientY) => {
|
|
20441
20469
|
const elementsAtPoint = typeof document.elementsFromPoint === "function" ? document.elementsFromPoint(clientX, clientY) : [document.elementFromPoint(clientX, clientY)].filter((element) => Boolean(element));
|
|
20442
20470
|
for (const element of elementsAtPoint) {
|
|
20443
20471
|
if (!(element instanceof HTMLElement)) {
|
|
@@ -20464,7 +20492,7 @@ function XlsxGrid({
|
|
|
20464
20492
|
}
|
|
20465
20493
|
return null;
|
|
20466
20494
|
}, []);
|
|
20467
|
-
const resolvePointerCellFromClient =
|
|
20495
|
+
const resolvePointerCellFromClient = _chunkAZWBTFJIcjs.q.call(void 0, (clientX, clientY) => {
|
|
20468
20496
|
const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
|
|
20469
20497
|
if (geometryCell) {
|
|
20470
20498
|
return resolveMergeAnchorCell(geometryCell);
|
|
@@ -20472,7 +20500,7 @@ function XlsxGrid({
|
|
|
20472
20500
|
const resolvedCell = resolvePointerCellFromHitTest(clientX, clientY);
|
|
20473
20501
|
return resolvedCell ? resolveMergeAnchorCell(resolvedCell) : null;
|
|
20474
20502
|
}, [resolveMergeAnchorCell, resolvePointerCellFromGeometry, resolvePointerCellFromHitTest]);
|
|
20475
|
-
const resolveDraggedSelectionCell =
|
|
20503
|
+
const resolveDraggedSelectionCell = _chunkAZWBTFJIcjs.q.call(void 0, (dragState, clientX, clientY) => {
|
|
20476
20504
|
const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
|
|
20477
20505
|
const hitCell = resolvePointerCellFromHitTest(clientX, clientY);
|
|
20478
20506
|
const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1134 => _1134.row]), () => ( (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0)));
|
|
@@ -20488,7 +20516,7 @@ function XlsxGrid({
|
|
|
20488
20516
|
}
|
|
20489
20517
|
return { row: actualRow, col: actualCol };
|
|
20490
20518
|
}, [resolvePointerCellFromGeometry, resolvePointerCellFromHitTest, rowIndexByActual]);
|
|
20491
|
-
const resolveCellPointerOrigin =
|
|
20519
|
+
const resolveCellPointerOrigin = _chunkAZWBTFJIcjs.q.call(void 0, (cell, rect, clientX, clientY) => {
|
|
20492
20520
|
const rowIndex = rowIndexByActual.get(cell.row);
|
|
20493
20521
|
const colIndex = colIndexByActual.get(cell.col);
|
|
20494
20522
|
if (rowIndex === void 0 || colIndex === void 0) {
|
|
@@ -20505,7 +20533,7 @@ function XlsxGrid({
|
|
|
20505
20533
|
originContentY: (_nullishCoalesce(rowPrefixSums[rowIndex], () => ( 0))) + clampContentOffset((clientY - rect.top) / contentScaleY, displayHeight)
|
|
20506
20534
|
};
|
|
20507
20535
|
}, [colIndexByActual, colPrefixSums, displayDefaultColWidth, displayDefaultRowHeight, displayEffectiveColWidths, displayEffectiveRowHeights, rowIndexByActual, rowPrefixSums]);
|
|
20508
|
-
const resolveCellPointerOriginFromClient =
|
|
20536
|
+
const resolveCellPointerOriginFromClient = _chunkAZWBTFJIcjs.q.call(void 0, (cell, clientX, clientY) => {
|
|
20509
20537
|
const scroller = scrollRef.current;
|
|
20510
20538
|
const rowIndex = rowIndexByActual.get(cell.row);
|
|
20511
20539
|
const colIndex = colIndexByActual.get(cell.col);
|
|
@@ -20539,7 +20567,7 @@ function XlsxGrid({
|
|
|
20539
20567
|
rowIndexByActual,
|
|
20540
20568
|
rowPrefixSums
|
|
20541
20569
|
]);
|
|
20542
|
-
const resolveRowPointerOrigin =
|
|
20570
|
+
const resolveRowPointerOrigin = _chunkAZWBTFJIcjs.q.call(void 0, (actualRow, rect, clientY) => {
|
|
20543
20571
|
const rowIndex = rowIndexByActual.get(actualRow);
|
|
20544
20572
|
if (rowIndex === void 0) {
|
|
20545
20573
|
return null;
|
|
@@ -20553,7 +20581,7 @@ function XlsxGrid({
|
|
|
20553
20581
|
originContentY: (_nullishCoalesce(rowPrefixSums[rowIndex], () => ( 0))) + clampContentOffset((clientY - rect.top) / contentScaleY, displayHeight)
|
|
20554
20582
|
};
|
|
20555
20583
|
}, [colPrefixSums, displayDefaultRowHeight, displayEffectiveRowHeights, rowIndexByActual, rowPrefixSums]);
|
|
20556
|
-
const resolveColumnPointerOrigin =
|
|
20584
|
+
const resolveColumnPointerOrigin = _chunkAZWBTFJIcjs.q.call(void 0, (actualCol, rect, clientX) => {
|
|
20557
20585
|
const colIndex = colIndexByActual.get(actualCol);
|
|
20558
20586
|
if (colIndex === void 0) {
|
|
20559
20587
|
return null;
|
|
@@ -20567,7 +20595,7 @@ function XlsxGrid({
|
|
|
20567
20595
|
originContentY: _nullishCoalesce(rowPrefixSums[0], () => ( 0))
|
|
20568
20596
|
};
|
|
20569
20597
|
}, [colIndexByActual, colPrefixSums, displayDefaultColWidth, displayEffectiveColWidths, rowPrefixSums]);
|
|
20570
|
-
const applyColumnPreview =
|
|
20598
|
+
const applyColumnPreview = _chunkAZWBTFJIcjs.q.call(void 0, (actualCol, widthPx) => {
|
|
20571
20599
|
const colElement = colElementRefs.current.get(actualCol);
|
|
20572
20600
|
if (colElement) {
|
|
20573
20601
|
colElement.style.width = widthPx === null ? "" : `${widthPx}px`;
|
|
@@ -20581,14 +20609,14 @@ function XlsxGrid({
|
|
|
20581
20609
|
tableRef.current.style.width = `${baseTotalWidth + widthDelta}px`;
|
|
20582
20610
|
}
|
|
20583
20611
|
}, [displayDefaultColWidth, displayEffectiveColWidths, displayRowHeaderWidth, visibleCols]);
|
|
20584
|
-
const applyRowPreview =
|
|
20612
|
+
const applyRowPreview = _chunkAZWBTFJIcjs.q.call(void 0, (actualRow, heightPx) => {
|
|
20585
20613
|
const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access', _1137 => _1137.current, 'optionalAccess', _1138 => _1138.querySelector, 'call', _1139 => _1139(`tr[data-xlsx-row="${actualRow}"]`)]))), () => ( null));
|
|
20586
20614
|
if (rowElement) {
|
|
20587
20615
|
rowElementRefs.current.set(actualRow, rowElement);
|
|
20588
20616
|
rowElement.style.height = heightPx === null ? "" : `${heightPx}px`;
|
|
20589
20617
|
}
|
|
20590
20618
|
}, []);
|
|
20591
|
-
|
|
20619
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20592
20620
|
_optionalChain([pendingSelectionDragCleanupRef, 'access', _1140 => _1140.current, 'optionalCall', _1141 => _1141()]);
|
|
20593
20621
|
_optionalChain([selectionDragCleanupRef, 'access', _1142 => _1142.current, 'optionalCall', _1143 => _1143()]);
|
|
20594
20622
|
_optionalChain([fillDragCleanupRef, 'access', _1144 => _1144.current, 'optionalCall', _1145 => _1145()]);
|
|
@@ -20619,19 +20647,19 @@ function XlsxGrid({
|
|
|
20619
20647
|
selectionPreviewRangeRef.current = null;
|
|
20620
20648
|
setInteractionMode("idle");
|
|
20621
20649
|
}, [activeSheetIndex, clearGlobalCursor, revision]);
|
|
20622
|
-
const focusGridElement =
|
|
20650
|
+
const focusGridElement = _chunkAZWBTFJIcjs.q.call(void 0, (element, options) => {
|
|
20623
20651
|
if (document.activeElement !== element) {
|
|
20624
20652
|
element.focus(_nullishCoalesce(options, () => ( { preventScroll: true })));
|
|
20625
20653
|
}
|
|
20626
20654
|
}, []);
|
|
20627
|
-
const focusGrid =
|
|
20655
|
+
const focusGrid = _chunkAZWBTFJIcjs.q.call(void 0, (options) => {
|
|
20628
20656
|
const scroller = scrollRef.current;
|
|
20629
20657
|
if (scroller) {
|
|
20630
20658
|
gridKeyboardActiveRef.current = true;
|
|
20631
20659
|
focusGridElement(scroller, options);
|
|
20632
20660
|
}
|
|
20633
20661
|
}, [focusGridElement]);
|
|
20634
|
-
|
|
20662
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20635
20663
|
const handleDocumentPointerDown = (event) => {
|
|
20636
20664
|
const scroller = scrollRef.current;
|
|
20637
20665
|
if (!scroller || !(event.target instanceof Node) || !scroller.contains(event.target)) {
|
|
@@ -20663,7 +20691,7 @@ function XlsxGrid({
|
|
|
20663
20691
|
document.removeEventListener("keydown", handleDocumentKeyDown);
|
|
20664
20692
|
};
|
|
20665
20693
|
}, [focusGridElement]);
|
|
20666
|
-
const openHyperlink =
|
|
20694
|
+
const openHyperlink = _chunkAZWBTFJIcjs.q.call(void 0, (target, location) => {
|
|
20667
20695
|
const internalTarget = parseInternalSheetLink(_nullishCoalesce(location, () => ( target)));
|
|
20668
20696
|
if (internalTarget) {
|
|
20669
20697
|
const targetSheetIndex = sheets.findIndex((sheet) => sheet.name === internalTarget.sheetName);
|
|
@@ -20685,7 +20713,7 @@ function XlsxGrid({
|
|
|
20685
20713
|
window.open(externalTarget, "_blank", "noopener,noreferrer");
|
|
20686
20714
|
}
|
|
20687
20715
|
}, [activeSheetIndex, selectCell, setActiveSheetIndex, sheets]);
|
|
20688
|
-
const startEditing =
|
|
20716
|
+
const startEditing = _chunkAZWBTFJIcjs.q.call(void 0,
|
|
20689
20717
|
(cell, initialValue) => {
|
|
20690
20718
|
if (readOnly) {
|
|
20691
20719
|
return;
|
|
@@ -20696,7 +20724,7 @@ function XlsxGrid({
|
|
|
20696
20724
|
},
|
|
20697
20725
|
[getControllerCellDisplayValue, readOnly, selectCell]
|
|
20698
20726
|
);
|
|
20699
|
-
const commitEditing =
|
|
20727
|
+
const commitEditing = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
20700
20728
|
if (!editingCell) {
|
|
20701
20729
|
return;
|
|
20702
20730
|
}
|
|
@@ -20713,19 +20741,19 @@ function XlsxGrid({
|
|
|
20713
20741
|
setEditingValue("");
|
|
20714
20742
|
focusGrid();
|
|
20715
20743
|
}, [editingCell, editingValue, focusGrid, readOnly, setCellValue]);
|
|
20716
|
-
const cancelEditing =
|
|
20744
|
+
const cancelEditing = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
20717
20745
|
editingCellRef.current = null;
|
|
20718
20746
|
setEditingCell(null);
|
|
20719
20747
|
setEditingValue("");
|
|
20720
20748
|
focusGrid();
|
|
20721
20749
|
}, [focusGrid]);
|
|
20722
|
-
const handleEditingBlur =
|
|
20750
|
+
const handleEditingBlur = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
20723
20751
|
if (!editingCellRef.current) {
|
|
20724
20752
|
return;
|
|
20725
20753
|
}
|
|
20726
20754
|
commitEditing();
|
|
20727
20755
|
}, [commitEditing]);
|
|
20728
|
-
const handleEditingNavigate =
|
|
20756
|
+
const handleEditingNavigate = _chunkAZWBTFJIcjs.q.call(void 0, (key, value) => {
|
|
20729
20757
|
const cell = editingCellRef.current;
|
|
20730
20758
|
if (!cell) {
|
|
20731
20759
|
return;
|
|
@@ -20769,13 +20797,13 @@ function XlsxGrid({
|
|
|
20769
20797
|
moveSelection(nextRowIndex, nextColIndex, false);
|
|
20770
20798
|
focusGrid();
|
|
20771
20799
|
}, [colIndexByActual, focusGrid, rowIndexByActual, setCellValue, visibleCols, visibleRows]);
|
|
20772
|
-
|
|
20800
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20773
20801
|
commitEditingRef.current = commitEditing;
|
|
20774
20802
|
}, [commitEditing]);
|
|
20775
|
-
const [, startBatchTransition] =
|
|
20776
|
-
const [, startSelectionTransition] =
|
|
20777
|
-
const [asyncViewportRowBatch, setAsyncViewportRowBatch] =
|
|
20778
|
-
const viewportRequest =
|
|
20803
|
+
const [, startBatchTransition] = _chunkAZWBTFJIcjs.k2.call(void 0, );
|
|
20804
|
+
const [, startSelectionTransition] = _chunkAZWBTFJIcjs.k2.call(void 0, );
|
|
20805
|
+
const [asyncViewportRowBatch, setAsyncViewportRowBatch] = _chunkAZWBTFJIcjs.d.call(void 0, null);
|
|
20806
|
+
const viewportRequest = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
20779
20807
|
const rowIndices = experimentalCanvas ? (() => {
|
|
20780
20808
|
if (visibleRows.length === 0 || drawingViewport.height <= 0) {
|
|
20781
20809
|
return [];
|
|
@@ -20817,7 +20845,7 @@ function XlsxGrid({
|
|
|
20817
20845
|
rowPrefixSums,
|
|
20818
20846
|
visibleRows
|
|
20819
20847
|
]);
|
|
20820
|
-
const syncViewportRowBatch =
|
|
20848
|
+
const syncViewportRowBatch = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
20821
20849
|
if (!shouldVirtualizeRows || !worksheet || getRowsBatchAsync || !viewportRequest) {
|
|
20822
20850
|
return null;
|
|
20823
20851
|
}
|
|
@@ -20839,7 +20867,7 @@ function XlsxGrid({
|
|
|
20839
20867
|
return null;
|
|
20840
20868
|
}
|
|
20841
20869
|
}, [activeSheet, getRowsBatchAsync, shouldVirtualizeRows, viewportRequest, worksheet, locale]);
|
|
20842
|
-
|
|
20870
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20843
20871
|
if (!shouldVirtualizeRows || !getRowsBatchAsync || !activeSheet || !viewportRequest) {
|
|
20844
20872
|
setAsyncViewportRowBatch(null);
|
|
20845
20873
|
return;
|
|
@@ -20878,25 +20906,25 @@ function XlsxGrid({
|
|
|
20878
20906
|
};
|
|
20879
20907
|
}, [activeSheet, asyncViewportRowBatch, getRowsBatchAsync, shouldVirtualizeRows, startBatchTransition, viewportRequest]);
|
|
20880
20908
|
const viewportRowBatch = getRowsBatchAsync ? asyncViewportRowBatch : syncViewportRowBatch;
|
|
20881
|
-
|
|
20909
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
20882
20910
|
setAsyncViewportRowBatch(null);
|
|
20883
20911
|
}, [activeSheetIndex, revision, locale]);
|
|
20884
|
-
const sparklinesByCell =
|
|
20912
|
+
const sparklinesByCell = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
20885
20913
|
const map = /* @__PURE__ */ new Map();
|
|
20886
20914
|
for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1152 => _1152.sparklines]), () => ( []))) {
|
|
20887
20915
|
map.set(`${sparkline.target.row}:${sparkline.target.col}`, sparkline);
|
|
20888
20916
|
}
|
|
20889
20917
|
return map;
|
|
20890
20918
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1153 => _1153.sparklines])]);
|
|
20891
|
-
const chartRangeHighlights =
|
|
20919
|
+
const chartRangeHighlights = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
20892
20920
|
() => collectChartRangeHighlights(selectedChart, selectedChartElement, sheets, workbook, paletteIsDark(palette)),
|
|
20893
20921
|
[palette, selectedChart, selectedChartElement, sheets, workbook]
|
|
20894
20922
|
);
|
|
20895
|
-
const activeSheetChartHighlights =
|
|
20923
|
+
const activeSheetChartHighlights = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
20896
20924
|
() => activeSheet ? chartRangeHighlights.filter((highlight) => highlight.workbookSheetIndex === activeSheet.workbookSheetIndex) : [],
|
|
20897
20925
|
[activeSheet, chartRangeHighlights]
|
|
20898
20926
|
);
|
|
20899
|
-
const cellRenderCacheInvalidationKey =
|
|
20927
|
+
const cellRenderCacheInvalidationKey = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
20900
20928
|
() => [
|
|
20901
20929
|
activeSheetChartHighlights,
|
|
20902
20930
|
activeSheetIndex,
|
|
@@ -20928,14 +20956,14 @@ function XlsxGrid({
|
|
|
20928
20956
|
zoomFactor
|
|
20929
20957
|
]
|
|
20930
20958
|
);
|
|
20931
|
-
const cellRenderCacheInvalidationRef =
|
|
20959
|
+
const cellRenderCacheInvalidationRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
20932
20960
|
if (cellRenderCacheInvalidationRef.current !== cellRenderCacheInvalidationKey) {
|
|
20933
20961
|
cellRenderCacheRef.current.clear();
|
|
20934
20962
|
cellBaseRawStyleCacheRef.current.clear();
|
|
20935
20963
|
mergedBorderOverlayCacheRef.current.clear();
|
|
20936
20964
|
cellRenderCacheInvalidationRef.current = cellRenderCacheInvalidationKey;
|
|
20937
20965
|
}
|
|
20938
|
-
const getCellData =
|
|
20966
|
+
const getCellData = _chunkAZWBTFJIcjs.q.call(void 0, (row, col) => {
|
|
20939
20967
|
const cacheKey = `${row}:${col}`;
|
|
20940
20968
|
const cached = cellRenderCacheRef.current.get(cacheKey);
|
|
20941
20969
|
if (cached) {
|
|
@@ -21224,10 +21252,10 @@ function XlsxGrid({
|
|
|
21224
21252
|
worksheet,
|
|
21225
21253
|
zoomFactor
|
|
21226
21254
|
]);
|
|
21227
|
-
|
|
21255
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
21228
21256
|
conditionalFormatMetricsCacheRef.current.clear();
|
|
21229
21257
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1187 => _1187.conditionalFormatRules]), _optionalChain([activeSheet, 'optionalAccess', _1188 => _1188.workbookSheetIndex]), revision]);
|
|
21230
|
-
const selectionOverlay =
|
|
21258
|
+
const selectionOverlay = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21231
21259
|
if (!displayedSelection) {
|
|
21232
21260
|
return null;
|
|
21233
21261
|
}
|
|
@@ -21247,7 +21275,7 @@ function XlsxGrid({
|
|
|
21247
21275
|
};
|
|
21248
21276
|
}, [colIndexByActual, colPrefixSums, displayHeaderHeight, displayRowHeaderWidth, displayedSelection, rowIndexByActual, rowPrefixSums]);
|
|
21249
21277
|
const resolvedSelectionOverlay = selectionOverlay;
|
|
21250
|
-
const rangeHighlightRects =
|
|
21278
|
+
const rangeHighlightRects = _chunkAZWBTFJIcjs.T.call(void 0, () => highlightedCellRanges.map(({ highlight, index, range }) => {
|
|
21251
21279
|
const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
|
|
21252
21280
|
const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
|
|
21253
21281
|
return {
|
|
@@ -21262,7 +21290,7 @@ function XlsxGrid({
|
|
|
21262
21290
|
} : null
|
|
21263
21291
|
};
|
|
21264
21292
|
}), [colPrefixSums, displayHeaderHeight, displayRowHeaderWidth, highlightedCellRanges, rowPrefixSums, visibleCols, visibleRows]);
|
|
21265
|
-
|
|
21293
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
21266
21294
|
let requiredRows = 0;
|
|
21267
21295
|
let requiredCols = 0;
|
|
21268
21296
|
for (const { highlight, range } of highlightedCellRanges) {
|
|
@@ -21276,7 +21304,7 @@ function XlsxGrid({
|
|
|
21276
21304
|
setDisplayRowLimit((current) => Math.max(current, requiredRows));
|
|
21277
21305
|
setDisplayColLimit((current) => Math.max(current, requiredCols));
|
|
21278
21306
|
}, [_optionalChain([activeSheet, 'optionalAccess', _1189 => _1189.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1190 => _1190.maxUsedRow]), highlightedCellRanges, activeSheetIndex, isWorkerBacked]);
|
|
21279
|
-
|
|
21307
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
21280
21308
|
const scroller = scrollRef.current;
|
|
21281
21309
|
const target = rangeHighlightRects.find(({ highlight: highlight2 }) => highlight2.autoScroll);
|
|
21282
21310
|
if (!scroller || !_optionalChain([target, 'optionalAccess', _1191 => _1191.rect]) || scrolledHighlightRef.current === target.highlight || isLoading || scroller.clientWidth === 0 || scroller.clientHeight === 0 || target.highlight.kind !== "columns" && displayRowLimit <= target.range.end.row || target.highlight.kind !== "rows" && displayColLimit <= target.range.end.col) {
|
|
@@ -21292,13 +21320,13 @@ function XlsxGrid({
|
|
|
21292
21320
|
scrolledHighlightRef.current = highlight;
|
|
21293
21321
|
syncDrawingViewport(scroller, { immediate: true });
|
|
21294
21322
|
}, [displayColLimit, displayRowLimit, drawingViewport.height, drawingViewport.width, frozenPaneBottom, frozenPaneRight, isLoading, rangeHighlightRects, syncDrawingViewport]);
|
|
21295
|
-
const { fill: selectionFill, header: selectionHeaderSurface, stroke: selectionStroke } =
|
|
21323
|
+
const { fill: selectionFill, header: selectionHeaderSurface, stroke: selectionStroke } = _chunkAZWBTFJIcjs.T.call(void 0, () => resolveSelectionColors({
|
|
21296
21324
|
palette,
|
|
21297
21325
|
selectionColor,
|
|
21298
21326
|
selectionFillColor,
|
|
21299
21327
|
selectionHeaderColor
|
|
21300
21328
|
}), [palette, selectionColor, selectionFillColor, selectionHeaderColor]);
|
|
21301
|
-
const virtualCols =
|
|
21329
|
+
const virtualCols = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21302
21330
|
() => domExpandedWindow.colIndices.map((index) => {
|
|
21303
21331
|
const virtualCol = colVirtualItemByIndex.get(index);
|
|
21304
21332
|
return {
|
|
@@ -21311,7 +21339,7 @@ function XlsxGrid({
|
|
|
21311
21339
|
}),
|
|
21312
21340
|
[colPrefixSums, colVirtualItemByIndex, displayDefaultColWidth, displayEffectiveColWidths, domExpandedWindow.colIndices, visibleCols]
|
|
21313
21341
|
);
|
|
21314
|
-
const renderedCols =
|
|
21342
|
+
const renderedCols = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21315
21343
|
() => {
|
|
21316
21344
|
const columns = [];
|
|
21317
21345
|
virtualCols.forEach((virtualCol) => {
|
|
@@ -21330,7 +21358,7 @@ function XlsxGrid({
|
|
|
21330
21358
|
},
|
|
21331
21359
|
[virtualCols, visibleCols]
|
|
21332
21360
|
);
|
|
21333
|
-
const canvasBaseRowIndices =
|
|
21361
|
+
const canvasBaseRowIndices = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21334
21362
|
if (visibleRows.length === 0 || drawingViewport.height <= 0) {
|
|
21335
21363
|
return [];
|
|
21336
21364
|
}
|
|
@@ -21354,7 +21382,7 @@ function XlsxGrid({
|
|
|
21354
21382
|
rowPrefixSums,
|
|
21355
21383
|
visibleRows.length
|
|
21356
21384
|
]);
|
|
21357
|
-
const canvasBaseColIndices =
|
|
21385
|
+
const canvasBaseColIndices = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21358
21386
|
if (visibleCols.length === 0 || drawingViewport.width <= 0) {
|
|
21359
21387
|
return [];
|
|
21360
21388
|
}
|
|
@@ -21378,11 +21406,11 @@ function XlsxGrid({
|
|
|
21378
21406
|
frozenColVirtualIndices,
|
|
21379
21407
|
visibleCols.length
|
|
21380
21408
|
]);
|
|
21381
|
-
const canvasExpandedWindow =
|
|
21409
|
+
const canvasExpandedWindow = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21382
21410
|
() => expandMergeAwareWindow(canvasBaseRowIndices, canvasBaseColIndices, indexedMergedRegions),
|
|
21383
21411
|
[canvasBaseColIndices, canvasBaseRowIndices, indexedMergedRegions]
|
|
21384
21412
|
);
|
|
21385
|
-
const canvasVisibleRowItems =
|
|
21413
|
+
const canvasVisibleRowItems = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21386
21414
|
() => canvasExpandedWindow.rowIndices.map((index) => ({
|
|
21387
21415
|
actualRow: _nullishCoalesce(visibleRows[index], () => ( index)),
|
|
21388
21416
|
index,
|
|
@@ -21391,7 +21419,7 @@ function XlsxGrid({
|
|
|
21391
21419
|
})),
|
|
21392
21420
|
[canvasExpandedWindow.rowIndices, displayDefaultRowHeight, displayEffectiveRowHeights, rowPrefixSums, visibleRows]
|
|
21393
21421
|
);
|
|
21394
|
-
const canvasVisibleColItems =
|
|
21422
|
+
const canvasVisibleColItems = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21395
21423
|
() => canvasExpandedWindow.colIndices.map((index) => ({
|
|
21396
21424
|
actualCol: _nullishCoalesce(visibleCols[index], () => ( index)),
|
|
21397
21425
|
index,
|
|
@@ -21400,7 +21428,7 @@ function XlsxGrid({
|
|
|
21400
21428
|
})),
|
|
21401
21429
|
[canvasExpandedWindow.colIndices, colPrefixSums, displayDefaultColWidth, displayEffectiveColWidths, visibleCols]
|
|
21402
21430
|
);
|
|
21403
|
-
const canvasPaneAxisItems =
|
|
21431
|
+
const canvasPaneAxisItems = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21404
21432
|
const frozenRowIndexSet = new Set(frozenRows.map((actualRow) => rowIndexByActual.get(actualRow)).filter((index) => index !== void 0));
|
|
21405
21433
|
const frozenColIndexSet = new Set(frozenCols.map((actualCol) => colIndexByActual.get(actualCol)).filter((index) => index !== void 0));
|
|
21406
21434
|
const frozenRowItems = canvasVisibleRowItems.filter((item) => frozenRowIndexSet.has(item.index));
|
|
@@ -21429,7 +21457,7 @@ function XlsxGrid({
|
|
|
21429
21457
|
const totalContentWidth = _nullishCoalesce(colPrefixSums[colPrefixSums.length - 1], () => ( 0));
|
|
21430
21458
|
const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access', _1195 => _1195[0], 'optionalAccess', _1196 => _1196.start]), () => ( 0)) : 0;
|
|
21431
21459
|
const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access', _1197 => _1197[virtualCols.length - 1], 'optionalAccess', _1198 => _1198.end]), () => ( 0))) : 0;
|
|
21432
|
-
const imageRects =
|
|
21460
|
+
const imageRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21433
21461
|
() => showImages ? images.map((image) => ({
|
|
21434
21462
|
image,
|
|
21435
21463
|
rect: imagePreviewRect && imagePreviewRect.id === image.id ? imagePreviewRect.rect : resolveImageRect(image, visibleRows, visibleCols, displayEffectiveRowHeights, displayEffectiveColWidths, {
|
|
@@ -21463,7 +21491,7 @@ function XlsxGrid({
|
|
|
21463
21491
|
zoomFactor
|
|
21464
21492
|
]
|
|
21465
21493
|
);
|
|
21466
|
-
const shapeRects =
|
|
21494
|
+
const shapeRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21467
21495
|
() => showImages ? shapes.map((shape) => ({
|
|
21468
21496
|
rect: resolveAnchoredRect(shape.anchor, visibleRows, visibleCols, displayEffectiveRowHeights, displayEffectiveColWidths, {
|
|
21469
21497
|
actualColPrefixSums,
|
|
@@ -21496,7 +21524,7 @@ function XlsxGrid({
|
|
|
21496
21524
|
zoomFactor
|
|
21497
21525
|
]
|
|
21498
21526
|
);
|
|
21499
|
-
const formControlRects =
|
|
21527
|
+
const formControlRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21500
21528
|
() => showImages ? formControls.filter((control) => !control.hidden).map((control) => ({
|
|
21501
21529
|
control,
|
|
21502
21530
|
rect: resolveAnchoredRect(control.anchor, visibleRows, visibleCols, displayEffectiveRowHeights, displayEffectiveColWidths, {
|
|
@@ -21529,7 +21557,7 @@ function XlsxGrid({
|
|
|
21529
21557
|
zoomFactor
|
|
21530
21558
|
]
|
|
21531
21559
|
);
|
|
21532
|
-
const chartRects =
|
|
21560
|
+
const chartRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21533
21561
|
() => showImages ? charts.map((chart) => ({
|
|
21534
21562
|
chart,
|
|
21535
21563
|
rect: chartPreviewRect && chartPreviewRect.id === chart.id ? chartPreviewRect.rect : resolveAnchoredRect(chart.anchor, visibleRows, visibleCols, displayEffectiveRowHeights, displayEffectiveColWidths, {
|
|
@@ -21565,27 +21593,27 @@ function XlsxGrid({
|
|
|
21565
21593
|
);
|
|
21566
21594
|
const shouldBakeCanvasStaticDrawings = Boolean(experimentalCanvas && readOnly && showImages);
|
|
21567
21595
|
const shouldBakeCanvasImages = Boolean(shouldBakeCanvasStaticDrawings && !renderImage && !renderImageSelection);
|
|
21568
|
-
const bakedShapeRects =
|
|
21596
|
+
const bakedShapeRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21569
21597
|
() => shouldBakeCanvasStaticDrawings ? shapeRects.filter(({ shape }) => !shape.hyperlink) : [],
|
|
21570
21598
|
[shapeRects, shouldBakeCanvasStaticDrawings]
|
|
21571
21599
|
);
|
|
21572
|
-
const domShapeRects =
|
|
21600
|
+
const domShapeRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21573
21601
|
() => shouldBakeCanvasStaticDrawings ? shapeRects.filter(({ shape }) => shape.hyperlink) : shapeRects,
|
|
21574
21602
|
[shapeRects, shouldBakeCanvasStaticDrawings]
|
|
21575
21603
|
);
|
|
21576
21604
|
const domFormControlRects = formControlRects;
|
|
21577
|
-
const bakedImageRects =
|
|
21605
|
+
const bakedImageRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21578
21606
|
() => shouldBakeCanvasImages ? imageRects.filter(({ image }) => !image.hyperlink && selectedImageId !== image.id) : [],
|
|
21579
21607
|
[imageRects, selectedImageId, shouldBakeCanvasImages]
|
|
21580
21608
|
);
|
|
21581
|
-
const domImageRects =
|
|
21609
|
+
const domImageRects = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
21582
21610
|
() => shouldBakeCanvasImages ? imageRects.filter(({ image }) => image.hyperlink || selectedImageId === image.id) : imageRects,
|
|
21583
21611
|
[imageRects, selectedImageId, shouldBakeCanvasImages]
|
|
21584
21612
|
);
|
|
21585
21613
|
const hasCanvasDomDrawingOverlays = Boolean(
|
|
21586
21614
|
showImages && (chartRects.length > 0 || domShapeRects.length > 0 || domFormControlRects.length > 0 || domImageRects.length > 0)
|
|
21587
21615
|
);
|
|
21588
|
-
const bakedCanvasDrawingSignature =
|
|
21616
|
+
const bakedCanvasDrawingSignature = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21589
21617
|
if (!shouldBakeCanvasStaticDrawings) {
|
|
21590
21618
|
return "";
|
|
21591
21619
|
}
|
|
@@ -21599,7 +21627,7 @@ function XlsxGrid({
|
|
|
21599
21627
|
revision,
|
|
21600
21628
|
shouldBakeCanvasStaticDrawings
|
|
21601
21629
|
]);
|
|
21602
|
-
const resolveMountedCellOverlayRect =
|
|
21630
|
+
const resolveMountedCellOverlayRect = _chunkAZWBTFJIcjs.q.call(void 0, (element) => {
|
|
21603
21631
|
const wrapper = wrapperRef.current;
|
|
21604
21632
|
if (!wrapper) {
|
|
21605
21633
|
return null;
|
|
@@ -21617,7 +21645,7 @@ function XlsxGrid({
|
|
|
21617
21645
|
width: elementRect.width / scaleX
|
|
21618
21646
|
};
|
|
21619
21647
|
}, []);
|
|
21620
|
-
const resolveMountedCellOverlayRectForAddress =
|
|
21648
|
+
const resolveMountedCellOverlayRectForAddress = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
21621
21649
|
const wrapper = wrapperRef.current;
|
|
21622
21650
|
if (!wrapper) {
|
|
21623
21651
|
return null;
|
|
@@ -21628,7 +21656,7 @@ function XlsxGrid({
|
|
|
21628
21656
|
}
|
|
21629
21657
|
return resolveMountedCellOverlayRect(element);
|
|
21630
21658
|
}, [resolveMountedCellOverlayRect]);
|
|
21631
|
-
const resolveGeometryOverlayRect =
|
|
21659
|
+
const resolveGeometryOverlayRect = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
21632
21660
|
const normalized = normalizeRange2(range);
|
|
21633
21661
|
const isSingleCellSelection = normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col;
|
|
21634
21662
|
const mergedRange = isSingleCellSelection ? findMergedRange(normalized.start) : null;
|
|
@@ -21680,7 +21708,7 @@ function XlsxGrid({
|
|
|
21680
21708
|
width: Math.max(0, width)
|
|
21681
21709
|
};
|
|
21682
21710
|
}, [colIndexByActual, colPrefixSums, displayDefaultColWidth, displayDefaultRowHeight, displayEffectiveColWidths, displayEffectiveRowHeights, displayHeaderHeight, displayRowHeaderWidth, findMergedRange, rowIndexByActual, rowPrefixSums]);
|
|
21683
|
-
const resolveMountedRangeOverlayRect =
|
|
21711
|
+
const resolveMountedRangeOverlayRect = _chunkAZWBTFJIcjs.q.call(void 0, (range, geometryRect) => {
|
|
21684
21712
|
const normalized = normalizeRange2(range);
|
|
21685
21713
|
const startRect = resolveMountedCellOverlayRectForAddress(normalized.start);
|
|
21686
21714
|
const topRightRect = resolveMountedCellOverlayRectForAddress({ row: normalized.start.row, col: normalized.end.col });
|
|
@@ -21701,7 +21729,7 @@ function XlsxGrid({
|
|
|
21701
21729
|
width: Math.max(0, right - left)
|
|
21702
21730
|
};
|
|
21703
21731
|
}, [displayHeaderHeight, displayRowHeaderWidth, resolveMountedCellOverlayRectForAddress]);
|
|
21704
|
-
const resolveDragPreviewRect =
|
|
21732
|
+
const resolveDragPreviewRect = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
21705
21733
|
const dragState = selectionDragRef.current;
|
|
21706
21734
|
if (!dragState || !dragState.didDrag || dragState.axis !== "cell" || !dragState.originOverlayRect) {
|
|
21707
21735
|
return null;
|
|
@@ -21734,7 +21762,7 @@ function XlsxGrid({
|
|
|
21734
21762
|
width: Math.max(originRect.width, right - left)
|
|
21735
21763
|
};
|
|
21736
21764
|
}, [resolveGeometryOverlayRect, resolveMountedRangeOverlayRect]);
|
|
21737
|
-
const resolveOverlayRect =
|
|
21765
|
+
const resolveOverlayRect = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
21738
21766
|
const normalized = normalizeRange2(range);
|
|
21739
21767
|
if (normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col) {
|
|
21740
21768
|
const rect = resolveMountedCellOverlayRectForAddress(normalized.start);
|
|
@@ -21751,7 +21779,7 @@ function XlsxGrid({
|
|
|
21751
21779
|
resolveGeometryOverlayRect,
|
|
21752
21780
|
resolveMountedRangeOverlayRect
|
|
21753
21781
|
]);
|
|
21754
|
-
const resolveCellDisplayRect =
|
|
21782
|
+
const resolveCellDisplayRect = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
21755
21783
|
const rowIndex = rowIndexByActual.get(cell.row);
|
|
21756
21784
|
const colIndex = colIndexByActual.get(cell.col);
|
|
21757
21785
|
if (rowIndex === void 0 || colIndex === void 0) {
|
|
@@ -21797,7 +21825,7 @@ function XlsxGrid({
|
|
|
21797
21825
|
rowIndexByActual,
|
|
21798
21826
|
worksheet
|
|
21799
21827
|
]);
|
|
21800
|
-
const openTableMenuState =
|
|
21828
|
+
const openTableMenuState = _chunkAZWBTFJIcjs.T.call(void 0, () => {
|
|
21801
21829
|
if (!openTableMenu) {
|
|
21802
21830
|
return null;
|
|
21803
21831
|
}
|
|
@@ -21827,7 +21855,7 @@ function XlsxGrid({
|
|
|
21827
21855
|
top: rect.top + rect.height - 2
|
|
21828
21856
|
};
|
|
21829
21857
|
}, [effectiveTables, openTableMenu, resolveCellDisplayRect]);
|
|
21830
|
-
const applyHeaderSelection =
|
|
21858
|
+
const applyHeaderSelection = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
21831
21859
|
if (experimentalCanvas) {
|
|
21832
21860
|
return;
|
|
21833
21861
|
}
|
|
@@ -21839,7 +21867,7 @@ function XlsxGrid({
|
|
|
21839
21867
|
element.style.backgroundColor = normalized && actualCol >= normalized.start.col && actualCol <= normalized.end.col ? "var(--xlsx-selection-header)" : palette.headerSurface;
|
|
21840
21868
|
});
|
|
21841
21869
|
}, [experimentalCanvas, palette.headerSurface, palette.rowHeaderSurface]);
|
|
21842
|
-
const setRowHeaderRef =
|
|
21870
|
+
const setRowHeaderRef = _chunkAZWBTFJIcjs.q.call(void 0, (actualRow, element) => {
|
|
21843
21871
|
if (experimentalCanvas) {
|
|
21844
21872
|
rowHeaderCellRefs.current.delete(actualRow);
|
|
21845
21873
|
return;
|
|
@@ -21852,7 +21880,7 @@ function XlsxGrid({
|
|
|
21852
21880
|
}
|
|
21853
21881
|
rowHeaderCellRefs.current.delete(actualRow);
|
|
21854
21882
|
}, [experimentalCanvas, palette.rowHeaderSurface]);
|
|
21855
|
-
const setColHeaderRef =
|
|
21883
|
+
const setColHeaderRef = _chunkAZWBTFJIcjs.q.call(void 0, (actualCol, element) => {
|
|
21856
21884
|
if (experimentalCanvas) {
|
|
21857
21885
|
colHeaderCellRefs.current.delete(actualCol);
|
|
21858
21886
|
return;
|
|
@@ -21865,7 +21893,7 @@ function XlsxGrid({
|
|
|
21865
21893
|
}
|
|
21866
21894
|
colHeaderCellRefs.current.delete(actualCol);
|
|
21867
21895
|
}, [experimentalCanvas, palette.headerSurface]);
|
|
21868
|
-
const applyPreviewOverlay =
|
|
21896
|
+
const applyPreviewOverlay = _chunkAZWBTFJIcjs.q.call(void 0, (range, options) => {
|
|
21869
21897
|
const overlays = experimentalCanvas ? [...selectionPaneOverlayRefs.current.values()] : [selectionOverlayRef.current];
|
|
21870
21898
|
if (!range) {
|
|
21871
21899
|
if (_optionalChain([options, 'optionalAccess', _1201 => _1201.updateHeaderSelection]) !== false) {
|
|
@@ -21901,7 +21929,7 @@ function XlsxGrid({
|
|
|
21901
21929
|
applyHeaderSelection(range);
|
|
21902
21930
|
}
|
|
21903
21931
|
}, [applyHeaderSelection, experimentalCanvas, resolveDragPreviewRect, resolveGeometryOverlayRect, resolveOverlayRect, zoomFactor]);
|
|
21904
|
-
const applyPreviewOverlayFromElement =
|
|
21932
|
+
const applyPreviewOverlayFromElement = _chunkAZWBTFJIcjs.q.call(void 0, (element, range) => {
|
|
21905
21933
|
if (experimentalCanvas || !isSameCell(range.start, range.end)) {
|
|
21906
21934
|
applyPreviewOverlay(range);
|
|
21907
21935
|
return;
|
|
@@ -21928,7 +21956,7 @@ function XlsxGrid({
|
|
|
21928
21956
|
}
|
|
21929
21957
|
applyHeaderSelection(range);
|
|
21930
21958
|
}, [applyHeaderSelection, applyPreviewOverlay, experimentalCanvas, resolveMountedCellOverlayRect, resolveOverlayRect, zoomFactor]);
|
|
21931
|
-
const syncActiveValidationOverlay =
|
|
21959
|
+
const syncActiveValidationOverlay = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
21932
21960
|
const overlay = activeValidationOverlayRef.current;
|
|
21933
21961
|
if (!overlay || !cell || editingCellRef.current || selectionDragRef.current || fillDragRef.current) {
|
|
21934
21962
|
if (overlay) {
|
|
@@ -21950,7 +21978,7 @@ function XlsxGrid({
|
|
|
21950
21978
|
overlay.style.opacity = "1";
|
|
21951
21979
|
overlay.style.visibility = "visible";
|
|
21952
21980
|
}, [getCellData, resolveOverlayRect, zoomFactor]);
|
|
21953
|
-
const commitSelectionRange =
|
|
21981
|
+
const commitSelectionRange = _chunkAZWBTFJIcjs.q.call(void 0, (range) => {
|
|
21954
21982
|
gridKeyboardActiveRef.current = true;
|
|
21955
21983
|
const normalized = normalizeRange2(range);
|
|
21956
21984
|
if (selectionRef.current && rangesEqual(selectionRef.current, normalized) && isSameCell(activeCellRef.current, normalized.end) && selectedChartIdRef.current === null && selectedImageIdRef.current === null) {
|
|
@@ -21975,12 +22003,12 @@ function XlsxGrid({
|
|
|
21975
22003
|
});
|
|
21976
22004
|
});
|
|
21977
22005
|
}, [selectRange, startSelectionTransition]);
|
|
21978
|
-
const refreshOverlayFromCurrentSelection =
|
|
22006
|
+
const refreshOverlayFromCurrentSelection = _chunkAZWBTFJIcjs.q.call(void 0, () => {
|
|
21979
22007
|
if (displayedSelectionRef.current) {
|
|
21980
22008
|
applyPreviewOverlay(displayedSelectionRef.current);
|
|
21981
22009
|
}
|
|
21982
22010
|
}, [applyPreviewOverlay]);
|
|
21983
|
-
const resolveResizeGuidePositionFromClient =
|
|
22011
|
+
const resolveResizeGuidePositionFromClient = _chunkAZWBTFJIcjs.q.call(void 0, (type, clientPosition) => {
|
|
21984
22012
|
const scroller = scrollRef.current;
|
|
21985
22013
|
const scrollerRect = _optionalChain([scroller, 'optionalAccess', _1209 => _1209.getBoundingClientRect, 'call', _1210 => _1210()]);
|
|
21986
22014
|
if (!scroller || !scrollerRect) {
|
|
@@ -21991,7 +22019,7 @@ function XlsxGrid({
|
|
|
21991
22019
|
}
|
|
21992
22020
|
return scroller.scrollTop + (clientPosition - scrollerRect.top);
|
|
21993
22021
|
}, []);
|
|
21994
|
-
|
|
22022
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
21995
22023
|
function handlePointerMove(event) {
|
|
21996
22024
|
const state = resizeStateRef.current;
|
|
21997
22025
|
if (!state) {
|
|
@@ -22357,7 +22385,7 @@ function XlsxGrid({
|
|
|
22357
22385
|
window.removeEventListener("pointercancel", finishFillDrag);
|
|
22358
22386
|
};
|
|
22359
22387
|
}
|
|
22360
|
-
|
|
22388
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
22361
22389
|
const overlayRange = _nullishCoalesce(selectionPreviewRangeRef.current, () => ( displayedSelection));
|
|
22362
22390
|
if (!overlayRange || !wrapperRef.current) {
|
|
22363
22391
|
applyHeaderSelection(null);
|
|
@@ -22371,10 +22399,10 @@ function XlsxGrid({
|
|
|
22371
22399
|
}
|
|
22372
22400
|
applyPreviewOverlay(overlayRange);
|
|
22373
22401
|
}, [applyHeaderSelection, applyPreviewOverlay, displayedSelection, revision]);
|
|
22374
|
-
|
|
22402
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
22375
22403
|
syncActiveValidationOverlay(activeCell);
|
|
22376
22404
|
}, [activeCell, editingCell, revision, syncActiveValidationOverlay]);
|
|
22377
|
-
const closeContextMenu =
|
|
22405
|
+
const closeContextMenu = _chunkAZWBTFJIcjs.q.call(void 0, (restoreFocus = true) => {
|
|
22378
22406
|
setContextMenu(null);
|
|
22379
22407
|
if (restoreFocus) focusGrid({ preventScroll: true });
|
|
22380
22408
|
}, [focusGrid]);
|
|
@@ -22416,16 +22444,16 @@ function XlsxGrid({
|
|
|
22416
22444
|
position
|
|
22417
22445
|
});
|
|
22418
22446
|
}
|
|
22419
|
-
const handleCellDoubleClick =
|
|
22447
|
+
const handleCellDoubleClick = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
22420
22448
|
startEditing(cell);
|
|
22421
22449
|
}, [startEditing]);
|
|
22422
|
-
const handleCellClick =
|
|
22450
|
+
const handleCellClick = _chunkAZWBTFJIcjs.q.call(void 0, (cell, cellData) => {
|
|
22423
22451
|
if (!cellData.hyperlink) {
|
|
22424
22452
|
return;
|
|
22425
22453
|
}
|
|
22426
22454
|
openHyperlink(cellData.hyperlink.target, cellData.hyperlink.location);
|
|
22427
22455
|
}, [openHyperlink]);
|
|
22428
|
-
const handleCellPointerDown =
|
|
22456
|
+
const handleCellPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event, cell) => {
|
|
22429
22457
|
if (event.button !== 0) {
|
|
22430
22458
|
return;
|
|
22431
22459
|
}
|
|
@@ -22482,7 +22510,7 @@ function XlsxGrid({
|
|
|
22482
22510
|
resolveMergeAnchorCell,
|
|
22483
22511
|
resolvePointerCellFromGeometry
|
|
22484
22512
|
]);
|
|
22485
|
-
const handleRowPointerDown =
|
|
22513
|
+
const handleRowPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event, actualRow) => {
|
|
22486
22514
|
if (event.button !== 0 || firstVisibleCol === void 0 || lastVisibleCol === void 0) {
|
|
22487
22515
|
return;
|
|
22488
22516
|
}
|
|
@@ -22514,7 +22542,7 @@ function XlsxGrid({
|
|
|
22514
22542
|
axisSelectionRef.current = { axis: "row", startRow: anchorRow, endRow: actualRow };
|
|
22515
22543
|
commitSelectionRange(initialRange);
|
|
22516
22544
|
}, [commitSelectionRange, firstVisibleCol, focusGrid, lastVisibleCol, resolveRowPointerOrigin]);
|
|
22517
|
-
const handleColumnPointerDown =
|
|
22545
|
+
const handleColumnPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event, actualCol) => {
|
|
22518
22546
|
if (event.button !== 0 || firstVisibleRow === void 0 || lastVisibleRow === void 0) {
|
|
22519
22547
|
return;
|
|
22520
22548
|
}
|
|
@@ -22546,7 +22574,7 @@ function XlsxGrid({
|
|
|
22546
22574
|
axisSelectionRef.current = { axis: "column", startCol: anchorCol, endCol: actualCol };
|
|
22547
22575
|
commitSelectionRange(initialRange);
|
|
22548
22576
|
}, [commitSelectionRange, firstVisibleRow, focusGrid, lastVisibleRow, resolveColumnPointerOrigin]);
|
|
22549
|
-
const handleRowResizePointerDown =
|
|
22577
|
+
const handleRowResizePointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event, actualRow, rowHeight) => {
|
|
22550
22578
|
if (!canResizeHeaders) {
|
|
22551
22579
|
return;
|
|
22552
22580
|
}
|
|
@@ -22554,7 +22582,7 @@ function XlsxGrid({
|
|
|
22554
22582
|
event.stopPropagation();
|
|
22555
22583
|
startRowResize(event.pointerId, actualRow, rowHeight, event.clientY);
|
|
22556
22584
|
}, [canResizeHeaders]);
|
|
22557
|
-
const renderCellAdornment =
|
|
22585
|
+
const renderCellAdornment = _chunkAZWBTFJIcjs.q.call(void 0, (cell) => {
|
|
22558
22586
|
const table = getTableAtCell(effectiveTables, cell.row, cell.col);
|
|
22559
22587
|
const tableColumn = getTableHeaderColumn(table, cell.row, cell.col);
|
|
22560
22588
|
if (!table || !tableColumn) {
|
|
@@ -22585,7 +22613,7 @@ function XlsxGrid({
|
|
|
22585
22613
|
}
|
|
22586
22614
|
});
|
|
22587
22615
|
}
|
|
22588
|
-
return /* @__PURE__ */
|
|
22616
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
22589
22617
|
"button",
|
|
22590
22618
|
{
|
|
22591
22619
|
onPointerDown: (event) => {
|
|
@@ -22607,7 +22635,7 @@ function XlsxGrid({
|
|
|
22607
22635
|
}
|
|
22608
22636
|
);
|
|
22609
22637
|
}, [effectiveTables, palette, renderTableHeaderMenu, sortState, sortTable, zoomFactor]);
|
|
22610
|
-
const resolveCanvasColumnHeaderRect =
|
|
22638
|
+
const resolveCanvasColumnHeaderRect = _chunkAZWBTFJIcjs.q.call(void 0, (actualCol) => {
|
|
22611
22639
|
const colIndex = colIndexByActual.get(actualCol);
|
|
22612
22640
|
if (colIndex === void 0) {
|
|
22613
22641
|
return null;
|
|
@@ -22626,7 +22654,7 @@ function XlsxGrid({
|
|
|
22626
22654
|
drawingViewport.left,
|
|
22627
22655
|
stickyLeftByCol
|
|
22628
22656
|
]);
|
|
22629
|
-
const resolveCanvasRowHeaderRect =
|
|
22657
|
+
const resolveCanvasRowHeaderRect = _chunkAZWBTFJIcjs.q.call(void 0, (actualRow) => {
|
|
22630
22658
|
const rowIndex = rowIndexByActual.get(actualRow);
|
|
22631
22659
|
if (rowIndex === void 0) {
|
|
22632
22660
|
return null;
|
|
@@ -22663,7 +22691,7 @@ function XlsxGrid({
|
|
|
22663
22691
|
const topScrollHeaderCanvasWidth = scrollBodyCanvasWidth;
|
|
22664
22692
|
const leftFrozenHeaderCanvasHeight = topBodyCanvasHeight;
|
|
22665
22693
|
const leftScrollHeaderCanvasHeight = scrollBodyCanvasHeight;
|
|
22666
|
-
const canvasColumnHeaderCells =
|
|
22694
|
+
const canvasColumnHeaderCells = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
22667
22695
|
() => canvasVisibleColItems.flatMap((column) => {
|
|
22668
22696
|
const rect = resolveCanvasColumnHeaderRect(column.actualCol);
|
|
22669
22697
|
if (!rect) {
|
|
@@ -22688,7 +22716,7 @@ function XlsxGrid({
|
|
|
22688
22716
|
stickyLeftByCol
|
|
22689
22717
|
]
|
|
22690
22718
|
);
|
|
22691
|
-
const canvasRowHeaderCells =
|
|
22719
|
+
const canvasRowHeaderCells = _chunkAZWBTFJIcjs.T.call(void 0,
|
|
22692
22720
|
() => canvasVisibleRowItems.flatMap((row) => {
|
|
22693
22721
|
const rect = resolveCanvasRowHeaderRect(row.actualRow);
|
|
22694
22722
|
if (!rect) {
|
|
@@ -22711,7 +22739,7 @@ function XlsxGrid({
|
|
|
22711
22739
|
stickyTopByRow
|
|
22712
22740
|
]
|
|
22713
22741
|
);
|
|
22714
|
-
const resolveCanvasColumnResizeTarget =
|
|
22742
|
+
const resolveCanvasColumnResizeTarget = _chunkAZWBTFJIcjs.q.call(void 0, (clientX) => {
|
|
22715
22743
|
if (!canResizeHeaders) {
|
|
22716
22744
|
return null;
|
|
22717
22745
|
}
|
|
@@ -22727,7 +22755,7 @@ function XlsxGrid({
|
|
|
22727
22755
|
}
|
|
22728
22756
|
return null;
|
|
22729
22757
|
}, [canResizeHeaders, canvasColumnHeaderCells]);
|
|
22730
|
-
const resolveCanvasColumnHeaderTarget =
|
|
22758
|
+
const resolveCanvasColumnHeaderTarget = _chunkAZWBTFJIcjs.q.call(void 0, (clientX) => {
|
|
22731
22759
|
const scrollerRect = _optionalChain([scrollRef, 'access', _1245 => _1245.current, 'optionalAccess', _1246 => _1246.getBoundingClientRect, 'call', _1247 => _1247()]);
|
|
22732
22760
|
if (!scrollerRect) {
|
|
22733
22761
|
return null;
|
|
@@ -22740,7 +22768,7 @@ function XlsxGrid({
|
|
|
22740
22768
|
}
|
|
22741
22769
|
return null;
|
|
22742
22770
|
}, [canvasColumnHeaderCells]);
|
|
22743
|
-
const resolveCanvasRowResizeTarget =
|
|
22771
|
+
const resolveCanvasRowResizeTarget = _chunkAZWBTFJIcjs.q.call(void 0, (clientY) => {
|
|
22744
22772
|
if (!canResizeHeaders) {
|
|
22745
22773
|
return null;
|
|
22746
22774
|
}
|
|
@@ -22756,7 +22784,7 @@ function XlsxGrid({
|
|
|
22756
22784
|
}
|
|
22757
22785
|
return null;
|
|
22758
22786
|
}, [canResizeHeaders, canvasRowHeaderCells]);
|
|
22759
|
-
const resolveCanvasRowHeaderTarget =
|
|
22787
|
+
const resolveCanvasRowHeaderTarget = _chunkAZWBTFJIcjs.q.call(void 0, (clientY) => {
|
|
22760
22788
|
const scrollerRect = _optionalChain([scrollRef, 'access', _1251 => _1251.current, 'optionalAccess', _1252 => _1252.getBoundingClientRect, 'call', _1253 => _1253()]);
|
|
22761
22789
|
if (!scrollerRect) {
|
|
22762
22790
|
return null;
|
|
@@ -22769,28 +22797,28 @@ function XlsxGrid({
|
|
|
22769
22797
|
}
|
|
22770
22798
|
return null;
|
|
22771
22799
|
}, [canvasRowHeaderCells]);
|
|
22772
|
-
const handleCanvasColumnHeaderPointerMove =
|
|
22800
|
+
const handleCanvasColumnHeaderPointerMove = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22773
22801
|
if (_optionalChain([resizeStateRef, 'access', _1254 => _1254.current, 'optionalAccess', _1255 => _1255.type]) === "column") {
|
|
22774
22802
|
event.currentTarget.style.cursor = "col-resize";
|
|
22775
22803
|
return;
|
|
22776
22804
|
}
|
|
22777
22805
|
event.currentTarget.style.cursor = resolveCanvasColumnResizeTarget(event.clientX) ? "col-resize" : "default";
|
|
22778
22806
|
}, [resolveCanvasColumnResizeTarget]);
|
|
22779
|
-
const handleCanvasRowHeaderPointerMove =
|
|
22807
|
+
const handleCanvasRowHeaderPointerMove = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22780
22808
|
if (_optionalChain([resizeStateRef, 'access', _1256 => _1256.current, 'optionalAccess', _1257 => _1257.type]) === "row") {
|
|
22781
22809
|
event.currentTarget.style.cursor = "row-resize";
|
|
22782
22810
|
return;
|
|
22783
22811
|
}
|
|
22784
22812
|
event.currentTarget.style.cursor = resolveCanvasRowResizeTarget(event.clientY) ? "row-resize" : "default";
|
|
22785
22813
|
}, [resolveCanvasRowResizeTarget]);
|
|
22786
|
-
const handleCanvasHeaderPointerLeave =
|
|
22814
|
+
const handleCanvasHeaderPointerLeave = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22787
22815
|
if (resizeStateRef.current) {
|
|
22788
22816
|
event.currentTarget.style.cursor = resizeStateRef.current.type === "column" ? "col-resize" : "row-resize";
|
|
22789
22817
|
return;
|
|
22790
22818
|
}
|
|
22791
22819
|
event.currentTarget.style.cursor = "default";
|
|
22792
22820
|
}, []);
|
|
22793
|
-
const handleCanvasBodyPointerDown =
|
|
22821
|
+
const handleCanvasBodyPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22794
22822
|
if (event.button !== 0) {
|
|
22795
22823
|
return;
|
|
22796
22824
|
}
|
|
@@ -22849,14 +22877,14 @@ function XlsxGrid({
|
|
|
22849
22877
|
rowPrefixSums,
|
|
22850
22878
|
startCellSelection
|
|
22851
22879
|
]);
|
|
22852
|
-
const handleCanvasBodyClick =
|
|
22880
|
+
const handleCanvasBodyClick = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22853
22881
|
const cell = resolvePointerCellFromClient(event.clientX, event.clientY);
|
|
22854
22882
|
if (!cell) {
|
|
22855
22883
|
return;
|
|
22856
22884
|
}
|
|
22857
22885
|
handleCellClick(cell, getCellData(cell.row, cell.col));
|
|
22858
22886
|
}, [getCellData, handleCellClick, resolvePointerCellFromClient]);
|
|
22859
|
-
const handleCanvasBodyDoubleClick =
|
|
22887
|
+
const handleCanvasBodyDoubleClick = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22860
22888
|
if (readOnly) {
|
|
22861
22889
|
return;
|
|
22862
22890
|
}
|
|
@@ -22866,7 +22894,7 @@ function XlsxGrid({
|
|
|
22866
22894
|
}
|
|
22867
22895
|
startEditing(cell);
|
|
22868
22896
|
}, [readOnly, resolvePointerCellFromClient, startEditing]);
|
|
22869
|
-
const handleCanvasColumnHeaderPointerDown =
|
|
22897
|
+
const handleCanvasColumnHeaderPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22870
22898
|
if (event.button !== 0 || firstVisibleRow === void 0 || lastVisibleRow === void 0) {
|
|
22871
22899
|
return;
|
|
22872
22900
|
}
|
|
@@ -22925,7 +22953,7 @@ function XlsxGrid({
|
|
|
22925
22953
|
rowPrefixSums,
|
|
22926
22954
|
startCellSelection
|
|
22927
22955
|
]);
|
|
22928
|
-
const handleCanvasRowHeaderPointerDown =
|
|
22956
|
+
const handleCanvasRowHeaderPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (event) => {
|
|
22929
22957
|
if (event.button !== 0 || firstVisibleCol === void 0 || lastVisibleCol === void 0) {
|
|
22930
22958
|
return;
|
|
22931
22959
|
}
|
|
@@ -22984,7 +23012,7 @@ function XlsxGrid({
|
|
|
22984
23012
|
rowPrefixSums,
|
|
22985
23013
|
startCellSelection
|
|
22986
23014
|
]);
|
|
22987
|
-
const getCanvasImage =
|
|
23015
|
+
const getCanvasImage = _chunkAZWBTFJIcjs.q.call(void 0, (image) => {
|
|
22988
23016
|
if (typeof Image === "undefined") {
|
|
22989
23017
|
return null;
|
|
22990
23018
|
}
|
|
@@ -23012,7 +23040,7 @@ function XlsxGrid({
|
|
|
23012
23040
|
imageElement.src = image.src;
|
|
23013
23041
|
return null;
|
|
23014
23042
|
}, []);
|
|
23015
|
-
|
|
23043
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
23016
23044
|
if (!experimentalCanvas) {
|
|
23017
23045
|
return;
|
|
23018
23046
|
}
|
|
@@ -24118,7 +24146,7 @@ function XlsxGrid({
|
|
|
24118
24146
|
visibleRows,
|
|
24119
24147
|
zoomFactor
|
|
24120
24148
|
]);
|
|
24121
|
-
const startChartMove =
|
|
24149
|
+
const startChartMove = _chunkAZWBTFJIcjs.q.call(void 0, (event, chart, rect) => {
|
|
24122
24150
|
if (event.button !== 0) {
|
|
24123
24151
|
return;
|
|
24124
24152
|
}
|
|
@@ -24146,7 +24174,7 @@ function XlsxGrid({
|
|
|
24146
24174
|
document.body.style.userSelect = "none";
|
|
24147
24175
|
installChartInteractionListenersRef.current(event.pointerId);
|
|
24148
24176
|
}, [focusGrid, selectChart]);
|
|
24149
|
-
const startChartResize =
|
|
24177
|
+
const startChartResize = _chunkAZWBTFJIcjs.q.call(void 0, (event, chart, rect, handle) => {
|
|
24150
24178
|
if (readOnlyRef.current || chart.editable === false || event.button !== 0) {
|
|
24151
24179
|
return;
|
|
24152
24180
|
}
|
|
@@ -24172,7 +24200,7 @@ function XlsxGrid({
|
|
|
24172
24200
|
document.body.style.userSelect = "none";
|
|
24173
24201
|
installChartInteractionListenersRef.current(event.pointerId);
|
|
24174
24202
|
}, [focusGrid, selectChart]);
|
|
24175
|
-
const startImageMove =
|
|
24203
|
+
const startImageMove = _chunkAZWBTFJIcjs.q.call(void 0, (event, image, rect) => {
|
|
24176
24204
|
if (event.button !== 0) {
|
|
24177
24205
|
return;
|
|
24178
24206
|
}
|
|
@@ -24200,7 +24228,7 @@ function XlsxGrid({
|
|
|
24200
24228
|
document.body.style.userSelect = "none";
|
|
24201
24229
|
installImageInteractionListenersRef.current(event.pointerId);
|
|
24202
24230
|
}, [focusGrid, selectImage]);
|
|
24203
|
-
const startImageResize =
|
|
24231
|
+
const startImageResize = _chunkAZWBTFJIcjs.q.call(void 0, (event, image, rect, handle) => {
|
|
24204
24232
|
if (readOnlyRef.current || image.editable === false || event.button !== 0) {
|
|
24205
24233
|
return;
|
|
24206
24234
|
}
|
|
@@ -24226,7 +24254,7 @@ function XlsxGrid({
|
|
|
24226
24254
|
document.body.style.userSelect = "none";
|
|
24227
24255
|
installImageInteractionListenersRef.current(event.pointerId);
|
|
24228
24256
|
}, [focusGrid, selectImage]);
|
|
24229
|
-
const handleImageClick =
|
|
24257
|
+
const handleImageClick = _chunkAZWBTFJIcjs.q.call(void 0, (image) => {
|
|
24230
24258
|
if (skipNextImageClickRef.current === image.id) {
|
|
24231
24259
|
skipNextImageClickRef.current = null;
|
|
24232
24260
|
return;
|
|
@@ -24235,34 +24263,34 @@ function XlsxGrid({
|
|
|
24235
24263
|
openHyperlink(image.hyperlink);
|
|
24236
24264
|
}
|
|
24237
24265
|
}, [openHyperlink]);
|
|
24238
|
-
const handleShapeClick =
|
|
24266
|
+
const handleShapeClick = _chunkAZWBTFJIcjs.q.call(void 0, (shape) => {
|
|
24239
24267
|
if (shape.hyperlink) {
|
|
24240
24268
|
openHyperlink(shape.hyperlink);
|
|
24241
24269
|
}
|
|
24242
24270
|
}, [openHyperlink]);
|
|
24243
|
-
const handleChartClick =
|
|
24271
|
+
const handleChartClick = _chunkAZWBTFJIcjs.q.call(void 0, (chart) => {
|
|
24244
24272
|
if (skipNextChartClickRef.current === chart.id) {
|
|
24245
24273
|
skipNextChartClickRef.current = null;
|
|
24246
24274
|
return;
|
|
24247
24275
|
}
|
|
24248
24276
|
selectChart(chart.id);
|
|
24249
24277
|
}, [selectChart]);
|
|
24250
|
-
const handleChartElementPointerDown =
|
|
24278
|
+
const handleChartElementPointerDown = _chunkAZWBTFJIcjs.q.call(void 0, (selection2) => {
|
|
24251
24279
|
skipNextChartClickRef.current = selection2.chartId;
|
|
24252
24280
|
selectChartElement(selection2);
|
|
24253
24281
|
}, [selectChartElement]);
|
|
24254
|
-
const handleChartElementDoubleClick =
|
|
24282
|
+
const handleChartElementDoubleClick = _chunkAZWBTFJIcjs.q.call(void 0, (selection2) => {
|
|
24255
24283
|
selectChartElement(selection2);
|
|
24256
24284
|
}, [selectChartElement]);
|
|
24257
24285
|
if (isLoading) {
|
|
24258
|
-
return /* @__PURE__ */
|
|
24286
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderLoading(loadingComponent, loadingState, palette) });
|
|
24259
24287
|
}
|
|
24260
24288
|
if (isLoadDeferred) {
|
|
24261
|
-
return /* @__PURE__ */
|
|
24289
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderDeferredLoad({ ...controller, canLoadDeferred, continueDeferredLoad, deferredLoadFileSize, isLoadDeferred }, palette) });
|
|
24262
24290
|
}
|
|
24263
24291
|
if (error) {
|
|
24264
24292
|
if (error instanceof XlsxFileSizeLimitExceededError) {
|
|
24265
|
-
return /* @__PURE__ */
|
|
24293
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderFileTooLarge(
|
|
24266
24294
|
fileTooLargeState,
|
|
24267
24295
|
{
|
|
24268
24296
|
displayFileName,
|
|
@@ -24272,10 +24300,10 @@ function XlsxGrid({
|
|
|
24272
24300
|
palette
|
|
24273
24301
|
) });
|
|
24274
24302
|
}
|
|
24275
|
-
return /* @__PURE__ */
|
|
24303
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderError(errorState, error, palette) });
|
|
24276
24304
|
}
|
|
24277
24305
|
if (!activeSheet && _optionalChain([activeTab, 'optionalAccess', _1322 => _1322.kind]) === "chartsheet") {
|
|
24278
|
-
return /* @__PURE__ */
|
|
24306
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24279
24307
|
"div",
|
|
24280
24308
|
{
|
|
24281
24309
|
style: {
|
|
@@ -24288,7 +24316,7 @@ function XlsxGrid({
|
|
|
24288
24316
|
minWidth: 0,
|
|
24289
24317
|
padding: 16
|
|
24290
24318
|
},
|
|
24291
|
-
children: /* @__PURE__ */
|
|
24319
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24292
24320
|
"div",
|
|
24293
24321
|
{
|
|
24294
24322
|
style: {
|
|
@@ -24303,7 +24331,7 @@ function XlsxGrid({
|
|
|
24303
24331
|
},
|
|
24304
24332
|
children: charts.length > 0 ? charts.map((chart) => {
|
|
24305
24333
|
const chartsheetRect = { height: 320, left: 0, top: 0, width: 640 };
|
|
24306
|
-
return /* @__PURE__ */
|
|
24334
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { minHeight: 320, position: "relative" }, children: isChartsLoading ? renderChartLoadingNode(renderChartLoading, chart, chartsheetRect) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24307
24335
|
MemoChartSvg,
|
|
24308
24336
|
{
|
|
24309
24337
|
chart,
|
|
@@ -24315,7 +24343,7 @@ function XlsxGrid({
|
|
|
24315
24343
|
selectedChartElement
|
|
24316
24344
|
}
|
|
24317
24345
|
) }, chart.id);
|
|
24318
|
-
}) : /* @__PURE__ */
|
|
24346
|
+
}) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24319
24347
|
"div",
|
|
24320
24348
|
{
|
|
24321
24349
|
style: {
|
|
@@ -24335,7 +24363,7 @@ function XlsxGrid({
|
|
|
24335
24363
|
);
|
|
24336
24364
|
}
|
|
24337
24365
|
if (!activeSheet) {
|
|
24338
|
-
return /* @__PURE__ */
|
|
24366
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderEmpty(emptyState, palette) });
|
|
24339
24367
|
}
|
|
24340
24368
|
const virtualRows = domExpandedWindow.rowIndices.map((index) => {
|
|
24341
24369
|
const virtualRow = rowVirtualItemByIndex.get(index);
|
|
@@ -24570,7 +24598,7 @@ function XlsxGrid({
|
|
|
24570
24598
|
border: "none"
|
|
24571
24599
|
} : null
|
|
24572
24600
|
};
|
|
24573
|
-
return /* @__PURE__ */
|
|
24601
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24574
24602
|
"div",
|
|
24575
24603
|
{
|
|
24576
24604
|
onClick: () => handleShapeClick(shape),
|
|
@@ -24585,7 +24613,7 @@ function XlsxGrid({
|
|
|
24585
24613
|
},
|
|
24586
24614
|
title: shape.description,
|
|
24587
24615
|
children: [
|
|
24588
|
-
vectorShape ? /* @__PURE__ */
|
|
24616
|
+
vectorShape ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24589
24617
|
"svg",
|
|
24590
24618
|
{
|
|
24591
24619
|
"aria-hidden": "true",
|
|
@@ -24598,11 +24626,11 @@ function XlsxGrid({
|
|
|
24598
24626
|
},
|
|
24599
24627
|
viewBox: `0 0 ${vectorShape.viewBox.width} ${vectorShape.viewBox.height}`,
|
|
24600
24628
|
children: [
|
|
24601
|
-
headMarker || tailMarker ? /* @__PURE__ */
|
|
24629
|
+
headMarker || tailMarker ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "defs", { children: [
|
|
24602
24630
|
headMarker,
|
|
24603
24631
|
tailMarker
|
|
24604
24632
|
] }) : null,
|
|
24605
|
-
/* @__PURE__ */
|
|
24633
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24606
24634
|
"path",
|
|
24607
24635
|
{
|
|
24608
24636
|
d: vectorShape.path,
|
|
@@ -24619,7 +24647,7 @@ function XlsxGrid({
|
|
|
24619
24647
|
]
|
|
24620
24648
|
}
|
|
24621
24649
|
) : null,
|
|
24622
|
-
/* @__PURE__ */
|
|
24650
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24623
24651
|
"div",
|
|
24624
24652
|
{
|
|
24625
24653
|
style: {
|
|
@@ -24768,7 +24796,7 @@ function XlsxGrid({
|
|
|
24768
24796
|
}
|
|
24769
24797
|
};
|
|
24770
24798
|
if (renderFormControl) {
|
|
24771
|
-
return /* @__PURE__ */
|
|
24799
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: renderFormControl({
|
|
24772
24800
|
activate: activateControl,
|
|
24773
24801
|
checked: isFormControlChecked(control),
|
|
24774
24802
|
control,
|
|
@@ -24788,7 +24816,7 @@ function XlsxGrid({
|
|
|
24788
24816
|
}
|
|
24789
24817
|
if (control.kind === "group-box") {
|
|
24790
24818
|
const hasLabel = controlLabel.length > 0;
|
|
24791
|
-
return /* @__PURE__ */
|
|
24819
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24792
24820
|
"div",
|
|
24793
24821
|
{
|
|
24794
24822
|
style: {
|
|
@@ -24796,7 +24824,7 @@ function XlsxGrid({
|
|
|
24796
24824
|
padding: `${hasLabel ? Math.max(7, fontSizePx * 0.5) : 0}px 0 0`,
|
|
24797
24825
|
position: "absolute"
|
|
24798
24826
|
},
|
|
24799
|
-
children: /* @__PURE__ */
|
|
24827
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24800
24828
|
"div",
|
|
24801
24829
|
{
|
|
24802
24830
|
style: {
|
|
@@ -24806,7 +24834,7 @@ function XlsxGrid({
|
|
|
24806
24834
|
position: "relative",
|
|
24807
24835
|
width: "100%"
|
|
24808
24836
|
},
|
|
24809
|
-
children: controlLabel ? /* @__PURE__ */
|
|
24837
|
+
children: controlLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24810
24838
|
"span",
|
|
24811
24839
|
{
|
|
24812
24840
|
style: {
|
|
@@ -24829,7 +24857,7 @@ function XlsxGrid({
|
|
|
24829
24857
|
}
|
|
24830
24858
|
if (control.kind === "radio") {
|
|
24831
24859
|
const checked = isFormControlChecked(control);
|
|
24832
|
-
return /* @__PURE__ */
|
|
24860
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24833
24861
|
"button",
|
|
24834
24862
|
{
|
|
24835
24863
|
"aria-disabled": readOnly || control.controlIndex === void 0,
|
|
@@ -24854,7 +24882,7 @@ function XlsxGrid({
|
|
|
24854
24882
|
type: "button",
|
|
24855
24883
|
children: [
|
|
24856
24884
|
renderRadioControl(checked, palette, zoomFactor),
|
|
24857
|
-
controlLabel ? /* @__PURE__ */
|
|
24885
|
+
controlLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: controlLabel }) : null
|
|
24858
24886
|
]
|
|
24859
24887
|
},
|
|
24860
24888
|
`${pane}-${control.id}`
|
|
@@ -24863,7 +24891,7 @@ function XlsxGrid({
|
|
|
24863
24891
|
if (control.kind === "checkbox") {
|
|
24864
24892
|
const checked = isFormControlChecked(control);
|
|
24865
24893
|
const mixed = isFormControlMixed(control);
|
|
24866
|
-
return /* @__PURE__ */
|
|
24894
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24867
24895
|
"button",
|
|
24868
24896
|
{
|
|
24869
24897
|
"aria-disabled": readOnly || control.controlIndex === void 0,
|
|
@@ -24887,14 +24915,14 @@ function XlsxGrid({
|
|
|
24887
24915
|
type: "button",
|
|
24888
24916
|
children: [
|
|
24889
24917
|
renderCheckboxControl(checked, palette, zoomFactor, mixed),
|
|
24890
|
-
controlLabel ? /* @__PURE__ */
|
|
24918
|
+
controlLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: controlLabel }) : null
|
|
24891
24919
|
]
|
|
24892
24920
|
},
|
|
24893
24921
|
`${pane}-${control.id}`
|
|
24894
24922
|
);
|
|
24895
24923
|
}
|
|
24896
24924
|
if (control.kind === "button") {
|
|
24897
|
-
return /* @__PURE__ */
|
|
24925
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24898
24926
|
"button",
|
|
24899
24927
|
{
|
|
24900
24928
|
"aria-disabled": readOnly || !onFormControlAction,
|
|
@@ -24923,7 +24951,7 @@ function XlsxGrid({
|
|
|
24923
24951
|
}
|
|
24924
24952
|
if (control.kind === "dropdown") {
|
|
24925
24953
|
const selected = typeof control.selected === "number" ? control.selected : void 0;
|
|
24926
|
-
return /* @__PURE__ */
|
|
24954
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24927
24955
|
"select",
|
|
24928
24956
|
{
|
|
24929
24957
|
"aria-disabled": readOnly || control.controlIndex === void 0 || controlItems.length === 0,
|
|
@@ -24947,8 +24975,8 @@ function XlsxGrid({
|
|
|
24947
24975
|
tabIndex: readOnly ? -1 : void 0,
|
|
24948
24976
|
value: selected === void 0 ? "" : String(selected),
|
|
24949
24977
|
children: [
|
|
24950
|
-
selected === void 0 ? /* @__PURE__ */
|
|
24951
|
-
controlItems.map((item, index) => /* @__PURE__ */
|
|
24978
|
+
selected === void 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "option", { value: "", children: controlLabel }) : null,
|
|
24979
|
+
controlItems.map((item, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "option", { value: index, children: item }, index))
|
|
24952
24980
|
]
|
|
24953
24981
|
},
|
|
24954
24982
|
`${pane}-${control.id}`
|
|
@@ -24957,7 +24985,7 @@ function XlsxGrid({
|
|
|
24957
24985
|
if (control.kind === "listbox") {
|
|
24958
24986
|
const selected = Array.isArray(control.selected) ? control.selected : control.selected === void 0 ? [] : [control.selected];
|
|
24959
24987
|
const allowsMultipleSelection = (_nullishCoalesce(control.selection, () => ( "single"))) !== "single";
|
|
24960
|
-
return /* @__PURE__ */
|
|
24988
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24961
24989
|
"select",
|
|
24962
24990
|
{
|
|
24963
24991
|
"aria-disabled": readOnly || control.controlIndex === void 0 || controlItems.length === 0,
|
|
@@ -24984,7 +25012,7 @@ function XlsxGrid({
|
|
|
24984
25012
|
},
|
|
24985
25013
|
tabIndex: readOnly ? -1 : void 0,
|
|
24986
25014
|
value: allowsMultipleSelection ? selected.map(String) : selected[0] === void 0 ? "" : String(selected[0]),
|
|
24987
|
-
children: controlItems.map((item, index) => /* @__PURE__ */
|
|
25015
|
+
children: controlItems.map((item, index) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "option", { value: index, children: item }, index))
|
|
24988
25016
|
},
|
|
24989
25017
|
`${pane}-${control.id}`
|
|
24990
25018
|
);
|
|
@@ -24992,7 +25020,7 @@ function XlsxGrid({
|
|
|
24992
25020
|
if (control.kind === "scrollbar") {
|
|
24993
25021
|
const min = _nullishCoalesce(control.min, () => ( 0));
|
|
24994
25022
|
const max = Math.max(min, _nullishCoalesce(control.max, () => ( 100)));
|
|
24995
|
-
return /* @__PURE__ */
|
|
25023
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
24996
25024
|
"input",
|
|
24997
25025
|
{
|
|
24998
25026
|
"aria-disabled": readOnly || control.controlIndex === void 0,
|
|
@@ -25024,7 +25052,7 @@ function XlsxGrid({
|
|
|
25024
25052
|
if (control.kind === "spinner") {
|
|
25025
25053
|
const min = _nullishCoalesce(control.min, () => ( 0));
|
|
25026
25054
|
const max = Math.max(min, _nullishCoalesce(control.max, () => ( 100)));
|
|
25027
|
-
return /* @__PURE__ */
|
|
25055
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25028
25056
|
"input",
|
|
25029
25057
|
{
|
|
25030
25058
|
"aria-disabled": readOnly || control.controlIndex === void 0,
|
|
@@ -25054,7 +25082,7 @@ function XlsxGrid({
|
|
|
25054
25082
|
`${pane}-${control.id}`
|
|
25055
25083
|
);
|
|
25056
25084
|
}
|
|
25057
|
-
return /* @__PURE__ */
|
|
25085
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25058
25086
|
"div",
|
|
25059
25087
|
{
|
|
25060
25088
|
style: {
|
|
@@ -25064,7 +25092,7 @@ function XlsxGrid({
|
|
|
25064
25092
|
boxSizing: "border-box",
|
|
25065
25093
|
padding: `0 ${Math.max(1, zoomFactor)}px`
|
|
25066
25094
|
},
|
|
25067
|
-
children: controlLabel ? /* @__PURE__ */
|
|
25095
|
+
children: controlLabel ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: controlLabel }) : null
|
|
25068
25096
|
},
|
|
25069
25097
|
`${pane}-${control.id}`
|
|
25070
25098
|
);
|
|
@@ -25092,7 +25120,7 @@ function XlsxGrid({
|
|
|
25092
25120
|
width: rect.width,
|
|
25093
25121
|
zIndex: isFrozenDrawing ? image.zIndex + 20 : image.zIndex
|
|
25094
25122
|
};
|
|
25095
|
-
const defaultNode = /* @__PURE__ */
|
|
25123
|
+
const defaultNode = /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25096
25124
|
"img",
|
|
25097
25125
|
{
|
|
25098
25126
|
alt: _nullishCoalesce(_nullishCoalesce(image.description, () => ( image.name)), () => ( "")),
|
|
@@ -25107,7 +25135,7 @@ function XlsxGrid({
|
|
|
25107
25135
|
}
|
|
25108
25136
|
}
|
|
25109
25137
|
);
|
|
25110
|
-
const selectionNode = selectedImageId === image.id ? /* @__PURE__ */
|
|
25138
|
+
const selectionNode = selectedImageId === image.id ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25111
25139
|
"div",
|
|
25112
25140
|
{
|
|
25113
25141
|
style: {
|
|
@@ -25118,7 +25146,7 @@ function XlsxGrid({
|
|
|
25118
25146
|
zIndex: isFrozenDrawing ? image.zIndex + 22 : image.zIndex + 2
|
|
25119
25147
|
},
|
|
25120
25148
|
children: renderImageSelection ? renderImageSelection({
|
|
25121
|
-
defaultNode: /* @__PURE__ */
|
|
25149
|
+
defaultNode: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25122
25150
|
"div",
|
|
25123
25151
|
{
|
|
25124
25152
|
style: {
|
|
@@ -25129,7 +25157,7 @@ function XlsxGrid({
|
|
|
25129
25157
|
pointerEvents: "none",
|
|
25130
25158
|
position: "absolute"
|
|
25131
25159
|
},
|
|
25132
|
-
children: canEditImage ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */
|
|
25160
|
+
children: canEditImage ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25133
25161
|
"div",
|
|
25134
25162
|
{
|
|
25135
25163
|
onPointerDown: (event) => startImageResize(event, image, rect, position),
|
|
@@ -25149,7 +25177,7 @@ function XlsxGrid({
|
|
|
25149
25177
|
}),
|
|
25150
25178
|
image,
|
|
25151
25179
|
rect
|
|
25152
|
-
}) : /* @__PURE__ */
|
|
25180
|
+
}) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25153
25181
|
"div",
|
|
25154
25182
|
{
|
|
25155
25183
|
style: {
|
|
@@ -25160,7 +25188,7 @@ function XlsxGrid({
|
|
|
25160
25188
|
pointerEvents: "none",
|
|
25161
25189
|
position: "absolute"
|
|
25162
25190
|
},
|
|
25163
|
-
children: canEditImage ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */
|
|
25191
|
+
children: canEditImage ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25164
25192
|
"div",
|
|
25165
25193
|
{
|
|
25166
25194
|
onPointerDown: (event) => startImageResize(event, image, rect, position),
|
|
@@ -25172,9 +25200,9 @@ function XlsxGrid({
|
|
|
25172
25200
|
)
|
|
25173
25201
|
}
|
|
25174
25202
|
) : null;
|
|
25175
|
-
return /* @__PURE__ */
|
|
25176
|
-
renderImage ? /* @__PURE__ */
|
|
25177
|
-
/* @__PURE__ */
|
|
25203
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25204
|
+
renderImage ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style, children: renderImage({ defaultNode, image, rect, style }) }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style, children: defaultNode }),
|
|
25205
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25178
25206
|
"div",
|
|
25179
25207
|
{
|
|
25180
25208
|
onClick: () => handleImageClick(image),
|
|
@@ -25214,7 +25242,7 @@ function XlsxGrid({
|
|
|
25214
25242
|
width: rect.width,
|
|
25215
25243
|
zIndex: isFrozenDrawing ? chart.zIndex + 20 : chart.zIndex
|
|
25216
25244
|
};
|
|
25217
|
-
const selectionNode = selectedChartId === chart.id ? /* @__PURE__ */
|
|
25245
|
+
const selectionNode = selectedChartId === chart.id ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25218
25246
|
"div",
|
|
25219
25247
|
{
|
|
25220
25248
|
style: {
|
|
@@ -25224,7 +25252,7 @@ function XlsxGrid({
|
|
|
25224
25252
|
pointerEvents: "none",
|
|
25225
25253
|
zIndex: isFrozenDrawing ? chart.zIndex + 22 : chart.zIndex + 2
|
|
25226
25254
|
},
|
|
25227
|
-
children: /* @__PURE__ */
|
|
25255
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25228
25256
|
"div",
|
|
25229
25257
|
{
|
|
25230
25258
|
style: {
|
|
@@ -25235,7 +25263,7 @@ function XlsxGrid({
|
|
|
25235
25263
|
pointerEvents: "none",
|
|
25236
25264
|
position: "absolute"
|
|
25237
25265
|
},
|
|
25238
|
-
children: canEditChart ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */
|
|
25266
|
+
children: canEditChart ? IMAGE_HANDLE_POSITIONS.map((position) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25239
25267
|
"div",
|
|
25240
25268
|
{
|
|
25241
25269
|
onPointerDown: (event) => startChartResize(event, chart, rect, position),
|
|
@@ -25247,8 +25275,8 @@ function XlsxGrid({
|
|
|
25247
25275
|
)
|
|
25248
25276
|
}
|
|
25249
25277
|
) : null;
|
|
25250
|
-
return /* @__PURE__ */
|
|
25251
|
-
/* @__PURE__ */
|
|
25278
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25279
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25252
25280
|
"div",
|
|
25253
25281
|
{
|
|
25254
25282
|
onClick: () => handleChartClick(chart),
|
|
@@ -25258,7 +25286,7 @@ function XlsxGrid({
|
|
|
25258
25286
|
cursor: canEditChart && selectedChartId === chart.id ? "move" : "cell",
|
|
25259
25287
|
pointerEvents: "auto"
|
|
25260
25288
|
},
|
|
25261
|
-
children: isChartsLoading ? renderChartLoadingNode(renderChartLoading, chart, rect) : /* @__PURE__ */
|
|
25289
|
+
children: isChartsLoading ? renderChartLoadingNode(renderChartLoading, chart, rect) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
25262
25290
|
MemoChartSvg,
|
|
25263
25291
|
{
|
|
25264
25292
|
chart,
|
|
@@ -25359,25 +25387,25 @@ function XlsxGrid({
|
|
|
25359
25387
|
scroll: null,
|
|
25360
25388
|
top: null
|
|
25361
25389
|
} : {
|
|
25362
|
-
corner: /* @__PURE__ */
|
|
25390
|
+
corner: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25363
25391
|
chartRects.map(({ chart, rect }) => renderChartDrawing(chart, rect, "corner")),
|
|
25364
25392
|
domShapeRects.map(({ shape, rect }) => renderShapeDrawing(shape, rect, "corner")),
|
|
25365
25393
|
domFormControlRects.map(({ control, rect }) => renderFormControlDrawing(control, rect, "corner")),
|
|
25366
25394
|
domImageRects.map(({ image, rect }) => renderImageDrawing(image, rect, "corner"))
|
|
25367
25395
|
] }),
|
|
25368
|
-
left: /* @__PURE__ */
|
|
25396
|
+
left: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25369
25397
|
chartRects.map(({ chart, rect }) => renderChartDrawing(chart, rect, "left")),
|
|
25370
25398
|
domShapeRects.map(({ shape, rect }) => renderShapeDrawing(shape, rect, "left")),
|
|
25371
25399
|
domFormControlRects.map(({ control, rect }) => renderFormControlDrawing(control, rect, "left")),
|
|
25372
25400
|
domImageRects.map(({ image, rect }) => renderImageDrawing(image, rect, "left"))
|
|
25373
25401
|
] }),
|
|
25374
|
-
scroll: /* @__PURE__ */
|
|
25402
|
+
scroll: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25375
25403
|
chartRects.map(({ chart, rect }) => renderChartDrawing(chart, rect, "scroll")),
|
|
25376
25404
|
domShapeRects.map(({ shape, rect }) => renderShapeDrawing(shape, rect, "scroll")),
|
|
25377
25405
|
domFormControlRects.map(({ control, rect }) => renderFormControlDrawing(control, rect, "scroll")),
|
|
25378
25406
|
domImageRects.map(({ image, rect }) => renderImageDrawing(image, rect, "scroll"))
|
|
25379
25407
|
] }),
|
|
25380
|
-
top: /* @__PURE__ */
|
|
25408
|
+
top: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
25381
25409
|
chartRects.map(({ chart, rect }) => renderChartDrawing(chart, rect, "top")),
|
|
25382
25410
|
domShapeRects.map(({ shape, rect }) => renderShapeDrawing(shape, rect, "top")),
|
|
25383
25411
|
domFormControlRects.map(({ control, rect }) => renderFormControlDrawing(control, rect, "top")),
|
|
@@ -26097,7 +26125,7 @@ function XlsxGrid({
|
|
|
26097
26125
|
}
|
|
26098
26126
|
};
|
|
26099
26127
|
const rangeHighlightNodes = rangeHighlightRects.flatMap(({ index, rect }) => rect ? [
|
|
26100
|
-
/* @__PURE__ */
|
|
26128
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26101
26129
|
"div",
|
|
26102
26130
|
{
|
|
26103
26131
|
"aria-hidden": "true",
|
|
@@ -26117,8 +26145,8 @@ function XlsxGrid({
|
|
|
26117
26145
|
)
|
|
26118
26146
|
] : []);
|
|
26119
26147
|
function renderSelectionOverlay(pane) {
|
|
26120
|
-
return /* @__PURE__ */
|
|
26121
|
-
/* @__PURE__ */
|
|
26148
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
26149
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26122
26150
|
"div",
|
|
26123
26151
|
{
|
|
26124
26152
|
ref: pane ? (element) => {
|
|
@@ -26148,7 +26176,7 @@ function XlsxGrid({
|
|
|
26148
26176
|
}
|
|
26149
26177
|
}
|
|
26150
26178
|
),
|
|
26151
|
-
/* @__PURE__ */
|
|
26179
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26152
26180
|
"div",
|
|
26153
26181
|
{
|
|
26154
26182
|
ref: pane ? (element) => {
|
|
@@ -26192,7 +26220,7 @@ function XlsxGrid({
|
|
|
26192
26220
|
{ pane: "left", style: canvasLeftOverlayPaneStyle, ref: canvasLeftOverlayContentRef, left: -displayRowHeaderWidth, top: -drawingViewport.top - frozenPaneBottom },
|
|
26193
26221
|
{ pane: "corner", style: canvasCornerOverlayPaneStyle, ref: canvasCornerOverlayContentRef, left: -displayRowHeaderWidth, top: -displayHeaderHeight }
|
|
26194
26222
|
];
|
|
26195
|
-
const selectionOverlayPanes = experimentalCanvas ? /* @__PURE__ */
|
|
26223
|
+
const selectionOverlayPanes = experimentalCanvas ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { ...canvasBodyViewportLayerStyle, zIndex: 40 }, children: overlayPanes.map(({ pane, style, left, top }) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26196
26224
|
"div",
|
|
26197
26225
|
{
|
|
26198
26226
|
ref: (element) => {
|
|
@@ -26214,7 +26242,7 @@ function XlsxGrid({
|
|
|
26214
26242
|
children: renderSelectionOverlay(pane)
|
|
26215
26243
|
}
|
|
26216
26244
|
) }, pane)) }) : null;
|
|
26217
|
-
const drawingOverlayPanes = experimentalCanvas && hasCanvasDomDrawingOverlays || rangeHighlightNodes.length > 0 ? /* @__PURE__ */
|
|
26245
|
+
const drawingOverlayPanes = experimentalCanvas && hasCanvasDomDrawingOverlays || rangeHighlightNodes.length > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { ...canvasBodyViewportLayerStyle, zIndex: experimentalCanvas ? 23 : 34 }, children: overlayPanes.map(({ pane, style, ref, left, top }) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26218
26246
|
"div",
|
|
26219
26247
|
{
|
|
26220
26248
|
ref,
|
|
@@ -26234,7 +26262,7 @@ function XlsxGrid({
|
|
|
26234
26262
|
]
|
|
26235
26263
|
}
|
|
26236
26264
|
) }, pane)) }) : null;
|
|
26237
|
-
const scrollerContent = /* @__PURE__ */
|
|
26265
|
+
const scrollerContent = /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26238
26266
|
"div",
|
|
26239
26267
|
{
|
|
26240
26268
|
style: {
|
|
@@ -26245,7 +26273,7 @@ function XlsxGrid({
|
|
|
26245
26273
|
width: totalWidth,
|
|
26246
26274
|
height: sheetContentHeight
|
|
26247
26275
|
},
|
|
26248
|
-
children: /* @__PURE__ */
|
|
26276
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26249
26277
|
"div",
|
|
26250
26278
|
{
|
|
26251
26279
|
ref: wrapperRef,
|
|
@@ -26261,17 +26289,17 @@ function XlsxGrid({
|
|
|
26261
26289
|
width: totalWidth
|
|
26262
26290
|
},
|
|
26263
26291
|
children: [
|
|
26264
|
-
showImages && !experimentalCanvas ? /* @__PURE__ */
|
|
26265
|
-
/* @__PURE__ */
|
|
26266
|
-
/* @__PURE__ */
|
|
26267
|
-
/* @__PURE__ */
|
|
26268
|
-
/* @__PURE__ */
|
|
26292
|
+
showImages && !experimentalCanvas ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
26293
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: topOverlayStyle, children: paneDrawingNodes.top }),
|
|
26294
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: leftOverlayStyle, children: paneDrawingNodes.left }),
|
|
26295
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: cornerOverlayStyle, children: paneDrawingNodes.corner }),
|
|
26296
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: scrollOverlayStyle, children: paneDrawingNodes.scroll })
|
|
26269
26297
|
] }) : null,
|
|
26270
26298
|
drawingOverlayPanes,
|
|
26271
26299
|
selectionOverlayPanes,
|
|
26272
|
-
experimentalCanvas ? /* @__PURE__ */
|
|
26273
|
-
/* @__PURE__ */
|
|
26274
|
-
/* @__PURE__ */
|
|
26300
|
+
experimentalCanvas ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
26301
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: canvasBodyViewportLayerStyle, children: [
|
|
26302
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26275
26303
|
"canvas",
|
|
26276
26304
|
{
|
|
26277
26305
|
ref: scrollBodyCanvasRef,
|
|
@@ -26281,7 +26309,7 @@ function XlsxGrid({
|
|
|
26281
26309
|
style: canvasScrollBodyStyle
|
|
26282
26310
|
}
|
|
26283
26311
|
),
|
|
26284
|
-
/* @__PURE__ */
|
|
26312
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26285
26313
|
"canvas",
|
|
26286
26314
|
{
|
|
26287
26315
|
ref: topBodyCanvasRef,
|
|
@@ -26291,7 +26319,7 @@ function XlsxGrid({
|
|
|
26291
26319
|
style: canvasTopBodyStyle
|
|
26292
26320
|
}
|
|
26293
26321
|
),
|
|
26294
|
-
/* @__PURE__ */
|
|
26322
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26295
26323
|
"canvas",
|
|
26296
26324
|
{
|
|
26297
26325
|
ref: leftBodyCanvasRef,
|
|
@@ -26301,7 +26329,7 @@ function XlsxGrid({
|
|
|
26301
26329
|
style: canvasLeftBodyStyle
|
|
26302
26330
|
}
|
|
26303
26331
|
),
|
|
26304
|
-
/* @__PURE__ */
|
|
26332
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26305
26333
|
"canvas",
|
|
26306
26334
|
{
|
|
26307
26335
|
ref: cornerBodyCanvasRef,
|
|
@@ -26312,8 +26340,8 @@ function XlsxGrid({
|
|
|
26312
26340
|
}
|
|
26313
26341
|
)
|
|
26314
26342
|
] }),
|
|
26315
|
-
/* @__PURE__ */
|
|
26316
|
-
/* @__PURE__ */
|
|
26343
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: canvasHeaderViewportLayerStyle, children: [
|
|
26344
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26317
26345
|
"canvas",
|
|
26318
26346
|
{
|
|
26319
26347
|
ref: topFrozenHeaderCanvasRef,
|
|
@@ -26323,7 +26351,7 @@ function XlsxGrid({
|
|
|
26323
26351
|
style: canvasTopFrozenHeaderStyle
|
|
26324
26352
|
}
|
|
26325
26353
|
),
|
|
26326
|
-
/* @__PURE__ */
|
|
26354
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26327
26355
|
"canvas",
|
|
26328
26356
|
{
|
|
26329
26357
|
ref: topScrollHeaderCanvasRef,
|
|
@@ -26333,7 +26361,7 @@ function XlsxGrid({
|
|
|
26333
26361
|
style: canvasTopScrollHeaderStyle
|
|
26334
26362
|
}
|
|
26335
26363
|
),
|
|
26336
|
-
/* @__PURE__ */
|
|
26364
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26337
26365
|
"canvas",
|
|
26338
26366
|
{
|
|
26339
26367
|
ref: leftFrozenHeaderCanvasRef,
|
|
@@ -26343,7 +26371,7 @@ function XlsxGrid({
|
|
|
26343
26371
|
style: canvasLeftFrozenHeaderStyle
|
|
26344
26372
|
}
|
|
26345
26373
|
),
|
|
26346
|
-
/* @__PURE__ */
|
|
26374
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26347
26375
|
"canvas",
|
|
26348
26376
|
{
|
|
26349
26377
|
ref: leftScrollHeaderCanvasRef,
|
|
@@ -26353,13 +26381,13 @@ function XlsxGrid({
|
|
|
26353
26381
|
style: canvasLeftScrollHeaderStyle
|
|
26354
26382
|
}
|
|
26355
26383
|
),
|
|
26356
|
-
/* @__PURE__ */
|
|
26384
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "canvas", { ref: cornerHeaderCanvasRef, style: canvasCornerHeaderStyle })
|
|
26357
26385
|
] }),
|
|
26358
26386
|
editingCell && editingOverlayRect ? (() => {
|
|
26359
26387
|
const editingCellStyle = getCellData(editingCell.row, editingCell.col).style;
|
|
26360
26388
|
const editingBackground = typeof editingCellStyle.backgroundColor === "string" ? editingCellStyle.backgroundColor : resolveSheetSurface(activeSheet, palette);
|
|
26361
26389
|
const editingColor = typeof editingCellStyle.color === "string" ? editingCellStyle.color : resolveReadableTextColor(null, editingBackground, palette);
|
|
26362
|
-
return /* @__PURE__ */
|
|
26390
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26363
26391
|
"div",
|
|
26364
26392
|
{
|
|
26365
26393
|
style: {
|
|
@@ -26370,7 +26398,7 @@ function XlsxGrid({
|
|
|
26370
26398
|
height: editingOverlayRect.height,
|
|
26371
26399
|
zIndex: 28
|
|
26372
26400
|
},
|
|
26373
|
-
children: /* @__PURE__ */
|
|
26401
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26374
26402
|
"input",
|
|
26375
26403
|
{
|
|
26376
26404
|
ref: editingInputRef,
|
|
@@ -26416,7 +26444,7 @@ function XlsxGrid({
|
|
|
26416
26444
|
}
|
|
26417
26445
|
);
|
|
26418
26446
|
})() : null,
|
|
26419
|
-
activeCellAdornment && activeCellAdornmentRect ? /* @__PURE__ */
|
|
26447
|
+
activeCellAdornment && activeCellAdornmentRect ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26420
26448
|
"div",
|
|
26421
26449
|
{
|
|
26422
26450
|
style: {
|
|
@@ -26428,10 +26456,10 @@ function XlsxGrid({
|
|
|
26428
26456
|
width: activeCellAdornmentRect.width,
|
|
26429
26457
|
zIndex: 27
|
|
26430
26458
|
},
|
|
26431
|
-
children: /* @__PURE__ */
|
|
26459
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { height: "100%", pointerEvents: "auto", position: "relative", width: "100%" }, children: activeCellAdornment })
|
|
26432
26460
|
}
|
|
26433
26461
|
) : null
|
|
26434
|
-
] }) : /* @__PURE__ */
|
|
26462
|
+
] }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26435
26463
|
"table",
|
|
26436
26464
|
{
|
|
26437
26465
|
ref: tableRef,
|
|
@@ -26443,10 +26471,10 @@ function XlsxGrid({
|
|
|
26443
26471
|
width: totalWidth
|
|
26444
26472
|
},
|
|
26445
26473
|
children: [
|
|
26446
|
-
/* @__PURE__ */
|
|
26447
|
-
/* @__PURE__ */
|
|
26448
|
-
leadingColumnSpacerWidth > 0 ? /* @__PURE__ */
|
|
26449
|
-
renderedCols.map((column) => /* @__PURE__ */
|
|
26474
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "colgroup", { children: [
|
|
26475
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "col", { style: { width: displayRowHeaderWidth } }),
|
|
26476
|
+
leadingColumnSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "col", { style: { width: leadingColumnSpacerWidth } }) : null,
|
|
26477
|
+
renderedCols.map((column) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26450
26478
|
"col",
|
|
26451
26479
|
{
|
|
26452
26480
|
ref: (element) => {
|
|
@@ -26460,10 +26488,10 @@ function XlsxGrid({
|
|
|
26460
26488
|
},
|
|
26461
26489
|
column.key
|
|
26462
26490
|
)),
|
|
26463
|
-
trailingColumnSpacerWidth > 0 ? /* @__PURE__ */
|
|
26491
|
+
trailingColumnSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "col", { style: { width: trailingColumnSpacerWidth } }) : null
|
|
26464
26492
|
] }),
|
|
26465
|
-
/* @__PURE__ */
|
|
26466
|
-
/* @__PURE__ */
|
|
26493
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "thead", { style: { position: "sticky", top: 0, zIndex: canvasHeaderOverlayZIndex }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "tr", { children: [
|
|
26494
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26467
26495
|
"th",
|
|
26468
26496
|
{
|
|
26469
26497
|
style: {
|
|
@@ -26475,8 +26503,8 @@ function XlsxGrid({
|
|
|
26475
26503
|
}
|
|
26476
26504
|
}
|
|
26477
26505
|
),
|
|
26478
|
-
leadingColumnSpacerWidth > 0 ? /* @__PURE__ */
|
|
26479
|
-
renderedCols.map((column) => /* @__PURE__ */
|
|
26506
|
+
leadingColumnSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "th", { "aria-hidden": "true", style: { ...headerCellStyle, padding: 0, width: leadingColumnSpacerWidth } }) : null,
|
|
26507
|
+
renderedCols.map((column) => /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26480
26508
|
"th",
|
|
26481
26509
|
{
|
|
26482
26510
|
"data-xlsx-col-header": column.actualCol,
|
|
@@ -26487,8 +26515,8 @@ function XlsxGrid({
|
|
|
26487
26515
|
left: stickyLeftByCol.get(column.actualCol),
|
|
26488
26516
|
zIndex: stickyLeftByCol.has(column.actualCol) ? stickyHeaderOverlayZIndex : headerCellStyle.zIndex
|
|
26489
26517
|
},
|
|
26490
|
-
children: /* @__PURE__ */
|
|
26491
|
-
/* @__PURE__ */
|
|
26518
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { position: "relative" }, children: [
|
|
26519
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26492
26520
|
"span",
|
|
26493
26521
|
{
|
|
26494
26522
|
style: {
|
|
@@ -26499,7 +26527,7 @@ function XlsxGrid({
|
|
|
26499
26527
|
children: columnLabel2(column.actualCol)
|
|
26500
26528
|
}
|
|
26501
26529
|
),
|
|
26502
|
-
/* @__PURE__ */
|
|
26530
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26503
26531
|
"div",
|
|
26504
26532
|
{
|
|
26505
26533
|
onPointerDown: (event) => {
|
|
@@ -26522,9 +26550,9 @@ function XlsxGrid({
|
|
|
26522
26550
|
},
|
|
26523
26551
|
column.key
|
|
26524
26552
|
)),
|
|
26525
|
-
trailingColumnSpacerWidth > 0 ? /* @__PURE__ */
|
|
26553
|
+
trailingColumnSpacerWidth > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "th", { "aria-hidden": "true", style: { ...headerCellStyle, padding: 0, width: trailingColumnSpacerWidth } }) : null
|
|
26526
26554
|
] }) }),
|
|
26527
|
-
/* @__PURE__ */
|
|
26555
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "tbody", { children: [
|
|
26528
26556
|
virtualRows.map((virtualRow, index) => {
|
|
26529
26557
|
const actualRow = visibleRows[virtualRow.index];
|
|
26530
26558
|
if (actualRow === void 0) {
|
|
@@ -26532,9 +26560,9 @@ function XlsxGrid({
|
|
|
26532
26560
|
}
|
|
26533
26561
|
const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access', _1405 => _1405[index - 1], 'optionalAccess', _1406 => _1406.end]), () => ( 0));
|
|
26534
26562
|
const gapHeight = Math.max(0, virtualRow.start - previousEnd);
|
|
26535
|
-
return /* @__PURE__ */
|
|
26536
|
-
gapHeight > 0 ? /* @__PURE__ */
|
|
26537
|
-
/* @__PURE__ */
|
|
26563
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, _chunkAZWBTFJIcjs.S, { children: [
|
|
26564
|
+
gapHeight > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "tr", { "aria-hidden": "true", style: { height: gapHeight }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "td", { colSpan: rowColSpan }) }) : null,
|
|
26565
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26538
26566
|
MemoGridRow,
|
|
26539
26567
|
{
|
|
26540
26568
|
actualRow,
|
|
@@ -26571,20 +26599,20 @@ function XlsxGrid({
|
|
|
26571
26599
|
)
|
|
26572
26600
|
] }, `row-fragment-${virtualRow.key}`);
|
|
26573
26601
|
}),
|
|
26574
|
-
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1407 => _1407[virtualRows.length - 1], 'optionalAccess', _1408 => _1408.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */
|
|
26602
|
+
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1407 => _1407[virtualRows.length - 1], 'optionalAccess', _1408 => _1408.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26575
26603
|
"tr",
|
|
26576
26604
|
{
|
|
26577
26605
|
style: {
|
|
26578
26606
|
height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1409 => _1409[virtualRows.length - 1], 'optionalAccess', _1410 => _1410.end]), () => ( totalHeight)))
|
|
26579
26607
|
},
|
|
26580
|
-
children: /* @__PURE__ */
|
|
26608
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "td", { colSpan: rowColSpan })
|
|
26581
26609
|
}
|
|
26582
26610
|
) : null
|
|
26583
26611
|
] })
|
|
26584
26612
|
]
|
|
26585
26613
|
}
|
|
26586
26614
|
),
|
|
26587
|
-
/* @__PURE__ */
|
|
26615
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26588
26616
|
"div",
|
|
26589
26617
|
{
|
|
26590
26618
|
ref: canvasSelectionLayerRef,
|
|
@@ -26602,7 +26630,7 @@ function XlsxGrid({
|
|
|
26602
26630
|
},
|
|
26603
26631
|
children: [
|
|
26604
26632
|
!experimentalCanvas ? renderSelectionOverlay() : null,
|
|
26605
|
-
activeCellOverlay != null && activeCellOverlayRect ? /* @__PURE__ */
|
|
26633
|
+
activeCellOverlay != null && activeCellOverlayRect ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26606
26634
|
"div",
|
|
26607
26635
|
{
|
|
26608
26636
|
"data-xlsx-active-cell-overlay": "",
|
|
@@ -26618,7 +26646,7 @@ function XlsxGrid({
|
|
|
26618
26646
|
children: activeCellOverlay
|
|
26619
26647
|
}
|
|
26620
26648
|
) : null,
|
|
26621
|
-
/* @__PURE__ */
|
|
26649
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26622
26650
|
"div",
|
|
26623
26651
|
{
|
|
26624
26652
|
ref: activeValidationOverlayRef,
|
|
@@ -26645,7 +26673,7 @@ function XlsxGrid({
|
|
|
26645
26673
|
]
|
|
26646
26674
|
}
|
|
26647
26675
|
),
|
|
26648
|
-
resizeGuide ? /* @__PURE__ */
|
|
26676
|
+
resizeGuide ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26649
26677
|
"div",
|
|
26650
26678
|
{
|
|
26651
26679
|
"aria-hidden": "true",
|
|
@@ -26663,7 +26691,7 @@ function XlsxGrid({
|
|
|
26663
26691
|
}
|
|
26664
26692
|
}
|
|
26665
26693
|
) : null,
|
|
26666
|
-
!renderTableHeaderMenu && openTableMenuState ? /* @__PURE__ */
|
|
26694
|
+
!renderTableHeaderMenu && openTableMenuState ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26667
26695
|
"div",
|
|
26668
26696
|
{
|
|
26669
26697
|
ref: tableMenuRef,
|
|
@@ -26674,7 +26702,7 @@ function XlsxGrid({
|
|
|
26674
26702
|
top: openTableMenuState.top,
|
|
26675
26703
|
zIndex: 50
|
|
26676
26704
|
},
|
|
26677
|
-
children: /* @__PURE__ */
|
|
26705
|
+
children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26678
26706
|
DefaultTableHeaderMenu,
|
|
26679
26707
|
{
|
|
26680
26708
|
cell: { col: openTableMenuState.column.index + openTableMenuState.table.start.col, row: openTableMenuState.table.start.row },
|
|
@@ -26700,9 +26728,9 @@ function XlsxGrid({
|
|
|
26700
26728
|
)
|
|
26701
26729
|
}
|
|
26702
26730
|
);
|
|
26703
|
-
return /* @__PURE__ */
|
|
26704
|
-
renderScroller ? renderScroller({ children: scrollerContent, viewportProps: scrollerViewportProps }) : /* @__PURE__ */
|
|
26705
|
-
enableContextMenu && contextMenu && /* @__PURE__ */
|
|
26731
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { backgroundColor: palette.canvas, display: "flex", flex: 1, minHeight: 0, minWidth: 0 }, children: [
|
|
26732
|
+
renderScroller ? renderScroller({ children: scrollerContent, viewportProps: scrollerViewportProps }) : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { ...scrollerViewportProps, children: scrollerContent }, activeTabIndex),
|
|
26733
|
+
enableContextMenu && contextMenu && /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26706
26734
|
XlsxContextMenu,
|
|
26707
26735
|
{
|
|
26708
26736
|
...contextMenu,
|
|
@@ -26762,9 +26790,9 @@ function XlsxViewerInner({
|
|
|
26762
26790
|
}) {
|
|
26763
26791
|
const palette = useViewerPalette(isDark, headerBackgroundColor, headerTextColor);
|
|
26764
26792
|
const { displayFileName, error } = controller;
|
|
26765
|
-
const appliedHighlightRef =
|
|
26793
|
+
const appliedHighlightRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
26766
26794
|
const { clearHighlightedRanges, file, highlightRanges, isLoading, sheets, src } = controller;
|
|
26767
|
-
|
|
26795
|
+
_chunkAZWBTFJIcjs.h.call(void 0, () => {
|
|
26768
26796
|
if (isLoading || highlightedRanges === void 0) {
|
|
26769
26797
|
appliedHighlightRef.current = null;
|
|
26770
26798
|
return;
|
|
@@ -26791,7 +26819,7 @@ function XlsxViewerInner({
|
|
|
26791
26819
|
},
|
|
26792
26820
|
palette
|
|
26793
26821
|
) : void 0;
|
|
26794
|
-
return /* @__PURE__ */
|
|
26822
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, ViewerAppearanceContext.Provider, { value: { headerBackgroundColor, headerTextColor, isDark }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, ViewerContext.Provider, { value: controller, children: customFileTooLarge !== void 0 ? customFileTooLarge : /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26795
26823
|
"div",
|
|
26796
26824
|
{
|
|
26797
26825
|
className: classNames("react-xlsx-viewer", className),
|
|
@@ -26814,9 +26842,9 @@ function XlsxViewerInner({
|
|
|
26814
26842
|
width: "100%"
|
|
26815
26843
|
},
|
|
26816
26844
|
children: [
|
|
26817
|
-
/* @__PURE__ */
|
|
26845
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "style", { children: RANGE_HIGHLIGHT_STYLES }),
|
|
26818
26846
|
resolveToolbar(toolbar, showDefaultToolbar, controller, palette),
|
|
26819
|
-
/* @__PURE__ */
|
|
26847
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "div", { style: { display: "flex", flex: 1, minHeight: 0, minWidth: 0 }, children: /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0,
|
|
26820
26848
|
XlsxGrid,
|
|
26821
26849
|
{
|
|
26822
26850
|
allowResizeInReadOnly,
|
|
@@ -26857,23 +26885,23 @@ function XlsxViewerInner({
|
|
|
26857
26885
|
}
|
|
26858
26886
|
function XlsxViewerWithInlineController(props) {
|
|
26859
26887
|
const controller = useXlsxViewerController(props);
|
|
26860
|
-
return /* @__PURE__ */
|
|
26888
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewerInner, { ...props, controller });
|
|
26861
26889
|
}
|
|
26862
26890
|
function XlsxViewer(props) {
|
|
26863
|
-
const contextController =
|
|
26891
|
+
const contextController = _chunkAZWBTFJIcjs.x.call(void 0, ViewerContext);
|
|
26864
26892
|
if (props.controller) {
|
|
26865
|
-
return /* @__PURE__ */
|
|
26893
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewerInner, { ...props, controller: props.controller });
|
|
26866
26894
|
}
|
|
26867
26895
|
if (contextController) {
|
|
26868
|
-
return /* @__PURE__ */
|
|
26896
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewerInner, { ...props, controller: contextController });
|
|
26869
26897
|
}
|
|
26870
|
-
return /* @__PURE__ */
|
|
26898
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewerWithInlineController, { ...props });
|
|
26871
26899
|
}
|
|
26872
26900
|
|
|
26873
26901
|
// src/vanilla.tsx
|
|
26874
26902
|
function DomContent({ node }) {
|
|
26875
|
-
const hostRef =
|
|
26876
|
-
|
|
26903
|
+
const hostRef = _chunkAZWBTFJIcjs.A.call(void 0, null);
|
|
26904
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => {
|
|
26877
26905
|
const host = hostRef.current;
|
|
26878
26906
|
if (!host) return;
|
|
26879
26907
|
host.replaceChildren(node);
|
|
@@ -26881,10 +26909,10 @@ function DomContent({ node }) {
|
|
|
26881
26909
|
if (node.parentNode === host) host.removeChild(node);
|
|
26882
26910
|
};
|
|
26883
26911
|
}, [node]);
|
|
26884
|
-
return /* @__PURE__ */
|
|
26912
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, "span", { ref: hostRef, style: { display: "contents" } });
|
|
26885
26913
|
}
|
|
26886
26914
|
function toReactContent(content) {
|
|
26887
|
-
return content !== null && typeof content === "object" ? /* @__PURE__ */
|
|
26915
|
+
return content !== null && typeof content === "object" ? /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, DomContent, { node: content }) : content;
|
|
26888
26916
|
}
|
|
26889
26917
|
function toReactOptions(options) {
|
|
26890
26918
|
const {
|
|
@@ -26920,9 +26948,9 @@ function VanillaViewerRoot({
|
|
|
26920
26948
|
publish
|
|
26921
26949
|
}) {
|
|
26922
26950
|
const controller = useXlsxViewerController(options);
|
|
26923
|
-
const viewerOptions =
|
|
26924
|
-
|
|
26925
|
-
return /* @__PURE__ */
|
|
26951
|
+
const viewerOptions = _chunkAZWBTFJIcjs.T.call(void 0, () => toReactOptions(options), [options]);
|
|
26952
|
+
_chunkAZWBTFJIcjs._.call(void 0, () => publish(controller, generation), [controller, generation, publish]);
|
|
26953
|
+
return /* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewer, { ...viewerOptions, controller });
|
|
26926
26954
|
}
|
|
26927
26955
|
function mergeOptions(current, next) {
|
|
26928
26956
|
if (next.file !== void 0 && next.src !== void 0) {
|
|
@@ -26962,7 +26990,7 @@ function createViewer(container, initialOptions = {}) {
|
|
|
26962
26990
|
});
|
|
26963
26991
|
};
|
|
26964
26992
|
const render = () => root.render(
|
|
26965
|
-
/* @__PURE__ */
|
|
26993
|
+
/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, VanillaViewerRoot, { generation, options, publish }, generation)
|
|
26966
26994
|
);
|
|
26967
26995
|
const assertActive = () => {
|
|
26968
26996
|
if (destroyed) throw new Error("The viewer has been destroyed.");
|
|
@@ -27034,7 +27062,7 @@ function __createControlledViewer(container) {
|
|
|
27034
27062
|
const root = createRoot(element);
|
|
27035
27063
|
return {
|
|
27036
27064
|
update(props) {
|
|
27037
|
-
root.render(/* @__PURE__ */
|
|
27065
|
+
root.render(/* @__PURE__ */ _chunkAZWBTFJIcjs.u.call(void 0, XlsxViewer, { ...props }));
|
|
27038
27066
|
},
|
|
27039
27067
|
destroy() {
|
|
27040
27068
|
root.unmount();
|
|
@@ -27072,4 +27100,4 @@ function __createContentRoot(container) {
|
|
|
27072
27100
|
|
|
27073
27101
|
|
|
27074
27102
|
exports.parseXlsxRange = parseXlsxRange; exports.formatBinaryBytes = formatBinaryBytes; exports.XlsxFileSizeLimitExceededError = XlsxFileSizeLimitExceededError; exports.setWasmSource = setWasmSource; exports.initWasm = initWasm; exports.canUseConfiguredWasmSourceInWorker = canUseConfiguredWasmSourceInWorker; exports.getConfiguredWorkerWasmSource = getConfiguredWorkerWasmSource; exports.getSheetsWasmModule = getSheetsWasmModule; exports.XlsxViewer = XlsxViewer2; exports.createXlsxViewer = createXlsxViewer; exports.__createControlledViewer = __createControlledViewer; exports.__createContentNode = __createContentNode; exports.__createContentRoot = __createContentRoot;
|
|
27075
|
-
//# sourceMappingURL=chunk-
|
|
27103
|
+
//# sourceMappingURL=chunk-ZJ76CZAL.cjs.map
|