@extend-ai/react-xlsx 0.20.1 → 0.20.3
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/browser-B73UAN6E.cjs +232 -0
- package/dist/browser-B73UAN6E.cjs.map +1 -0
- package/dist/browser-KWIEUO2X.js +228 -0
- package/dist/browser-KWIEUO2X.js.map +1 -0
- package/dist/{chart-renderer-K6GORT3R.cjs → chart-renderer-2EKXNHUD.cjs} +286 -365
- package/dist/chart-renderer-2EKXNHUD.cjs.map +1 -0
- package/dist/{chart-renderer-K2VM257E.cjs → chart-renderer-W7XW24JI.cjs} +526 -604
- package/dist/chart-renderer-W7XW24JI.cjs.map +1 -0
- package/dist/{chart-renderer-KGLAI4DN.js → chart-renderer-XBF7EPUS.js} +13 -92
- package/dist/chart-renderer-XBF7EPUS.js.map +1 -0
- package/dist/{chart-renderer-RXO7WP4Q.js → chart-renderer-ZLJVPLGN.js} +23 -101
- package/dist/chart-renderer-ZLJVPLGN.js.map +1 -0
- package/dist/{chunk-2MVEKDY2.cjs → chunk-6IGWCJU5.cjs} +25 -9
- package/dist/chunk-6IGWCJU5.cjs.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-GXJO6CK6.js → chunk-HEEFCVWS.js} +40 -12
- package/dist/chunk-HEEFCVWS.js.map +1 -0
- package/dist/{chunk-3JTCYAUX.js → chunk-HKMFMIKE.js} +14 -3
- package/dist/chunk-HKMFMIKE.js.map +1 -0
- package/dist/chunk-IDNIGBUM.cjs +108 -0
- package/dist/chunk-IDNIGBUM.cjs.map +1 -0
- package/dist/chunk-M55TBS4X.cjs +111 -0
- package/dist/chunk-M55TBS4X.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-WSQDFXDW.js → chunk-VG4JELEQ.js} +22 -6
- package/dist/chunk-VG4JELEQ.js.map +1 -0
- package/dist/{chunk-54YBFWL3.cjs → chunk-WGRRI25I.cjs} +14 -3
- package/dist/chunk-WGRRI25I.cjs.map +1 -0
- package/dist/{chunk-HAHCVXCU.cjs → chunk-XISBYOD5.cjs} +787 -759
- package/dist/chunk-XISBYOD5.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/office_charts_bg.wasm +0 -0
- package/dist/payload-JBPE7GEG.cjs +8 -0
- package/dist/payload-JBPE7GEG.cjs.map +1 -0
- package/dist/payload-KYNCVJT5.js +6 -0
- package/dist/payload-KYNCVJT5.js.map +1 -0
- 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/rust-office-charts-LICENSE.txt +21 -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 +9 -7
- 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
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;require('./chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;require('./chunk-WGRRI25I.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -1632,6 +1632,21 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
|
|
|
1632
1632
|
chart.axes = [...chart.axes, seriesAxis];
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
|
+
const kind = chartTypeNode.localName === "lineChart" && chart.chartType === "Line" ? "line" : chartTypeNode.localName === "barChart" && chart.chartType === "ColumnClustered" ? "bar" : null;
|
|
1636
|
+
const groupCount = Array.from(plotArea.children).filter((entry) => entry.localName.endsWith("Chart")).length;
|
|
1637
|
+
if (kind && groupCount === 1 && !chart.is3d && !plotArea.querySelector("trendline, errBars, dropLines, hiLowLines, upDownBars, dateAx, multiLvlStrRef, pictureOptions") && getLocalChildren(chartTypeNode, "ser").length === chart.series.length) {
|
|
1638
|
+
chart.renderSource = {
|
|
1639
|
+
kind,
|
|
1640
|
+
xml: chartXml,
|
|
1641
|
+
themeColors: themePalette ? Object.fromEntries(Object.entries(THEME_COLOR_INDEX_BY_NAME).flatMap(([key, index]) => {
|
|
1642
|
+
const color = themePalette.colorsByIndex[index];
|
|
1643
|
+
return color ? [[key, color]] : [];
|
|
1644
|
+
})) : void 0,
|
|
1645
|
+
themeOverrideXml: _nullishCoalesce(readArchiveText(archive, relationships.get("http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride")), () => ( void 0)),
|
|
1646
|
+
styleXml: _nullishCoalesce(readArchiveText(archive, relationships.get(CHART_STYLE_REL_TYPE)), () => ( void 0)),
|
|
1647
|
+
colorStyleXml: _nullishCoalesce(readArchiveText(archive, relationships.get(CHART_COLOR_STYLE_REL_TYPE)), () => ( void 0))
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1635
1650
|
applyChartSeriesStyleFromXml(chart, chartTypeNode, themePalette);
|
|
1636
1651
|
applyFallbackSeriesStyles();
|
|
1637
1652
|
applyBuiltinChartDefaults(chart, themePalette);
|
|
@@ -10430,7 +10445,11 @@ function useXlsxViewerController(options) {
|
|
|
10430
10445
|
if (imageAssetsRef.current && hydratedChartAssets) {
|
|
10431
10446
|
updateWorkbookChartDefinition(imageAssetsRef.current, hydratedChartAssets, id, patch);
|
|
10432
10447
|
}
|
|
10433
|
-
setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) =>
|
|
10448
|
+
setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) => {
|
|
10449
|
+
if (chart.id !== id) return chart;
|
|
10450
|
+
const appearanceUnchanged = Object.keys(patch).every((key) => key === "anchor" || key === "title");
|
|
10451
|
+
return { ...chart, renderSource: appearanceUnchanged ? chart.renderSource : void 0, ...patch };
|
|
10452
|
+
})));
|
|
10434
10453
|
setRevision((current) => current + 1);
|
|
10435
10454
|
}, [ensureChartAssetsHydrated, getChartById, readOnly, recordHistoryBeforeMutation, sheets, workbook]);
|
|
10436
10455
|
const setChartSeriesFormula = React.useCallback((chartId, seriesIndex, formula) => {
|
|
@@ -10445,7 +10464,7 @@ function useXlsxViewerController(options) {
|
|
|
10445
10464
|
if (!nextChart) {
|
|
10446
10465
|
return false;
|
|
10447
10466
|
}
|
|
10448
|
-
updateChart(chartId, { series: nextChart.series });
|
|
10467
|
+
updateChart(chartId, { series: nextChart.series, renderSource: chart.renderSource });
|
|
10449
10468
|
const selectedSeries = nextChart.series[seriesIndex];
|
|
10450
10469
|
if (selectedSeries) {
|
|
10451
10470
|
setSelectedChartElement((current) => current && current.chartId === chartId && current.kind !== "chart" ? {
|