@extend-ai/react-xlsx 0.24.2 → 0.24.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/README.md +1 -1
- package/dist/{chunk-LX33ROHL.cjs → chunk-6TAWBCPV.cjs} +541 -516
- package/dist/chunk-6TAWBCPV.cjs.map +1 -0
- package/dist/{chunk-J3G4UUGR.js → chunk-TVUCGYTJ.js} +34 -9
- package/dist/chunk-TVUCGYTJ.js.map +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +2 -2
- package/dist/internal.js +1 -1
- package/dist/vanilla.cjs +2 -2
- package/dist/vanilla.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-J3G4UUGR.js.map +0 -1
- package/dist/chunk-LX33ROHL.cjs.map +0 -1
|
@@ -7420,7 +7420,7 @@ function hiddenRangeEnds(hidden) {
|
|
|
7420
7420
|
}
|
|
7421
7421
|
return ends;
|
|
7422
7422
|
}
|
|
7423
|
-
function HiddenRangeMarker({ axis, start, end, label, position, color, readOnly, canUnhide, onUnhide, render, zoomFactor }) {
|
|
7423
|
+
function HiddenRangeMarker({ axis, start, end, label, position, color, readOnly, canUnhide, onUnhide, openContextMenu, render, zoomFactor }) {
|
|
7424
7424
|
const action = _chunkTLEC4K6Wcjs.A.call(void 0, onUnhide);
|
|
7425
7425
|
action.current = onUnhide;
|
|
7426
7426
|
const unhide = _chunkTLEC4K6Wcjs.q.call(void 0, () => {
|
|
@@ -7452,6 +7452,12 @@ function HiddenRangeMarker({ axis, start, end, label, position, color, readOnly,
|
|
|
7452
7452
|
"span",
|
|
7453
7453
|
{
|
|
7454
7454
|
"data-xlsx-hidden-range-marker": axis,
|
|
7455
|
+
onContextMenu: openContextMenu && canUnhide ? (event) => {
|
|
7456
|
+
if (event.defaultPrevented) return;
|
|
7457
|
+
event.preventDefault();
|
|
7458
|
+
event.stopPropagation();
|
|
7459
|
+
openContextMenu(axis, start, end, { x: event.clientX, y: event.clientY });
|
|
7460
|
+
} : void 0,
|
|
7455
7461
|
onPointerDown: (event) => event.stopPropagation(),
|
|
7456
7462
|
onKeyDown: (event) => event.stopPropagation(),
|
|
7457
7463
|
style: {
|
|
@@ -7833,7 +7839,8 @@ function XlsxContextMenu({
|
|
|
7833
7839
|
editSize,
|
|
7834
7840
|
renderContextMenu,
|
|
7835
7841
|
contextMenuClassName,
|
|
7836
|
-
contextMenuStyle
|
|
7842
|
+
contextMenuStyle,
|
|
7843
|
+
hiddenRange
|
|
7837
7844
|
}) {
|
|
7838
7845
|
const { messages } = controller;
|
|
7839
7846
|
const rootRef = _chunkTLEC4K6Wcjs.A.call(void 0, null);
|
|
@@ -7864,6 +7871,8 @@ function XlsxContextMenu({
|
|
|
7864
7871
|
const clearContents = { id: "clearContents", label: messages.clearContents, destructive: true, disabled: touchesPivot };
|
|
7865
7872
|
const isHeader = context.kind === "row" || context.kind === "column";
|
|
7866
7873
|
const row3 = context.kind === "row";
|
|
7874
|
+
const canChangeVisibility = _nullishCoalesce(controller.canChangeVisibility, () => ( !controller.readOnly));
|
|
7875
|
+
const unhide = { id: row3 ? "unhideRows" : "unhideColumns", label: messages.unhide };
|
|
7867
7876
|
const headerActions = [
|
|
7868
7877
|
...cutCopy,
|
|
7869
7878
|
...!controller.readOnly ? [paste, clearContents] : [],
|
|
@@ -7872,9 +7881,9 @@ function XlsxContextMenu({
|
|
|
7872
7881
|
label: `${row3 ? messages.rowHeight : messages.columnWidth}\u2026`,
|
|
7873
7882
|
separatorBefore: true
|
|
7874
7883
|
}] : [],
|
|
7875
|
-
...
|
|
7884
|
+
...canChangeVisibility ? [
|
|
7876
7885
|
{ id: row3 ? "hideRows" : "hideColumns", label: messages.hide, separatorBefore: !canResize },
|
|
7877
|
-
|
|
7886
|
+
unhide
|
|
7878
7887
|
] : []
|
|
7879
7888
|
];
|
|
7880
7889
|
const cellActions = [
|
|
@@ -7948,7 +7957,7 @@ function XlsxContextMenu({
|
|
|
7948
7957
|
{ id: "sendBackward", label: "Send Backward", disabled: drawingDisabled || drawing.zIndex <= minOrder }
|
|
7949
7958
|
]
|
|
7950
7959
|
}
|
|
7951
|
-
] : isHeader ? headerActions : cellActions;
|
|
7960
|
+
] : hiddenRange ? canChangeVisibility ? [unhide] : [] : isHeader ? headerActions : cellActions;
|
|
7952
7961
|
const findAction = (items, id) => {
|
|
7953
7962
|
for (const item of items) {
|
|
7954
7963
|
if (item.disabled) continue;
|
|
@@ -8078,11 +8087,13 @@ function XlsxContextMenu({
|
|
|
8078
8087
|
editSize(id === "rowHeight" ? "row" : "column");
|
|
8079
8088
|
return true;
|
|
8080
8089
|
case "hideRows":
|
|
8081
|
-
case "unhideRows":
|
|
8082
8090
|
case "hideColumns":
|
|
8083
|
-
case "unhideColumns":
|
|
8084
8091
|
controller[id]();
|
|
8085
8092
|
break;
|
|
8093
|
+
case "unhideRows":
|
|
8094
|
+
case "unhideColumns":
|
|
8095
|
+
controller[id](_optionalChain([hiddenRange, 'optionalAccess', _525 => _525.start]), _optionalChain([hiddenRange, 'optionalAccess', _526 => _526.end]));
|
|
8096
|
+
break;
|
|
8086
8097
|
case "selectRow":
|
|
8087
8098
|
selectExtent("row");
|
|
8088
8099
|
break;
|
|
@@ -8190,14 +8201,14 @@ function PivotGroupControls({
|
|
|
8190
8201
|
if (readOnly) return null;
|
|
8191
8202
|
const size = Math.max(14, 14 * zoom);
|
|
8192
8203
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: [
|
|
8193
|
-
pivots.filter((pivot) => pivot.target.sheet.toLowerCase() === _optionalChain([sheetName, 'optionalAccess',
|
|
8204
|
+
pivots.filter((pivot) => pivot.target.sheet.toLowerCase() === _optionalChain([sheetName, 'optionalAccess', _527 => _527.toLowerCase, 'call', _528 => _528()]) && !pivot.unsupportedFeatures.length).flatMap((pivot) => (_nullishCoalesce(pivot.toggles, () => ( []))).flatMap((toggle) => {
|
|
8194
8205
|
const rect = rectForCell(toggle);
|
|
8195
8206
|
if (!rect) return [];
|
|
8196
8207
|
const frozenTop = stickyTop.get(toggle.row);
|
|
8197
8208
|
const frozenLeft = stickyLeft.get(toggle.col);
|
|
8198
8209
|
const top = !renderControl && frozenTop !== void 0 ? frozenTop + viewport.top : rect.top;
|
|
8199
8210
|
const left = !renderControl && frozenLeft !== void 0 ? frozenLeft + viewport.left : rect.left;
|
|
8200
|
-
const hasHeader = _optionalChain([pivot, 'access',
|
|
8211
|
+
const hasHeader = _optionalChain([pivot, 'access', _529 => _529.headers, 'optionalAccess', _530 => _530.some, 'call', _531 => _531((header) => header.row === toggle.row && header.col === toggle.col)]);
|
|
8201
8212
|
const x2 = left + Math.max(0, rect.width - size - (hasHeader ? size + 6 * zoom : 3 * zoom));
|
|
8202
8213
|
const y2 = top + Math.max(0, (rect.height - size) / 2);
|
|
8203
8214
|
if (!renderControl && (x2 < viewport.left + (frozenLeft === void 0 ? frozenRight : 0) || y2 < viewport.top + (frozenTop === void 0 ? frozenBottom : 0) || x2 + size > viewport.left + viewport.width || y2 + size > viewport.top + viewport.height)) return [];
|
|
@@ -8276,7 +8287,7 @@ function groupUnit(axis) {
|
|
|
8276
8287
|
function axisFor(pivot, header, field) {
|
|
8277
8288
|
const axes = header.axis === "reportFilters" ? [...pivot.rows, ...pivot.columns] : pivot[header.axis];
|
|
8278
8289
|
const candidate = header.axis === "reportFilters" ? void 0 : axes[field.depth];
|
|
8279
|
-
return _optionalChain([candidate, 'optionalAccess',
|
|
8290
|
+
return _optionalChain([candidate, 'optionalAccess', _532 => _532.field]) === field.field ? candidate : axes.find((axis) => axis.field === field.field && groupUnit(axis) === (_nullishCoalesce(field.groupingUnit, () => ( null))));
|
|
8280
8291
|
}
|
|
8281
8292
|
function scoped(filter, field) {
|
|
8282
8293
|
return filter.field === field.field && (_nullishCoalesce(filter.groupingUnit, () => ( null))) === (_nullishCoalesce(field.groupingUnit, () => ( null)));
|
|
@@ -8302,7 +8313,7 @@ function Input({ label, value, onChange, ...props }) {
|
|
|
8302
8313
|
function DefaultPivotHeaderPopup({ menu, anchor, colors, popupRef }) {
|
|
8303
8314
|
const [search, setSearch] = _chunkTLEC4K6Wcjs.d.call(void 0, "");
|
|
8304
8315
|
const existingMembers = menu.filters.find((filter) => filter.kind === "members");
|
|
8305
|
-
const [selected, setSelected] = _chunkTLEC4K6Wcjs.d.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([existingMembers, 'optionalAccess',
|
|
8316
|
+
const [selected, setSelected] = _chunkTLEC4K6Wcjs.d.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([existingMembers, 'optionalAccess', _533 => _533.values]), () => ( menu.members.map((member) => member.key)))));
|
|
8306
8317
|
const [mode, setMode] = _chunkTLEC4K6Wcjs.d.call(void 0, "members");
|
|
8307
8318
|
const [draft, setDraft] = _chunkTLEC4K6Wcjs.d.call(void 0, () => filterDefault(menu.field, "label"));
|
|
8308
8319
|
const [sortMeasure, setSortMeasure] = _chunkTLEC4K6Wcjs.d.call(void 0, "0");
|
|
@@ -8310,13 +8321,13 @@ function DefaultPivotHeaderPopup({ menu, anchor, colors, popupRef }) {
|
|
|
8310
8321
|
const titleId = _chunkTLEC4K6Wcjs.g.call(void 0, );
|
|
8311
8322
|
const searchRef = _chunkTLEC4K6Wcjs.A.call(void 0, null);
|
|
8312
8323
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
8313
|
-
_optionalChain([searchRef, 'access',
|
|
8324
|
+
_optionalChain([searchRef, 'access', _534 => _534.current, 'optionalAccess', _535 => _535.focus, 'call', _536 => _536()]);
|
|
8314
8325
|
}, []);
|
|
8315
8326
|
_chunkTLEC4K6Wcjs._.call(void 0, () => {
|
|
8316
8327
|
const padding = 8;
|
|
8317
8328
|
const width = Math.max(0, Math.min(308, window.innerWidth - padding * 2));
|
|
8318
8329
|
const maxHeight = Math.max(0, Math.min(480, window.innerHeight - padding * 2));
|
|
8319
|
-
const height = Math.min(_nullishCoalesce(_optionalChain([popupRef, 'access',
|
|
8330
|
+
const height = Math.min(_nullishCoalesce(_optionalChain([popupRef, 'access', _537 => _537.current, 'optionalAccess', _538 => _538.getBoundingClientRect, 'call', _539 => _539(), 'access', _540 => _540.height]), () => ( 440)), maxHeight);
|
|
8320
8331
|
const below = anchor.bottom + 4;
|
|
8321
8332
|
const top = below + height <= window.innerHeight - padding ? below : Math.max(padding, anchor.top - height - 4);
|
|
8322
8333
|
const left = Math.max(padding, Math.min(anchor.right - width, window.innerWidth - width - padding));
|
|
@@ -8341,8 +8352,8 @@ function DefaultPivotHeaderPopup({ menu, anchor, colors, popupRef }) {
|
|
|
8341
8352
|
return;
|
|
8342
8353
|
}
|
|
8343
8354
|
if (event.key !== "Tab") return;
|
|
8344
|
-
const targets = _optionalChain([popupRef, 'access',
|
|
8345
|
-
if (!_optionalChain([targets, 'optionalAccess',
|
|
8355
|
+
const targets = _optionalChain([popupRef, 'access', _541 => _541.current, 'optionalAccess', _542 => _542.querySelectorAll, 'call', _543 => _543('button:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex="0"]')]);
|
|
8356
|
+
if (!_optionalChain([targets, 'optionalAccess', _544 => _544.length])) return;
|
|
8346
8357
|
const first = targets[0];
|
|
8347
8358
|
const last = targets[targets.length - 1];
|
|
8348
8359
|
if (event.shiftKey && document.activeElement === first) {
|
|
@@ -8493,10 +8504,10 @@ function PivotHeaderControls({ pivots, sheetName, rectForCell, viewport, viewpor
|
|
|
8493
8504
|
measure();
|
|
8494
8505
|
viewportElement.addEventListener("scroll", measure, { passive: true });
|
|
8495
8506
|
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
8496
|
-
_optionalChain([observer, 'optionalAccess',
|
|
8507
|
+
_optionalChain([observer, 'optionalAccess', _545 => _545.observe, 'call', _546 => _546(viewportElement)]);
|
|
8497
8508
|
return () => {
|
|
8498
8509
|
viewportElement.removeEventListener("scroll", measure);
|
|
8499
|
-
_optionalChain([observer, 'optionalAccess',
|
|
8510
|
+
_optionalChain([observer, 'optionalAccess', _547 => _547.disconnect, 'call', _548 => _548()]);
|
|
8500
8511
|
if (frame !== null) cancelAnimationFrame(frame);
|
|
8501
8512
|
};
|
|
8502
8513
|
}, [viewportElement, Boolean(renderControl)]);
|
|
@@ -8531,27 +8542,27 @@ function PivotHeaderControls({ pivots, sheetName, rectForCell, viewport, viewpor
|
|
|
8531
8542
|
measure();
|
|
8532
8543
|
window.addEventListener("resize", measure);
|
|
8533
8544
|
window.addEventListener("scroll", measure, true);
|
|
8534
|
-
_optionalChain([viewportElement, 'optionalAccess',
|
|
8545
|
+
_optionalChain([viewportElement, 'optionalAccess', _549 => _549.addEventListener, 'call', _550 => _550(VIEWPORT_CHANGE_EVENT, measure)]);
|
|
8535
8546
|
const outside = (event) => {
|
|
8536
8547
|
const target = event.target;
|
|
8537
|
-
if (target && (_optionalChain([popupRef, 'access',
|
|
8548
|
+
if (target && (_optionalChain([popupRef, 'access', _551 => _551.current, 'optionalAccess', _552 => _552.contains, 'call', _553 => _553(target)]) || _optionalChain([triggers, 'access', _554 => _554.current, 'access', _555 => _555.get, 'call', _556 => _556(open.key), 'optionalAccess', _557 => _557.contains, 'call', _558 => _558(target)]))) return;
|
|
8538
8549
|
setOpen(null);
|
|
8539
8550
|
};
|
|
8540
8551
|
document.addEventListener("pointerdown", outside, true);
|
|
8541
8552
|
return () => {
|
|
8542
8553
|
window.removeEventListener("resize", measure);
|
|
8543
8554
|
window.removeEventListener("scroll", measure, true);
|
|
8544
|
-
_optionalChain([viewportElement, 'optionalAccess',
|
|
8555
|
+
_optionalChain([viewportElement, 'optionalAccess', _559 => _559.removeEventListener, 'call', _560 => _560(VIEWPORT_CHANGE_EVENT, measure)]);
|
|
8545
8556
|
document.removeEventListener("pointerdown", outside, true);
|
|
8546
8557
|
};
|
|
8547
8558
|
}, [open, pivots, viewportElement, viewport.left, viewport.top, viewport.width, viewport.height]);
|
|
8548
8559
|
const close = () => {
|
|
8549
|
-
const key = _optionalChain([open, 'optionalAccess',
|
|
8560
|
+
const key = _optionalChain([open, 'optionalAccess', _561 => _561.key]);
|
|
8550
8561
|
setOpen(null);
|
|
8551
8562
|
setError(null);
|
|
8552
|
-
if (key) requestAnimationFrame(() => _optionalChain([triggers, 'access',
|
|
8563
|
+
if (key) requestAnimationFrame(() => _optionalChain([triggers, 'access', _562 => _562.current, 'access', _563 => _563.get, 'call', _564 => _564(key), 'optionalAccess', _565 => _565.focus, 'call', _566 => _566()]));
|
|
8553
8564
|
};
|
|
8554
|
-
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: pivots.filter((pivot) => pivot.target.sheet.toLowerCase() === _optionalChain([sheetName, 'optionalAccess',
|
|
8565
|
+
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: pivots.filter((pivot) => pivot.target.sheet.toLowerCase() === _optionalChain([sheetName, 'optionalAccess', _567 => _567.toLowerCase, 'call', _568 => _568()])).flatMap((pivot) => (_nullishCoalesce(pivot.headers, () => ( []))).flatMap((header) => {
|
|
8555
8566
|
if (!header.fields.length) return [];
|
|
8556
8567
|
const rect = rectForCell(header);
|
|
8557
8568
|
if (!rect) return [];
|
|
@@ -8565,15 +8576,15 @@ function PivotHeaderControls({ pivots, sheetName, rectForCell, viewport, viewpor
|
|
|
8565
8576
|
const y2 = top + (experimentalCanvas ? Math.max(0, rect.height - size - zoom) : 3 * zoom);
|
|
8566
8577
|
if (!renderControl && (x2 < liveViewport.left + (frozenLeft === void 0 ? frozenRight : 0) || y2 < liveViewport.top + (frozenTop === void 0 ? frozenBottom : 0) || x2 + width > liveViewport.left + liveViewport.width || y2 + height > liveViewport.top + liveViewport.height)) return [];
|
|
8567
8578
|
const key = `${pivot.id}:${header.row}:${header.col}:${header.axis}`;
|
|
8568
|
-
const isOpen = _optionalChain([open, 'optionalAccess',
|
|
8579
|
+
const isOpen = _optionalChain([open, 'optionalAccess', _569 => _569.key]) === key;
|
|
8569
8580
|
const field = _nullishCoalesce(header.fields.find((field2) => isOpen && field2.depth === open.depth), () => ( header.fields[0]));
|
|
8570
8581
|
const axis = axisFor(pivot, header, field);
|
|
8571
|
-
const members = _optionalChain([axis, 'optionalAccess',
|
|
8582
|
+
const members = _optionalChain([axis, 'optionalAccess', _570 => _570.items, 'optionalAccess', _571 => _571.length]) ? axis.items : _nullishCoalesce(_optionalChain([pivot, 'access', _572 => _572.fields, 'access', _573 => _573.find, 'call', _574 => _574((source) => source.index === field.field), 'optionalAccess', _575 => _575.items]), () => ( []));
|
|
8572
8583
|
const filters = pivot.filters.filter((filter) => scoped(filter, field));
|
|
8573
8584
|
const filtered = header.fields.some((field2) => pivot.filters.some((filter) => scoped(filter, field2)));
|
|
8574
|
-
const label = _nullishCoalesce(_optionalChain([openLabel, 'optionalAccess',
|
|
8585
|
+
const label = _nullishCoalesce(_optionalChain([openLabel, 'optionalAccess', _576 => _576.replace, 'call', _577 => _577("{column}", header.caption || field.name)]), () => ( `Sort and filter ${header.caption || field.name}`));
|
|
8575
8586
|
const locked = readOnly || pivot.unsupportedFeatures.length > 0;
|
|
8576
|
-
const direction = _optionalChain([axis, 'optionalAccess',
|
|
8587
|
+
const direction = _optionalChain([axis, 'optionalAccess', _578 => _578.sort]) === "ascending" || _optionalChain([axis, 'optionalAccess', _579 => _579.sort]) === "valueAscending" ? "ascending" : _optionalChain([axis, 'optionalAccess', _580 => _580.sort]) === "descending" || _optionalChain([axis, 'optionalAccess', _581 => _581.sort]) === "valueDescending" ? "descending" : null;
|
|
8577
8588
|
const foreground = isDark ? _nullishCoalesce(colors.headerText, () => ( colors.text)) : "#667174";
|
|
8578
8589
|
const triggerContent = experimentalCanvas ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: size, height: size, style: { display: "block", flexShrink: 0 }, children: [
|
|
8579
8590
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "rect", { width: "16", height: "16", fill: isDark ? _nullishCoalesce(colors.headerSurface, () => ( colors.surface)) : "#f8fafb" }),
|
|
@@ -8602,7 +8613,7 @@ function PivotHeaderControls({ pivots, sheetName, rectForCell, viewport, viewpor
|
|
|
8602
8613
|
field,
|
|
8603
8614
|
members,
|
|
8604
8615
|
filters,
|
|
8605
|
-
sort: header.axis === "reportFilters" ? null : _nullishCoalesce(_optionalChain([axis, 'optionalAccess',
|
|
8616
|
+
sort: header.axis === "reportFilters" ? null : _nullishCoalesce(_optionalChain([axis, 'optionalAccess', _582 => _582.sort]), () => ( null)),
|
|
8606
8617
|
readOnly: locked,
|
|
8607
8618
|
isOpen,
|
|
8608
8619
|
setField: (depth) => {
|
|
@@ -8614,7 +8625,7 @@ function PivotHeaderControls({ pivots, sheetName, rectForCell, viewport, viewpor
|
|
|
8614
8625
|
setOpen: (next) => {
|
|
8615
8626
|
if (next) {
|
|
8616
8627
|
setOpen({ key, depth: field.depth });
|
|
8617
|
-
setAnchor(_nullishCoalesce(_optionalChain([triggers, 'access',
|
|
8628
|
+
setAnchor(_nullishCoalesce(_optionalChain([triggers, 'access', _583 => _583.current, 'access', _584 => _584.get, 'call', _585 => _585(key), 'optionalAccess', _586 => _586.getBoundingClientRect, 'call', _587 => _587()]), () => ( null)));
|
|
8618
8629
|
setError(null);
|
|
8619
8630
|
} else setOpen(null);
|
|
8620
8631
|
},
|
|
@@ -8715,7 +8726,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8715
8726
|
const [savedDefinition, setSavedDefinition] = _chunkTLEC4K6Wcjs.d.call(void 0, "");
|
|
8716
8727
|
const [pendingFocus, setPendingFocus] = _chunkTLEC4K6Wcjs.d.call(void 0, null);
|
|
8717
8728
|
const sourceNeedsLoad = Boolean(draft && JSON.stringify(draft.source) !== loadedSource);
|
|
8718
|
-
const stale = Boolean(dirty && _optionalChain([draft, 'optionalAccess',
|
|
8729
|
+
const stale = Boolean(dirty && _optionalChain([draft, 'optionalAccess', _588 => _588.id]) && savedDefinition !== JSON.stringify(_nullishCoalesce(viewer.pivotTables.find((pivot) => pivot.id === draft.id), () => ( null))));
|
|
8719
8730
|
const run = _chunkTLEC4K6Wcjs.q.call(void 0, (action) => {
|
|
8720
8731
|
setError(null);
|
|
8721
8732
|
setStatus(null);
|
|
@@ -8740,7 +8751,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8740
8751
|
if (options2.initialOpen !== void 0) setOpen(options2.initialOpen);
|
|
8741
8752
|
}, [viewer.src, viewer.file]);
|
|
8742
8753
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
8743
|
-
if (options2.enabled === false || dirty || !_optionalChain([draft, 'optionalAccess',
|
|
8754
|
+
if (options2.enabled === false || dirty || !_optionalChain([draft, 'optionalAccess', _589 => _589.id])) return;
|
|
8744
8755
|
const current = viewer.pivotTables.find((pivot) => pivot.id === draft.id);
|
|
8745
8756
|
setDraft(current ? copyPivot(current) : null);
|
|
8746
8757
|
if (current) {
|
|
@@ -8751,19 +8762,19 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8751
8762
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
8752
8763
|
if (options2.enabled === false || options2.autoSelect === false || dirty || pendingFocus || !viewer.activeCell || !viewer.activeSheet) return;
|
|
8753
8764
|
const current = viewer.getPivotTableAtCell(viewer.activeCell, viewer.activeSheet.name);
|
|
8754
|
-
if (!current || current.id === _optionalChain([draft, 'optionalAccess',
|
|
8765
|
+
if (!current || current.id === _optionalChain([draft, 'optionalAccess', _590 => _590.id])) return;
|
|
8755
8766
|
setDraft(copyPivot(current));
|
|
8756
8767
|
setLoadedSource(JSON.stringify(current.source));
|
|
8757
8768
|
setSavedDefinition(JSON.stringify(current));
|
|
8758
8769
|
setError(null);
|
|
8759
8770
|
setStatus(null);
|
|
8760
8771
|
setDetails(null);
|
|
8761
|
-
}, [_optionalChain([viewer, 'access',
|
|
8772
|
+
}, [_optionalChain([viewer, 'access', _591 => _591.activeCell, 'optionalAccess', _592 => _592.row]), _optionalChain([viewer, 'access', _593 => _593.activeCell, 'optionalAccess', _594 => _594.col]), _optionalChain([viewer, 'access', _595 => _595.activeSheet, 'optionalAccess', _596 => _596.name]), viewer.pivotTables, options2.autoSelect, options2.enabled]);
|
|
8762
8773
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
8763
|
-
if (!pendingFocus || _optionalChain([viewer, 'access',
|
|
8774
|
+
if (!pendingFocus || _optionalChain([viewer, 'access', _597 => _597.activeSheet, 'optionalAccess', _598 => _598.name, 'access', _599 => _599.toLowerCase, 'call', _600 => _600()]) !== pendingFocus.sheet.toLowerCase()) return;
|
|
8764
8775
|
viewer.selectCell({ row: pendingFocus.row, col: pendingFocus.col });
|
|
8765
8776
|
setPendingFocus(null);
|
|
8766
|
-
}, [pendingFocus, _optionalChain([viewer, 'access',
|
|
8777
|
+
}, [pendingFocus, _optionalChain([viewer, 'access', _601 => _601.activeSheet, 'optionalAccess', _602 => _602.name]), viewer.selectCell]);
|
|
8767
8778
|
const focus = (pivot) => {
|
|
8768
8779
|
const sheetIndex = viewer.sheets.findIndex((sheet) => sheet.name.toLowerCase() === pivot.target.sheet.toLowerCase());
|
|
8769
8780
|
if (sheetIndex >= 0) viewer.setActiveSheetIndex(sheetIndex);
|
|
@@ -8783,7 +8794,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8783
8794
|
focus(pivot);
|
|
8784
8795
|
});
|
|
8785
8796
|
const edit = (change) => {
|
|
8786
|
-
if (options2.enabled === false || viewer.readOnly || _optionalChain([draft, 'optionalAccess',
|
|
8797
|
+
if (options2.enabled === false || viewer.readOnly || _optionalChain([draft, 'optionalAccess', _603 => _603.unsupportedFeatures, 'access', _604 => _604.length])) return;
|
|
8787
8798
|
setDraft((current) => current ? change(current) : current);
|
|
8788
8799
|
setDirty(true);
|
|
8789
8800
|
setStatus(null);
|
|
@@ -8834,7 +8845,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8834
8845
|
if (!draft) return;
|
|
8835
8846
|
const fields = viewer.getPivotSourceFields(draft.source);
|
|
8836
8847
|
setLoadedSource(JSON.stringify(draft.source));
|
|
8837
|
-
const sameSchema = fields.length === draft.fields.length && fields.every((field, index) => field.name === _optionalChain([draft, 'access',
|
|
8848
|
+
const sameSchema = fields.length === draft.fields.length && fields.every((field, index) => field.name === _optionalChain([draft, 'access', _605 => _605.fields, 'access', _606 => _606[index], 'optionalAccess', _607 => _607.name]));
|
|
8838
8849
|
edit((pivot) => ({ ...pivot, fields, ...sameSchema ? {} : { rows: [], columns: [], values: [], filters: [], reportFilters: [], calculatedItems: [] } }));
|
|
8839
8850
|
setStatus(sameSchema ? "Source fields updated." : "Fields loaded. Choose the fields to summarize.");
|
|
8840
8851
|
});
|
|
@@ -8856,7 +8867,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8856
8867
|
if (all) {
|
|
8857
8868
|
const refreshed = viewer.refreshAllPivotTables();
|
|
8858
8869
|
setStatus(`${refreshed.length} PivotTable${refreshed.length === 1 ? "" : "s"} refreshed.`);
|
|
8859
|
-
} else if (_optionalChain([draft, 'optionalAccess',
|
|
8870
|
+
} else if (_optionalChain([draft, 'optionalAccess', _608 => _608.id])) {
|
|
8860
8871
|
const refreshed = viewer.refreshPivotTable(draft.id);
|
|
8861
8872
|
setDraft(copyPivot(refreshed));
|
|
8862
8873
|
setLoadedSource(JSON.stringify(refreshed.source));
|
|
@@ -8868,7 +8879,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8868
8879
|
});
|
|
8869
8880
|
const remove = () => run(() => {
|
|
8870
8881
|
if (dirty) throw new Error("Apply or discard your changes before removing the report.");
|
|
8871
|
-
if (!_optionalChain([draft, 'optionalAccess',
|
|
8882
|
+
if (!_optionalChain([draft, 'optionalAccess', _609 => _609.id])) return;
|
|
8872
8883
|
if (viewer.removePivotTable(draft.id)) {
|
|
8873
8884
|
setDraft(null);
|
|
8874
8885
|
setDirty(false);
|
|
@@ -8877,7 +8888,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8877
8888
|
}
|
|
8878
8889
|
});
|
|
8879
8890
|
const reset = () => run(() => {
|
|
8880
|
-
const saved = viewer.pivotTables.find((pivot) => pivot.id === _optionalChain([draft, 'optionalAccess',
|
|
8891
|
+
const saved = viewer.pivotTables.find((pivot) => pivot.id === _optionalChain([draft, 'optionalAccess', _610 => _610.id]));
|
|
8881
8892
|
setDraft(saved ? copyPivot(saved) : null);
|
|
8882
8893
|
setLoadedSource(saved ? JSON.stringify(saved.source) : "");
|
|
8883
8894
|
setSavedDefinition(saved ? JSON.stringify(saved) : "");
|
|
@@ -8885,8 +8896,8 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8885
8896
|
setDetails(null);
|
|
8886
8897
|
});
|
|
8887
8898
|
const showDetails = () => run(() => {
|
|
8888
|
-
if (!_optionalChain([draft, 'optionalAccess',
|
|
8889
|
-
if (_optionalChain([viewer, 'access',
|
|
8899
|
+
if (!_optionalChain([draft, 'optionalAccess', _611 => _611.id]) || !viewer.activeCell) return;
|
|
8900
|
+
if (_optionalChain([viewer, 'access', _612 => _612.activeSheet, 'optionalAccess', _613 => _613.name, 'access', _614 => _614.toLowerCase, 'call', _615 => _615()]) !== draft.target.sheet.toLowerCase()) throw new Error("Select a value cell inside this PivotTable first.");
|
|
8890
8901
|
setDetails(viewer.pivotDrillDown(draft.id, viewer.activeCell.row, viewer.activeCell.col));
|
|
8891
8902
|
setDetailContext({ id: draft.id, row: viewer.activeCell.row, col: viewer.activeCell.col });
|
|
8892
8903
|
setOpen(true);
|
|
@@ -8926,7 +8937,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8926
8937
|
});
|
|
8927
8938
|
const removeField = (area, index) => edit((pivot) => area === "values" ? replaceValues(pivot, pivot.values.filter((_2, position) => position !== index)) : { ...pivot, [area]: pivot[area].filter((_2, position) => position !== index) });
|
|
8928
8939
|
const moveField = (fromArea, fromIndex, toArea, toIndex) => {
|
|
8929
|
-
if (fromArea === "values" && toArea !== "values" && _optionalChain([draft, 'optionalAccess',
|
|
8940
|
+
if (fromArea === "values" && toArea !== "values" && _optionalChain([draft, 'optionalAccess', _616 => _616.values, 'access', _617 => _617[fromIndex], 'optionalAccess', _618 => _618.formula, 'optionalAccess', _619 => _619.trim, 'call', _620 => _620()])) {
|
|
8930
8941
|
run(() => {
|
|
8931
8942
|
throw new Error("Calculated fields can only be placed in Values.");
|
|
8932
8943
|
});
|
|
@@ -8934,7 +8945,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8934
8945
|
}
|
|
8935
8946
|
edit((pivot) => {
|
|
8936
8947
|
const entry = pivot[fromArea][fromIndex];
|
|
8937
|
-
if (entry === void 0 || fromArea === "values" && toArea !== "values" && typeof entry === "object" && "formula" in entry && _optionalChain([entry, 'access',
|
|
8948
|
+
if (entry === void 0 || fromArea === "values" && toArea !== "values" && typeof entry === "object" && "formula" in entry && _optionalChain([entry, 'access', _621 => _621.formula, 'optionalAccess', _622 => _622.trim, 'call', _623 => _623()])) return pivot;
|
|
8938
8949
|
if (fromArea === toArea) {
|
|
8939
8950
|
const entries2 = [...pivot[fromArea]];
|
|
8940
8951
|
entries2.splice(fromIndex, 1);
|
|
@@ -8957,7 +8968,7 @@ function usePivotTableEditor(viewer, options2 = {}) {
|
|
|
8957
8968
|
return { ...next, [toArea]: entries };
|
|
8958
8969
|
});
|
|
8959
8970
|
};
|
|
8960
|
-
return { viewer, readOnly: viewer.readOnly || Boolean(_optionalChain([draft, 'optionalAccess',
|
|
8971
|
+
return { viewer, readOnly: viewer.readOnly || Boolean(_optionalChain([draft, 'optionalAccess', _624 => _624.unsupportedFeatures, 'access', _625 => _625.length])), open, setOpen, draft, dirty, edit, select, create, apply, reset, remove, refresh, readFields, addField, removeField, moveField, details, detailContext, showDetails, clearDetails: () => {
|
|
8961
8972
|
setDetails(null);
|
|
8962
8973
|
setDetailContext(null);
|
|
8963
8974
|
}, sourceNeedsLoad, stale, error, status, run };
|
|
@@ -8978,16 +8989,16 @@ var row2 = { display: "flex", alignItems: "center", gap: 6, minWidth: 0 };
|
|
|
8978
8989
|
var hint = { color: "var(--xlsx-pivot-muted)", fontSize: 11, lineHeight: 1.5, margin: 0 };
|
|
8979
8990
|
var control2 = { boxSizing: "border-box", width: "100%", minWidth: 0, minHeight: 30, border: "1px solid var(--xlsx-pivot-border)", borderRadius: 3, background: "var(--xlsx-pivot-input)", color: "inherit", padding: "4px 7px", font: "inherit" };
|
|
8980
8991
|
function fieldName(pivot, index) {
|
|
8981
|
-
return _nullishCoalesce(_optionalChain([pivot, 'access',
|
|
8992
|
+
return _nullishCoalesce(_optionalChain([pivot, 'access', _626 => _626.fields, 'access', _627 => _627.find, 'call', _628 => _628((field) => field.index === index), 'optionalAccess', _629 => _629.name]), () => ( `Field ${index + 1}`));
|
|
8982
8993
|
}
|
|
8983
8994
|
function fieldIndex(pivot, area, index) {
|
|
8984
|
-
return area === "reportFilters" ? pivot.reportFilters[index] : _optionalChain([pivot, 'access',
|
|
8995
|
+
return area === "reportFilters" ? pivot.reportFilters[index] : _optionalChain([pivot, 'access', _630 => _630[area], 'access', _631 => _631[index], 'optionalAccess', _632 => _632.field]);
|
|
8985
8996
|
}
|
|
8986
8997
|
function sourceFieldIndex(pivot, area, index) {
|
|
8987
|
-
return area === "values" && _optionalChain([pivot, 'access',
|
|
8998
|
+
return area === "values" && _optionalChain([pivot, 'access', _633 => _633.values, 'access', _634 => _634[index], 'optionalAccess', _635 => _635.formula, 'optionalAccess', _636 => _636.trim, 'call', _637 => _637()]) ? void 0 : fieldIndex(pivot, area, index);
|
|
8988
8999
|
}
|
|
8989
9000
|
function groupingUnit(axis) {
|
|
8990
|
-
return _optionalChain([axis, 'optionalAccess',
|
|
9001
|
+
return _optionalChain([axis, 'optionalAccess', _638 => _638.grouping]) ? axis.grouping.kind === "date" ? axis.grouping.unit : axis.grouping.kind : null;
|
|
8991
9002
|
}
|
|
8992
9003
|
function Action({ children: children2, primary, style, ...props }) {
|
|
8993
9004
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "button", { type: "button", ...props, style: { ...control2, width: "auto", cursor: props.disabled ? "default" : "pointer", opacity: props.disabled ? 0.55 : 1, ...primary ? { background: "var(--xlsx-pivot-accent)", borderColor: "var(--xlsx-pivot-accent)", color: "#fff" } : {}, ...style }, children: children2 });
|
|
@@ -9054,10 +9065,10 @@ function ValueSettings({ pivot, value, onChange }) {
|
|
|
9054
9065
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: [
|
|
9055
9066
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Custom name", value: value.name, onChange: (name) => onChange({ ...value, name }) }),
|
|
9056
9067
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Summarize values by", value: value.aggregation, options: AGGREGATIONS, onChange: (aggregation) => onChange({ ...value, aggregation }) }),
|
|
9057
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Show values as", value: value.showAs, options: SHOW_AS, onChange: (showAs) => onChange({ ...value, showAs, baseField: _nullishCoalesce(value.baseField, () => ( _optionalChain([axes, 'access',
|
|
9068
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Show values as", value: value.showAs, options: SHOW_AS, onChange: (showAs) => onChange({ ...value, showAs, baseField: _nullishCoalesce(value.baseField, () => ( _optionalChain([axes, 'access', _639 => _639[0], 'optionalAccess', _640 => _640.field]))) }) }),
|
|
9058
9069
|
needsBase ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Base field", value: value.baseField == null ? "" : String(value.baseField), placeholder: "Choose a field", options: pivot.fields.filter((field) => axes.some((axis) => axis.field === field.index)).map((field) => [String(field.index), field.name]), onChange: (field) => onChange({ ...value, baseField: Number(field), baseGroupingUnit: null, baseItem: null }) }) : null,
|
|
9059
9070
|
needsBase && baseAxes.length > 1 ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Base grouping level", value: _nullishCoalesce(_nullishCoalesce(value.baseGroupingUnit, () => ( groupingUnit(base))), () => ( "")), options: baseAxes.map((axis) => [_nullishCoalesce(groupingUnit(axis), () => ( "")), axis.name || groupingUnit(axis) || "Source items"]), onChange: (unit) => onChange({ ...value, baseGroupingUnit: unit || null, baseItem: null }) }) : null,
|
|
9060
|
-
needsItem ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Base item", value: _nullishCoalesce(value.baseItem, () => ( "previous")), options: [["previous", "(previous)"], ["next", "(next)"], ...(_optionalChain([base, 'optionalAccess',
|
|
9071
|
+
needsItem ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Base item", value: _nullishCoalesce(value.baseItem, () => ( "previous")), options: [["previous", "(previous)"], ["next", "(next)"], ...(_optionalChain([base, 'optionalAccess', _641 => _641.items, 'optionalAccess', _642 => _642.length]) ? base.items : _nullishCoalesce(_optionalChain([source, 'optionalAccess', _643 => _643.items]), () => ( []))).map((item) => [item.key, item.caption])], onChange: (baseItem) => onChange({ ...value, baseItem }) }) : null,
|
|
9061
9072
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Number format", value: _nullishCoalesce(value.numberFormat, () => ( "")), placeholder: "General", onChange: (numberFormat) => onChange({ ...value, numberFormat: numberFormat || null }) }),
|
|
9062
9073
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Calculated field formula", value: _nullishCoalesce(value.formula, () => ( "")), placeholder: "Leave blank for a source field", onChange: (formula) => onChange({ ...value, formula: formula || null }) }),
|
|
9063
9074
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: "Use field names in formulas. Enclose names containing spaces in single quotes or square brackets." }),
|
|
@@ -9068,20 +9079,20 @@ function AxisSettings({ pivot, axis, onChange, onAddDateLevel }) {
|
|
|
9068
9079
|
const source = pivot.fields.find((field) => field.index === axis.field);
|
|
9069
9080
|
const grouping = axis.grouping;
|
|
9070
9081
|
const updateGrouping = (patch) => onChange({ ...axis, grouping: { ...grouping, ...patch }, items: [], collapsed: [] });
|
|
9071
|
-
const availableUnits = DATE_UNITS.filter((unit) => ![...pivot.rows, ...pivot.columns].some((field) => field.field === axis.field && _optionalChain([field, 'access',
|
|
9082
|
+
const availableUnits = DATE_UNITS.filter((unit) => ![...pivot.rows, ...pivot.columns].some((field) => field.field === axis.field && _optionalChain([field, 'access', _644 => _644.grouping, 'optionalAccess', _645 => _645.kind]) === "date" && field.grouping.unit === unit));
|
|
9072
9083
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: [
|
|
9073
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Custom name", value: _nullishCoalesce(axis.name, () => ( "")), placeholder: _optionalChain([source, 'optionalAccess',
|
|
9084
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Custom name", value: _nullishCoalesce(axis.name, () => ( "")), placeholder: _optionalChain([source, 'optionalAccess', _646 => _646.name]), onChange: (name) => onChange({ ...axis, name: name || null }) }),
|
|
9074
9085
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Sort", value: axis.sort, options: [["ascending", "Ascending (A to Z)"], ["descending", "Descending (Z to A)"], ["manual", "Source order"], ["valueAscending", "Smallest to largest by value"], ["valueDescending", "Largest to smallest by value"]], onChange: (sort) => onChange({ ...axis, sort, sortMeasure: _nullishCoalesce(axis.sortMeasure, () => ( 0)) }) }),
|
|
9075
9086
|
axis.sort.startsWith("value") ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Sort by value", value: String(_nullishCoalesce(axis.sortMeasure, () => ( 0))), options: pivot.values.map((value, index) => [String(index), value.name]), onChange: (sortMeasure) => onChange({ ...axis, sortMeasure: Number(sortMeasure) }) }) : null,
|
|
9076
9087
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Check, { label: "Show subtotals", checked: axis.subtotals, onChange: (subtotals) => onChange({ ...axis, subtotals }) }),
|
|
9077
9088
|
axis.subtotals ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "details", { children: [
|
|
9078
9089
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "summary", { style: { cursor: "pointer" }, children: "Custom subtotal functions" }),
|
|
9079
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 3, marginTop: 6 }, children: AGGREGATIONS.map(([value, label]) => /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Check, { label, checked: _nullishCoalesce(_optionalChain([axis, 'access',
|
|
9090
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 3, marginTop: 6 }, children: AGGREGATIONS.map(([value, label]) => /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Check, { label, checked: _nullishCoalesce(_optionalChain([axis, 'access', _647 => _647.subtotalFunctions, 'optionalAccess', _648 => _648.includes, 'call', _649 => _649(value)]), () => ( false)), onChange: (checked) => onChange({ ...axis, subtotalFunctions: checked ? [..._nullishCoalesce(axis.subtotalFunctions, () => ( [])), value] : _optionalChain([axis, 'access', _650 => _650.subtotalFunctions, 'optionalAccess', _651 => _651.filter, 'call', _652 => _652((item) => item !== value)]) }) }, value)) }),
|
|
9080
9091
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: "Leave unchecked to use the value field\u2019s summary function." })
|
|
9081
9092
|
] }) : null,
|
|
9082
9093
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Check, { label: "Show items with no data", checked: _nullishCoalesce(axis.showItemsWithNoData, () => ( false)), onChange: (showItemsWithNoData) => onChange({ ...axis, showItemsWithNoData }) }),
|
|
9083
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Grouping", value: _nullishCoalesce(_optionalChain([grouping, 'optionalAccess',
|
|
9084
|
-
_optionalChain([grouping, 'optionalAccess',
|
|
9094
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Grouping", value: _nullishCoalesce(_optionalChain([grouping, 'optionalAccess', _653 => _653.kind]), () => ( "none")), options: [["none", "None"], ["number", "Numeric intervals"], ["date", "Date intervals"], ["manual", "Named groups"]], onChange: (kind) => onChange({ ...axis, grouping: kind === "none" ? null : { kind, unit: "months", interval: 1, groups: [] }, items: [], collapsed: [] }) }),
|
|
9095
|
+
_optionalChain([grouping, 'optionalAccess', _654 => _654.kind]) === "date" ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Group dates by", value: grouping.unit, options: DATE_UNITS.map((unit) => [unit, unit[0].toUpperCase() + unit.slice(1)]), onChange: (unit) => updateGrouping({ unit }) }) : null,
|
|
9085
9096
|
grouping && grouping.kind !== "manual" ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: [
|
|
9086
9097
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Interval", type: "number", min: 1e-6, step: "any", value: String(grouping.interval), onChange: (interval) => updateGrouping({ interval: Number(interval) }) }),
|
|
9087
9098
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8 }, children: [
|
|
@@ -9090,18 +9101,18 @@ function AxisSettings({ pivot, axis, onChange, onAddDateLevel }) {
|
|
|
9090
9101
|
] }),
|
|
9091
9102
|
grouping.kind === "date" ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: "Optional bounds use Excel date serial values." }) : null
|
|
9092
9103
|
] }) : null,
|
|
9093
|
-
_optionalChain([grouping, 'optionalAccess',
|
|
9094
|
-
_optionalChain([grouping, 'optionalAccess',
|
|
9104
|
+
_optionalChain([grouping, 'optionalAccess', _655 => _655.kind]) === "date" && availableUnits.length ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "Add date grouping level", value: "", placeholder: "Choose a level", options: availableUnits.map((unit) => [unit, unit[0].toUpperCase() + unit.slice(1)]), onChange: (unit) => onAddDateLevel(unit) }) : null,
|
|
9105
|
+
_optionalChain([grouping, 'optionalAccess', _656 => _656.kind]) === "manual" ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: [
|
|
9095
9106
|
grouping.groups.map((group, index) => /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { ...stack2, borderTop: "1px solid var(--xlsx-pivot-border)", paddingTop: 8 }, children: [
|
|
9096
9107
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Group name", value: group.name, onChange: (name) => updateGrouping({ groups: grouping.groups.map((item, position) => position === index ? { ...item, name } : item) }) }),
|
|
9097
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Members, { items: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
9108
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Members, { items: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _657 => _657.items]), () => ( [])), selected: group.members, onChange: (members) => updateGrouping({ groups: grouping.groups.map((item, position) => position === index ? { ...item, members } : item) }) }),
|
|
9098
9109
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { onClick: () => updateGrouping({ groups: grouping.groups.filter((_2, position) => position !== index) }), children: "Remove group" })
|
|
9099
9110
|
] }, index)),
|
|
9100
9111
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { onClick: () => updateGrouping({ groups: [...grouping.groups, { name: `Group ${grouping.groups.length + 1}`, members: [] }] }), children: "Add named group" })
|
|
9101
9112
|
] }) : null,
|
|
9102
9113
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "details", { children: [
|
|
9103
9114
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "summary", { style: { cursor: "pointer" }, children: "Collapse members" }),
|
|
9104
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { paddingTop: 8 }, children: grouping && !_optionalChain([axis, 'access',
|
|
9115
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { paddingTop: 8 }, children: grouping && !_optionalChain([axis, 'access', _658 => _658.items, 'optionalAccess', _659 => _659.length]) ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: "Apply grouping to load its members." }) : /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Members, { label: "Members to collapse", items: _optionalChain([axis, 'access', _660 => _660.items, 'optionalAccess', _661 => _661.length]) ? axis.items : _nullishCoalesce(_optionalChain([source, 'optionalAccess', _662 => _662.items]), () => ( [])), selected: axis.collapsed, onChange: (collapsed) => onChange({ ...axis, collapsed }) }) })
|
|
9105
9116
|
] })
|
|
9106
9117
|
] });
|
|
9107
9118
|
}
|
|
@@ -9109,7 +9120,7 @@ function FieldFilters({ editor, pivot, field, axis }) {
|
|
|
9109
9120
|
const source = pivot.fields.find((item) => item.index === field);
|
|
9110
9121
|
const filterAxis = _nullishCoalesce(axis, () => ( [...pivot.rows, ...pivot.columns].find((item) => item.field === field && item.grouping)));
|
|
9111
9122
|
const unit = groupingUnit(filterAxis);
|
|
9112
|
-
const members = _optionalChain([filterAxis, 'optionalAccess',
|
|
9123
|
+
const members = _optionalChain([filterAxis, 'optionalAccess', _663 => _663.items, 'optionalAccess', _664 => _664.length]) ? filterAxis.items : _nullishCoalesce(_optionalChain([source, 'optionalAccess', _665 => _665.items]), () => ( []));
|
|
9113
9124
|
const filters = pivot.filters.map((filter, index) => ({ filter, index })).filter(({ filter }) => filter.field === field && (_nullishCoalesce(filter.groupingUnit, () => ( null))) === unit);
|
|
9114
9125
|
const kinds = [["members", "Select items"], ["label", "Label filter"], ["value", "Value filter"], ["top10", "Top / bottom filter"]];
|
|
9115
9126
|
const update = (index, next) => editor.edit((current) => ({ ...current, filters: current.filters.flatMap((filter, position) => position === index ? next ? [next] : [] : [filter]) }));
|
|
@@ -9118,10 +9129,10 @@ function FieldFilters({ editor, pivot, field, axis }) {
|
|
|
9118
9129
|
"Field filters",
|
|
9119
9130
|
unit ? ` \xB7 ${unit}` : ""
|
|
9120
9131
|
] }),
|
|
9121
|
-
_optionalChain([filterAxis, 'optionalAccess',
|
|
9132
|
+
_optionalChain([filterAxis, 'optionalAccess', _666 => _666.grouping]) && !_optionalChain([filterAxis, 'access', _667 => _667.items, 'optionalAccess', _668 => _668.length]) ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: "Apply grouping before selecting its members." }) : null,
|
|
9122
9133
|
filters.map(({ filter, index }) => /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { ...stack2, paddingBlock: 8, borderTop: "1px solid var(--xlsx-pivot-border)" }, children: [
|
|
9123
9134
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { ...row2, justifyContent: "space-between" }, children: [
|
|
9124
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "span", { children: _optionalChain([kinds, 'access',
|
|
9135
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "span", { children: _optionalChain([kinds, 'access', _669 => _669.find, 'call', _670 => _670(([kind]) => kind === filter.kind), 'optionalAccess', _671 => _671[1]]) }),
|
|
9125
9136
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { "aria-label": `Remove ${filter.kind} filter`, onClick: () => update(index, null), children: "\xD7" })
|
|
9126
9137
|
] }),
|
|
9127
9138
|
filter.kind === "members" ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Members, { items: members, selected: filter.values, onChange: (values) => update(index, { ...filter, values }) }) : null,
|
|
@@ -9181,10 +9192,10 @@ function Advanced({ editor, pivot }) {
|
|
|
9181
9192
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Text, { label: "Formula", value: item.formula, onChange: (formula) => update({ calculatedItems: pivot.calculatedItems.map((entry, position) => position === index ? { ...entry, formula } : entry) }) }),
|
|
9182
9193
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { onClick: () => update({ calculatedItems: pivot.calculatedItems.filter((_2, position) => position !== index) }), children: "Remove calculated item" })
|
|
9183
9194
|
] }, index)),
|
|
9184
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { disabled: !pivot.fields.length, onClick: () => update({ calculatedItems: [...pivot.calculatedItems, { field: _nullishCoalesce(_optionalChain([pivot, 'access',
|
|
9195
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { disabled: !pivot.fields.length, onClick: () => update({ calculatedItems: [...pivot.calculatedItems, { field: _nullishCoalesce(_optionalChain([pivot, 'access', _672 => _672.rows, 'access', _673 => _673[0], 'optionalAccess', _674 => _674.field]), () => ( pivot.fields[0].index)), name: `Calculated item ${pivot.calculatedItems.length + 1}`, formula: "0" }] }), children: "Add calculated item" })
|
|
9185
9196
|
] }),
|
|
9186
9197
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Section, { title: "PivotChart", children: [
|
|
9187
|
-
_optionalChain([pivot, 'access',
|
|
9198
|
+
_optionalChain([pivot, 'access', _675 => _675.charts, 'optionalAccess', _676 => _676.length]) ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: [
|
|
9188
9199
|
pivot.charts.length,
|
|
9189
9200
|
" linked chart",
|
|
9190
9201
|
pivot.charts.length === 1 ? "" : "s",
|
|
@@ -9217,13 +9228,13 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9217
9228
|
const titleId = _chunkTLEC4K6Wcjs.g.call(void 0, );
|
|
9218
9229
|
const settingsId = _chunkTLEC4K6Wcjs.g.call(void 0, );
|
|
9219
9230
|
const pivot = editor.draft;
|
|
9220
|
-
const disabled = editor.readOnly || Boolean(_optionalChain([pivot, 'optionalAccess',
|
|
9231
|
+
const disabled = editor.readOnly || Boolean(_optionalChain([pivot, 'optionalAccess', _677 => _677.unsupportedFeatures, 'access', _678 => _678.length])) || editor.sourceNeedsLoad;
|
|
9221
9232
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
9222
9233
|
setSelected(null);
|
|
9223
9234
|
setSearch("");
|
|
9224
|
-
}, [_optionalChain([pivot, 'optionalAccess',
|
|
9235
|
+
}, [_optionalChain([pivot, 'optionalAccess', _679 => _679.id])]);
|
|
9225
9236
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
9226
|
-
const parent = _optionalChain([paneRef, 'access',
|
|
9237
|
+
const parent = _optionalChain([paneRef, 'access', _680 => _680.current, 'optionalAccess', _681 => _681.parentElement]);
|
|
9227
9238
|
if (!parent) return;
|
|
9228
9239
|
const viewer = parent.closest(".react-xlsx-viewer");
|
|
9229
9240
|
const measure = () => {
|
|
@@ -9233,16 +9244,16 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9233
9244
|
};
|
|
9234
9245
|
measure();
|
|
9235
9246
|
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
9236
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9237
|
-
if (viewer) _optionalChain([observer, 'optionalAccess',
|
|
9247
|
+
_optionalChain([observer, 'optionalAccess', _682 => _682.observe, 'call', _683 => _683(parent)]);
|
|
9248
|
+
if (viewer) _optionalChain([observer, 'optionalAccess', _684 => _684.observe, 'call', _685 => _685(viewer)]);
|
|
9238
9249
|
window.addEventListener("resize", measure);
|
|
9239
9250
|
return () => {
|
|
9240
|
-
_optionalChain([observer, 'optionalAccess',
|
|
9251
|
+
_optionalChain([observer, 'optionalAccess', _686 => _686.disconnect, 'call', _687 => _687()]);
|
|
9241
9252
|
window.removeEventListener("resize", measure);
|
|
9242
9253
|
};
|
|
9243
9254
|
}, []);
|
|
9244
9255
|
const selectedField = pivot && selected ? fieldIndex(pivot, selected.area, selected.index) : void 0;
|
|
9245
|
-
const selectedCalculated = Boolean(pivot && _optionalChain([selected, 'optionalAccess',
|
|
9256
|
+
const selectedCalculated = Boolean(pivot && _optionalChain([selected, 'optionalAccess', _688 => _688.area]) === "values" && _optionalChain([pivot, 'access', _689 => _689.values, 'access', _690 => _690[selected.index], 'optionalAccess', _691 => _691.formula, 'optionalAccess', _692 => _692.trim, 'call', _693 => _693()]));
|
|
9246
9257
|
const theme = {
|
|
9247
9258
|
"--xlsx-pivot-bg": isDark ? "#242729" : "#fafbfa",
|
|
9248
9259
|
"--xlsx-pivot-input": isDark ? "#303437" : "#ffffff",
|
|
@@ -9252,7 +9263,7 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9252
9263
|
"--xlsx-pivot-hover": isDark ? "#35483d" : "#edf5ef"
|
|
9253
9264
|
};
|
|
9254
9265
|
const move = (from, to, index) => {
|
|
9255
|
-
if (from.area === "values" && to !== "values" && _optionalChain([pivot, 'optionalAccess',
|
|
9266
|
+
if (from.area === "values" && to !== "values" && _optionalChain([pivot, 'optionalAccess', _694 => _694.values, 'access', _695 => _695[from.index], 'optionalAccess', _696 => _696.formula, 'optionalAccess', _697 => _697.trim, 'call', _698 => _698()])) {
|
|
9256
9267
|
setAnnouncement("Calculated fields stay in the Values area.");
|
|
9257
9268
|
return;
|
|
9258
9269
|
}
|
|
@@ -9267,7 +9278,7 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9267
9278
|
if (disabled) return;
|
|
9268
9279
|
try {
|
|
9269
9280
|
const data = JSON.parse(event.dataTransfer.getData(DRAG_TYPE));
|
|
9270
|
-
if ("field" in data && Number.isInteger(data.field) && _optionalChain([pivot, 'optionalAccess',
|
|
9281
|
+
if ("field" in data && Number.isInteger(data.field) && _optionalChain([pivot, 'optionalAccess', _699 => _699.fields, 'access', _700 => _700.some, 'call', _701 => _701((field) => field.index === data.field)])) {
|
|
9271
9282
|
editor.addField(area, data.field);
|
|
9272
9283
|
setAnnouncement(`Field added to ${AREA_NAMES[area]}.`);
|
|
9273
9284
|
} else if ("area" in data && AREAS.includes(data.area) && Number.isInteger(data.index) && pivot && data.index >= 0 && data.index < pivot[data.area].length) move(data, area, index);
|
|
@@ -9287,14 +9298,14 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9287
9298
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { overflowY: "auto", flex: 1, minHeight: 0 }, children: [
|
|
9288
9299
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { ...stack2, padding: 12 }, children: [
|
|
9289
9300
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { ...row2, alignItems: "end" }, children: [
|
|
9290
|
-
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "PivotTable", value: _nullishCoalesce(_optionalChain([pivot, 'optionalAccess',
|
|
9301
|
+
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Choice2, { label: "PivotTable", value: _nullishCoalesce(_optionalChain([pivot, 'optionalAccess', _702 => _702.id]), () => ( "")), placeholder: pivot && !pivot.id ? pivot.name : "Choose a PivotTable", options: editor.viewer.pivotTables.map((item) => [item.id, item.name]), onChange: editor.select, disabled: editor.dirty }) }),
|
|
9291
9302
|
/* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, Action, { disabled: editor.viewer.readOnly || editor.dirty, onClick: editor.create, children: "New" })
|
|
9292
9303
|
] }),
|
|
9293
9304
|
editor.error ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { role: "alert", style: { margin: 0, color: isDark ? "#ffb7b0" : "#a12622", overflowWrap: "anywhere" }, children: editor.error }) : null,
|
|
9294
9305
|
editor.status ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { role: "status", style: hint, children: editor.status }) : null,
|
|
9295
9306
|
editor.stale ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { role: "alert", style: hint, children: "The worksheet changed while you were editing. Discard these changes to load the current PivotTable." }) : null,
|
|
9296
9307
|
editor.sourceNeedsLoad ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { role: "status", style: hint, children: "The source changed. Load its fields under Source and location." }) : null,
|
|
9297
|
-
_optionalChain([pivot, 'optionalAccess',
|
|
9308
|
+
_optionalChain([pivot, 'optionalAccess', _703 => _703.unsupportedFeatures, 'access', _704 => _704.length]) ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "p", { style: hint, children: [
|
|
9298
9309
|
"This PivotTable is preserved for Excel. Editing is unavailable for: ",
|
|
9299
9310
|
pivot.unsupportedFeatures.join(", "),
|
|
9300
9311
|
"."
|
|
@@ -9336,7 +9347,7 @@ function DefaultXlsxPivotTableFieldList({ editor, isDark = false, className, sty
|
|
|
9336
9347
|
pivot[area].map((_2, index) => {
|
|
9337
9348
|
const field = fieldIndex(pivot, area, index);
|
|
9338
9349
|
const name = area === "values" ? pivot.values[index].name : area === "reportFilters" ? fieldName(pivot, field) : pivot[area][index].name || fieldName(pivot, field);
|
|
9339
|
-
const active = _optionalChain([selected, 'optionalAccess',
|
|
9350
|
+
const active = _optionalChain([selected, 'optionalAccess', _705 => _705.area]) === area && selected.index === index;
|
|
9340
9351
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { draggable: !disabled, onDragStart: (event) => drag(event, { area, index }), onDrop: (event) => drop(event, area, index), style: { marginBottom: 3 }, children: /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "button", { type: "button", "aria-expanded": active, "aria-controls": settingsId, title: `${name} settings. Alt+Up or Alt+Down reorders the field.`, onClick: () => setSelected(active ? null : { area, index }), onKeyDown: (event) => {
|
|
9341
9352
|
if (!event.altKey || !["ArrowUp", "ArrowDown"].includes(event.key)) return;
|
|
9342
9353
|
event.preventDefault();
|
|
@@ -9461,7 +9472,7 @@ function preloadChartRenderers(chartsBySheet, experimentalOfficeCharts) {
|
|
|
9461
9472
|
for (const chart of charts) {
|
|
9462
9473
|
const source = chart.renderSource;
|
|
9463
9474
|
hasSharedCharts ||= Boolean(source && !source.experimental);
|
|
9464
|
-
hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess',
|
|
9475
|
+
hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess', _706 => _706.experimental]));
|
|
9465
9476
|
}
|
|
9466
9477
|
}
|
|
9467
9478
|
if (experimentalOfficeCharts && (hasExtendedCharts || hasSharedCharts)) void suppliedOfficeChartRenderer.load().catch(() => {
|
|
@@ -10163,7 +10174,7 @@ function parseCanvasGradientStops(value) {
|
|
|
10163
10174
|
if (!match) {
|
|
10164
10175
|
return null;
|
|
10165
10176
|
}
|
|
10166
|
-
const color = _optionalChain([match, 'access',
|
|
10177
|
+
const color = _optionalChain([match, 'access', _707 => _707[1], 'optionalAccess', _708 => _708.trim, 'call', _709 => _709()]);
|
|
10167
10178
|
const percent = match[2] ? Number.parseFloat(match[2]) : Number.NaN;
|
|
10168
10179
|
if (!color) {
|
|
10169
10180
|
return null;
|
|
@@ -10179,7 +10190,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
|
|
|
10179
10190
|
if (linearMatch) {
|
|
10180
10191
|
const parts = splitCssGradientArgs(_nullishCoalesce(linearMatch[1], () => ( "")));
|
|
10181
10192
|
if (parts.length >= 2) {
|
|
10182
|
-
const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access',
|
|
10193
|
+
const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _710 => _710[0], 'optionalAccess', _711 => _711.trim, 'call', _712 => _712()]), () => ( "180deg"));
|
|
10183
10194
|
const angleMatch = rawAngle.match(/(-?\d*\.?\d+)deg/i);
|
|
10184
10195
|
const cssAngle = angleMatch ? Number.parseFloat(_nullishCoalesce(angleMatch[1], () => ( "180"))) : 180;
|
|
10185
10196
|
const radians = (90 - cssAngle) * Math.PI / 180;
|
|
@@ -10209,7 +10220,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
|
|
|
10209
10220
|
const radialMatch = backgroundImage.match(/^radial-gradient\((.*)\)$/i);
|
|
10210
10221
|
if (radialMatch) {
|
|
10211
10222
|
const parts = splitCssGradientArgs(_nullishCoalesce(radialMatch[1], () => ( "")));
|
|
10212
|
-
const stopParts = _optionalChain([parts, 'access',
|
|
10223
|
+
const stopParts = _optionalChain([parts, 'access', _713 => _713[0], 'optionalAccess', _714 => _714.startsWith, 'call', _715 => _715("circle")]) ? parts.slice(1) : parts;
|
|
10213
10224
|
const gradient = context.createRadialGradient(
|
|
10214
10225
|
rect.left + rect.width / 2,
|
|
10215
10226
|
rect.top + rect.height / 2,
|
|
@@ -10389,7 +10400,7 @@ function resolveDarkModeSurface(themePalette, palette) {
|
|
|
10389
10400
|
return "hsl(225 4% 6%)";
|
|
10390
10401
|
}
|
|
10391
10402
|
function resolveSheetSurface(sheet, palette) {
|
|
10392
|
-
return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess',
|
|
10403
|
+
return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _716 => _716.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _717 => _717.themePalette, 'access', _718 => _718.colorsByIndex, 'access', _719 => _719[0]]), () => ( SHEET_SURFACE));
|
|
10393
10404
|
}
|
|
10394
10405
|
function normalizeRange2(range) {
|
|
10395
10406
|
return {
|
|
@@ -10587,7 +10598,7 @@ function buildVisibleAxisIndices(precomputed, displayLimit, maxUsedIndex, hidden
|
|
|
10587
10598
|
const visible = precomputed.filter((index) => index < displayLimit);
|
|
10588
10599
|
const appendStart = precomputed.length ? Math.max(0, maxUsedIndex + 1) : 0;
|
|
10589
10600
|
for (let index = appendStart; index < displayLimit; index++) {
|
|
10590
|
-
if (!_optionalChain([hiddenIndices, 'optionalAccess',
|
|
10601
|
+
if (!_optionalChain([hiddenIndices, 'optionalAccess', _720 => _720.has, 'call', _721 => _721(index)])) visible.push(index);
|
|
10591
10602
|
}
|
|
10592
10603
|
return visible;
|
|
10593
10604
|
}
|
|
@@ -10609,31 +10620,31 @@ function resolveAxisStartOffset(actualIndex, actualIndices, sizes, indexByActual
|
|
|
10609
10620
|
if (actualPrefixSums && actualIndex >= 0 && actualIndex < actualPrefixSums.length) {
|
|
10610
10621
|
return _nullishCoalesce(actualPrefixSums[actualIndex], () => ( 0));
|
|
10611
10622
|
}
|
|
10612
|
-
const visibleIndex = _optionalChain([indexByActual, 'optionalAccess',
|
|
10623
|
+
const visibleIndex = _optionalChain([indexByActual, 'optionalAccess', _722 => _722.get, 'call', _723 => _723(actualIndex)]);
|
|
10613
10624
|
if (visibleIndex !== void 0 && prefixSums) {
|
|
10614
10625
|
return _nullishCoalesce(prefixSums[visibleIndex], () => ( 0));
|
|
10615
10626
|
}
|
|
10616
10627
|
return sumBeforeActualIndex(actualIndices, sizes, actualIndex);
|
|
10617
10628
|
}
|
|
10618
10629
|
function resolveAnchoredRect(anchor, visibleRows, visibleCols, rowHeights, colWidths, options2) {
|
|
10619
|
-
const headerHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10620
|
-
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10621
|
-
const anchorZoomFactor = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10630
|
+
const headerHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _724 => _724.headerHeight]), () => ( HEADER_HEIGHT));
|
|
10631
|
+
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _725 => _725.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
|
|
10632
|
+
const anchorZoomFactor = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _726 => _726.zoomFactor]), () => ( 1));
|
|
10622
10633
|
const resolveMarkerLeft = (col, colOffsetEmu) => rowHeaderWidth + resolveAxisStartOffset(
|
|
10623
10634
|
col,
|
|
10624
10635
|
visibleCols,
|
|
10625
10636
|
colWidths,
|
|
10626
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10627
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10628
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10637
|
+
_optionalChain([options2, 'optionalAccess', _727 => _727.colIndexByActual]),
|
|
10638
|
+
_optionalChain([options2, 'optionalAccess', _728 => _728.colPrefixSums]),
|
|
10639
|
+
_optionalChain([options2, 'optionalAccess', _729 => _729.actualColPrefixSums])
|
|
10629
10640
|
) + _chunkGP5SOQQHcjs.emuToPixels.call(void 0, colOffsetEmu) * anchorZoomFactor;
|
|
10630
10641
|
const resolveMarkerTop = (row3, rowOffsetEmu) => headerHeight + resolveAxisStartOffset(
|
|
10631
10642
|
row3,
|
|
10632
10643
|
visibleRows,
|
|
10633
10644
|
rowHeights,
|
|
10634
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10635
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10636
|
-
_optionalChain([options2, 'optionalAccess',
|
|
10645
|
+
_optionalChain([options2, 'optionalAccess', _730 => _730.rowIndexByActual]),
|
|
10646
|
+
_optionalChain([options2, 'optionalAccess', _731 => _731.rowPrefixSums]),
|
|
10647
|
+
_optionalChain([options2, 'optionalAccess', _732 => _732.actualRowPrefixSums])
|
|
10637
10648
|
) + _chunkGP5SOQQHcjs.emuToPixels.call(void 0, rowOffsetEmu) * anchorZoomFactor;
|
|
10638
10649
|
if (anchor.kind === "absolute") {
|
|
10639
10650
|
return {
|
|
@@ -10720,15 +10731,15 @@ function rectIntersectsViewport(rect, viewport, overscan = 240) {
|
|
|
10720
10731
|
return rectRight >= viewportLeft && rect.left <= viewportRight && rectBottom >= viewportTop && rect.top <= viewportBottom;
|
|
10721
10732
|
}
|
|
10722
10733
|
function resolveFrozenDrawingPane(rect, frozenRows, frozenCols, actualRowHeights, actualColWidths, freezePanes, stickyTopByRow, stickyLeftByCol, options2) {
|
|
10723
|
-
const headerHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10724
|
-
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10725
|
-
const defaultRowHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10726
|
-
const defaultColWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
10727
|
-
const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess',
|
|
10734
|
+
const headerHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _733 => _733.headerHeight]), () => ( HEADER_HEIGHT));
|
|
10735
|
+
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _734 => _734.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
|
|
10736
|
+
const defaultRowHeight = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _735 => _735.defaultRowHeight]), () => ( DEFAULT_ROW_HEIGHT2));
|
|
10737
|
+
const defaultColWidth = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _736 => _736.defaultColWidth]), () => ( DEFAULT_COL_WIDTH2));
|
|
10738
|
+
const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess', _737 => _737.row]) && freezePanes.row > 0 && frozenRows.length > 0 ? frozenRows.reduce(
|
|
10728
10739
|
(max, row3) => Math.max(max, (_nullishCoalesce(stickyTopByRow.get(row3), () => ( headerHeight))) + (_nullishCoalesce(actualRowHeights[row3], () => ( defaultRowHeight)))),
|
|
10729
10740
|
headerHeight
|
|
10730
10741
|
) : null;
|
|
10731
|
-
const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess',
|
|
10742
|
+
const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess', _738 => _738.col]) && freezePanes.col > 0 && frozenCols.length > 0 ? frozenCols.reduce(
|
|
10732
10743
|
(max, col) => Math.max(max, (_nullishCoalesce(stickyLeftByCol.get(col), () => ( rowHeaderWidth))) + (_nullishCoalesce(actualColWidths[col], () => ( defaultColWidth)))),
|
|
10733
10744
|
rowHeaderWidth
|
|
10734
10745
|
) : null;
|
|
@@ -10749,9 +10760,9 @@ function drawingLayer(zIndex) {
|
|
|
10749
10760
|
return Math.round(zIndex * 1024);
|
|
10750
10761
|
}
|
|
10751
10762
|
function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
10752
|
-
const borderWidth = _optionalChain([shape, 'access',
|
|
10753
|
-
const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access',
|
|
10754
|
-
const fillColor = _optionalChain([shape, 'access',
|
|
10763
|
+
const borderWidth = _optionalChain([shape, 'access', _739 => _739.stroke, 'optionalAccess', _740 => _740.none]) ? 0 : Math.max(0, _nullishCoalesce(_optionalChain([shape, 'access', _741 => _741.stroke, 'optionalAccess', _742 => _742.widthPx]), () => ( 0))) * viewerScale;
|
|
10764
|
+
const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access', _743 => _743.stroke, 'optionalAccess', _744 => _744.color]), () => ( "transparent"));
|
|
10765
|
+
const fillColor = _optionalChain([shape, 'access', _745 => _745.fill, 'optionalAccess', _746 => _746.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _747 => _747.fill, 'optionalAccess', _748 => _748.color]), () => ( "transparent"));
|
|
10755
10766
|
const hasVisibleText = shape.paragraphs.some((paragraph) => paragraph.runs.some((run) => run.text.trim().length > 0));
|
|
10756
10767
|
const transformParts = [
|
|
10757
10768
|
shape.rotationDeg ? `rotate(${shape.rotationDeg}deg)` : "",
|
|
@@ -10765,7 +10776,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
|
10765
10776
|
borderRadius = 12 * viewerScale;
|
|
10766
10777
|
}
|
|
10767
10778
|
return {
|
|
10768
|
-
alignItems: _optionalChain([shape, 'access',
|
|
10779
|
+
alignItems: _optionalChain([shape, 'access', _749 => _749.textBox, 'optionalAccess', _750 => _750.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _751 => _751.textBox, 'optionalAccess', _752 => _752.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
|
|
10769
10780
|
backgroundColor: fillColor,
|
|
10770
10781
|
border: borderWidth > 0 ? `${borderWidth}px solid ${strokeColor}` : "none",
|
|
10771
10782
|
borderRadius,
|
|
@@ -10775,7 +10786,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
|
10775
10786
|
height: rect.height,
|
|
10776
10787
|
justifyContent: "flex-start",
|
|
10777
10788
|
left: rect.left,
|
|
10778
|
-
opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access',
|
|
10789
|
+
opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _753 => _753.fill, 'optionalAccess', _754 => _754.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _755 => _755.stroke, 'optionalAccess', _756 => _756.opacity]), () => ( 1))),
|
|
10779
10790
|
overflow: hasVisibleText ? "hidden" : "visible",
|
|
10780
10791
|
position: "absolute",
|
|
10781
10792
|
top: rect.top,
|
|
@@ -10792,7 +10803,7 @@ function clampPercent(value, fallback) {
|
|
|
10792
10803
|
return Math.max(0, Math.min(100, value));
|
|
10793
10804
|
}
|
|
10794
10805
|
function resolveShapeAdjustment(shape, name, fallback) {
|
|
10795
|
-
const rawValue = _optionalChain([shape, 'access',
|
|
10806
|
+
const rawValue = _optionalChain([shape, 'access', _757 => _757.geometryAdjustments, 'optionalAccess', _758 => _758[name]]);
|
|
10796
10807
|
if (typeof rawValue !== "number") {
|
|
10797
10808
|
return fallback;
|
|
10798
10809
|
}
|
|
@@ -11729,9 +11740,9 @@ function renderShapeParagraph(paragraph, index, fallbackAlign = "left", textScal
|
|
|
11729
11740
|
);
|
|
11730
11741
|
}
|
|
11731
11742
|
function clampImageRect(rect, options2) {
|
|
11732
|
-
const contentOffsetLeft = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
11733
|
-
const contentOffsetTop = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
11734
|
-
const minSizePx = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
11743
|
+
const contentOffsetLeft = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _759 => _759.contentOffsetLeft]), () => ( ROW_HEADER_WIDTH));
|
|
11744
|
+
const contentOffsetTop = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _760 => _760.contentOffsetTop]), () => ( HEADER_HEIGHT));
|
|
11745
|
+
const minSizePx = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _761 => _761.minSizePx]), () => ( IMAGE_MIN_SIZE_PX));
|
|
11735
11746
|
return {
|
|
11736
11747
|
height: Math.max(minSizePx, rect.height),
|
|
11737
11748
|
left: Math.max(contentOffsetLeft, rect.left),
|
|
@@ -11982,24 +11993,24 @@ function escapeCssFontFamily(name) {
|
|
|
11982
11993
|
return /[\s"'(),]/.test(name) ? `"${name.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : name;
|
|
11983
11994
|
}
|
|
11984
11995
|
function resolveSpreadsheetThemeFont(font, themePalette) {
|
|
11985
|
-
const scheme = typeof _optionalChain([font, 'optionalAccess',
|
|
11996
|
+
const scheme = typeof _optionalChain([font, 'optionalAccess', _762 => _762.scheme]) === "string" ? font.scheme : null;
|
|
11986
11997
|
if (scheme === "major") {
|
|
11987
|
-
return _optionalChain([themePalette, 'optionalAccess',
|
|
11998
|
+
return _optionalChain([themePalette, 'optionalAccess', _763 => _763.majorLatinFont]);
|
|
11988
11999
|
}
|
|
11989
12000
|
if (scheme === "minor") {
|
|
11990
|
-
return _optionalChain([themePalette, 'optionalAccess',
|
|
12001
|
+
return _optionalChain([themePalette, 'optionalAccess', _764 => _764.minorLatinFont]);
|
|
11991
12002
|
}
|
|
11992
12003
|
return void 0;
|
|
11993
12004
|
}
|
|
11994
12005
|
function buildSpreadsheetFontFamily(font, themePalette) {
|
|
11995
12006
|
const candidates = [
|
|
11996
|
-
typeof _optionalChain([font, 'optionalAccess',
|
|
11997
|
-
_nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call',
|
|
12007
|
+
typeof _optionalChain([font, 'optionalAccess', _765 => _765.name]) === "string" ? font.name.trim() : "",
|
|
12008
|
+
_nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _766 => _766(font, themePalette), 'optionalAccess', _767 => _767.trim, 'call', _768 => _768()]), () => ( ""))
|
|
11998
12009
|
].filter((value, index, array) => value.length > 0 && array.indexOf(value) === index);
|
|
11999
12010
|
if (candidates.length === 0) {
|
|
12000
12011
|
return void 0;
|
|
12001
12012
|
}
|
|
12002
|
-
const primaryFont = _optionalChain([candidates, 'access',
|
|
12013
|
+
const primaryFont = _optionalChain([candidates, 'access', _769 => _769[0], 'optionalAccess', _770 => _770.toLowerCase, 'call', _771 => _771()]);
|
|
12003
12014
|
if (primaryFont === "calibri") {
|
|
12004
12015
|
return [
|
|
12005
12016
|
"Calibri",
|
|
@@ -12032,17 +12043,17 @@ function resolveSpreadsheetLineHeight(fontSizePt) {
|
|
|
12032
12043
|
}
|
|
12033
12044
|
function buildGridlineShadow(color, options2) {
|
|
12034
12045
|
const parts = [];
|
|
12035
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
12046
|
+
if (_optionalChain([options2, 'optionalAccess', _772 => _772.right]) !== false) {
|
|
12036
12047
|
parts.push(`inset -1px 0 0 ${color}`);
|
|
12037
12048
|
}
|
|
12038
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
12049
|
+
if (_optionalChain([options2, 'optionalAccess', _773 => _773.bottom]) !== false) {
|
|
12039
12050
|
parts.push(`inset 0 -1px 0 ${color}`);
|
|
12040
12051
|
}
|
|
12041
12052
|
return parts.join(", ");
|
|
12042
12053
|
}
|
|
12043
12054
|
function buildCellStyle(style, palette, themePalette, options2) {
|
|
12044
|
-
const showGridLines = _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
12045
|
-
const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess',
|
|
12055
|
+
const showGridLines = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _774 => _774.showGridLines]), () => ( true));
|
|
12056
|
+
const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _775 => _775.colorsByIndex, 'access', _776 => _776[0]]), () => ( SHEET_SURFACE));
|
|
12046
12057
|
const gridlineShadow = showGridLines ? buildGridlineShadow(palette.border) : void 0;
|
|
12047
12058
|
const css = {
|
|
12048
12059
|
backgroundColor: baseSurface,
|
|
@@ -12055,7 +12066,7 @@ function buildCellStyle(style, palette, themePalette, options2) {
|
|
|
12055
12066
|
lineHeight: String(resolveSpreadsheetLineHeight(11)),
|
|
12056
12067
|
overflow: "hidden",
|
|
12057
12068
|
padding: DEFAULT_CELL_PADDING,
|
|
12058
|
-
textAlign: _nullishCoalesce(_optionalChain([options2, 'optionalAccess',
|
|
12069
|
+
textAlign: _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _777 => _777.generalAlignment]), () => ( "left")),
|
|
12059
12070
|
textOverflow: "clip",
|
|
12060
12071
|
verticalAlign: "bottom",
|
|
12061
12072
|
whiteSpace: "nowrap"
|
|
@@ -12139,24 +12150,24 @@ function buildCellStyle(style, palette, themePalette, options2) {
|
|
|
12139
12150
|
}
|
|
12140
12151
|
const border = style.border;
|
|
12141
12152
|
if (border) {
|
|
12142
|
-
const hasRightBorder = Boolean(_optionalChain([border, 'access',
|
|
12143
|
-
const hasBottomBorder = Boolean(_optionalChain([border, 'access',
|
|
12153
|
+
const hasRightBorder = Boolean(_optionalChain([border, 'access', _778 => _778.right, 'optionalAccess', _779 => _779.style]) && border.right.style !== "none");
|
|
12154
|
+
const hasBottomBorder = Boolean(_optionalChain([border, 'access', _780 => _780.bottom, 'optionalAccess', _781 => _781.style]) && border.bottom.style !== "none");
|
|
12144
12155
|
if (showGridLines && (hasRightBorder || hasBottomBorder)) {
|
|
12145
12156
|
css.boxShadow = buildGridlineShadow(palette.border, {
|
|
12146
12157
|
bottom: !hasBottomBorder,
|
|
12147
12158
|
right: !hasRightBorder
|
|
12148
12159
|
}) || void 0;
|
|
12149
12160
|
}
|
|
12150
|
-
if (_optionalChain([border, 'access',
|
|
12161
|
+
if (_optionalChain([border, 'access', _782 => _782.top, 'optionalAccess', _783 => _783.style]) && border.top.style !== "none") {
|
|
12151
12162
|
css.borderTop = mapBorder2(border.top, themePalette);
|
|
12152
12163
|
}
|
|
12153
|
-
if (_optionalChain([border, 'access',
|
|
12164
|
+
if (_optionalChain([border, 'access', _784 => _784.right, 'optionalAccess', _785 => _785.style]) && border.right.style !== "none") {
|
|
12154
12165
|
css.borderRight = mapBorder2(border.right, themePalette);
|
|
12155
12166
|
}
|
|
12156
|
-
if (_optionalChain([border, 'access',
|
|
12167
|
+
if (_optionalChain([border, 'access', _786 => _786.bottom, 'optionalAccess', _787 => _787.style]) && border.bottom.style !== "none") {
|
|
12157
12168
|
css.borderBottom = mapBorder2(border.bottom, themePalette);
|
|
12158
12169
|
}
|
|
12159
|
-
if (_optionalChain([border, 'access',
|
|
12170
|
+
if (_optionalChain([border, 'access', _788 => _788.left, 'optionalAccess', _789 => _789.style]) && border.left.style !== "none") {
|
|
12160
12171
|
css.borderLeft = mapBorder2(border.left, themePalette);
|
|
12161
12172
|
}
|
|
12162
12173
|
}
|
|
@@ -12235,7 +12246,7 @@ function canReceiveOverflowText(data) {
|
|
|
12235
12246
|
}
|
|
12236
12247
|
function getCellDisplayValue(worksheet, row3, col, activeSheet, locale = "en-US") {
|
|
12237
12248
|
const formula = worksheet.getFormulaAt(row3, col);
|
|
12238
|
-
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess',
|
|
12249
|
+
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _790 => _790.cachedFormulaValues, 'optionalAccess', _791 => _791[cellAddressToA12({ row: row3, col })]]) : void 0;
|
|
12239
12250
|
const formatted = worksheet.getFormattedValueAt(row3, col);
|
|
12240
12251
|
if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
|
|
12241
12252
|
return _chunkGP5SOQQHcjs.localizeCellNumber.call(void 0, worksheet, row3, col, decodeHtmlEntities2(formatted), locale);
|
|
@@ -12348,13 +12359,13 @@ function resolveChartFormulaRange(formula, fallbackSheetIndex, sheets, workbook)
|
|
|
12348
12359
|
}
|
|
12349
12360
|
}
|
|
12350
12361
|
const split = splitSheetFormulaReference(reference);
|
|
12351
|
-
const range = parseA1RangeReference2((_nullishCoalesce(_optionalChain([split, 'optionalAccess',
|
|
12362
|
+
const range = parseA1RangeReference2((_nullishCoalesce(_optionalChain([split, 'optionalAccess', _792 => _792.range]), () => ( reference))).replace(/\$/g, ""));
|
|
12352
12363
|
if (!range) {
|
|
12353
12364
|
return null;
|
|
12354
12365
|
}
|
|
12355
12366
|
let workbookSheetIndex = fallbackSheetIndex;
|
|
12356
|
-
if (_optionalChain([split, 'optionalAccess',
|
|
12357
|
-
const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess',
|
|
12367
|
+
if (_optionalChain([split, 'optionalAccess', _793 => _793.sheetName])) {
|
|
12368
|
+
const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess', _794 => _794.sheetIndex, 'call', _795 => _795(split.sheetName)]);
|
|
12358
12369
|
if (typeof workbookResolvedIndex === "number" && Number.isInteger(workbookResolvedIndex) && workbookResolvedIndex >= 0) {
|
|
12359
12370
|
workbookSheetIndex = workbookResolvedIndex;
|
|
12360
12371
|
} else {
|
|
@@ -12375,26 +12386,26 @@ function collectChartRangeHighlights(chart, selectedElement, sheets, workbook, i
|
|
|
12375
12386
|
}
|
|
12376
12387
|
const highlights = [];
|
|
12377
12388
|
const seenRanges = /* @__PURE__ */ new Set();
|
|
12378
|
-
const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess',
|
|
12389
|
+
const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess', _796 => _796.chartId]) === chart.id && selectedElement.kind !== "chart" && selectedElement.kind !== "legend" ? selectedElement.seriesIndex : null;
|
|
12379
12390
|
const seriesEntries = chart.series.map((series, seriesIndex) => ({ series, seriesIndex })).filter(({ series, seriesIndex }) => series.hidden !== true && (selectedSeriesIndex == null || seriesIndex === selectedSeriesIndex));
|
|
12380
12391
|
const references = seriesEntries.flatMap(({ series, seriesIndex }) => [
|
|
12381
12392
|
{
|
|
12382
|
-
formula: typeof _optionalChain([series, 'access',
|
|
12393
|
+
formula: typeof _optionalChain([series, 'access', _797 => _797.raw, 'optionalAccess', _798 => _798.name]) === "string" ? series.raw.name : void 0,
|
|
12383
12394
|
role: "name",
|
|
12384
12395
|
seriesIndex
|
|
12385
12396
|
},
|
|
12386
12397
|
{
|
|
12387
|
-
formula: _optionalChain([series, 'access',
|
|
12398
|
+
formula: _optionalChain([series, 'access', _799 => _799.categoriesRef, 'optionalAccess', _800 => _800.formula]),
|
|
12388
12399
|
role: "category",
|
|
12389
12400
|
seriesIndex
|
|
12390
12401
|
},
|
|
12391
12402
|
{
|
|
12392
|
-
formula: _optionalChain([series, 'access',
|
|
12403
|
+
formula: _optionalChain([series, 'access', _801 => _801.valuesRef, 'optionalAccess', _802 => _802.formula]),
|
|
12393
12404
|
role: "value",
|
|
12394
12405
|
seriesIndex
|
|
12395
12406
|
},
|
|
12396
12407
|
{
|
|
12397
|
-
formula: _optionalChain([series, 'access',
|
|
12408
|
+
formula: _optionalChain([series, 'access', _803 => _803.bubbleSizeRef, 'optionalAccess', _804 => _804.formula]),
|
|
12398
12409
|
role: "bubble",
|
|
12399
12410
|
seriesIndex
|
|
12400
12411
|
}
|
|
@@ -12566,7 +12577,7 @@ function normalizeBatchedMergeSpan(value) {
|
|
|
12566
12577
|
}
|
|
12567
12578
|
function normalizeBatchedCellValue(rawValue, formula, row3, col, activeSheet) {
|
|
12568
12579
|
const value = typeof rawValue === "string" ? decodeHtmlEntities2(rawValue) : rawValue === null || rawValue === void 0 ? "" : String(rawValue);
|
|
12569
|
-
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess',
|
|
12580
|
+
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _805 => _805.cachedFormulaValues, 'optionalAccess', _806 => _806[cellAddressToA12({ row: row3, col })]]) : void 0;
|
|
12570
12581
|
if (formula && cachedFormulaValue !== void 0 && value.startsWith("#")) {
|
|
12571
12582
|
return cachedFormulaValue;
|
|
12572
12583
|
}
|
|
@@ -12619,31 +12630,31 @@ function mergeResolvedCellStyle(base, overlay, options2) {
|
|
|
12619
12630
|
..._nullishCoalesce(base, () => ( {})),
|
|
12620
12631
|
..._nullishCoalesce(overlay, () => ( {}))
|
|
12621
12632
|
};
|
|
12622
|
-
const baseAlignment = _optionalChain([base, 'optionalAccess',
|
|
12623
|
-
const overlayAlignment = _optionalChain([overlay, 'optionalAccess',
|
|
12633
|
+
const baseAlignment = _optionalChain([base, 'optionalAccess', _807 => _807.alignment]);
|
|
12634
|
+
const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _808 => _808.alignment]);
|
|
12624
12635
|
if (baseAlignment || overlayAlignment) {
|
|
12625
12636
|
nextStyle.alignment = {
|
|
12626
12637
|
..._nullishCoalesce(baseAlignment, () => ( {})),
|
|
12627
12638
|
..._nullishCoalesce(overlayAlignment, () => ( {}))
|
|
12628
12639
|
};
|
|
12629
12640
|
}
|
|
12630
|
-
const baseBorder = _optionalChain([base, 'optionalAccess',
|
|
12631
|
-
const overlayBorder = _optionalChain([overlay, 'optionalAccess',
|
|
12641
|
+
const baseBorder = _optionalChain([base, 'optionalAccess', _809 => _809.border]);
|
|
12642
|
+
const overlayBorder = _optionalChain([overlay, 'optionalAccess', _810 => _810.border]);
|
|
12632
12643
|
if (baseBorder || overlayBorder) {
|
|
12633
|
-
nextStyle.border = _optionalChain([options2, 'optionalAccess',
|
|
12644
|
+
nextStyle.border = _optionalChain([options2, 'optionalAccess', _811 => _811.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
|
|
12634
12645
|
..._nullishCoalesce(baseBorder, () => ( {})),
|
|
12635
12646
|
..._nullishCoalesce(overlayBorder, () => ( {}))
|
|
12636
12647
|
};
|
|
12637
12648
|
}
|
|
12638
|
-
const baseFill = _optionalChain([base, 'optionalAccess',
|
|
12639
|
-
const overlayFill = _optionalChain([overlay, 'optionalAccess',
|
|
12649
|
+
const baseFill = _optionalChain([base, 'optionalAccess', _812 => _812.fill]);
|
|
12650
|
+
const overlayFill = _optionalChain([overlay, 'optionalAccess', _813 => _813.fill]);
|
|
12640
12651
|
if (baseFill || overlayFill) {
|
|
12641
|
-
nextStyle.fill = _optionalChain([options2, 'optionalAccess',
|
|
12652
|
+
nextStyle.fill = _optionalChain([options2, 'optionalAccess', _814 => _814.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
|
|
12642
12653
|
}
|
|
12643
|
-
const baseFont = _optionalChain([base, 'optionalAccess',
|
|
12644
|
-
const overlayFont = _optionalChain([overlay, 'optionalAccess',
|
|
12654
|
+
const baseFont = _optionalChain([base, 'optionalAccess', _815 => _815.font]);
|
|
12655
|
+
const overlayFont = _optionalChain([overlay, 'optionalAccess', _816 => _816.font]);
|
|
12645
12656
|
if (baseFont || overlayFont) {
|
|
12646
|
-
nextStyle.font = _optionalChain([options2, 'optionalAccess',
|
|
12657
|
+
nextStyle.font = _optionalChain([options2, 'optionalAccess', _817 => _817.replaceXfSubtrees]) && overlayFont ? overlayFont : {
|
|
12647
12658
|
..._nullishCoalesce(baseFont, () => ( {})),
|
|
12648
12659
|
..._nullishCoalesce(overlayFont, () => ( {}))
|
|
12649
12660
|
};
|
|
@@ -12651,10 +12662,10 @@ function mergeResolvedCellStyle(base, overlay, options2) {
|
|
|
12651
12662
|
return nextStyle;
|
|
12652
12663
|
}
|
|
12653
12664
|
function resolveCellTableOverrides(rawStyle, sheet, row3, col) {
|
|
12654
|
-
const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
12655
|
-
const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess',
|
|
12665
|
+
const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _818 => _818.cellStyleIds, 'optionalAccess', _819 => _819[cellAddressToA12({ row: row3, col })]]), () => ( _optionalChain([sheet, 'optionalAccess', _820 => _820.rowStyleIds, 'access', _821 => _821[row3]]))), () => ( _optionalChain([sheet, 'optionalAccess', _822 => _822.colStyleIds, 'access', _823 => _823[col]])));
|
|
12666
|
+
const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess', _824 => _824.styleById, 'access', _825 => _825[styleId], 'optionalAccess', _826 => _826.tableStyleOverrides]);
|
|
12656
12667
|
const overrides = {};
|
|
12657
|
-
const font = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
12668
|
+
const font = asRecord(_optionalChain([rawStyle, 'optionalAccess', _827 => _827.font]));
|
|
12658
12669
|
if (font) {
|
|
12659
12670
|
const explicitFont = {};
|
|
12660
12671
|
const fontDefaults = {
|
|
@@ -12667,28 +12678,28 @@ function resolveCellTableOverrides(rawStyle, sheet, row3, col) {
|
|
|
12667
12678
|
verticalAlign: "baseline"
|
|
12668
12679
|
};
|
|
12669
12680
|
for (const [key, value] of Object.entries(font)) {
|
|
12670
|
-
const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call',
|
|
12681
|
+
const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call', _828 => _828(value), 'optionalAccess', _829 => _829.colorType]) !== "auto" : value !== fontDefaults[key];
|
|
12671
12682
|
if (isExplicit) {
|
|
12672
12683
|
explicitFont[key] = value;
|
|
12673
12684
|
}
|
|
12674
12685
|
}
|
|
12675
12686
|
overrides.font = explicitFont;
|
|
12676
12687
|
}
|
|
12677
|
-
const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
12688
|
+
const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess', _830 => _830.fill]));
|
|
12678
12689
|
if (fill && fill.fillType !== "none") {
|
|
12679
12690
|
overrides.fill = fill;
|
|
12680
12691
|
}
|
|
12681
|
-
const border = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
12692
|
+
const border = asRecord(_optionalChain([rawStyle, 'optionalAccess', _831 => _831.border]));
|
|
12682
12693
|
if (border) {
|
|
12683
12694
|
overrides.border = Object.fromEntries(Object.entries(border).filter(([, edge]) => {
|
|
12684
|
-
const style = _optionalChain([asRecord, 'call',
|
|
12695
|
+
const style = _optionalChain([asRecord, 'call', _832 => _832(edge), 'optionalAccess', _833 => _833.style]);
|
|
12685
12696
|
return typeof style === "string" && style !== "none";
|
|
12686
12697
|
}));
|
|
12687
12698
|
}
|
|
12688
12699
|
return overrides;
|
|
12689
12700
|
}
|
|
12690
12701
|
function resolveBorderEdgePriority(edge) {
|
|
12691
|
-
const style = typeof _optionalChain([edge, 'optionalAccess',
|
|
12702
|
+
const style = typeof _optionalChain([edge, 'optionalAccess', _834 => _834.style]) === "string" ? edge.style : "none";
|
|
12692
12703
|
const stylePriority = {
|
|
12693
12704
|
dashed: 2,
|
|
12694
12705
|
dashDot: 3,
|
|
@@ -12722,8 +12733,8 @@ function resolvePreferredBorderEdge(current, candidate) {
|
|
|
12722
12733
|
return current;
|
|
12723
12734
|
}
|
|
12724
12735
|
function resolveMergedRegionBorderOverlay(row3, col, merge, resolveBaseCellStyle) {
|
|
12725
|
-
const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
12726
|
-
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
12736
|
+
const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _835 => _835.rowSpan]), () => ( 1)));
|
|
12737
|
+
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _836 => _836.colSpan]), () => ( 1)));
|
|
12727
12738
|
if (rowSpan === 1 && colSpan === 1) {
|
|
12728
12739
|
return null;
|
|
12729
12740
|
}
|
|
@@ -12735,19 +12746,19 @@ function resolveMergedRegionBorderOverlay(row3, col, merge, resolveBaseCellStyle
|
|
|
12735
12746
|
let left = null;
|
|
12736
12747
|
for (let targetCol = col; targetCol <= endCol; targetCol += 1) {
|
|
12737
12748
|
const topStyle = resolveBaseCellStyle(row3, targetCol);
|
|
12738
|
-
const topBorder = _optionalChain([topStyle, 'optionalAccess',
|
|
12739
|
-
top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess',
|
|
12749
|
+
const topBorder = _optionalChain([topStyle, 'optionalAccess', _837 => _837.border]);
|
|
12750
|
+
top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess', _838 => _838.top]), () => ( null)));
|
|
12740
12751
|
const bottomStyle = resolveBaseCellStyle(endRow, targetCol);
|
|
12741
|
-
const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess',
|
|
12742
|
-
bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess',
|
|
12752
|
+
const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess', _839 => _839.border]);
|
|
12753
|
+
bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess', _840 => _840.bottom]), () => ( null)));
|
|
12743
12754
|
}
|
|
12744
12755
|
for (let targetRow = row3; targetRow <= endRow; targetRow += 1) {
|
|
12745
12756
|
const leftStyle = resolveBaseCellStyle(targetRow, col);
|
|
12746
|
-
const leftBorder = _optionalChain([leftStyle, 'optionalAccess',
|
|
12747
|
-
left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess',
|
|
12757
|
+
const leftBorder = _optionalChain([leftStyle, 'optionalAccess', _841 => _841.border]);
|
|
12758
|
+
left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess', _842 => _842.left]), () => ( null)));
|
|
12748
12759
|
const rightStyle = resolveBaseCellStyle(targetRow, endCol);
|
|
12749
|
-
const rightBorder = _optionalChain([rightStyle, 'optionalAccess',
|
|
12750
|
-
right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess',
|
|
12760
|
+
const rightBorder = _optionalChain([rightStyle, 'optionalAccess', _843 => _843.border]);
|
|
12761
|
+
right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess', _844 => _844.right]), () => ( null)));
|
|
12751
12762
|
}
|
|
12752
12763
|
const border = {};
|
|
12753
12764
|
if (top) {
|
|
@@ -12806,7 +12817,7 @@ function resolveTableCellStyle(table, row3, col, activeSheet) {
|
|
|
12806
12817
|
if (!table || !activeSheet) {
|
|
12807
12818
|
return null;
|
|
12808
12819
|
}
|
|
12809
|
-
const styleName = _optionalChain([table, 'access',
|
|
12820
|
+
const styleName = _optionalChain([table, 'access', _845 => _845.styleInfo, 'optionalAccess', _846 => _846.name]);
|
|
12810
12821
|
if (!styleName) {
|
|
12811
12822
|
return null;
|
|
12812
12823
|
}
|
|
@@ -12845,7 +12856,7 @@ function resolveTableCellStyle(table, row3, col, activeSheet) {
|
|
|
12845
12856
|
resolved = mergeResolvedCellStyle(resolved, nextStyle);
|
|
12846
12857
|
};
|
|
12847
12858
|
applyElement("wholeTable", tableRegion);
|
|
12848
|
-
if (isBodyRow && _optionalChain([table, 'access',
|
|
12859
|
+
if (isBodyRow && _optionalChain([table, 'access', _847 => _847.styleInfo, 'optionalAccess', _848 => _848.showColumnStripes])) {
|
|
12849
12860
|
const isFirstStripe = (col - table.start.col) % 2 === 0;
|
|
12850
12861
|
applyElement(isFirstStripe ? "firstColumnStripe" : "secondColumnStripe", {
|
|
12851
12862
|
endCol: col,
|
|
@@ -12854,7 +12865,7 @@ function resolveTableCellStyle(table, row3, col, activeSheet) {
|
|
|
12854
12865
|
startRow: bodyStartRow
|
|
12855
12866
|
});
|
|
12856
12867
|
}
|
|
12857
|
-
if (isBodyRow && _optionalChain([table, 'access',
|
|
12868
|
+
if (isBodyRow && _optionalChain([table, 'access', _849 => _849.styleInfo, 'optionalAccess', _850 => _850.showRowStripes])) {
|
|
12858
12869
|
const isFirstStripe = (row3 - bodyStartRow) % 2 === 0;
|
|
12859
12870
|
applyElement(isFirstStripe ? "firstRowStripe" : "secondRowStripe", {
|
|
12860
12871
|
...tableRegion,
|
|
@@ -12862,8 +12873,8 @@ function resolveTableCellStyle(table, row3, col, activeSheet) {
|
|
|
12862
12873
|
startRow: row3
|
|
12863
12874
|
});
|
|
12864
12875
|
}
|
|
12865
|
-
applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access',
|
|
12866
|
-
applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access',
|
|
12876
|
+
applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access', _851 => _851.styleInfo, 'optionalAccess', _852 => _852.showLastColumn])) && isLastColumn);
|
|
12877
|
+
applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access', _853 => _853.styleInfo, 'optionalAccess', _854 => _854.showFirstColumn])) && isFirstColumn);
|
|
12867
12878
|
applyElement("headerRow", headerRegion, isHeaderRow);
|
|
12868
12879
|
if (isHeaderRow && table.headerRowCellStyle) {
|
|
12869
12880
|
const namedHeaderStyle = activeSheet.namedCellStyleByName[table.headerRowCellStyle];
|
|
@@ -13884,11 +13895,11 @@ function resolveConditionalFormulaComparable(formula, worksheet, sheet, batchedC
|
|
|
13884
13895
|
return literal;
|
|
13885
13896
|
}
|
|
13886
13897
|
const splitReference = splitSheetFormulaReference(normalized);
|
|
13887
|
-
const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess',
|
|
13888
|
-
if (targetSheetName && _optionalChain([sheet, 'optionalAccess',
|
|
13898
|
+
const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _855 => _855.sheetName]), () => ( null));
|
|
13899
|
+
if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _856 => _856.name]) && targetSheetName !== sheet.name) {
|
|
13889
13900
|
return literal;
|
|
13890
13901
|
}
|
|
13891
|
-
const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess',
|
|
13902
|
+
const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _857 => _857.range]), () => ( normalized));
|
|
13892
13903
|
const cell = parseA1CellReference2(cellRef.replace(/\$/g, ""));
|
|
13893
13904
|
if (!cell) {
|
|
13894
13905
|
return literal;
|
|
@@ -13920,8 +13931,8 @@ function normalizeConditionalTextOperand(value) {
|
|
|
13920
13931
|
}
|
|
13921
13932
|
function resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells) {
|
|
13922
13933
|
const normalizedRuleType = rule.ruleType.trim().toLowerCase();
|
|
13923
|
-
const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access',
|
|
13924
|
-
const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access',
|
|
13934
|
+
const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _858 => _858.formulas, 'optionalAccess', _859 => _859[0]]), () => ( "")), worksheet, sheet, batchedCells);
|
|
13935
|
+
const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _860 => _860.formulas, 'optionalAccess', _861 => _861[1]]), () => ( "")), worksheet, sheet, batchedCells);
|
|
13925
13936
|
if (normalizedRuleType === "cellis") {
|
|
13926
13937
|
return resolveConditionalCellIsMatch(_nullishCoalesce(rule.operator, () => ( "equal")), left, right, numericValue, textValue);
|
|
13927
13938
|
}
|
|
@@ -13952,7 +13963,7 @@ function getStyledConditionalRules(rules) {
|
|
|
13952
13963
|
return styledRules;
|
|
13953
13964
|
}
|
|
13954
13965
|
function resolveConditionalCellStyleForCell(row3, col, sheet, readNumericValue, readTextValue, worksheet, batchedCells) {
|
|
13955
|
-
const rules = _optionalChain([sheet, 'optionalAccess',
|
|
13966
|
+
const rules = _optionalChain([sheet, 'optionalAccess', _862 => _862.conditionalFormatRules]);
|
|
13956
13967
|
if (!sheet || !rules || rules.length === 0) {
|
|
13957
13968
|
return null;
|
|
13958
13969
|
}
|
|
@@ -14231,7 +14242,7 @@ function resolveFormControlLabel(control3) {
|
|
|
14231
14242
|
return label.replace(/\u00a0/g, " ").replace(/^\s+/, "");
|
|
14232
14243
|
}
|
|
14233
14244
|
function resolveConditionalDataBarForCell(row3, col, worksheet, sheet, metricsCache) {
|
|
14234
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
14245
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _863 => _863.conditionalFormatRules]), () => ( []));
|
|
14235
14246
|
const matchingRule = rules.find(
|
|
14236
14247
|
(rule) => rule.kind === "dataBar" && rule.ranges.some((range) => isCellInRange({ row: row3, col }, range))
|
|
14237
14248
|
);
|
|
@@ -14269,23 +14280,23 @@ function resolveConditionalDataBarForCell(row3, col, worksheet, sheet, metricsCa
|
|
|
14269
14280
|
const span = maxValue - minValue;
|
|
14270
14281
|
const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
|
|
14271
14282
|
const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
|
|
14272
|
-
const color = _chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.color, _optionalChain([sheet, 'optionalAccess',
|
|
14283
|
+
const color = _chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.color, _optionalChain([sheet, 'optionalAccess', _864 => _864.themePalette]));
|
|
14273
14284
|
if (!color || widthPercent <= 0) {
|
|
14274
14285
|
return null;
|
|
14275
14286
|
}
|
|
14276
14287
|
return {
|
|
14277
|
-
axisColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess',
|
|
14288
|
+
axisColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _865 => _865.themePalette])), () => ( void 0)),
|
|
14278
14289
|
border: _nullishCoalesce(matchingRule.border, () => ( void 0)),
|
|
14279
|
-
borderColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess',
|
|
14290
|
+
borderColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _866 => _866.themePalette])), () => ( void 0)),
|
|
14280
14291
|
color,
|
|
14281
14292
|
gradient: _nullishCoalesce(matchingRule.gradient, () => ( void 0)),
|
|
14282
|
-
negativeBorderColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess',
|
|
14283
|
-
negativeFillColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess',
|
|
14293
|
+
negativeBorderColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _867 => _867.themePalette])), () => ( void 0)),
|
|
14294
|
+
negativeFillColor: _nullishCoalesce(_chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _868 => _868.themePalette])), () => ( void 0)),
|
|
14284
14295
|
widthPercent
|
|
14285
14296
|
};
|
|
14286
14297
|
}
|
|
14287
14298
|
function resolveConditionalColorScaleForCell(row3, col, worksheet, sheet, metricsCache) {
|
|
14288
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
14299
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _869 => _869.conditionalFormatRules]), () => ( []));
|
|
14289
14300
|
const matchingRule = rules.find(
|
|
14290
14301
|
(rule) => rule.kind === "colorScale" && rule.ranges.some((range) => isCellInRange({ row: row3, col }, range))
|
|
14291
14302
|
);
|
|
@@ -14313,7 +14324,7 @@ function resolveConditionalColorScaleForCell(row3, col, worksheet, sheet, metric
|
|
|
14313
14324
|
});
|
|
14314
14325
|
metricsCache.set(cacheKey, ruleValues);
|
|
14315
14326
|
}
|
|
14316
|
-
const colors = matchingRule.colors.map((color) => _chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, color, _optionalChain([sheet, 'optionalAccess',
|
|
14327
|
+
const colors = matchingRule.colors.map((color) => _chunkGP5SOQQHcjs.resolveWorkbookColor.call(void 0, color, _optionalChain([sheet, 'optionalAccess', _870 => _870.themePalette]))).filter((color) => typeof color === "string");
|
|
14317
14328
|
const thresholds = matchingRule.cfvos.map((threshold) => resolveConditionalRuleThreshold(threshold, ruleValues)).filter((value) => typeof value === "number" && Number.isFinite(value));
|
|
14318
14329
|
if (colors.length < 2 || thresholds.length < 2) {
|
|
14319
14330
|
return null;
|
|
@@ -14332,7 +14343,7 @@ function resolveConditionalColorScaleForCell(row3, col, worksheet, sheet, metric
|
|
|
14332
14343
|
return { color: resolvedColor };
|
|
14333
14344
|
}
|
|
14334
14345
|
function resolveConditionalIconForCell(row3, col, worksheet, sheet, metricsCache) {
|
|
14335
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
14346
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _871 => _871.conditionalFormatRules]), () => ( []));
|
|
14336
14347
|
const matchingRule = rules.find(
|
|
14337
14348
|
(rule) => rule.kind === "iconSet" && rule.ranges.some((range) => isCellInRange({ row: row3, col }, range))
|
|
14338
14349
|
);
|
|
@@ -14372,7 +14383,7 @@ function resolveConditionalIconForCell(row3, col, worksheet, sheet, metricsCache
|
|
|
14372
14383
|
return icon ? buildConditionalIcon(icon.iconSet, icon.iconId) : null;
|
|
14373
14384
|
}
|
|
14374
14385
|
function resolveCellDataValidation(row3, col, sheet) {
|
|
14375
|
-
const validation = _optionalChain([sheet, 'optionalAccess',
|
|
14386
|
+
const validation = _optionalChain([sheet, 'optionalAccess', _872 => _872.dataValidations, 'access', _873 => _873.find, 'call', _874 => _874((entry) => entry.ranges.some((range) => isCellInRange({ row: row3, col }, range)))]);
|
|
14376
14387
|
if (!validation) {
|
|
14377
14388
|
return null;
|
|
14378
14389
|
}
|
|
@@ -14673,7 +14684,7 @@ function GridRow({
|
|
|
14673
14684
|
whiteSpace: "nowrap",
|
|
14674
14685
|
width: "max-content"
|
|
14675
14686
|
} : null;
|
|
14676
|
-
const title = [_optionalChain([cellData, 'access',
|
|
14687
|
+
const title = [_optionalChain([cellData, 'access', _875 => _875.hyperlink, 'optionalAccess', _876 => _876.tooltip]), _optionalChain([cellData, 'access', _877 => _877.validation, 'optionalAccess', _878 => _878.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
|
|
14677
14688
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0,
|
|
14678
14689
|
"td",
|
|
14679
14690
|
{
|
|
@@ -14862,8 +14873,8 @@ var MemoGridRow = _chunkTLEC4K6Wcjs.N.call(void 0, GridRow, (prev, next) => {
|
|
|
14862
14873
|
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.onRowResizeDoubleClick !== next.onRowResizeDoubleClick || prev.onRowResizePointerDown !== next.onRowResizePointerDown || prev.renderCellAdornment !== next.renderCellAdornment || prev.cellEditorStyle !== next.cellEditorStyle || prev.onFocusEditorOverlay !== next.onFocusEditorOverlay) {
|
|
14863
14874
|
return false;
|
|
14864
14875
|
}
|
|
14865
|
-
const prevEditingCol = _optionalChain([prev, 'access',
|
|
14866
|
-
const nextEditingCol = _optionalChain([next, 'access',
|
|
14876
|
+
const prevEditingCol = _optionalChain([prev, 'access', _879 => _879.editingCell, 'optionalAccess', _880 => _880.row]) === prev.actualRow ? prev.editingCell.col : -1;
|
|
14877
|
+
const nextEditingCol = _optionalChain([next, 'access', _881 => _881.editingCell, 'optionalAccess', _882 => _882.row]) === next.actualRow ? next.editingCell.col : -1;
|
|
14867
14878
|
if (prevEditingCol !== nextEditingCol) {
|
|
14868
14879
|
return false;
|
|
14869
14880
|
}
|
|
@@ -14995,7 +15006,7 @@ function XlsxGrid({
|
|
|
14995
15006
|
setContextMenu(null);
|
|
14996
15007
|
}, [activeTabIndex, workbook, readOnly, enableContextMenu, zoomScale]);
|
|
14997
15008
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
14998
|
-
if (contextMenu && (contextMenu.context.chart ? contextMenu.context.chart.id !== selectedChartId : contextMenu.context.image ? contextMenu.context.image.id !== selectedImageId : !selection || !rangesEqual(normalizeRange2(selection), contextMenu.context.selection))) {
|
|
15009
|
+
if (contextMenu && (contextMenu.context.chart ? contextMenu.context.chart.id !== selectedChartId : contextMenu.context.image ? contextMenu.context.image.id !== selectedImageId : contextMenu.hiddenRange ? selection !== contextMenu.hiddenRange.anchorSelection : !selection || !rangesEqual(normalizeRange2(selection), contextMenu.context.selection))) {
|
|
14999
15010
|
setContextMenu(null);
|
|
15000
15011
|
}
|
|
15001
15012
|
}, [contextMenu, selection, selectedChartId, selectedImageId]);
|
|
@@ -15116,9 +15127,9 @@ function XlsxGrid({
|
|
|
15116
15127
|
const formulaReferences = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15117
15128
|
() => {
|
|
15118
15129
|
const worksheet2 = getActiveWorksheet();
|
|
15119
|
-
return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15130
|
+
return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _883 => _883.name]), () => ( ""))) : [];
|
|
15120
15131
|
},
|
|
15121
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
15132
|
+
[_optionalChain([activeSheet, 'optionalAccess', _884 => _884.name]), editingCell, editingValue, getActiveWorksheet]
|
|
15122
15133
|
);
|
|
15123
15134
|
const [openTableMenu, setOpenTableMenu] = _chunkTLEC4K6Wcjs.d.call(void 0, null);
|
|
15124
15135
|
const [fillPreviewRange, setFillPreviewRange] = _chunkTLEC4K6Wcjs.d.call(void 0, null);
|
|
@@ -15185,13 +15196,13 @@ function XlsxGrid({
|
|
|
15185
15196
|
);
|
|
15186
15197
|
const mergedRegions = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
15187
15198
|
const regions = [];
|
|
15188
|
-
const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess',
|
|
15199
|
+
const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess', _885 => _885.mergedRegions])) ? worksheet.mergedRegions : [];
|
|
15189
15200
|
for (const entry of rawMergedRegions) {
|
|
15190
15201
|
const region = asRecord(entry);
|
|
15191
|
-
const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
15192
|
-
const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
15193
|
-
const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
15194
|
-
const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
15202
|
+
const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _886 => _886.startRow]));
|
|
15203
|
+
const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _887 => _887.startCol]));
|
|
15204
|
+
const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _888 => _888.endRow]));
|
|
15205
|
+
const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _889 => _889.endCol]));
|
|
15195
15206
|
if (startRow === null || startCol === null || endRow === null || endCol === null) {
|
|
15196
15207
|
continue;
|
|
15197
15208
|
}
|
|
@@ -15203,19 +15214,19 @@ function XlsxGrid({
|
|
|
15203
15214
|
return regions;
|
|
15204
15215
|
}, [worksheet]);
|
|
15205
15216
|
const findMergedRange = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15206
|
-
() => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15207
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
15217
|
+
() => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _890 => _890.mergedRanges]), () => ( mergedRegions))),
|
|
15218
|
+
[_optionalChain([activeSheet, 'optionalAccess', _891 => _891.mergedRanges]), mergedRegions]
|
|
15208
15219
|
);
|
|
15209
15220
|
const resolveMergeAnchorCell = _chunkTLEC4K6Wcjs.q.call(void 0, (cell) => {
|
|
15210
|
-
return _nullishCoalesce(_optionalChain([findMergedRange, 'call',
|
|
15221
|
+
return _nullishCoalesce(_optionalChain([findMergedRange, 'call', _892 => _892(cell), 'optionalAccess', _893 => _893.start]), () => ( cell));
|
|
15211
15222
|
}, [findMergedRange]);
|
|
15212
15223
|
const resolveCellSelectionRange = _chunkTLEC4K6Wcjs.q.call(void 0, (range) => {
|
|
15213
15224
|
const normalized = normalizeRange2(range);
|
|
15214
|
-
return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15215
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15225
|
+
return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _894 => _894.mergedRanges]), () => ( mergedRegions)));
|
|
15226
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _895 => _895.mergedRanges]), mergedRegions, resolveMergeAnchorCell]);
|
|
15216
15227
|
const highlightedCellRanges = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15217
|
-
() => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess',
|
|
15218
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
15228
|
+
() => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess', _896 => _896.workbookSheetIndex]) === highlight.workbookSheetIndex ? [{ highlight, index, range: expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _897 => _897.mergedRanges]), () => ( mergedRegions))) }] : []),
|
|
15229
|
+
[_optionalChain([activeSheet, 'optionalAccess', _898 => _898.mergedRanges]), _optionalChain([activeSheet, 'optionalAccess', _899 => _899.workbookSheetIndex]), highlightedRanges, mergedRegions]
|
|
15219
15230
|
);
|
|
15220
15231
|
const normalizedSelection = _chunkTLEC4K6Wcjs.T.call(void 0, () => selection ? normalizeRange2(selection) : null, [selection]);
|
|
15221
15232
|
const secondaryRanges = _chunkTLEC4K6Wcjs.T.call(void 0, () => selectionRanges.length > 1 ? selectionRanges.slice(0, -1) : EMPTY_SELECTION_RANGES, [selectionRanges]);
|
|
@@ -15233,15 +15244,15 @@ function XlsxGrid({
|
|
|
15233
15244
|
insets.set(key, (_nullishCoalesce(insets.get(key), () => ( 0))) + 18);
|
|
15234
15245
|
};
|
|
15235
15246
|
for (const pivot of controller.pivotTables) {
|
|
15236
|
-
if (pivot.target.sheet.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess',
|
|
15247
|
+
if (pivot.target.sheet.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess', _900 => _900.name, 'access', _901 => _901.toLowerCase, 'call', _902 => _902()])) continue;
|
|
15237
15248
|
for (const header of _nullishCoalesce(pivot.headers, () => ( []))) add2(header);
|
|
15238
15249
|
if (!readOnly && !pivot.unsupportedFeatures.length) for (const toggle of _nullishCoalesce(pivot.toggles, () => ( []))) add2(toggle);
|
|
15239
15250
|
}
|
|
15240
15251
|
return insets;
|
|
15241
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15252
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _903 => _903.name]), controller.pivotTables, readOnly]);
|
|
15242
15253
|
const [displayRowLimit, setDisplayRowLimit] = _chunkTLEC4K6Wcjs.d.call(void 0,
|
|
15243
15254
|
() => resolveInitialDisplayExtent(
|
|
15244
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15255
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _904 => _904.maxUsedRow]), () => ( -1)),
|
|
15245
15256
|
MIN_OPEN_GRID_ROWS,
|
|
15246
15257
|
OPEN_GRID_ROW_PADDING,
|
|
15247
15258
|
Boolean(isWorkerBacked),
|
|
@@ -15250,15 +15261,15 @@ function XlsxGrid({
|
|
|
15250
15261
|
);
|
|
15251
15262
|
const [displayColLimit, setDisplayColLimit] = _chunkTLEC4K6Wcjs.d.call(void 0,
|
|
15252
15263
|
() => resolveInitialDisplayExtent(
|
|
15253
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15264
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _905 => _905.maxUsedCol]), () => ( -1)),
|
|
15254
15265
|
MIN_OPEN_GRID_COLS,
|
|
15255
15266
|
OPEN_GRID_COL_PADDING,
|
|
15256
15267
|
Boolean(isWorkerBacked),
|
|
15257
15268
|
INITIAL_WORKER_GRID_COLS
|
|
15258
15269
|
)
|
|
15259
15270
|
);
|
|
15260
|
-
const hiddenRowSet = _chunkTLEC4K6Wcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15261
|
-
const hiddenColSet = _chunkTLEC4K6Wcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15271
|
+
const hiddenRowSet = _chunkTLEC4K6Wcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _906 => _906.hiddenRows]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _907 => _907.hiddenRows])]);
|
|
15272
|
+
const hiddenColSet = _chunkTLEC4K6Wcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _908 => _908.hiddenCols]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _909 => _909.hiddenCols])]);
|
|
15262
15273
|
const hiddenRowEnds = _chunkTLEC4K6Wcjs.T.call(void 0, () => hiddenRangeEnds(hiddenRowSet), [hiddenRowSet]);
|
|
15263
15274
|
const hiddenColEnds = _chunkTLEC4K6Wcjs.T.call(void 0, () => hiddenRangeEnds(hiddenColSet), [hiddenColSet]);
|
|
15264
15275
|
const displayDefaultRowHeight = DEFAULT_ROW_HEIGHT2 * zoomFactor;
|
|
@@ -15296,27 +15307,27 @@ function XlsxGrid({
|
|
|
15296
15307
|
const liveZoomAnchorX = resolveClampedLiveZoomAnchor(
|
|
15297
15308
|
nextLiveViewport.left,
|
|
15298
15309
|
nextLiveViewport.width,
|
|
15299
|
-
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
15300
|
-
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess',
|
|
15310
|
+
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _910 => _910.scrollWidth]), () => ( nextLiveViewport.width)),
|
|
15311
|
+
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _911 => _911.anchor, 'access', _912 => _912.x]), () => ( 0))
|
|
15301
15312
|
);
|
|
15302
15313
|
const liveZoomAnchorY = resolveClampedLiveZoomAnchor(
|
|
15303
15314
|
nextLiveViewport.top,
|
|
15304
15315
|
nextLiveViewport.height,
|
|
15305
|
-
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
15306
|
-
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess',
|
|
15316
|
+
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _913 => _913.scrollHeight]), () => ( nextLiveViewport.height)),
|
|
15317
|
+
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _914 => _914.anchor, 'access', _915 => _915.y]), () => ( 0))
|
|
15307
15318
|
);
|
|
15308
15319
|
const applyElementTransform = (element, transform, willChange, transformOrigin = null) => {
|
|
15309
15320
|
if (!element) {
|
|
15310
15321
|
return;
|
|
15311
15322
|
}
|
|
15312
15323
|
const cached = canvasTransformStyleCacheRef.current.get(element);
|
|
15313
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
15324
|
+
if (_optionalChain([cached, 'optionalAccess', _916 => _916.transform]) !== transform || element.style.transform !== transform) {
|
|
15314
15325
|
element.style.transform = transform;
|
|
15315
15326
|
}
|
|
15316
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
15327
|
+
if (_optionalChain([cached, 'optionalAccess', _917 => _917.willChange]) !== willChange || element.style.willChange !== willChange) {
|
|
15317
15328
|
element.style.willChange = willChange;
|
|
15318
15329
|
}
|
|
15319
|
-
if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess',
|
|
15330
|
+
if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess', _918 => _918.transformOrigin]) !== transformOrigin || element.style.transformOrigin !== transformOrigin)) {
|
|
15320
15331
|
element.style.transformOrigin = transformOrigin;
|
|
15321
15332
|
}
|
|
15322
15333
|
canvasTransformStyleCacheRef.current.set(element, {
|
|
@@ -15551,7 +15562,7 @@ function XlsxGrid({
|
|
|
15551
15562
|
pendingLiveZoomCommitRef.current = null;
|
|
15552
15563
|
updateLiveGestureZoomState((current) => ({
|
|
15553
15564
|
anchor,
|
|
15554
|
-
baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
15565
|
+
baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _919 => _919.baseZoomScale]), () => ( committedZoomScaleRef.current)),
|
|
15555
15566
|
targetZoomScale: clampedZoomScale
|
|
15556
15567
|
}));
|
|
15557
15568
|
}, [maxZoomScale, minZoomScale, updateLiveGestureZoomState]);
|
|
@@ -15601,7 +15612,7 @@ function XlsxGrid({
|
|
|
15601
15612
|
const matchesLiveViewport = liveViewport.left === nextViewport.left && liveViewport.top === nextViewport.top && liveViewport.width === nextViewport.width && liveViewport.height === nextViewport.height;
|
|
15602
15613
|
liveDrawingViewportRef.current = nextViewport;
|
|
15603
15614
|
applyCanvasViewportCompensation(nextViewport);
|
|
15604
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
15615
|
+
if (_optionalChain([options2, 'optionalAccess', _920 => _920.immediate])) {
|
|
15605
15616
|
pendingDrawingViewportRef.current = null;
|
|
15606
15617
|
if (drawingViewportFrameRef.current !== null) {
|
|
15607
15618
|
window.cancelAnimationFrame(drawingViewportFrameRef.current);
|
|
@@ -15650,7 +15661,7 @@ function XlsxGrid({
|
|
|
15650
15661
|
}
|
|
15651
15662
|
}, []);
|
|
15652
15663
|
const clearResizeDrag = _chunkTLEC4K6Wcjs.q.call(void 0, () => {
|
|
15653
|
-
_optionalChain([resizeStateRef, 'access',
|
|
15664
|
+
_optionalChain([resizeStateRef, 'access', _921 => _921.current, 'optionalAccess', _922 => _922.restoreUserSelect, 'call', _923 => _923()]);
|
|
15654
15665
|
resizeStateRef.current = null;
|
|
15655
15666
|
pendingResizePreviewRef.current = null;
|
|
15656
15667
|
columnPreviewRef.current = null;
|
|
@@ -15701,51 +15712,51 @@ function XlsxGrid({
|
|
|
15701
15712
|
}, []);
|
|
15702
15713
|
const visibleRows = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
15703
15714
|
return buildVisibleAxisIndices(
|
|
15704
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15715
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _924 => _924.visibleRows]), () => ( [])),
|
|
15705
15716
|
displayRowLimit,
|
|
15706
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15717
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _925 => _925.maxUsedRow]), () => ( -1)),
|
|
15707
15718
|
hiddenRowSet
|
|
15708
15719
|
);
|
|
15709
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15720
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _926 => _926.maxUsedRow]), _optionalChain([activeSheet, 'optionalAccess', _927 => _927.visibleRows]), displayRowLimit, hiddenRowSet]);
|
|
15710
15721
|
const visibleCols = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
15711
15722
|
return buildVisibleAxisIndices(
|
|
15712
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15723
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _928 => _928.visibleCols]), () => ( [])),
|
|
15713
15724
|
displayColLimit,
|
|
15714
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15725
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _929 => _929.maxUsedCol]), () => ( -1)),
|
|
15715
15726
|
hiddenColSet
|
|
15716
15727
|
);
|
|
15717
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15728
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _930 => _930.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _931 => _931.visibleCols]), displayColLimit, hiddenColSet]);
|
|
15718
15729
|
const frozenRows = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
15719
|
-
const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15730
|
+
const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _932 => _932.freezePanes, 'optionalAccess', _933 => _933.row]), () => ( 0));
|
|
15720
15731
|
if (freezeRow <= 0) {
|
|
15721
15732
|
return [];
|
|
15722
15733
|
}
|
|
15723
15734
|
return visibleRows.filter((row3) => row3 < freezeRow);
|
|
15724
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15735
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _934 => _934.freezePanes, 'optionalAccess', _935 => _935.row]), visibleRows]);
|
|
15725
15736
|
const frozenCols = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
15726
|
-
const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15737
|
+
const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _936 => _936.freezePanes, 'optionalAccess', _937 => _937.col]), () => ( 0));
|
|
15727
15738
|
if (freezeCol <= 0) {
|
|
15728
15739
|
return [];
|
|
15729
15740
|
}
|
|
15730
15741
|
return visibleCols.filter((col) => col < freezeCol);
|
|
15731
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
15742
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _938 => _938.freezePanes, 'optionalAccess', _939 => _939.col]), visibleCols]);
|
|
15732
15743
|
const actualColWidths = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15733
15744
|
() => {
|
|
15734
|
-
const office = _optionalChain([activeSheet, 'optionalAccess',
|
|
15745
|
+
const office = _optionalChain([activeSheet, 'optionalAccess', _940 => _940.officeLayout]);
|
|
15735
15746
|
if (office) {
|
|
15736
15747
|
return Array.from({ length: displayColLimit }, (_2, index) => {
|
|
15737
15748
|
if (hiddenColSet.has(index)) return 0;
|
|
15738
15749
|
const original = office.columns[index];
|
|
15739
|
-
const override = _optionalChain([activeSheet, 'optionalAccess',
|
|
15740
|
-
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess',
|
|
15741
|
-
const width = _optionalChain([worksheet, 'optionalAccess',
|
|
15742
|
-
return width !== void 0 && width !== null ? _chunkGP5SOQQHcjs.resolveOfficeColumnWidthPixels.call(void 0, width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess',
|
|
15750
|
+
const override = _optionalChain([activeSheet, 'optionalAccess', _941 => _941.colWidthOverridesPx, 'access', _942 => _942[index]]);
|
|
15751
|
+
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _943 => _943.sourcePx])) return override;
|
|
15752
|
+
const width = _optionalChain([worksheet, 'optionalAccess', _944 => _944.getColumnWidth, 'call', _945 => _945(index)]);
|
|
15753
|
+
return width !== void 0 && width !== null ? _chunkGP5SOQQHcjs.resolveOfficeColumnWidthPixels.call(void 0, width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _946 => _946.sizePx]), () => ( office.defaultColumnPx));
|
|
15743
15754
|
});
|
|
15744
15755
|
}
|
|
15745
15756
|
const widths = new Array(displayColLimit).fill(0);
|
|
15746
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15757
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _947 => _947.showGridLines]), () => ( true));
|
|
15747
15758
|
const fallbackWidth = Math.max(
|
|
15748
|
-
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15759
|
+
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _948 => _948.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)), showGridLines),
|
|
15749
15760
|
DEFAULT_COL_WIDTH2 / 2
|
|
15750
15761
|
);
|
|
15751
15762
|
if (worksheet) {
|
|
@@ -15757,7 +15768,7 @@ function XlsxGrid({
|
|
|
15757
15768
|
if (width !== void 0 && width !== null) {
|
|
15758
15769
|
widths[col] = Math.max(
|
|
15759
15770
|
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0,
|
|
15760
|
-
_chunkGP5SOQQHcjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([activeSheet, 'optionalAccess',
|
|
15771
|
+
_chunkGP5SOQQHcjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([activeSheet, 'optionalAccess', _949 => _949.columnWidthCharacterWidthPx])),
|
|
15761
15772
|
showGridLines
|
|
15762
15773
|
),
|
|
15763
15774
|
DEFAULT_COL_WIDTH2 / 2
|
|
@@ -15766,7 +15777,7 @@ function XlsxGrid({
|
|
|
15766
15777
|
}
|
|
15767
15778
|
widths[col] = Math.max(
|
|
15768
15779
|
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0,
|
|
15769
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15780
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _950 => _950.colWidthOverridesPx, 'access', _951 => _951[col]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _952 => _952.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
|
|
15770
15781
|
showGridLines
|
|
15771
15782
|
),
|
|
15772
15783
|
DEFAULT_COL_WIDTH2 / 2
|
|
@@ -15774,8 +15785,8 @@ function XlsxGrid({
|
|
|
15774
15785
|
}
|
|
15775
15786
|
return widths;
|
|
15776
15787
|
}
|
|
15777
|
-
const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15778
|
-
const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15788
|
+
const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _953 => _953.visibleCols]), () => ( []));
|
|
15789
|
+
const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _954 => _954.colWidths]), () => ( []));
|
|
15779
15790
|
for (let index = 0; index < precomputedCols.length; index += 1) {
|
|
15780
15791
|
const col = precomputedCols[index];
|
|
15781
15792
|
if (col === void 0 || col >= displayColLimit) {
|
|
@@ -15783,28 +15794,28 @@ function XlsxGrid({
|
|
|
15783
15794
|
}
|
|
15784
15795
|
widths[col] = Math.max(
|
|
15785
15796
|
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0,
|
|
15786
|
-
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15797
|
+
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _955 => _955.colWidthOverridesPx, 'access', _956 => _956[col]]), () => ( precomputedWidths[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _957 => _957.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
|
|
15787
15798
|
showGridLines
|
|
15788
15799
|
),
|
|
15789
15800
|
DEFAULT_COL_WIDTH2 / 2
|
|
15790
15801
|
);
|
|
15791
15802
|
}
|
|
15792
|
-
for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15803
|
+
for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _958 => _958.maxUsedCol]), () => ( -1))) + 1); col < displayColLimit; col += 1) {
|
|
15793
15804
|
if (hiddenColSet.has(col)) continue;
|
|
15794
|
-
const overrideWidth = _optionalChain([activeSheet, 'optionalAccess',
|
|
15805
|
+
const overrideWidth = _optionalChain([activeSheet, 'optionalAccess', _959 => _959.colWidthOverridesPx, 'access', _960 => _960[col]]);
|
|
15795
15806
|
widths[col] = overrideWidth === void 0 ? fallbackWidth : Math.max(_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, overrideWidth, showGridLines), DEFAULT_COL_WIDTH2 / 2);
|
|
15796
15807
|
}
|
|
15797
15808
|
return widths;
|
|
15798
15809
|
},
|
|
15799
15810
|
[
|
|
15800
15811
|
hiddenColSet,
|
|
15801
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15802
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15803
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15804
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15805
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15806
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15807
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15812
|
+
_optionalChain([activeSheet, 'optionalAccess', _961 => _961.officeLayout]),
|
|
15813
|
+
_optionalChain([activeSheet, 'optionalAccess', _962 => _962.colWidthOverridesPx]),
|
|
15814
|
+
_optionalChain([activeSheet, 'optionalAccess', _963 => _963.colWidths]),
|
|
15815
|
+
_optionalChain([activeSheet, 'optionalAccess', _964 => _964.defaultColWidthPx]),
|
|
15816
|
+
_optionalChain([activeSheet, 'optionalAccess', _965 => _965.maxUsedCol]),
|
|
15817
|
+
_optionalChain([activeSheet, 'optionalAccess', _966 => _966.showGridLines]),
|
|
15818
|
+
_optionalChain([activeSheet, 'optionalAccess', _967 => _967.visibleCols]),
|
|
15808
15819
|
displayColLimit,
|
|
15809
15820
|
worksheet,
|
|
15810
15821
|
revision,
|
|
@@ -15812,26 +15823,26 @@ function XlsxGrid({
|
|
|
15812
15823
|
]
|
|
15813
15824
|
);
|
|
15814
15825
|
const autoHeightCells = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15815
|
-
() => worksheet && !_optionalChain([activeSheet, 'optionalAccess',
|
|
15816
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
15826
|
+
() => worksheet && !_optionalChain([activeSheet, 'optionalAccess', _968 => _968.officeLayout]) ? _chunkGP5SOQQHcjs.readWorksheetAutoHeightCells.call(void 0, worksheet, displayRowLimit, displayColLimit, locale) : [],
|
|
15827
|
+
[_optionalChain([activeSheet, 'optionalAccess', _969 => _969.officeLayout]), displayColLimit, displayRowLimit, locale, revision, worksheet]
|
|
15817
15828
|
);
|
|
15818
15829
|
const actualRowHeights = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
15819
15830
|
() => {
|
|
15820
|
-
const office = _optionalChain([activeSheet, 'optionalAccess',
|
|
15831
|
+
const office = _optionalChain([activeSheet, 'optionalAccess', _970 => _970.officeLayout]);
|
|
15821
15832
|
if (office) {
|
|
15822
15833
|
return Array.from({ length: displayRowLimit }, (_2, index) => {
|
|
15823
15834
|
if (hiddenRowSet.has(index)) return 0;
|
|
15824
15835
|
const original = office.rows[index];
|
|
15825
|
-
const override = _optionalChain([activeSheet, 'optionalAccess',
|
|
15826
|
-
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess',
|
|
15827
|
-
const height = _optionalChain([worksheet, 'optionalAccess',
|
|
15828
|
-
return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess',
|
|
15836
|
+
const override = _optionalChain([activeSheet, 'optionalAccess', _971 => _971.rowHeightOverridesPx, 'access', _972 => _972[index]]);
|
|
15837
|
+
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _973 => _973.sourcePx])) return override;
|
|
15838
|
+
const height = _optionalChain([worksheet, 'optionalAccess', _974 => _974.getRowHeight, 'call', _975 => _975(index)]);
|
|
15839
|
+
return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _976 => _976.sizePx]), () => ( office.defaultRowPx));
|
|
15829
15840
|
});
|
|
15830
15841
|
}
|
|
15831
15842
|
const heights = new Array(displayRowLimit).fill(0);
|
|
15832
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15843
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _977 => _977.showGridLines]), () => ( true));
|
|
15833
15844
|
const fallbackHeight = Math.max(
|
|
15834
|
-
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15845
|
+
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _978 => _978.defaultRowHeightPx]), () => ( DEFAULT_ROW_HEIGHT2)), showGridLines),
|
|
15835
15846
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
15836
15847
|
);
|
|
15837
15848
|
if (worksheet) {
|
|
@@ -15839,11 +15850,11 @@ function XlsxGrid({
|
|
|
15839
15850
|
for (const { index: row3, cells } of autoHeightCells) {
|
|
15840
15851
|
let estimatedHeight = 0;
|
|
15841
15852
|
for (const cell of cells) {
|
|
15842
|
-
const cellStyle = buildCellStyle(asRecord(cell.style), palette, _optionalChain([activeSheet, 'optionalAccess',
|
|
15843
|
-
const spanEnd = Math.min(displayColLimit, cell.col + (_nullishCoalesce(_optionalChain([cell, 'access',
|
|
15853
|
+
const cellStyle = buildCellStyle(asRecord(cell.style), palette, _optionalChain([activeSheet, 'optionalAccess', _979 => _979.themePalette]), { showGridLines });
|
|
15854
|
+
const spanEnd = Math.min(displayColLimit, cell.col + (_nullishCoalesce(_optionalChain([cell, 'access', _980 => _980.mergeSpan, 'optionalAccess', _981 => _981.colSpan]), () => ( 1))));
|
|
15844
15855
|
let cellWidth = 0;
|
|
15845
15856
|
for (let col = cell.col; col < spanEnd; col += 1) {
|
|
15846
|
-
cellWidth += _nullishCoalesce(actualColWidths[col], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15857
|
+
cellWidth += _nullishCoalesce(actualColWidths[col], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _982 => _982.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)))));
|
|
15847
15858
|
}
|
|
15848
15859
|
estimatedHeight = Math.max(estimatedHeight, measureWrappedTextHeight(cell.value, cellStyle, cellWidth));
|
|
15849
15860
|
}
|
|
@@ -15862,7 +15873,7 @@ function XlsxGrid({
|
|
|
15862
15873
|
const estimatedAutoHeight = _nullishCoalesce(estimatedHeights.get(row3), () => ( 0));
|
|
15863
15874
|
heights[row3] = estimatedAutoHeight > 0 ? Math.max(_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, Math.ceil(estimatedAutoHeight), showGridLines), fallbackHeight) : Math.max(
|
|
15864
15875
|
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0,
|
|
15865
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15876
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _983 => _983.rowHeightOverridesPx, 'access', _984 => _984[row3]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _985 => _985.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
|
|
15866
15877
|
showGridLines
|
|
15867
15878
|
),
|
|
15868
15879
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
@@ -15870,8 +15881,8 @@ function XlsxGrid({
|
|
|
15870
15881
|
}
|
|
15871
15882
|
return heights;
|
|
15872
15883
|
}
|
|
15873
|
-
const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15874
|
-
const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15884
|
+
const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _986 => _986.visibleRows]), () => ( []));
|
|
15885
|
+
const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _987 => _987.rowHeights]), () => ( []));
|
|
15875
15886
|
for (let index = 0; index < precomputedRows.length; index += 1) {
|
|
15876
15887
|
const row3 = precomputedRows[index];
|
|
15877
15888
|
if (row3 === void 0 || row3 >= displayRowLimit) {
|
|
@@ -15879,29 +15890,29 @@ function XlsxGrid({
|
|
|
15879
15890
|
}
|
|
15880
15891
|
heights[row3] = Math.max(
|
|
15881
15892
|
_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0,
|
|
15882
|
-
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15893
|
+
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _988 => _988.rowHeightOverridesPx, 'access', _989 => _989[row3]]), () => ( precomputedHeights[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _990 => _990.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
|
|
15883
15894
|
showGridLines
|
|
15884
15895
|
),
|
|
15885
15896
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
15886
15897
|
);
|
|
15887
15898
|
}
|
|
15888
|
-
for (let row3 = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
15899
|
+
for (let row3 = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _991 => _991.maxUsedRow]), () => ( -1))) + 1); row3 < displayRowLimit; row3 += 1) {
|
|
15889
15900
|
if (hiddenRowSet.has(row3)) continue;
|
|
15890
|
-
const overrideHeight = _optionalChain([activeSheet, 'optionalAccess',
|
|
15901
|
+
const overrideHeight = _optionalChain([activeSheet, 'optionalAccess', _992 => _992.rowHeightOverridesPx, 'access', _993 => _993[row3]]);
|
|
15891
15902
|
heights[row3] = overrideHeight === void 0 ? fallbackHeight : Math.max(_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, overrideHeight, showGridLines), DEFAULT_ROW_HEIGHT2 / 1.5);
|
|
15892
15903
|
}
|
|
15893
15904
|
return heights;
|
|
15894
15905
|
},
|
|
15895
15906
|
[
|
|
15896
15907
|
hiddenRowSet,
|
|
15897
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15898
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15899
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15900
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15901
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15902
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15903
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15904
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
15908
|
+
_optionalChain([activeSheet, 'optionalAccess', _994 => _994.officeLayout]),
|
|
15909
|
+
_optionalChain([activeSheet, 'optionalAccess', _995 => _995.defaultRowHeightPx]),
|
|
15910
|
+
_optionalChain([activeSheet, 'optionalAccess', _996 => _996.maxUsedRow]),
|
|
15911
|
+
_optionalChain([activeSheet, 'optionalAccess', _997 => _997.rowHeightOverridesPx]),
|
|
15912
|
+
_optionalChain([activeSheet, 'optionalAccess', _998 => _998.rowHeights]),
|
|
15913
|
+
_optionalChain([activeSheet, 'optionalAccess', _999 => _999.showGridLines]),
|
|
15914
|
+
_optionalChain([activeSheet, 'optionalAccess', _1000 => _1000.themePalette]),
|
|
15915
|
+
_optionalChain([activeSheet, 'optionalAccess', _1001 => _1001.visibleRows]),
|
|
15905
15916
|
actualColWidths,
|
|
15906
15917
|
autoHeightCells,
|
|
15907
15918
|
displayRowLimit,
|
|
@@ -16107,19 +16118,19 @@ function XlsxGrid({
|
|
|
16107
16118
|
[domBaseColIndices, domBaseRowIndices, indexedMergedRegions]
|
|
16108
16119
|
);
|
|
16109
16120
|
const maxRowDisplayLimit = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
16110
|
-
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16111
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
16121
|
+
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1002 => _1002.maxUsedRow]), () => ( -1)), MIN_OPEN_GRID_ROWS, OPEN_GRID_ROW_PADDING),
|
|
16122
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1003 => _1003.maxUsedRow])]
|
|
16112
16123
|
);
|
|
16113
16124
|
const maxColDisplayLimit = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
16114
|
-
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16115
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
16125
|
+
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1004 => _1004.maxUsedCol]), () => ( -1)), MIN_OPEN_GRID_COLS, OPEN_GRID_COL_PADDING),
|
|
16126
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1005 => _1005.maxUsedCol])]
|
|
16116
16127
|
);
|
|
16117
16128
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
16118
16129
|
if (!isWorkerBacked) {
|
|
16119
16130
|
return;
|
|
16120
16131
|
}
|
|
16121
|
-
const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access',
|
|
16122
|
-
const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access',
|
|
16132
|
+
const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access', _1006 => _1006[currentRowVirtualItems.length - 1], 'optionalAccess', _1007 => _1007.index]), () => ( -1));
|
|
16133
|
+
const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access', _1008 => _1008[currentColVirtualItems.length - 1], 'optionalAccess', _1009 => _1009.index]), () => ( -1));
|
|
16123
16134
|
if (lastVirtualRowIndex >= visibleRows.length - WORKER_GRID_GROW_THRESHOLD_ROWS && displayRowLimit < maxRowDisplayLimit) {
|
|
16124
16135
|
setDisplayRowLimit((current) => Math.min(maxRowDisplayLimit, current + WORKER_GRID_GROW_ROWS));
|
|
16125
16136
|
}
|
|
@@ -16334,7 +16345,7 @@ function XlsxGrid({
|
|
|
16334
16345
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
16335
16346
|
setDisplayRowLimit(
|
|
16336
16347
|
resolveInitialDisplayExtent(
|
|
16337
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16348
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1010 => _1010.maxUsedRow]), () => ( -1)),
|
|
16338
16349
|
MIN_OPEN_GRID_ROWS,
|
|
16339
16350
|
OPEN_GRID_ROW_PADDING,
|
|
16340
16351
|
Boolean(isWorkerBacked),
|
|
@@ -16343,40 +16354,40 @@ function XlsxGrid({
|
|
|
16343
16354
|
);
|
|
16344
16355
|
setDisplayColLimit(
|
|
16345
16356
|
resolveInitialDisplayExtent(
|
|
16346
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16357
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1011 => _1011.maxUsedCol]), () => ( -1)),
|
|
16347
16358
|
MIN_OPEN_GRID_COLS,
|
|
16348
16359
|
OPEN_GRID_COL_PADDING,
|
|
16349
16360
|
Boolean(isWorkerBacked),
|
|
16350
16361
|
INITIAL_WORKER_GRID_COLS
|
|
16351
16362
|
)
|
|
16352
16363
|
);
|
|
16353
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
16364
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1012 => _1012.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1013 => _1013.maxUsedRow]), activeSheetIndex, isWorkerBacked]);
|
|
16354
16365
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
16355
|
-
const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess',
|
|
16356
|
-
const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess',
|
|
16357
|
-
const rowPadding = _optionalChain([axisSelectionRef, 'access',
|
|
16358
|
-
const colPadding = _optionalChain([axisSelectionRef, 'access',
|
|
16366
|
+
const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1014 => _1014.end, 'access', _1015 => _1015.row]), () => ( -1));
|
|
16367
|
+
const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1016 => _1016.end, 'access', _1017 => _1017.col]), () => ( -1));
|
|
16368
|
+
const rowPadding = _optionalChain([axisSelectionRef, 'access', _1018 => _1018.current, 'optionalAccess', _1019 => _1019.axis]) === "column" ? 0 : OPEN_GRID_ROW_PADDING;
|
|
16369
|
+
const colPadding = _optionalChain([axisSelectionRef, 'access', _1020 => _1020.current, 'optionalAccess', _1021 => _1021.axis]) === "row" ? 0 : OPEN_GRID_COL_PADDING;
|
|
16359
16370
|
const nextRowLimit = Math.max(
|
|
16360
16371
|
resolveInitialDisplayExtent(
|
|
16361
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16362
|
-
minimumVisibleExtent(MIN_OPEN_GRID_ROWS, _optionalChain([activeSheet, 'optionalAccess',
|
|
16372
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1022 => _1022.maxUsedRow]), () => ( -1)),
|
|
16373
|
+
minimumVisibleExtent(MIN_OPEN_GRID_ROWS, _optionalChain([activeSheet, 'optionalAccess', _1023 => _1023.hiddenRows]), _chunkGP5SOQQHcjs.XLSX_MAX_ROWS),
|
|
16363
16374
|
OPEN_GRID_ROW_PADDING,
|
|
16364
16375
|
false,
|
|
16365
16376
|
INITIAL_WORKER_GRID_ROWS
|
|
16366
16377
|
),
|
|
16367
|
-
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess',
|
|
16378
|
+
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1024 => _1024.row]), () => ( -1))) + rowPadding + 1,
|
|
16368
16379
|
selectionEndRow + rowPadding + 1,
|
|
16369
16380
|
drawingExtents.maxRow + OPEN_GRID_ROW_PADDING + 1
|
|
16370
16381
|
);
|
|
16371
16382
|
const nextColLimit = Math.max(
|
|
16372
16383
|
resolveInitialDisplayExtent(
|
|
16373
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16374
|
-
minimumVisibleExtent(MIN_OPEN_GRID_COLS, _optionalChain([activeSheet, 'optionalAccess',
|
|
16384
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1025 => _1025.maxUsedCol]), () => ( -1)),
|
|
16385
|
+
minimumVisibleExtent(MIN_OPEN_GRID_COLS, _optionalChain([activeSheet, 'optionalAccess', _1026 => _1026.hiddenCols]), _chunkGP5SOQQHcjs.XLSX_MAX_COLUMNS),
|
|
16375
16386
|
OPEN_GRID_COL_PADDING,
|
|
16376
16387
|
false,
|
|
16377
16388
|
INITIAL_WORKER_GRID_COLS
|
|
16378
16389
|
),
|
|
16379
|
-
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess',
|
|
16390
|
+
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1027 => _1027.col]), () => ( -1))) + colPadding + 1,
|
|
16380
16391
|
selectionEndCol + colPadding + 1,
|
|
16381
16392
|
drawingExtents.maxCol + OPEN_GRID_COL_PADDING + 1
|
|
16382
16393
|
);
|
|
@@ -16384,30 +16395,30 @@ function XlsxGrid({
|
|
|
16384
16395
|
setDisplayColLimit((current) => current < nextColLimit ? nextColLimit : current);
|
|
16385
16396
|
}, [
|
|
16386
16397
|
activeCell,
|
|
16387
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16388
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16389
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16390
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16398
|
+
_optionalChain([activeSheet, 'optionalAccess', _1028 => _1028.hiddenRows]),
|
|
16399
|
+
_optionalChain([activeSheet, 'optionalAccess', _1029 => _1029.hiddenCols]),
|
|
16400
|
+
_optionalChain([activeSheet, 'optionalAccess', _1030 => _1030.maxUsedCol]),
|
|
16401
|
+
_optionalChain([activeSheet, 'optionalAccess', _1031 => _1031.maxUsedRow]),
|
|
16391
16402
|
drawingExtents.maxCol,
|
|
16392
16403
|
drawingExtents.maxRow,
|
|
16393
|
-
_optionalChain([normalizedSelection, 'optionalAccess',
|
|
16394
|
-
_optionalChain([normalizedSelection, 'optionalAccess',
|
|
16404
|
+
_optionalChain([normalizedSelection, 'optionalAccess', _1032 => _1032.end, 'access', _1033 => _1033.col]),
|
|
16405
|
+
_optionalChain([normalizedSelection, 'optionalAccess', _1034 => _1034.end, 'access', _1035 => _1035.row])
|
|
16395
16406
|
]);
|
|
16396
16407
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
16397
16408
|
const initialScrollKey = [
|
|
16398
16409
|
displayFileName,
|
|
16399
16410
|
activeSheetIndex,
|
|
16400
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16401
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16402
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16403
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16411
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1036 => _1036.workbookSheetIndex]), () => ( -1)),
|
|
16412
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1037 => _1037.name]), () => ( "")),
|
|
16413
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1038 => _1038.minUsedRow]), () => ( -1)),
|
|
16414
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1039 => _1039.minUsedCol]), () => ( -1)),
|
|
16404
16415
|
isWorkerBacked ? "worker" : "main"
|
|
16405
16416
|
].join("|");
|
|
16406
16417
|
if (initialScrollKeyRef.current === initialScrollKey) {
|
|
16407
16418
|
return;
|
|
16408
16419
|
}
|
|
16409
|
-
const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16410
|
-
const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
16420
|
+
const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1040 => _1040.minUsedRow]), () => ( -1)));
|
|
16421
|
+
const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1041 => _1041.minUsedCol]), () => ( -1)));
|
|
16411
16422
|
const initialScrollTop = initialUsedRow > 0 ? sumPrefixRange(actualRowPrefixSums, 0, initialUsedRow - 1) : 0;
|
|
16412
16423
|
const initialScrollLeft = initialUsedCol > 0 ? sumPrefixRange(actualColPrefixSums, 0, initialUsedCol - 1) : 0;
|
|
16413
16424
|
if (shouldUseDomVirtualizer && shouldVirtualizeRows) {
|
|
@@ -16426,10 +16437,10 @@ function XlsxGrid({
|
|
|
16426
16437
|
}
|
|
16427
16438
|
initialScrollKeyRef.current = initialScrollKey;
|
|
16428
16439
|
}, [
|
|
16429
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16430
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16431
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16432
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
16440
|
+
_optionalChain([activeSheet, 'optionalAccess', _1042 => _1042.minUsedCol]),
|
|
16441
|
+
_optionalChain([activeSheet, 'optionalAccess', _1043 => _1043.minUsedRow]),
|
|
16442
|
+
_optionalChain([activeSheet, 'optionalAccess', _1044 => _1044.name]),
|
|
16443
|
+
_optionalChain([activeSheet, 'optionalAccess', _1045 => _1045.workbookSheetIndex]),
|
|
16433
16444
|
activeSheetIndex,
|
|
16434
16445
|
actualColPrefixSums,
|
|
16435
16446
|
actualRowPrefixSums,
|
|
@@ -16668,7 +16679,7 @@ function XlsxGrid({
|
|
|
16668
16679
|
return;
|
|
16669
16680
|
}
|
|
16670
16681
|
function handlePointerDown(event) {
|
|
16671
|
-
if (_optionalChain([tableMenuRef, 'access',
|
|
16682
|
+
if (_optionalChain([tableMenuRef, 'access', _1046 => _1046.current, 'optionalAccess', _1047 => _1047.contains, 'call', _1048 => _1048(event.target)])) {
|
|
16672
16683
|
return;
|
|
16673
16684
|
}
|
|
16674
16685
|
setOpenTableMenu(null);
|
|
@@ -16679,7 +16690,7 @@ function XlsxGrid({
|
|
|
16679
16690
|
}
|
|
16680
16691
|
}
|
|
16681
16692
|
function handleViewportChange(event) {
|
|
16682
|
-
if (event.target instanceof Node && _optionalChain([tableMenuRef, 'access',
|
|
16693
|
+
if (event.target instanceof Node && _optionalChain([tableMenuRef, 'access', _1049 => _1049.current, 'optionalAccess', _1050 => _1050.contains, 'call', _1051 => _1051(event.target)])) return;
|
|
16683
16694
|
setOpenTableMenu(null);
|
|
16684
16695
|
}
|
|
16685
16696
|
window.addEventListener("pointerdown", handlePointerDown);
|
|
@@ -16687,15 +16698,15 @@ function XlsxGrid({
|
|
|
16687
16698
|
window.addEventListener("scroll", handleViewportChange, true);
|
|
16688
16699
|
window.addEventListener("resize", handleViewportChange);
|
|
16689
16700
|
const scroller = scrollRef.current;
|
|
16690
|
-
_optionalChain([scroller, 'optionalAccess',
|
|
16691
|
-
_optionalChain([scroller, 'optionalAccess',
|
|
16701
|
+
_optionalChain([scroller, 'optionalAccess', _1052 => _1052.addEventListener, 'call', _1053 => _1053("wheel", handleViewportChange, { passive: true })]);
|
|
16702
|
+
_optionalChain([scroller, 'optionalAccess', _1054 => _1054.addEventListener, 'call', _1055 => _1055("gesturestart", handleViewportChange)]);
|
|
16692
16703
|
return () => {
|
|
16693
16704
|
window.removeEventListener("pointerdown", handlePointerDown);
|
|
16694
16705
|
window.removeEventListener("keydown", handleKeyDown);
|
|
16695
16706
|
window.removeEventListener("scroll", handleViewportChange, true);
|
|
16696
16707
|
window.removeEventListener("resize", handleViewportChange);
|
|
16697
|
-
_optionalChain([scroller, 'optionalAccess',
|
|
16698
|
-
_optionalChain([scroller, 'optionalAccess',
|
|
16708
|
+
_optionalChain([scroller, 'optionalAccess', _1056 => _1056.removeEventListener, 'call', _1057 => _1057("wheel", handleViewportChange)]);
|
|
16709
|
+
_optionalChain([scroller, 'optionalAccess', _1058 => _1058.removeEventListener, 'call', _1059 => _1059("gesturestart", handleViewportChange)]);
|
|
16699
16710
|
};
|
|
16700
16711
|
}, [openTableMenu]);
|
|
16701
16712
|
const resolvePointerCellFromGeometry = _chunkTLEC4K6Wcjs.q.call(void 0, (clientX, clientY) => {
|
|
@@ -16748,7 +16759,7 @@ function XlsxGrid({
|
|
|
16748
16759
|
if (!(element instanceof HTMLElement)) {
|
|
16749
16760
|
continue;
|
|
16750
16761
|
}
|
|
16751
|
-
const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access',
|
|
16762
|
+
const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access', _1060 => _1060.closest, 'call', _1061 => _1061("[data-xlsx-cell]"), 'optionalAccess', _1062 => _1062.getAttribute, 'call', _1063 => _1063("data-xlsx-cell")]), () => ( null)));
|
|
16752
16763
|
if (cell) {
|
|
16753
16764
|
return cell;
|
|
16754
16765
|
}
|
|
@@ -16780,8 +16791,8 @@ function XlsxGrid({
|
|
|
16780
16791
|
const resolveDraggedSelectionCell = _chunkTLEC4K6Wcjs.q.call(void 0, (dragState, clientX, clientY) => {
|
|
16781
16792
|
const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
|
|
16782
16793
|
const hitCell = resolvePointerCellFromHitTest(clientX, clientY);
|
|
16783
|
-
const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess',
|
|
16784
|
-
const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess',
|
|
16794
|
+
const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1064 => _1064.row]), () => ( (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0)));
|
|
16795
|
+
const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1065 => _1065.col]), () => ( _optionalChain([hitCell, 'optionalAccess', _1066 => _1066.col])));
|
|
16785
16796
|
if (actualRow === void 0 || actualCol === void 0) {
|
|
16786
16797
|
return null;
|
|
16787
16798
|
}
|
|
@@ -16887,18 +16898,18 @@ function XlsxGrid({
|
|
|
16887
16898
|
}
|
|
16888
16899
|
}, [displayDefaultColWidth, displayEffectiveColWidths, displayRowHeaderWidth, visibleCols]);
|
|
16889
16900
|
const applyRowPreview = _chunkTLEC4K6Wcjs.q.call(void 0, (actualRow, heightPx) => {
|
|
16890
|
-
const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access',
|
|
16901
|
+
const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access', _1067 => _1067.current, 'optionalAccess', _1068 => _1068.querySelector, 'call', _1069 => _1069(`tr[data-xlsx-row="${actualRow}"]`)]))), () => ( null));
|
|
16891
16902
|
if (rowElement) {
|
|
16892
16903
|
rowElementRefs.current.set(actualRow, rowElement);
|
|
16893
16904
|
rowElement.style.height = heightPx === null ? "" : `${heightPx}px`;
|
|
16894
16905
|
}
|
|
16895
16906
|
}, []);
|
|
16896
16907
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
16897
|
-
_optionalChain([pendingSelectionDragCleanupRef, 'access',
|
|
16898
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
16899
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
16900
|
-
_optionalChain([chartInteractionCleanupRef, 'access',
|
|
16901
|
-
_optionalChain([imageInteractionCleanupRef, 'access',
|
|
16908
|
+
_optionalChain([pendingSelectionDragCleanupRef, 'access', _1070 => _1070.current, 'optionalCall', _1071 => _1071()]);
|
|
16909
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1072 => _1072.current, 'optionalCall', _1073 => _1073()]);
|
|
16910
|
+
_optionalChain([fillDragCleanupRef, 'access', _1074 => _1074.current, 'optionalCall', _1075 => _1075()]);
|
|
16911
|
+
_optionalChain([chartInteractionCleanupRef, 'access', _1076 => _1076.current, 'optionalCall', _1077 => _1077()]);
|
|
16912
|
+
_optionalChain([imageInteractionCleanupRef, 'access', _1078 => _1078.current, 'optionalCall', _1079 => _1079()]);
|
|
16902
16913
|
pendingSelectionDragCleanupRef.current = null;
|
|
16903
16914
|
selectionDragCleanupRef.current = null;
|
|
16904
16915
|
fillDragCleanupRef.current = null;
|
|
@@ -16957,7 +16968,7 @@ function XlsxGrid({
|
|
|
16957
16968
|
if (!scroller || interactiveTarget && interactiveTarget !== scroller) {
|
|
16958
16969
|
return;
|
|
16959
16970
|
}
|
|
16960
|
-
_optionalChain([gridKeyboardHandlerRef, 'access',
|
|
16971
|
+
_optionalChain([gridKeyboardHandlerRef, 'access', _1080 => _1080.current, 'optionalCall', _1081 => _1081(event)]);
|
|
16961
16972
|
};
|
|
16962
16973
|
document.addEventListener("pointerdown", handleDocumentPointerDown, true);
|
|
16963
16974
|
document.addEventListener("keydown", handleDocumentKeyDown);
|
|
@@ -16983,7 +16994,7 @@ function XlsxGrid({
|
|
|
16983
16994
|
return;
|
|
16984
16995
|
}
|
|
16985
16996
|
}
|
|
16986
|
-
const externalTarget = _optionalChain([target, 'optionalAccess',
|
|
16997
|
+
const externalTarget = _optionalChain([target, 'optionalAccess', _1082 => _1082.trim, 'call', _1083 => _1083()]);
|
|
16987
16998
|
if (!externalTarget || externalTarget.startsWith("#") || typeof window === "undefined") {
|
|
16988
16999
|
return;
|
|
16989
17000
|
}
|
|
@@ -17054,7 +17065,7 @@ function XlsxGrid({
|
|
|
17054
17065
|
enabled: !!renderCellEditorOverlay && !readOnly && !isLoading,
|
|
17055
17066
|
cell: editingCell,
|
|
17056
17067
|
sheetIndex: activeSheetIndex,
|
|
17057
|
-
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
17068
|
+
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1084 => _1084.name]), () => ( "")),
|
|
17058
17069
|
originalValue: editingSavedValueRef.current,
|
|
17059
17070
|
trigger: editingTriggerRef.current,
|
|
17060
17071
|
value: editingValue,
|
|
@@ -17069,7 +17080,7 @@ function XlsxGrid({
|
|
|
17069
17080
|
else commitEditing();
|
|
17070
17081
|
}, [cancelEditing, commitEditing, hasEditorPreview]);
|
|
17071
17082
|
const focusEditorOverlay = _chunkTLEC4K6Wcjs.q.call(void 0, () => {
|
|
17072
|
-
const target = _optionalChain([editorOverlayRef, 'access',
|
|
17083
|
+
const target = _optionalChain([editorOverlayRef, 'access', _1085 => _1085.current, 'optionalAccess', _1086 => _1086.querySelector, 'call', _1087 => _1087('button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex="0"]')]);
|
|
17073
17084
|
if (!target) return false;
|
|
17074
17085
|
target.focus({ preventScroll: true });
|
|
17075
17086
|
return true;
|
|
@@ -17078,7 +17089,7 @@ function XlsxGrid({
|
|
|
17078
17089
|
if (!editingCellRef.current) {
|
|
17079
17090
|
return;
|
|
17080
17091
|
}
|
|
17081
|
-
if (event.relatedTarget && _optionalChain([editorOverlayRef, 'access',
|
|
17092
|
+
if (event.relatedTarget && _optionalChain([editorOverlayRef, 'access', _1088 => _1088.current, 'optionalAccess', _1089 => _1089.contains, 'call', _1090 => _1090(event.relatedTarget)])) return;
|
|
17082
17093
|
exitEditorScope();
|
|
17083
17094
|
}, [exitEditorScope]);
|
|
17084
17095
|
const handleEditingNavigate = _chunkTLEC4K6Wcjs.q.call(void 0, (key, value) => {
|
|
@@ -17222,11 +17233,11 @@ function XlsxGrid({
|
|
|
17222
17233
|
}, [activeSheetIndex, revision, locale]);
|
|
17223
17234
|
const sparklinesByCell = _chunkTLEC4K6Wcjs.T.call(void 0, () => {
|
|
17224
17235
|
const map = /* @__PURE__ */ new Map();
|
|
17225
|
-
for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
17236
|
+
for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1091 => _1091.sparklines]), () => ( []))) {
|
|
17226
17237
|
map.set(`${sparkline.target.row}:${sparkline.target.col}`, sparkline);
|
|
17227
17238
|
}
|
|
17228
17239
|
return map;
|
|
17229
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
17240
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1092 => _1092.sparklines])]);
|
|
17230
17241
|
const chartRangeHighlights = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
17231
17242
|
() => collectChartRangeHighlights(selectedChart, selectedChartElement, sheets, workbook, paletteIsDark(palette)),
|
|
17232
17243
|
[palette, selectedChart, selectedChartElement, sheets, workbook]
|
|
@@ -17283,8 +17294,8 @@ function XlsxGrid({
|
|
|
17283
17294
|
return cached;
|
|
17284
17295
|
}
|
|
17285
17296
|
const batchCoversRow = viewportRowBatch ? row3 >= viewportRowBatch.startRow && row3 <= viewportRowBatch.endRow : false;
|
|
17286
|
-
const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess',
|
|
17287
|
-
const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess',
|
|
17297
|
+
const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1093 => _1093.cells, 'access', _1094 => _1094.get, 'call', _1095 => _1095(cacheKey)]) : void 0;
|
|
17298
|
+
const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1096 => _1096.isMergedSecondary, 'call', _1097 => _1097(row3, col)]), () => ( false));
|
|
17288
17299
|
if (!worksheet && !batchedCell) {
|
|
17289
17300
|
const emptyData = {
|
|
17290
17301
|
isMergedSecondary: false,
|
|
@@ -17292,7 +17303,7 @@ function XlsxGrid({
|
|
|
17292
17303
|
backgroundColor: resolveSheetSurface(activeSheet, palette),
|
|
17293
17304
|
borderBottom: "none",
|
|
17294
17305
|
borderRight: "none",
|
|
17295
|
-
boxShadow: _optionalChain([activeSheet, 'optionalAccess',
|
|
17306
|
+
boxShadow: _optionalChain([activeSheet, 'optionalAccess', _1098 => _1098.showGridLines]) ? buildGridlineShadow(palette.border) : void 0,
|
|
17296
17307
|
padding: DEFAULT_CELL_PADDING,
|
|
17297
17308
|
verticalAlign: "bottom",
|
|
17298
17309
|
whiteSpace: "nowrap"
|
|
@@ -17302,7 +17313,7 @@ function XlsxGrid({
|
|
|
17302
17313
|
cellRenderCacheRef.current.set(cacheKey, emptyData);
|
|
17303
17314
|
return emptyData;
|
|
17304
17315
|
}
|
|
17305
|
-
if (_optionalChain([batchedCell, 'optionalAccess',
|
|
17316
|
+
if (_optionalChain([batchedCell, 'optionalAccess', _1099 => _1099.isMergedSecondary]) || worksheetMergedSecondary) {
|
|
17306
17317
|
const mergedSecondaryData = {
|
|
17307
17318
|
isMergedSecondary: true,
|
|
17308
17319
|
style: {},
|
|
@@ -17311,7 +17322,7 @@ function XlsxGrid({
|
|
|
17311
17322
|
cellRenderCacheRef.current.set(cacheKey, mergedSecondaryData);
|
|
17312
17323
|
return mergedSecondaryData;
|
|
17313
17324
|
}
|
|
17314
|
-
const merge = worksheet ? worksheet.getMergeSpan(row3, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess',
|
|
17325
|
+
const merge = worksheet ? worksheet.getMergeSpan(row3, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1100 => _1100.mergeSpan]) : null;
|
|
17315
17326
|
const resolveBaseResolvedStyle = (targetRow, targetCol) => {
|
|
17316
17327
|
const targetCacheKey = `${targetRow}:${targetCol}`;
|
|
17317
17328
|
const cachedBaseStyle = cellBaseRawStyleCacheRef.current.get(targetCacheKey);
|
|
@@ -17319,9 +17330,9 @@ function XlsxGrid({
|
|
|
17319
17330
|
return cachedBaseStyle;
|
|
17320
17331
|
}
|
|
17321
17332
|
const targetBatchCoversRow = viewportRowBatch ? targetRow >= viewportRowBatch.startRow && targetRow <= viewportRowBatch.endRow : false;
|
|
17322
|
-
const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess',
|
|
17333
|
+
const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1101 => _1101.cells, 'access', _1102 => _1102.get, 'call', _1103 => _1103(targetCacheKey)]) : void 0;
|
|
17323
17334
|
const targetInheritedStyle = resolveInheritedCellStyle2(activeSheet, targetRow, targetCol);
|
|
17324
|
-
const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess',
|
|
17335
|
+
const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess', _1104 => _1104.style]), () => ( null)) : _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1105 => _1105.getCellStyleAt, 'call', _1106 => _1106(targetRow, targetCol)]), () => ( null));
|
|
17325
17336
|
const targetRawStyle = mergeResolvedCellStyle(targetInheritedStyle, targetWorksheetStyle, {
|
|
17326
17337
|
replaceXfSubtrees: true
|
|
17327
17338
|
});
|
|
@@ -17335,8 +17346,8 @@ function XlsxGrid({
|
|
|
17335
17346
|
return resolvedStyle;
|
|
17336
17347
|
};
|
|
17337
17348
|
const table = getTableAtCell(effectiveTables, row3, col);
|
|
17338
|
-
const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
17339
|
-
const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
17349
|
+
const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1107 => _1107.rowSpan]), () => ( 1)));
|
|
17350
|
+
const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1108 => _1108.colSpan]), () => ( 1)));
|
|
17340
17351
|
let mergedBorderOverlay = null;
|
|
17341
17352
|
if (mergeRowSpan > 1 || mergeColSpan > 1) {
|
|
17342
17353
|
const mergedBorderOverlayCacheKey = `${row3}:${col}:${mergeRowSpan}:${mergeColSpan}`;
|
|
@@ -17358,7 +17369,7 @@ function XlsxGrid({
|
|
|
17358
17369
|
let displayValue = null;
|
|
17359
17370
|
const readDisplayValue = () => {
|
|
17360
17371
|
if (displayValue === null) {
|
|
17361
|
-
displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess',
|
|
17372
|
+
displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _1109 => _1109.value]), () => ( "")) : getCellDisplayValue(worksheet, row3, col, activeSheet, locale);
|
|
17362
17373
|
}
|
|
17363
17374
|
return displayValue;
|
|
17364
17375
|
};
|
|
@@ -17369,13 +17380,13 @@ function XlsxGrid({
|
|
|
17369
17380
|
() => worksheet ? getCellNumericValue(worksheet, row3, col) : getBatchedCellNumericValue(batchedCell),
|
|
17370
17381
|
readDisplayValue,
|
|
17371
17382
|
worksheet,
|
|
17372
|
-
_optionalChain([viewportRowBatch, 'optionalAccess',
|
|
17383
|
+
_optionalChain([viewportRowBatch, 'optionalAccess', _1110 => _1110.cells])
|
|
17373
17384
|
);
|
|
17374
17385
|
const finalResolvedStyle = mergeResolvedCellStyle(resolvedMergedStyle, conditionalCellStyle);
|
|
17375
|
-
const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess',
|
|
17376
|
-
const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess',
|
|
17386
|
+
const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _1111 => _1111.alignment]);
|
|
17387
|
+
const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _1112 => _1112.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _1113 => _1113.textRotation]))));
|
|
17377
17388
|
const headerRowCount = table ? Math.max(table.headerRowCount, 1) : 0;
|
|
17378
|
-
const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess',
|
|
17389
|
+
const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1114 => _1114.hyperlink]) : _optionalChain([worksheet, 'optionalAccess', _1115 => _1115.getHyperlinkAt, 'call', _1116 => _1116(row3, col)]);
|
|
17379
17390
|
const sparkline = _nullishCoalesce(sparklinesByCell.get(cacheKey), () => ( null));
|
|
17380
17391
|
const sparklineValues = sparkline && worksheet ? sparkline.range.start.row === sparkline.range.end.row ? Array.from(
|
|
17381
17392
|
{ length: Math.abs(sparkline.range.end.col - sparkline.range.start.col) + 1 },
|
|
@@ -17392,13 +17403,13 @@ function XlsxGrid({
|
|
|
17392
17403
|
sparkline.range.start.col
|
|
17393
17404
|
)
|
|
17394
17405
|
) : null;
|
|
17395
|
-
const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess',
|
|
17406
|
+
const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _1117 => _1117.cellControl]) && worksheet ? getCellBooleanValue(worksheet, row3, col) : null;
|
|
17396
17407
|
const chartHighlight = resolveCellChartHighlight({ row: row3, col }, activeSheetChartHighlights);
|
|
17397
17408
|
const nextData = {
|
|
17398
17409
|
canvas: void 0,
|
|
17399
17410
|
chartHighlight,
|
|
17400
17411
|
checkboxState,
|
|
17401
|
-
colSpan: _optionalChain([merge, 'optionalAccess',
|
|
17412
|
+
colSpan: _optionalChain([merge, 'optionalAccess', _1118 => _1118.colSpan]),
|
|
17402
17413
|
conditionalDataBar: worksheet ? resolveConditionalDataBarForCell(
|
|
17403
17414
|
row3,
|
|
17404
17415
|
col,
|
|
@@ -17422,25 +17433,25 @@ function XlsxGrid({
|
|
|
17422
17433
|
) : null,
|
|
17423
17434
|
hyperlink: _nullishCoalesce(rawHyperlink, () => ( null)),
|
|
17424
17435
|
isMergedSecondary: false,
|
|
17425
|
-
shrinkToFit: _optionalChain([alignment, 'optionalAccess',
|
|
17436
|
+
shrinkToFit: _optionalChain([alignment, 'optionalAccess', _1119 => _1119.shrinkToFit]) === true,
|
|
17426
17437
|
isTableHeader: Boolean(table && row3 >= table.start.row && row3 < table.start.row + headerRowCount),
|
|
17427
17438
|
pivotControlInset: pivotControlInsets.get(cacheKey),
|
|
17428
|
-
rowSpan: _optionalChain([merge, 'optionalAccess',
|
|
17439
|
+
rowSpan: _optionalChain([merge, 'optionalAccess', _1120 => _1120.rowSpan]),
|
|
17429
17440
|
sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
|
|
17430
|
-
style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess',
|
|
17431
|
-
generalAlignment: batchCoversRow || !worksheet ? _optionalChain([batchedCell, 'optionalAccess',
|
|
17432
|
-
showGridLines: _optionalChain([activeSheet, 'optionalAccess',
|
|
17441
|
+
style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1121 => _1121.themePalette]), {
|
|
17442
|
+
generalAlignment: batchCoversRow || !worksheet ? _optionalChain([batchedCell, 'optionalAccess', _1122 => _1122.generalAlignment]) : getCellGeneralAlignment(worksheet, row3, col),
|
|
17443
|
+
showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1123 => _1123.showGridLines])
|
|
17433
17444
|
}), zoomFactor),
|
|
17434
|
-
usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess',
|
|
17445
|
+
usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess', _1124 => _1124.horizontal]) || alignment.horizontal === "general",
|
|
17435
17446
|
textRotationDeg,
|
|
17436
17447
|
validation: resolveCellDataValidation(row3, col, activeSheet),
|
|
17437
17448
|
value: sparkline ? "" : checkboxState !== null ? "" : readDisplayValue()
|
|
17438
17449
|
};
|
|
17439
17450
|
nextData.richText = resolveRichCellRuns(
|
|
17440
|
-
batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess',
|
|
17451
|
+
batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1125 => _1125.richText]) : _optionalChain([worksheet, 'optionalAccess', _1126 => _1126.getRichTextAt, 'call', _1127 => _1127(row3, col)]),
|
|
17441
17452
|
nextData.value,
|
|
17442
17453
|
nextData.style,
|
|
17443
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
17454
|
+
_optionalChain([activeSheet, 'optionalAccess', _1128 => _1128.themePalette]),
|
|
17444
17455
|
zoomFactor
|
|
17445
17456
|
);
|
|
17446
17457
|
if (getCellStyle) {
|
|
@@ -17455,13 +17466,13 @@ function XlsxGrid({
|
|
|
17455
17466
|
isMerged: Boolean(nextData.colSpan || nextData.rowSpan),
|
|
17456
17467
|
isTableHeader: Boolean(nextData.isTableHeader),
|
|
17457
17468
|
resolvedStyle: { ...nextData.style },
|
|
17458
|
-
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
17469
|
+
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1129 => _1129.name]), () => ( "")),
|
|
17459
17470
|
value: nextData.value,
|
|
17460
|
-
workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
17471
|
+
workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1130 => _1130.workbookSheetIndex]), () => ( -1))
|
|
17461
17472
|
});
|
|
17462
17473
|
if (styleOverrides) {
|
|
17463
17474
|
nextData.style = { ...nextData.style, ...styleOverrides };
|
|
17464
|
-
nextData.richText = _optionalChain([nextData, 'access',
|
|
17475
|
+
nextData.richText = _optionalChain([nextData, 'access', _1131 => _1131.richText, 'optionalAccess', _1132 => _1132.map, 'call', _1133 => _1133((run) => ({ ...run, style: { ...run.style, ...styleOverrides } }))]);
|
|
17465
17476
|
if (styleOverrides.textAlign !== void 0) nextData.usesGeneralAlignment = false;
|
|
17466
17477
|
if (nextData.conditionalColorScale && (styleOverrides.backgroundColor !== void 0 || styleOverrides.background !== void 0)) {
|
|
17467
17478
|
nextData.conditionalColorScale = null;
|
|
@@ -17579,7 +17590,7 @@ function XlsxGrid({
|
|
|
17579
17590
|
]);
|
|
17580
17591
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
17581
17592
|
conditionalFormatMetricsCacheRef.current.clear();
|
|
17582
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
17593
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1134 => _1134.conditionalFormatRules]), _optionalChain([activeSheet, 'optionalAccess', _1135 => _1135.workbookSheetIndex]), revision]);
|
|
17583
17594
|
const getSelectionOverlay = _chunkTLEC4K6Wcjs.q.call(void 0, (range) => {
|
|
17584
17595
|
if (!range) {
|
|
17585
17596
|
return null;
|
|
@@ -17624,11 +17635,11 @@ function XlsxGrid({
|
|
|
17624
17635
|
}
|
|
17625
17636
|
setDisplayRowLimit((current) => Math.max(current, requiredRows));
|
|
17626
17637
|
setDisplayColLimit((current) => Math.max(current, requiredCols));
|
|
17627
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
17638
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1136 => _1136.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1137 => _1137.maxUsedRow]), highlightedCellRanges, activeSheetIndex, isWorkerBacked]);
|
|
17628
17639
|
_chunkTLEC4K6Wcjs.h.call(void 0, () => {
|
|
17629
17640
|
const scroller = scrollRef.current;
|
|
17630
17641
|
const target = rangeHighlightRects.find(({ highlight: highlight2 }) => highlight2.autoScroll);
|
|
17631
|
-
if (!scroller || !_optionalChain([target, 'optionalAccess',
|
|
17642
|
+
if (!scroller || !_optionalChain([target, 'optionalAccess', _1138 => _1138.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) {
|
|
17632
17643
|
return;
|
|
17633
17644
|
}
|
|
17634
17645
|
const { highlight, rect } = target;
|
|
@@ -17775,8 +17786,8 @@ function XlsxGrid({
|
|
|
17775
17786
|
};
|
|
17776
17787
|
}, [canvasVisibleColItems, canvasVisibleRowItems, colIndexByActual, frozenCols, frozenRows, rowIndexByActual]);
|
|
17777
17788
|
const totalContentWidth = _nullishCoalesce(colPrefixSums[colPrefixSums.length - 1], () => ( 0));
|
|
17778
|
-
const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access',
|
|
17779
|
-
const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access',
|
|
17789
|
+
const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access', _1139 => _1139[0], 'optionalAccess', _1140 => _1140.start]), () => ( 0)) : 0;
|
|
17790
|
+
const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access', _1141 => _1141[virtualCols.length - 1], 'optionalAccess', _1142 => _1142.end]), () => ( 0))) : 0;
|
|
17780
17791
|
const imageRects = _chunkTLEC4K6Wcjs.T.call(void 0,
|
|
17781
17792
|
() => showImages ? images.map((image) => ({
|
|
17782
17793
|
image,
|
|
@@ -17980,8 +17991,8 @@ function XlsxGrid({
|
|
|
17980
17991
|
const normalized = normalizeRange2(range);
|
|
17981
17992
|
const isSingleCellSelection = normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col;
|
|
17982
17993
|
const mergedRange = isSingleCellSelection ? findMergedRange(normalized.start) : null;
|
|
17983
|
-
const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess',
|
|
17984
|
-
const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess',
|
|
17994
|
+
const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1143 => _1143.start]), () => ( normalized.start));
|
|
17995
|
+
const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1144 => _1144.end]), () => ( normalized.end));
|
|
17985
17996
|
const startRowIndex = rowIndexByActual.get(startCell.row);
|
|
17986
17997
|
const endRowIndex = rowIndexByActual.get(endCell.row);
|
|
17987
17998
|
const startColIndex = colIndexByActual.get(startCell.col);
|
|
@@ -18235,14 +18246,14 @@ function XlsxGrid({
|
|
|
18235
18246
|
const applyPreviewOverlay = _chunkTLEC4K6Wcjs.q.call(void 0, (range, options2) => {
|
|
18236
18247
|
const overlays = experimentalCanvas ? [...selectionPaneOverlayRefs.current.values()] : [selectionOverlayRef.current];
|
|
18237
18248
|
if (!range) {
|
|
18238
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
18249
|
+
if (_optionalChain([options2, 'optionalAccess', _1145 => _1145.updateHeaderSelection]) !== false) {
|
|
18239
18250
|
applyHeaderSelection(range);
|
|
18240
18251
|
}
|
|
18241
18252
|
return;
|
|
18242
18253
|
}
|
|
18243
|
-
const nextRect = experimentalCanvas || _optionalChain([options2, 'optionalAccess',
|
|
18254
|
+
const nextRect = experimentalCanvas || _optionalChain([options2, 'optionalAccess', _1146 => _1146.preferGeometry]) ? _nullishCoalesce(resolveGeometryOverlayRect(range), () => ( resolveOverlayRect(range))) : _optionalChain([selectionDragRef, 'access', _1147 => _1147.current, 'optionalAccess', _1148 => _1148.didDrag]) || fillDragRef.current ? _nullishCoalesce(_nullishCoalesce(resolveDragPreviewRect(range), () => ( resolveGeometryOverlayRect(range))), () => ( resolveOverlayRect(range))) : resolveOverlayRect(range);
|
|
18244
18255
|
if (!nextRect) {
|
|
18245
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
18256
|
+
if (_optionalChain([options2, 'optionalAccess', _1149 => _1149.updateHeaderSelection]) !== false) {
|
|
18246
18257
|
applyHeaderSelection(range);
|
|
18247
18258
|
}
|
|
18248
18259
|
return;
|
|
@@ -18264,7 +18275,7 @@ function XlsxGrid({
|
|
|
18264
18275
|
fillHandle.style.top = `${nextRect.top + nextRect.height - 4}px`;
|
|
18265
18276
|
}
|
|
18266
18277
|
}
|
|
18267
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
18278
|
+
if (_optionalChain([options2, 'optionalAccess', _1150 => _1150.updateHeaderSelection]) !== false) {
|
|
18268
18279
|
applyHeaderSelection(range);
|
|
18269
18280
|
}
|
|
18270
18281
|
}, [applyHeaderSelection, experimentalCanvas, resolveDragPreviewRect, resolveGeometryOverlayRect, resolveOverlayRect]);
|
|
@@ -18305,7 +18316,7 @@ function XlsxGrid({
|
|
|
18305
18316
|
return;
|
|
18306
18317
|
}
|
|
18307
18318
|
const cellData = getCellData(cell.row, cell.col);
|
|
18308
|
-
const shouldShow = _optionalChain([cellData, 'access',
|
|
18319
|
+
const shouldShow = _optionalChain([cellData, 'access', _1151 => _1151.validation, 'optionalAccess', _1152 => _1152.validationType]) === "list" && cellData.validation.showDropdown;
|
|
18309
18320
|
const rect = shouldShow ? resolveCellDisplayRect(cell) : null;
|
|
18310
18321
|
if (!rect) {
|
|
18311
18322
|
overlay.style.opacity = "0";
|
|
@@ -18333,7 +18344,7 @@ function XlsxGrid({
|
|
|
18333
18344
|
}, [applyPreviewOverlay]);
|
|
18334
18345
|
const resolveResizeGuidePositionFromClient = _chunkTLEC4K6Wcjs.q.call(void 0, (type, clientPosition) => {
|
|
18335
18346
|
const scroller = scrollRef.current;
|
|
18336
|
-
const scrollerRect = _optionalChain([scroller, 'optionalAccess',
|
|
18347
|
+
const scrollerRect = _optionalChain([scroller, 'optionalAccess', _1153 => _1153.getBoundingClientRect, 'call', _1154 => _1154()]);
|
|
18337
18348
|
if (!scroller || !scrollerRect) {
|
|
18338
18349
|
return null;
|
|
18339
18350
|
}
|
|
@@ -18389,7 +18400,7 @@ function XlsxGrid({
|
|
|
18389
18400
|
});
|
|
18390
18401
|
}
|
|
18391
18402
|
function handlePointerUp(event) {
|
|
18392
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
18403
|
+
if (_optionalChain([resizeStateRef, 'access', _1155 => _1155.current, 'optionalAccess', _1156 => _1156.pointerId]) === event.pointerId) {
|
|
18393
18404
|
const resizeState = resizeStateRef.current;
|
|
18394
18405
|
const preview = pendingResizePreviewRef.current;
|
|
18395
18406
|
clearResizeDrag();
|
|
@@ -18496,7 +18507,7 @@ function XlsxGrid({
|
|
|
18496
18507
|
const cleanup = pendingSelectionDragCleanupRef.current;
|
|
18497
18508
|
pendingSelectionDragCleanupRef.current = null;
|
|
18498
18509
|
pendingSelectionDragRef.current = null;
|
|
18499
|
-
_optionalChain([cleanup, 'optionalCall',
|
|
18510
|
+
_optionalChain([cleanup, 'optionalCall', _1157 => _1157()]);
|
|
18500
18511
|
}
|
|
18501
18512
|
function finishPendingSelectionDrag() {
|
|
18502
18513
|
const pendingState = pendingSelectionDragRef.current;
|
|
@@ -18511,7 +18522,7 @@ function XlsxGrid({
|
|
|
18511
18522
|
return;
|
|
18512
18523
|
}
|
|
18513
18524
|
clearPendingSelectionDrag();
|
|
18514
|
-
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
18525
|
+
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1158 => _1158.current, 'optionalAccess', _1159 => _1159.getBoundingClientRect, 'call', _1160 => _1160()]), () => ( null));
|
|
18515
18526
|
pendingState.didDrag = true;
|
|
18516
18527
|
selectionDragRef.current = pendingState;
|
|
18517
18528
|
if (!pendingState.headerGesture) {
|
|
@@ -18526,10 +18537,10 @@ function XlsxGrid({
|
|
|
18526
18537
|
function installPendingSelectionDragListeners(pointerId, target) {
|
|
18527
18538
|
const existingCleanup = pendingSelectionDragCleanupRef.current;
|
|
18528
18539
|
pendingSelectionDragCleanupRef.current = null;
|
|
18529
|
-
_optionalChain([existingCleanup, 'optionalCall',
|
|
18540
|
+
_optionalChain([existingCleanup, 'optionalCall', _1161 => _1161()]);
|
|
18530
18541
|
const pointerTarget = target;
|
|
18531
18542
|
try {
|
|
18532
|
-
_optionalChain([pointerTarget, 'access',
|
|
18543
|
+
_optionalChain([pointerTarget, 'access', _1162 => _1162.setPointerCapture, 'optionalCall', _1163 => _1163(pointerId)]);
|
|
18533
18544
|
} catch (e17) {
|
|
18534
18545
|
}
|
|
18535
18546
|
const handlePointerMove = (event) => {
|
|
@@ -18564,15 +18575,15 @@ function XlsxGrid({
|
|
|
18564
18575
|
target.removeEventListener("pointerup", handlePointerEnd);
|
|
18565
18576
|
target.removeEventListener("pointercancel", handlePointerEnd);
|
|
18566
18577
|
try {
|
|
18567
|
-
if (_optionalChain([pointerTarget, 'access',
|
|
18568
|
-
_optionalChain([pointerTarget, 'access',
|
|
18578
|
+
if (_optionalChain([pointerTarget, 'access', _1164 => _1164.hasPointerCapture, 'optionalCall', _1165 => _1165(pointerId)])) {
|
|
18579
|
+
_optionalChain([pointerTarget, 'access', _1166 => _1166.releasePointerCapture, 'optionalCall', _1167 => _1167(pointerId)]);
|
|
18569
18580
|
}
|
|
18570
18581
|
} catch (e18) {
|
|
18571
18582
|
}
|
|
18572
18583
|
};
|
|
18573
18584
|
}
|
|
18574
18585
|
function installSelectionDragListeners(pointerId) {
|
|
18575
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
18586
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1168 => _1168.current, 'optionalCall', _1169 => _1169()]);
|
|
18576
18587
|
let pendingClientPoint = null;
|
|
18577
18588
|
let pointerMoveFrame = null;
|
|
18578
18589
|
const flushPointerMove = () => {
|
|
@@ -18617,17 +18628,17 @@ function XlsxGrid({
|
|
|
18617
18628
|
pendingClientPoint = null;
|
|
18618
18629
|
const dragState = selectionDragRef.current;
|
|
18619
18630
|
const nextCell = dragState ? resolveDraggedSelectionCell(dragState, event.clientX, event.clientY) : null;
|
|
18620
|
-
let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess',
|
|
18621
|
-
if (_optionalChain([dragState, 'optionalAccess',
|
|
18631
|
+
let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess', _1170 => _1170.previewRange]), () => ( null));
|
|
18632
|
+
if (_optionalChain([dragState, 'optionalAccess', _1171 => _1171.didDrag]) && nextCell && dragState) {
|
|
18622
18633
|
nextRange = buildDraggedSelectionRange(dragState, nextCell);
|
|
18623
18634
|
}
|
|
18624
18635
|
selectionDragRef.current = null;
|
|
18625
18636
|
cachedScrollerRectRef.current = null;
|
|
18626
|
-
if (nextRange && _optionalChain([dragState, 'optionalAccess',
|
|
18637
|
+
if (nextRange && _optionalChain([dragState, 'optionalAccess', _1172 => _1172.headerGesture]) && dragState.axis !== "cell") {
|
|
18627
18638
|
if (!rangesEqual(nextRange, dragState.previewRange)) {
|
|
18628
18639
|
commitHeaderSelection(dragState.headerGesture, nextRange, dragState.axis);
|
|
18629
18640
|
}
|
|
18630
|
-
} else if (nextRange && (_optionalChain([dragState, 'optionalAccess',
|
|
18641
|
+
} else if (nextRange && (_optionalChain([dragState, 'optionalAccess', _1173 => _1173.didDrag]) || !_optionalChain([dragState, 'optionalAccess', _1174 => _1174.committedOnPointerDown]))) {
|
|
18631
18642
|
selectionPreviewRangeRef.current = nextRange;
|
|
18632
18643
|
displayedSelectionRef.current = nextRange;
|
|
18633
18644
|
axisSelectionRef.current = null;
|
|
@@ -18638,7 +18649,7 @@ function XlsxGrid({
|
|
|
18638
18649
|
setInteractionMode("idle");
|
|
18639
18650
|
document.body.style.cursor = "";
|
|
18640
18651
|
document.body.style.userSelect = "";
|
|
18641
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
18652
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1175 => _1175.current, 'optionalCall', _1176 => _1176()]);
|
|
18642
18653
|
selectionDragCleanupRef.current = null;
|
|
18643
18654
|
};
|
|
18644
18655
|
window.addEventListener("pointermove", handlePointerMove);
|
|
@@ -18656,7 +18667,7 @@ function XlsxGrid({
|
|
|
18656
18667
|
};
|
|
18657
18668
|
}
|
|
18658
18669
|
function installFillDragListeners(pointerId, sourceRange) {
|
|
18659
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
18670
|
+
_optionalChain([fillDragCleanupRef, 'access', _1177 => _1177.current, 'optionalCall', _1178 => _1178()]);
|
|
18660
18671
|
let pendingClientPoint = null;
|
|
18661
18672
|
let pointerMoveFrame = null;
|
|
18662
18673
|
const flushPointerMove = () => {
|
|
@@ -18694,7 +18705,7 @@ function XlsxGrid({
|
|
|
18694
18705
|
if (nextCell) {
|
|
18695
18706
|
updateFillPreview(nextCell);
|
|
18696
18707
|
}
|
|
18697
|
-
const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access',
|
|
18708
|
+
const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access', _1179 => _1179.current, 'optionalAccess', _1180 => _1180.previewRange]), () => ( sourceRange));
|
|
18698
18709
|
fillDragRef.current = null;
|
|
18699
18710
|
cachedScrollerRectRef.current = null;
|
|
18700
18711
|
setInteractionMode("idle");
|
|
@@ -18702,7 +18713,7 @@ function XlsxGrid({
|
|
|
18702
18713
|
document.body.style.cursor = "";
|
|
18703
18714
|
document.body.style.userSelect = "";
|
|
18704
18715
|
fillSelection(nextRange);
|
|
18705
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
18716
|
+
_optionalChain([fillDragCleanupRef, 'access', _1181 => _1181.current, 'optionalCall', _1182 => _1182()]);
|
|
18706
18717
|
fillDragCleanupRef.current = null;
|
|
18707
18718
|
};
|
|
18708
18719
|
window.addEventListener("pointermove", handlePointerMove);
|
|
@@ -18797,6 +18808,19 @@ function XlsxGrid({
|
|
|
18797
18808
|
...kind === "chart" ? { chart: drawing } : { image: drawing }
|
|
18798
18809
|
} });
|
|
18799
18810
|
}
|
|
18811
|
+
function openHiddenRangeContextMenu(kind, start, end, position) {
|
|
18812
|
+
if (!activeSheet) return;
|
|
18813
|
+
const range = getContextExtent(kind, {
|
|
18814
|
+
start: { row: start, col: start },
|
|
18815
|
+
end: { row: end, col: end }
|
|
18816
|
+
});
|
|
18817
|
+
setOpenTableMenu(null);
|
|
18818
|
+
setContextMenu({
|
|
18819
|
+
context: { kind, cell: range.start, selection: range, selectionRanges: [range], sheetIndex: activeSheetIndex, sheetName: activeSheet.name, readOnly },
|
|
18820
|
+
hiddenRange: { start, end, anchorSelection: selection },
|
|
18821
|
+
position
|
|
18822
|
+
});
|
|
18823
|
+
}
|
|
18800
18824
|
const handleCellDoubleClick = _chunkTLEC4K6Wcjs.q.call(void 0, (cell) => {
|
|
18801
18825
|
startEditing(cell, void 0, "double-click");
|
|
18802
18826
|
}, [startEditing]);
|
|
@@ -18878,8 +18902,8 @@ function XlsxGrid({
|
|
|
18878
18902
|
let anchorIndex = index;
|
|
18879
18903
|
if (event.shiftKey && active) {
|
|
18880
18904
|
anchorIndex = active.start[coordinate];
|
|
18881
|
-
if (_optionalChain([activeAxis, 'optionalAccess',
|
|
18882
|
-
if (_optionalChain([activeAxis, 'optionalAccess',
|
|
18905
|
+
if (_optionalChain([activeAxis, 'optionalAccess', _1183 => _1183.axis]) === "row" && axis === "row") anchorIndex = activeAxis.startRow;
|
|
18906
|
+
if (_optionalChain([activeAxis, 'optionalAccess', _1184 => _1184.axis]) === "column" && axis === "column") anchorIndex = activeAxis.startCol;
|
|
18883
18907
|
}
|
|
18884
18908
|
const cell = (along, across) => axis === "row" ? { row: along, col: across } : { row: across, col: along };
|
|
18885
18909
|
const range = normalizeRange2({ start: cell(anchorIndex, first), end: cell(index, last) });
|
|
@@ -18970,7 +18994,7 @@ function XlsxGrid({
|
|
|
18970
18994
|
{
|
|
18971
18995
|
"aria-haspopup": "menu",
|
|
18972
18996
|
"aria-label": _chunkTLEC4K6Wcjs.formatMessage.call(void 0, messages.openMenuForColumn, { column: tableColumn.name }),
|
|
18973
|
-
"aria-expanded": _optionalChain([openTableMenu, 'optionalAccess',
|
|
18997
|
+
"aria-expanded": _optionalChain([openTableMenu, 'optionalAccess', _1185 => _1185.tableName]) === table.name && openTableMenu.col === cell.col && openTableMenu.row === cell.row,
|
|
18974
18998
|
onPointerDown: (event) => {
|
|
18975
18999
|
event.preventDefault();
|
|
18976
19000
|
event.stopPropagation();
|
|
@@ -19118,7 +19142,7 @@ function XlsxGrid({
|
|
|
19118
19142
|
const office = activeSheet.officeLayout;
|
|
19119
19143
|
if (office) {
|
|
19120
19144
|
const original = office.columns[col];
|
|
19121
|
-
return override !== void 0 && override !== _optionalChain([original, 'optionalAccess',
|
|
19145
|
+
return override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1186 => _1186.sourcePx]) ? override : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1187 => _1187.sizePx]), () => ( office.defaultColumnPx));
|
|
19122
19146
|
}
|
|
19123
19147
|
const width = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(override, () => ( precomputedColumnWidths.get(col))), () => ( activeSheet.defaultColWidthPx)), () => ( DEFAULT_COL_WIDTH2));
|
|
19124
19148
|
return Math.max(_chunkGP5SOQQHcjs.resolveRenderedSheetAxisPixels.call(void 0, width, activeSheet.showGridLines), DEFAULT_COL_WIDTH2 / 2);
|
|
@@ -19131,13 +19155,13 @@ function XlsxGrid({
|
|
|
19131
19155
|
for (const [key, cell] of batch.cells) {
|
|
19132
19156
|
if (!cell.value || cell.isMergedSecondary || sparklinesByCell.has(key)) continue;
|
|
19133
19157
|
const [row3, col] = key.split(":").map(Number);
|
|
19134
|
-
const colSpan = _nullishCoalesce(_optionalChain([cell, 'access',
|
|
19135
|
-
const rowSpan = _nullishCoalesce(_optionalChain([cell, 'access',
|
|
19158
|
+
const colSpan = _nullishCoalesce(_optionalChain([cell, 'access', _1188 => _1188.mergeSpan, 'optionalAccess', _1189 => _1189.colSpan]), () => ( 1));
|
|
19159
|
+
const rowSpan = _nullishCoalesce(_optionalChain([cell, 'access', _1190 => _1190.mergeSpan, 'optionalAccess', _1191 => _1191.rowSpan]), () => ( 1));
|
|
19136
19160
|
if (isRow ? rowSpan > 1 || hiddenColSet.has(col) : colSpan > 1 || hiddenRowSet.has(row3)) continue;
|
|
19137
19161
|
const address2 = { row: row3, col };
|
|
19138
19162
|
const inheritedStyle = resolveInheritedCellStyle2(activeSheet, row3, col);
|
|
19139
19163
|
const cellStyle = mergeResolvedCellStyle(inheritedStyle, cell.style, { replaceXfSubtrees: true });
|
|
19140
|
-
if (_optionalChain([cellStyle, 'optionalAccess',
|
|
19164
|
+
if (_optionalChain([cellStyle, 'optionalAccess', _1192 => _1192.cellControl])) continue;
|
|
19141
19165
|
const table = getTableAtCell(effectiveTables, row3, col);
|
|
19142
19166
|
const tableStyle = resolveTableCellStyle(table, row3, col, activeSheet);
|
|
19143
19167
|
const baseStyle = tableStyle ? mergeResolvedCellStyle(
|
|
@@ -19155,15 +19179,15 @@ function XlsxGrid({
|
|
|
19155
19179
|
batch.cells
|
|
19156
19180
|
);
|
|
19157
19181
|
const resolvedStyle = mergeResolvedCellStyle(baseStyle, conditionalStyle);
|
|
19158
|
-
const alignment = _optionalChain([resolvedStyle, 'optionalAccess',
|
|
19159
|
-
const rotation = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess',
|
|
19182
|
+
const alignment = _optionalChain([resolvedStyle, 'optionalAccess', _1193 => _1193.alignment]);
|
|
19183
|
+
const rotation = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _1194 => _1194.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _1195 => _1195.textRotation]))));
|
|
19160
19184
|
const isTableHeader = Boolean(table && row3 < table.start.row + Math.max(table.headerRowCount, 1));
|
|
19161
19185
|
const matchingVisualRules = visualRules.length === 0 || readNumericValue() === null ? [] : visualRules.filter((rule) => rule.ranges.some((range) => isCellInRange(address2, range)));
|
|
19162
19186
|
const baseCssStyle = scaleCssProperties(buildCellStyle(resolvedStyle, palette, activeSheet.themePalette, {
|
|
19163
19187
|
generalAlignment: cell.generalAlignment,
|
|
19164
19188
|
showGridLines: activeSheet.showGridLines
|
|
19165
19189
|
}), zoomFactor);
|
|
19166
|
-
const overrides = _optionalChain([getCellStyleRef, 'access',
|
|
19190
|
+
const overrides = _optionalChain([getCellStyleRef, 'access', _1196 => _1196.current, 'optionalCall', _1197 => _1197({
|
|
19167
19191
|
cell: address2,
|
|
19168
19192
|
hasChartHighlight: Boolean(resolveCellChartHighlight(address2, activeSheetChartHighlights)),
|
|
19169
19193
|
hasConditionalFormat: matchingVisualRules.length > 0,
|
|
@@ -19177,7 +19201,7 @@ function XlsxGrid({
|
|
|
19177
19201
|
workbookSheetIndex: activeSheet.workbookSheetIndex
|
|
19178
19202
|
})]);
|
|
19179
19203
|
const style = { ...baseCssStyle, ...overrides };
|
|
19180
|
-
const richText = _optionalChain([resolveRichCellRuns, 'call',
|
|
19204
|
+
const richText = _optionalChain([resolveRichCellRuns, 'call', _1198 => _1198(cell.richText, cell.value, baseCssStyle, activeSheet.themePalette, zoomFactor), 'optionalAccess', _1199 => _1199.map, 'call', _1200 => _1200((run) => ({ ...run, style: { ...run.style, ...overrides } }))]);
|
|
19181
19205
|
const padding = resolveCanvasPadding(style.padding);
|
|
19182
19206
|
const leadingInset = matchingVisualRules.some((rule) => rule.kind === "iconSet") ? 18 : 0;
|
|
19183
19207
|
const trailingInset = (isTableHeader ? experimentalCanvas ? 16 : 24 : 0) + (_nullishCoalesce(pivotControlInsets.get(key), () => ( 0)));
|
|
@@ -19246,7 +19270,7 @@ function XlsxGrid({
|
|
|
19246
19270
|
if (!canResizeHeaders) {
|
|
19247
19271
|
return null;
|
|
19248
19272
|
}
|
|
19249
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
19273
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1201 => _1201.current, 'optionalAccess', _1202 => _1202.getBoundingClientRect, 'call', _1203 => _1203()]);
|
|
19250
19274
|
if (!scrollerRect) {
|
|
19251
19275
|
return null;
|
|
19252
19276
|
}
|
|
@@ -19267,7 +19291,7 @@ function XlsxGrid({
|
|
|
19267
19291
|
}
|
|
19268
19292
|
}, [autofit, resolveCanvasColumnResizeTarget]);
|
|
19269
19293
|
const resolveCanvasColumnHeaderTarget = _chunkTLEC4K6Wcjs.q.call(void 0, (clientX) => {
|
|
19270
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
19294
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1204 => _1204.current, 'optionalAccess', _1205 => _1205.getBoundingClientRect, 'call', _1206 => _1206()]);
|
|
19271
19295
|
if (!scrollerRect) {
|
|
19272
19296
|
return null;
|
|
19273
19297
|
}
|
|
@@ -19283,7 +19307,7 @@ function XlsxGrid({
|
|
|
19283
19307
|
if (!canResizeHeaders) {
|
|
19284
19308
|
return null;
|
|
19285
19309
|
}
|
|
19286
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
19310
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1207 => _1207.current, 'optionalAccess', _1208 => _1208.getBoundingClientRect, 'call', _1209 => _1209()]);
|
|
19287
19311
|
if (!scrollerRect) {
|
|
19288
19312
|
return null;
|
|
19289
19313
|
}
|
|
@@ -19308,7 +19332,7 @@ function XlsxGrid({
|
|
|
19308
19332
|
});
|
|
19309
19333
|
}, []);
|
|
19310
19334
|
const resolveCanvasRowHeaderTarget = _chunkTLEC4K6Wcjs.q.call(void 0, (clientY) => {
|
|
19311
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
19335
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1210 => _1210.current, 'optionalAccess', _1211 => _1211.getBoundingClientRect, 'call', _1212 => _1212()]);
|
|
19312
19336
|
if (!scrollerRect) {
|
|
19313
19337
|
return null;
|
|
19314
19338
|
}
|
|
@@ -19321,14 +19345,14 @@ function XlsxGrid({
|
|
|
19321
19345
|
return null;
|
|
19322
19346
|
}, [canvasRowHeaderCells]);
|
|
19323
19347
|
const handleCanvasColumnHeaderPointerMove = _chunkTLEC4K6Wcjs.q.call(void 0, (event) => {
|
|
19324
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
19348
|
+
if (_optionalChain([resizeStateRef, 'access', _1213 => _1213.current, 'optionalAccess', _1214 => _1214.type]) === "column") {
|
|
19325
19349
|
event.currentTarget.style.cursor = "col-resize";
|
|
19326
19350
|
return;
|
|
19327
19351
|
}
|
|
19328
19352
|
event.currentTarget.style.cursor = resolveCanvasColumnResizeTarget(event.clientX) ? "col-resize" : "default";
|
|
19329
19353
|
}, [resolveCanvasColumnResizeTarget]);
|
|
19330
19354
|
const handleCanvasRowHeaderPointerMove = _chunkTLEC4K6Wcjs.q.call(void 0, (event) => {
|
|
19331
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
19355
|
+
if (_optionalChain([resizeStateRef, 'access', _1215 => _1215.current, 'optionalAccess', _1216 => _1216.type]) === "row") {
|
|
19332
19356
|
event.currentTarget.style.cursor = "row-resize";
|
|
19333
19357
|
return;
|
|
19334
19358
|
}
|
|
@@ -19356,7 +19380,7 @@ function XlsxGrid({
|
|
|
19356
19380
|
const column = getTableHeaderColumn(table, cell.row, cell.col);
|
|
19357
19381
|
const columnRect = resolveCanvasColumnHeaderRect(cell.col);
|
|
19358
19382
|
const rowRect = resolveCanvasRowHeaderRect(cell.row);
|
|
19359
|
-
const viewportRect = _optionalChain([scrollRef, 'access',
|
|
19383
|
+
const viewportRect = _optionalChain([scrollRef, 'access', _1217 => _1217.current, 'optionalAccess', _1218 => _1218.getBoundingClientRect, 'call', _1219 => _1219()]);
|
|
19360
19384
|
if (table && column && columnRect && rowRect && viewportRect) {
|
|
19361
19385
|
const right = viewportRect.left + columnRect.left + columnRect.width - zoomFactor;
|
|
19362
19386
|
const bottom = viewportRect.top + rowRect.top + rowRect.height - zoomFactor;
|
|
@@ -19556,7 +19580,7 @@ function XlsxGrid({
|
|
|
19556
19580
|
return null;
|
|
19557
19581
|
}
|
|
19558
19582
|
context.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
19559
|
-
if (_optionalChain([options2, 'optionalAccess',
|
|
19583
|
+
if (_optionalChain([options2, 'optionalAccess', _1220 => _1220.clear]) !== false) {
|
|
19560
19584
|
context.clearRect(0, 0, width, height);
|
|
19561
19585
|
}
|
|
19562
19586
|
return context;
|
|
@@ -19670,7 +19694,7 @@ function XlsxGrid({
|
|
|
19670
19694
|
if (shouldRepaintBody && (!bodyContexts.scroll || !bodyContexts.top || !bodyContexts.left || !bodyContexts.corner) || shouldRepaintHeaders && (!cornerContext || topFrozenHeaderCanvasWidth > 0 && !topHeaderContexts.frozen || topScrollHeaderCanvasWidth > 0 && !topHeaderContexts.scroll || leftFrozenHeaderCanvasHeight > 0 && !leftHeaderContexts.frozen || leftScrollHeaderCanvasHeight > 0 && !leftHeaderContexts.scroll)) {
|
|
19671
19695
|
return;
|
|
19672
19696
|
}
|
|
19673
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
19697
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1221 => _1221.showGridLines]), () => ( true));
|
|
19674
19698
|
const sheetSurface = resolveSheetSurface(activeSheet, palette);
|
|
19675
19699
|
const deferredSpillTextsByPane = {
|
|
19676
19700
|
corner: [],
|
|
@@ -19715,11 +19739,11 @@ function XlsxGrid({
|
|
|
19715
19739
|
if (shape.paragraphs.length === 0) {
|
|
19716
19740
|
return;
|
|
19717
19741
|
}
|
|
19718
|
-
const inset = _optionalChain([shape, 'access',
|
|
19719
|
-
const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
19720
|
-
const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
19721
|
-
const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
19722
|
-
const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
19742
|
+
const inset = _optionalChain([shape, 'access', _1222 => _1222.textBox, 'optionalAccess', _1223 => _1223.insetPx]);
|
|
19743
|
+
const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1224 => _1224.left]), () => ( 6))) * zoomFactor;
|
|
19744
|
+
const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1225 => _1225.right]), () => ( 6))) * zoomFactor;
|
|
19745
|
+
const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1226 => _1226.top]), () => ( 4))) * zoomFactor;
|
|
19746
|
+
const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1227 => _1227.bottom]), () => ( 4))) * zoomFactor;
|
|
19723
19747
|
const textLeft = left + paddingLeft;
|
|
19724
19748
|
const textTop = top + paddingTop;
|
|
19725
19749
|
const textWidth = Math.max(0, width - paddingLeft - paddingRight);
|
|
@@ -19741,9 +19765,9 @@ function XlsxGrid({
|
|
|
19741
19765
|
});
|
|
19742
19766
|
const totalTextHeight = lineMetrics.reduce((total, metric) => total + metric.lineHeight, 0);
|
|
19743
19767
|
let y2 = textTop;
|
|
19744
|
-
if (_optionalChain([shape, 'access',
|
|
19768
|
+
if (_optionalChain([shape, 'access', _1228 => _1228.textBox, 'optionalAccess', _1229 => _1229.verticalAlign]) === "middle") {
|
|
19745
19769
|
y2 = textTop + Math.max(0, (textHeight - totalTextHeight) / 2);
|
|
19746
|
-
} else if (_optionalChain([shape, 'access',
|
|
19770
|
+
} else if (_optionalChain([shape, 'access', _1230 => _1230.textBox, 'optionalAccess', _1231 => _1231.verticalAlign]) === "bottom") {
|
|
19747
19771
|
y2 = textTop + Math.max(0, textHeight - totalTextHeight);
|
|
19748
19772
|
}
|
|
19749
19773
|
context.save();
|
|
@@ -19754,7 +19778,7 @@ function XlsxGrid({
|
|
|
19754
19778
|
shape.paragraphs.forEach((paragraph, paragraphIndex) => {
|
|
19755
19779
|
const metric = _nullishCoalesce(lineMetrics[paragraphIndex], () => ( { lineHeight: 14 * zoomFactor, widthPx: 0 }));
|
|
19756
19780
|
let x2 = textLeft;
|
|
19757
|
-
const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access',
|
|
19781
|
+
const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _1232 => _1232.textBox, 'optionalAccess', _1233 => _1233.horizontalAlign]))), () => ( "left"));
|
|
19758
19782
|
if (align === "center") {
|
|
19759
19783
|
x2 = textLeft + Math.max(0, (textWidth - metric.widthPx) / 2);
|
|
19760
19784
|
} else if (align === "right") {
|
|
@@ -19783,11 +19807,11 @@ function XlsxGrid({
|
|
|
19783
19807
|
context.restore();
|
|
19784
19808
|
};
|
|
19785
19809
|
const drawBakedShape = (context, shape, rect) => {
|
|
19786
|
-
const fillColor = _optionalChain([shape, 'access',
|
|
19787
|
-
const strokeColor = _optionalChain([shape, 'access',
|
|
19788
|
-
const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access',
|
|
19810
|
+
const fillColor = _optionalChain([shape, 'access', _1234 => _1234.fill, 'optionalAccess', _1235 => _1235.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1236 => _1236.fill, 'optionalAccess', _1237 => _1237.color]), () => ( "transparent"));
|
|
19811
|
+
const strokeColor = _optionalChain([shape, 'access', _1238 => _1238.stroke, 'optionalAccess', _1239 => _1239.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1240 => _1240.stroke, 'optionalAccess', _1241 => _1241.color]), () => ( "transparent"));
|
|
19812
|
+
const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _1242 => _1242.stroke, 'optionalAccess', _1243 => _1243.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
|
|
19789
19813
|
const vectorShape = resolveShapeVector(shape);
|
|
19790
|
-
const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access',
|
|
19814
|
+
const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1244 => _1244.fill, 'optionalAccess', _1245 => _1245.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1246 => _1246.stroke, 'optionalAccess', _1247 => _1247.opacity]), () => ( 1)));
|
|
19791
19815
|
context.save();
|
|
19792
19816
|
context.translate(rect.left + rect.width / 2, rect.top + rect.height / 2);
|
|
19793
19817
|
if (shape.rotationDeg) {
|
|
@@ -19798,7 +19822,7 @@ function XlsxGrid({
|
|
|
19798
19822
|
context.lineWidth = lineWidth;
|
|
19799
19823
|
context.strokeStyle = strokeColor;
|
|
19800
19824
|
context.fillStyle = fillColor;
|
|
19801
|
-
applyCanvasShapeDash(context, _optionalChain([shape, 'access',
|
|
19825
|
+
applyCanvasShapeDash(context, _optionalChain([shape, 'access', _1248 => _1248.stroke, 'optionalAccess', _1249 => _1249.dash]), lineWidth);
|
|
19802
19826
|
const localLeft = -rect.width / 2;
|
|
19803
19827
|
const localTop = -rect.height / 2;
|
|
19804
19828
|
if (vectorShape && typeof Path2D !== "undefined") {
|
|
@@ -19984,13 +20008,13 @@ function XlsxGrid({
|
|
|
19984
20008
|
drawnMergedAnchorKeys.add(anchorKey);
|
|
19985
20009
|
}
|
|
19986
20010
|
const displayRect = cellData.colSpan || cellData.rowSpan ? resolveCellDisplayRect(drawCell) : null;
|
|
19987
|
-
const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
19988
|
-
const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
20011
|
+
const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1250 => _1250.left]), () => ( baseCellLeft));
|
|
20012
|
+
const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1251 => _1251.top]), () => ( baseCellTop));
|
|
19989
20013
|
const localRect = {
|
|
19990
|
-
height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
20014
|
+
height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1252 => _1252.height]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[drawRowIndex], () => ( rowItem.size))))),
|
|
19991
20015
|
left: (useFrozenHorizontalPosition ? _nullishCoalesce(stickyLeftByCol.get(drawCell.col), () => ( baseLeft - drawingViewport.left)) : baseLeft - drawingViewport.left) - paneBoundsForCell.left,
|
|
19992
20016
|
top: (useFrozenVerticalPosition ? _nullishCoalesce(stickyTopByRow.get(drawCell.row), () => ( baseTop - drawingViewport.top)) : baseTop - drawingViewport.top) - paneBoundsForCell.top,
|
|
19993
|
-
width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
20017
|
+
width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1253 => _1253.width]), () => ( (_nullishCoalesce(displayEffectiveColWidths[drawColIndex], () => ( colItem.size)))))
|
|
19994
20018
|
};
|
|
19995
20019
|
const spillOffsetX = Math.min(0, _nullishCoalesce(cellData.spillOffsetX, () => ( 0)));
|
|
19996
20020
|
const drawableLeft = localRect.left + spillOffsetX;
|
|
@@ -20005,7 +20029,7 @@ function XlsxGrid({
|
|
|
20005
20029
|
canvasProfilePaintedCells += 1;
|
|
20006
20030
|
const cellStyle = cellData.style;
|
|
20007
20031
|
const canvasCellStyle = _nullishCoalesce(cellData.canvas, () => ( buildCanvasCellStyleCache(cellStyle)));
|
|
20008
|
-
const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access',
|
|
20032
|
+
const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _1254 => _1254.conditionalColorScale, 'optionalAccess', _1255 => _1255.color]), () => ( (typeof cellStyle.backgroundColor === "string" ? cellStyle.backgroundColor : sheetSurface)));
|
|
20009
20033
|
const gradientFill = !cellData.conditionalColorScale && typeof cellStyle.backgroundImage === "string" ? resolveCanvasGradientFill(paneContext, localRect, cellStyle.backgroundImage) : null;
|
|
20010
20034
|
if (cellData.chartHighlight) {
|
|
20011
20035
|
flushPendingGridlines();
|
|
@@ -20042,23 +20066,23 @@ function XlsxGrid({
|
|
|
20042
20066
|
const rightNeighborCol = visibleCols[drawColIndex + Math.max(1, _nullishCoalesce(cellData.colSpan, () => ( 1)))];
|
|
20043
20067
|
const rightNeighborCell = rightNeighborCol === void 0 ? null : { row: drawCell.row, col: rightNeighborCol };
|
|
20044
20068
|
const rightNeighborData = rightNeighborCell ? getCellData(rightNeighborCell.row, rightNeighborCell.col) : null;
|
|
20045
|
-
let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess',
|
|
20046
|
-
if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess',
|
|
20069
|
+
let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess', _1256 => _1256.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([rightNeighborData, 'optionalAccess', _1257 => _1257.canvas, 'optionalAccess', _1258 => _1258.leftBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([rightNeighborData, 'optionalAccess', _1259 => _1259.style, 'access', _1260 => _1260.borderLeft]))));
|
|
20070
|
+
if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess', _1261 => _1261.isMergedSecondary])) {
|
|
20047
20071
|
const rightNeighborAnchorCell = resolveMergeAnchorCell(rightNeighborCell);
|
|
20048
20072
|
if (rightNeighborAnchorCell.col === rightNeighborCell.col) {
|
|
20049
20073
|
const rightNeighborAnchorData = getCellData(rightNeighborAnchorCell.row, rightNeighborAnchorCell.col);
|
|
20050
|
-
rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access',
|
|
20074
|
+
rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access', _1262 => _1262.canvas, 'optionalAccess', _1263 => _1263.leftBorder]), () => ( parseCanvasBorderDeclaration(rightNeighborAnchorData.style.borderLeft)));
|
|
20051
20075
|
}
|
|
20052
20076
|
}
|
|
20053
20077
|
const bottomNeighborRow = visibleRows[drawRowIndex + Math.max(1, _nullishCoalesce(cellData.rowSpan, () => ( 1)))];
|
|
20054
20078
|
const bottomNeighborCell = bottomNeighborRow === void 0 ? null : { row: bottomNeighborRow, col: drawCell.col };
|
|
20055
20079
|
const bottomNeighborData = bottomNeighborCell ? getCellData(bottomNeighborCell.row, bottomNeighborCell.col) : null;
|
|
20056
|
-
let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess',
|
|
20057
|
-
if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess',
|
|
20080
|
+
let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess', _1264 => _1264.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([bottomNeighborData, 'optionalAccess', _1265 => _1265.canvas, 'optionalAccess', _1266 => _1266.topBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([bottomNeighborData, 'optionalAccess', _1267 => _1267.style, 'access', _1268 => _1268.borderTop]))));
|
|
20081
|
+
if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess', _1269 => _1269.isMergedSecondary])) {
|
|
20058
20082
|
const bottomNeighborAnchorCell = resolveMergeAnchorCell(bottomNeighborCell);
|
|
20059
20083
|
if (bottomNeighborAnchorCell.row === bottomNeighborCell.row) {
|
|
20060
20084
|
const bottomNeighborAnchorData = getCellData(bottomNeighborAnchorCell.row, bottomNeighborAnchorCell.col);
|
|
20061
|
-
bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access',
|
|
20085
|
+
bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access', _1270 => _1270.canvas, 'optionalAccess', _1271 => _1271.topBorder]), () => ( parseCanvasBorderDeclaration(bottomNeighborAnchorData.style.borderTop)));
|
|
20062
20086
|
}
|
|
20063
20087
|
}
|
|
20064
20088
|
const resolvedRightBorder = resolveCanvasBoundaryBorder(rightBorder, rightNeighborLeftBorder);
|
|
@@ -20352,7 +20376,7 @@ function XlsxGrid({
|
|
|
20352
20376
|
if (cellData.isTableHeader && !renderTableHeaderMenu) {
|
|
20353
20377
|
const table = getTableAtCell(effectiveTables, drawCell.row, drawCell.col);
|
|
20354
20378
|
const column = getTableHeaderColumn(table, drawCell.row, drawCell.col);
|
|
20355
|
-
const direction = table && column && _optionalChain([sortState, 'optionalAccess',
|
|
20379
|
+
const direction = table && column && _optionalChain([sortState, 'optionalAccess', _1272 => _1272.tableName]) === table.name && sortState.columnIndex === column.index ? sortState.direction : null;
|
|
20356
20380
|
drawCanvasTableHeaderTrigger(paneContext, localRect, direction, palette, zoomFactor);
|
|
20357
20381
|
}
|
|
20358
20382
|
}
|
|
@@ -20638,7 +20662,7 @@ function XlsxGrid({
|
|
|
20638
20662
|
if (readOnlyRef.current || chart.editable === false) {
|
|
20639
20663
|
return;
|
|
20640
20664
|
}
|
|
20641
|
-
_optionalChain([event, 'access',
|
|
20665
|
+
_optionalChain([event, 'access', _1273 => _1273.currentTarget, 'access', _1274 => _1274.setPointerCapture, 'optionalCall', _1275 => _1275(event.pointerId)]);
|
|
20642
20666
|
chartInteractionRef.current = {
|
|
20643
20667
|
baseRect: rect,
|
|
20644
20668
|
chartId: chart.id,
|
|
@@ -20663,7 +20687,7 @@ function XlsxGrid({
|
|
|
20663
20687
|
event.stopPropagation();
|
|
20664
20688
|
focusGrid();
|
|
20665
20689
|
selectChart(chart.id);
|
|
20666
|
-
_optionalChain([event, 'access',
|
|
20690
|
+
_optionalChain([event, 'access', _1276 => _1276.currentTarget, 'access', _1277 => _1277.setPointerCapture, 'optionalCall', _1278 => _1278(event.pointerId)]);
|
|
20667
20691
|
chartInteractionRef.current = {
|
|
20668
20692
|
baseRect: rect,
|
|
20669
20693
|
chartId: chart.id,
|
|
@@ -20692,7 +20716,7 @@ function XlsxGrid({
|
|
|
20692
20716
|
if (readOnlyRef.current || image.editable === false) {
|
|
20693
20717
|
return;
|
|
20694
20718
|
}
|
|
20695
|
-
_optionalChain([event, 'access',
|
|
20719
|
+
_optionalChain([event, 'access', _1279 => _1279.currentTarget, 'access', _1280 => _1280.setPointerCapture, 'optionalCall', _1281 => _1281(event.pointerId)]);
|
|
20696
20720
|
imageInteractionRef.current = {
|
|
20697
20721
|
baseRect: rect,
|
|
20698
20722
|
didMove: false,
|
|
@@ -20717,7 +20741,7 @@ function XlsxGrid({
|
|
|
20717
20741
|
event.stopPropagation();
|
|
20718
20742
|
focusGrid();
|
|
20719
20743
|
selectImage(image.id);
|
|
20720
|
-
_optionalChain([event, 'access',
|
|
20744
|
+
_optionalChain([event, 'access', _1282 => _1282.currentTarget, 'access', _1283 => _1283.setPointerCapture, 'optionalCall', _1284 => _1284(event.pointerId)]);
|
|
20721
20745
|
imageInteractionRef.current = {
|
|
20722
20746
|
baseRect: rect,
|
|
20723
20747
|
didMove: false,
|
|
@@ -20785,7 +20809,7 @@ function XlsxGrid({
|
|
|
20785
20809
|
}
|
|
20786
20810
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, _chunkTLEC4K6Wcjs.S, { children: renderError(errorState, error, palette, messages) });
|
|
20787
20811
|
}
|
|
20788
|
-
if (!activeSheet && _optionalChain([activeTab, 'optionalAccess',
|
|
20812
|
+
if (!activeSheet && _optionalChain([activeTab, 'optionalAccess', _1285 => _1285.kind]) === "chartsheet") {
|
|
20789
20813
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0,
|
|
20790
20814
|
"div",
|
|
20791
20815
|
{
|
|
@@ -20815,10 +20839,10 @@ function XlsxGrid({
|
|
|
20815
20839
|
children: charts.length > 0 ? charts.map((chart) => {
|
|
20816
20840
|
const sourceSize = chart.anchor.kind !== "two-cell" ? chart.anchor.sizeEmu : void 0;
|
|
20817
20841
|
const chartsheetRect = {
|
|
20818
|
-
height: _optionalChain([sourceSize, 'optionalAccess',
|
|
20842
|
+
height: _optionalChain([sourceSize, 'optionalAccess', _1286 => _1286.cy]) ? _chunkGP5SOQQHcjs.emuToPixels.call(void 0, sourceSize.cy) : 320,
|
|
20819
20843
|
left: 0,
|
|
20820
20844
|
top: 0,
|
|
20821
|
-
width: _optionalChain([sourceSize, 'optionalAccess',
|
|
20845
|
+
width: _optionalChain([sourceSize, 'optionalAccess', _1287 => _1287.cx]) ? _chunkGP5SOQQHcjs.emuToPixels.call(void 0, sourceSize.cx) : 640
|
|
20822
20846
|
};
|
|
20823
20847
|
return /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "div", { style: {
|
|
20824
20848
|
minHeight: sourceSize ? void 0 : 320,
|
|
@@ -20876,8 +20900,8 @@ function XlsxGrid({
|
|
|
20876
20900
|
const sheetContentHeight = displayHeaderHeight + totalHeight;
|
|
20877
20901
|
const isLiveZooming = liveGestureZoom !== null && zoomScale === liveGestureZoom.baseZoomScale;
|
|
20878
20902
|
const liveZoomScale = isLiveZooming ? Math.max(0.1, liveGestureZoom.targetZoomScale / liveGestureZoom.baseZoomScale) : 1;
|
|
20879
|
-
const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
20880
|
-
const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
20903
|
+
const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1288 => _1288.current, 'optionalAccess', _1289 => _1289.scrollLeft]), () => ( drawingViewport.left));
|
|
20904
|
+
const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1290 => _1290.current, 'optionalAccess', _1291 => _1291.scrollTop]), () => ( drawingViewport.top));
|
|
20881
20905
|
const liveZoomTranslateX = isLiveZooming ? (liveZoomScrollLeft + liveGestureZoom.anchor.x) * (1 - liveZoomScale) : 0;
|
|
20882
20906
|
const liveZoomTranslateY = isLiveZooming ? (liveZoomScrollTop + liveGestureZoom.anchor.y) * (1 - liveZoomScale) : 0;
|
|
20883
20907
|
const headerLabelLiveScale = isLiveZooming ? liveZoomScale : 1;
|
|
@@ -20944,9 +20968,10 @@ function XlsxGrid({
|
|
|
20944
20968
|
color: selectionStroke,
|
|
20945
20969
|
zoomFactor,
|
|
20946
20970
|
onUnhide: row3 ? controller.unhideRows : controller.unhideColumns,
|
|
20971
|
+
openContextMenu: enableContextMenu ? openHiddenRangeContextMenu : void 0,
|
|
20947
20972
|
render: renderHiddenRangeMarker
|
|
20948
20973
|
},
|
|
20949
|
-
`${_optionalChain([activeSheet, 'optionalAccess',
|
|
20974
|
+
`${_optionalChain([activeSheet, 'optionalAccess', _1292 => _1292.workbookSheetIndex])}:${axis}:${start}`
|
|
20950
20975
|
);
|
|
20951
20976
|
}
|
|
20952
20977
|
const markers = [];
|
|
@@ -21080,7 +21105,7 @@ function XlsxGrid({
|
|
|
21080
21105
|
}) : [];
|
|
21081
21106
|
const activeCellOverlayCell = renderActiveCellOverlay && activeCell ? resolveMergeAnchorCell(activeCell) : null;
|
|
21082
21107
|
const activeCellOverlayRect = activeCellOverlayCell ? resolveCellDisplayRect(activeCellOverlayCell) : null;
|
|
21083
|
-
const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall',
|
|
21108
|
+
const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall', _1293 => _1293({ cell: activeCellOverlayCell, rect: activeCellOverlayRect })]) : null;
|
|
21084
21109
|
const cellOverlayPaneFor = (cell) => stickyTopByRow.has(cell.row) ? stickyLeftByCol.has(cell.col) ? "corner" : "top" : stickyLeftByCol.has(cell.col) ? "left" : "scroll";
|
|
21085
21110
|
const renderCellOverlay = (cell, content) => {
|
|
21086
21111
|
const host = cellOverlayHosts[cellOverlayPaneFor(cell)];
|
|
@@ -21102,7 +21127,7 @@ function XlsxGrid({
|
|
|
21102
21127
|
frozenCols,
|
|
21103
21128
|
displayActualRowHeights,
|
|
21104
21129
|
displayActualColWidths,
|
|
21105
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21130
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1294 => _1294.freezePanes]), () => ( null)),
|
|
21106
21131
|
stickyTopByRow,
|
|
21107
21132
|
stickyLeftByCol,
|
|
21108
21133
|
{
|
|
@@ -21122,7 +21147,7 @@ function XlsxGrid({
|
|
|
21122
21147
|
return null;
|
|
21123
21148
|
}
|
|
21124
21149
|
const isFrozenDrawing = pane !== "scroll";
|
|
21125
|
-
const inset = _optionalChain([shape, 'access',
|
|
21150
|
+
const inset = _optionalChain([shape, 'access', _1295 => _1295.textBox, 'optionalAccess', _1296 => _1296.insetPx]);
|
|
21126
21151
|
const groupScaleX = _nullishCoalesce(shape.scaleX, () => ( 1));
|
|
21127
21152
|
const groupScaleY = _nullishCoalesce(shape.scaleY, () => ( 1));
|
|
21128
21153
|
const strokeScale = Math.max(groupScaleX, groupScaleY);
|
|
@@ -21130,12 +21155,12 @@ function XlsxGrid({
|
|
|
21130
21155
|
const textWidth = groupScaleX !== 0 ? rect.width / groupScaleX : rect.width;
|
|
21131
21156
|
const textHeight = groupScaleY !== 0 ? rect.height / groupScaleY : rect.height;
|
|
21132
21157
|
const vectorShape = resolveShapeVector(shape);
|
|
21133
|
-
const strokeColor = _optionalChain([shape, 'access',
|
|
21134
|
-
const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access',
|
|
21158
|
+
const strokeColor = _optionalChain([shape, 'access', _1297 => _1297.stroke, 'optionalAccess', _1298 => _1298.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1299 => _1299.stroke, 'optionalAccess', _1300 => _1300.color]), () => ( "transparent"));
|
|
21159
|
+
const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access', _1301 => _1301.stroke, 'optionalAccess', _1302 => _1302.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * strokeScale * zoomFactor;
|
|
21135
21160
|
const headMarkerId = `${shape.id}-${pane}-head-marker`;
|
|
21136
21161
|
const tailMarkerId = `${shape.id}-${pane}-tail-marker`;
|
|
21137
21162
|
const headMarker = vectorShape ? resolveShapeLineEndMarker(
|
|
21138
|
-
_optionalChain([shape, 'access',
|
|
21163
|
+
_optionalChain([shape, 'access', _1303 => _1303.stroke, 'optionalAccess', _1304 => _1304.headEndType]),
|
|
21139
21164
|
headMarkerId,
|
|
21140
21165
|
strokeColor,
|
|
21141
21166
|
scaledStrokeWidth,
|
|
@@ -21143,7 +21168,7 @@ function XlsxGrid({
|
|
|
21143
21168
|
vectorShape.viewBox
|
|
21144
21169
|
) : null;
|
|
21145
21170
|
const tailMarker = vectorShape ? resolveShapeLineEndMarker(
|
|
21146
|
-
_optionalChain([shape, 'access',
|
|
21171
|
+
_optionalChain([shape, 'access', _1305 => _1305.stroke, 'optionalAccess', _1306 => _1306.tailEndType]),
|
|
21147
21172
|
tailMarkerId,
|
|
21148
21173
|
strokeColor,
|
|
21149
21174
|
scaledStrokeWidth,
|
|
@@ -21193,12 +21218,12 @@ function XlsxGrid({
|
|
|
21193
21218
|
"path",
|
|
21194
21219
|
{
|
|
21195
21220
|
d: vectorShape.path,
|
|
21196
|
-
fill: _optionalChain([shape, 'access',
|
|
21197
|
-
fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access',
|
|
21221
|
+
fill: _optionalChain([shape, 'access', _1307 => _1307.fill, 'optionalAccess', _1308 => _1308.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1309 => _1309.fill, 'optionalAccess', _1310 => _1310.color]), () => ( "transparent")),
|
|
21222
|
+
fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1311 => _1311.fill, 'optionalAccess', _1312 => _1312.opacity]), () => ( 1)),
|
|
21198
21223
|
markerEnd: tailMarker ? `url(#${tailMarkerId})` : void 0,
|
|
21199
21224
|
markerStart: headMarker ? `url(#${headMarkerId})` : void 0,
|
|
21200
21225
|
stroke: strokeColor,
|
|
21201
|
-
strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access',
|
|
21226
|
+
strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1313 => _1313.stroke, 'optionalAccess', _1314 => _1314.opacity]), () => ( 1)),
|
|
21202
21227
|
strokeWidth: scaledStrokeWidth,
|
|
21203
21228
|
vectorEffect: "non-scaling-stroke"
|
|
21204
21229
|
}
|
|
@@ -21216,11 +21241,11 @@ function XlsxGrid({
|
|
|
21216
21241
|
flexDirection: "column",
|
|
21217
21242
|
gap: 2 * zoomFactor,
|
|
21218
21243
|
height: textHeight,
|
|
21219
|
-
justifyContent: _optionalChain([shape, 'access',
|
|
21220
|
-
paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
21221
|
-
paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
21222
|
-
paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
21223
|
-
paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
21244
|
+
justifyContent: _optionalChain([shape, 'access', _1315 => _1315.textBox, 'optionalAccess', _1316 => _1316.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1317 => _1317.textBox, 'optionalAccess', _1318 => _1318.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
|
|
21245
|
+
paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1319 => _1319.bottom]), () => ( 4))) * zoomFactor,
|
|
21246
|
+
paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1320 => _1320.left]), () => ( 6))) * zoomFactor,
|
|
21247
|
+
paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1321 => _1321.right]), () => ( 6))) * zoomFactor,
|
|
21248
|
+
paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1322 => _1322.top]), () => ( 4))) * zoomFactor,
|
|
21224
21249
|
pointerEvents: "none",
|
|
21225
21250
|
position: "relative",
|
|
21226
21251
|
transform: groupScaleX !== 1 || groupScaleY !== 1 ? `scale(${groupScaleX}, ${groupScaleY})` : void 0,
|
|
@@ -21231,7 +21256,7 @@ function XlsxGrid({
|
|
|
21231
21256
|
children: shape.paragraphs.map((paragraph, index) => renderShapeParagraph(
|
|
21232
21257
|
paragraph,
|
|
21233
21258
|
index,
|
|
21234
|
-
_nullishCoalesce(_optionalChain([shape, 'access',
|
|
21259
|
+
_nullishCoalesce(_optionalChain([shape, 'access', _1323 => _1323.textBox, 'optionalAccess', _1324 => _1324.horizontalAlign]), () => ( "left")),
|
|
21235
21260
|
textScale
|
|
21236
21261
|
))
|
|
21237
21262
|
}
|
|
@@ -21295,7 +21320,7 @@ function XlsxGrid({
|
|
|
21295
21320
|
}
|
|
21296
21321
|
const didUpdate = updateFormControl(control3.controlIndex, { kind }, control3.sheetIndex);
|
|
21297
21322
|
if (didUpdate) {
|
|
21298
|
-
_optionalChain([onFormControlChange, 'optionalCall',
|
|
21323
|
+
_optionalChain([onFormControlChange, 'optionalCall', _1325 => _1325({
|
|
21299
21324
|
control: { ...control3, ...nextControl },
|
|
21300
21325
|
previousControl: control3,
|
|
21301
21326
|
type: "change"
|
|
@@ -21305,13 +21330,13 @@ function XlsxGrid({
|
|
|
21305
21330
|
};
|
|
21306
21331
|
const setControlState = (state = "unchecked") => {
|
|
21307
21332
|
const kind = buildFormControlKindInput(control3);
|
|
21308
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
21333
|
+
if (_optionalChain([kind, 'optionalAccess', _1326 => _1326.kind]) === "checkbox") {
|
|
21309
21334
|
return commitControlKind(
|
|
21310
21335
|
{ ...kind, state },
|
|
21311
21336
|
{ checked: state === "checked", state }
|
|
21312
21337
|
);
|
|
21313
21338
|
}
|
|
21314
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
21339
|
+
if (_optionalChain([kind, 'optionalAccess', _1327 => _1327.kind]) === "optionButton" && state !== "mixed") {
|
|
21315
21340
|
return commitControlKind(
|
|
21316
21341
|
{ ...kind, state },
|
|
21317
21342
|
{ checked: state === "checked", state }
|
|
@@ -21321,14 +21346,14 @@ function XlsxGrid({
|
|
|
21321
21346
|
};
|
|
21322
21347
|
const setControlSelected = (selected) => {
|
|
21323
21348
|
const kind = buildFormControlKindInput(control3);
|
|
21324
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
21349
|
+
if (_optionalChain([kind, 'optionalAccess', _1328 => _1328.kind]) === "dropdown") {
|
|
21325
21350
|
const nextSelected = typeof selected === "number" ? selected : void 0;
|
|
21326
21351
|
return commitControlKind(
|
|
21327
21352
|
{ ...kind, selected: nextSelected },
|
|
21328
21353
|
{ selected: nextSelected }
|
|
21329
21354
|
);
|
|
21330
21355
|
}
|
|
21331
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
21356
|
+
if (_optionalChain([kind, 'optionalAccess', _1329 => _1329.kind]) === "listBox") {
|
|
21332
21357
|
const nextSelected = Array.isArray(selected) ? selected : typeof selected === "number" ? [selected] : [];
|
|
21333
21358
|
return commitControlKind(
|
|
21334
21359
|
{ ...kind, selected: nextSelected },
|
|
@@ -21342,7 +21367,7 @@ function XlsxGrid({
|
|
|
21342
21367
|
return false;
|
|
21343
21368
|
}
|
|
21344
21369
|
const kind = buildFormControlKindInput(control3);
|
|
21345
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
21370
|
+
if (_optionalChain([kind, 'optionalAccess', _1330 => _1330.kind]) !== "scrollbar" && _optionalChain([kind, 'optionalAccess', _1331 => _1331.kind]) !== "spinner") {
|
|
21346
21371
|
return false;
|
|
21347
21372
|
}
|
|
21348
21373
|
const nextValue = Math.max(kind.min, Math.min(kind.max, value));
|
|
@@ -21350,7 +21375,7 @@ function XlsxGrid({
|
|
|
21350
21375
|
};
|
|
21351
21376
|
const activateControl = () => {
|
|
21352
21377
|
if (!readOnly && control3.kind === "button") {
|
|
21353
|
-
_optionalChain([onFormControlAction, 'optionalCall',
|
|
21378
|
+
_optionalChain([onFormControlAction, 'optionalCall', _1332 => _1332({ control: control3, type: "activate" })]);
|
|
21354
21379
|
}
|
|
21355
21380
|
};
|
|
21356
21381
|
if (renderFormControl) {
|
|
@@ -22039,7 +22064,7 @@ function XlsxGrid({
|
|
|
22039
22064
|
actualIndex: actualCol,
|
|
22040
22065
|
initialPx: widthPx,
|
|
22041
22066
|
pointerId,
|
|
22042
|
-
restoreUserSelect: _nullishCoalesce(_optionalChain([resizeStateRef, 'access',
|
|
22067
|
+
restoreUserSelect: _nullishCoalesce(_optionalChain([resizeStateRef, 'access', _1333 => _1333.current, 'optionalAccess', _1334 => _1334.restoreUserSelect]), () => ( suppressResizeTextSelection())),
|
|
22043
22068
|
startPosition: startX,
|
|
22044
22069
|
type: "column"
|
|
22045
22070
|
};
|
|
@@ -22059,7 +22084,7 @@ function XlsxGrid({
|
|
|
22059
22084
|
actualIndex: actualRow,
|
|
22060
22085
|
initialPx: heightPx,
|
|
22061
22086
|
pointerId,
|
|
22062
|
-
restoreUserSelect: _nullishCoalesce(_optionalChain([resizeStateRef, 'access',
|
|
22087
|
+
restoreUserSelect: _nullishCoalesce(_optionalChain([resizeStateRef, 'access', _1335 => _1335.current, 'optionalAccess', _1336 => _1336.restoreUserSelect]), () => ( suppressResizeTextSelection())),
|
|
22063
22088
|
startPosition: startY,
|
|
22064
22089
|
type: "row"
|
|
22065
22090
|
};
|
|
@@ -22137,7 +22162,7 @@ function XlsxGrid({
|
|
|
22137
22162
|
if (readOnly) {
|
|
22138
22163
|
return;
|
|
22139
22164
|
}
|
|
22140
|
-
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
22165
|
+
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1337 => _1337.current, 'optionalAccess', _1338 => _1338.getBoundingClientRect, 'call', _1339 => _1339()]), () => ( null));
|
|
22141
22166
|
const normalizedSource = normalizeRange2(sourceRange);
|
|
22142
22167
|
fillDragRef.current = {
|
|
22143
22168
|
pointerId,
|
|
@@ -22160,7 +22185,7 @@ function XlsxGrid({
|
|
|
22160
22185
|
applyPreviewOverlay(nextRange);
|
|
22161
22186
|
}
|
|
22162
22187
|
function installImageInteractionListeners(pointerId) {
|
|
22163
|
-
_optionalChain([imageInteractionCleanupRef, 'access',
|
|
22188
|
+
_optionalChain([imageInteractionCleanupRef, 'access', _1340 => _1340.current, 'optionalCall', _1341 => _1341()]);
|
|
22164
22189
|
const resolveInteractionRect = (interaction, clientX, clientY) => {
|
|
22165
22190
|
const deltaX = clientX - interaction.startClientX;
|
|
22166
22191
|
const deltaY = clientY - interaction.startClientY;
|
|
@@ -22240,7 +22265,7 @@ function XlsxGrid({
|
|
|
22240
22265
|
imageInteractionCleanupRef.current = cleanup;
|
|
22241
22266
|
}
|
|
22242
22267
|
function installChartInteractionListeners(pointerId) {
|
|
22243
|
-
_optionalChain([chartInteractionCleanupRef, 'access',
|
|
22268
|
+
_optionalChain([chartInteractionCleanupRef, 'access', _1342 => _1342.current, 'optionalCall', _1343 => _1343()]);
|
|
22244
22269
|
const resolveInteractionRect = (interaction, clientX, clientY) => {
|
|
22245
22270
|
const deltaX = clientX - interaction.startClientX;
|
|
22246
22271
|
const deltaY = clientY - interaction.startClientY;
|
|
@@ -22404,7 +22429,7 @@ function XlsxGrid({
|
|
|
22404
22429
|
const scroller = scrollRef.current;
|
|
22405
22430
|
const viewportHeight = Math.max(
|
|
22406
22431
|
displayDefaultRowHeight,
|
|
22407
|
-
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
22432
|
+
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1344 => _1344.clientHeight]), () => ( displayDefaultRowHeight * 20))) - frozenPaneBottom
|
|
22408
22433
|
);
|
|
22409
22434
|
const currentOffset = _nullishCoalesce(rowPrefixSums[currentRowIndex], () => ( 0));
|
|
22410
22435
|
const targetOffset = direction > 0 ? currentOffset + viewportHeight : currentOffset - viewportHeight;
|
|
@@ -22414,7 +22439,7 @@ function XlsxGrid({
|
|
|
22414
22439
|
const scroller = scrollRef.current;
|
|
22415
22440
|
const viewportWidth = Math.max(
|
|
22416
22441
|
displayDefaultColWidth,
|
|
22417
|
-
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
22442
|
+
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1345 => _1345.clientWidth]), () => ( displayDefaultColWidth * 8))) - frozenPaneRight
|
|
22418
22443
|
);
|
|
22419
22444
|
const currentOffset = _nullishCoalesce(colPrefixSums[currentColIndex], () => ( 0));
|
|
22420
22445
|
const targetOffset = direction > 0 ? currentOffset + viewportWidth : currentOffset - viewportWidth;
|
|
@@ -22422,7 +22447,7 @@ function XlsxGrid({
|
|
|
22422
22447
|
}
|
|
22423
22448
|
function resolveColumnSelectionNavigation(eventKey) {
|
|
22424
22449
|
const axisSelection = axisSelectionRef.current;
|
|
22425
|
-
if (_optionalChain([axisSelection, 'optionalAccess',
|
|
22450
|
+
if (_optionalChain([axisSelection, 'optionalAccess', _1346 => _1346.axis]) !== "column" || firstVisibleRow === void 0) {
|
|
22426
22451
|
return null;
|
|
22427
22452
|
}
|
|
22428
22453
|
const startCol = Math.min(axisSelection.startCol, axisSelection.endCol);
|
|
@@ -22440,7 +22465,7 @@ function XlsxGrid({
|
|
|
22440
22465
|
}
|
|
22441
22466
|
function resolveRowSelectionNavigation(eventKey) {
|
|
22442
22467
|
const axisSelection = axisSelectionRef.current;
|
|
22443
|
-
if (_optionalChain([axisSelection, 'optionalAccess',
|
|
22468
|
+
if (_optionalChain([axisSelection, 'optionalAccess', _1347 => _1347.axis]) !== "row" || firstVisibleCol === void 0) {
|
|
22444
22469
|
return null;
|
|
22445
22470
|
}
|
|
22446
22471
|
const startRow = Math.min(axisSelection.startRow, axisSelection.endRow);
|
|
@@ -22462,18 +22487,18 @@ function XlsxGrid({
|
|
|
22462
22487
|
}
|
|
22463
22488
|
if (enableContextMenu && (event.key === "ContextMenu" || event.shiftKey && event.key === "F10")) {
|
|
22464
22489
|
const cell = resolveCurrentCell();
|
|
22465
|
-
const rect = _optionalChain([scrollRef, 'access',
|
|
22490
|
+
const rect = _optionalChain([scrollRef, 'access', _1348 => _1348.current, 'optionalAccess', _1349 => _1349.getBoundingClientRect, 'call', _1350 => _1350()]);
|
|
22466
22491
|
if (cell && rect) {
|
|
22467
22492
|
event.preventDefault();
|
|
22468
22493
|
const overlay = resolveOverlayRect({ start: cell, end: cell });
|
|
22469
22494
|
const position = {
|
|
22470
|
-
x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess',
|
|
22471
|
-
y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
22495
|
+
x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess', _1351 => _1351.left]), () => ( displayRowHeaderWidth))) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1352 => _1352.current, 'optionalAccess', _1353 => _1353.scrollLeft]), () => ( 0))),
|
|
22496
|
+
y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1354 => _1354.current, 'optionalAccess', _1355 => _1355.scrollTop]), () => ( 0)))
|
|
22472
22497
|
};
|
|
22473
22498
|
if (selectedChart) openDrawingContextMenu("chart", selectedChart, position);
|
|
22474
22499
|
else if (selectedImage) openDrawingContextMenu("image", selectedImage, position);
|
|
22475
22500
|
else {
|
|
22476
|
-
const axis = _optionalChain([axisSelectionRef, 'access',
|
|
22501
|
+
const axis = _optionalChain([axisSelectionRef, 'access', _1356 => _1356.current, 'optionalAccess', _1357 => _1357.axis]);
|
|
22477
22502
|
const kind = axis && selectionCoversRange(selectionRanges, getContextExtent(axis, { start: cell, end: cell })) ? axis : "cell";
|
|
22478
22503
|
if (kind === "row") position.x = rect.left + displayRowHeaderWidth;
|
|
22479
22504
|
if (kind === "column") position.y = rect.top + displayHeaderHeight;
|
|
@@ -22535,7 +22560,7 @@ function XlsxGrid({
|
|
|
22535
22560
|
}
|
|
22536
22561
|
}
|
|
22537
22562
|
moveSelection(
|
|
22538
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22563
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1358 => _1358.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : nextMerged.row,
|
|
22539
22564
|
currentColIndex,
|
|
22540
22565
|
event.shiftKey
|
|
22541
22566
|
);
|
|
@@ -22550,7 +22575,7 @@ function XlsxGrid({
|
|
|
22550
22575
|
}
|
|
22551
22576
|
}
|
|
22552
22577
|
moveSelection(
|
|
22553
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22578
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1359 => _1359.minUsedRow]), () => ( -1)))), () => ( 0)) : nextMerged.row,
|
|
22554
22579
|
currentColIndex,
|
|
22555
22580
|
event.shiftKey
|
|
22556
22581
|
);
|
|
@@ -22566,7 +22591,7 @@ function XlsxGrid({
|
|
|
22566
22591
|
}
|
|
22567
22592
|
moveSelection(
|
|
22568
22593
|
currentRowIndex,
|
|
22569
|
-
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22594
|
+
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1360 => _1360.minUsedCol]), () => ( -1)))), () => ( 0)) : nextMerged.col,
|
|
22570
22595
|
event.shiftKey
|
|
22571
22596
|
);
|
|
22572
22597
|
break;
|
|
@@ -22581,23 +22606,23 @@ function XlsxGrid({
|
|
|
22581
22606
|
}
|
|
22582
22607
|
moveSelection(
|
|
22583
22608
|
currentRowIndex,
|
|
22584
|
-
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22609
|
+
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1361 => _1361.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)) : nextMerged.col,
|
|
22585
22610
|
event.shiftKey
|
|
22586
22611
|
);
|
|
22587
22612
|
break;
|
|
22588
22613
|
case "Home":
|
|
22589
22614
|
event.preventDefault();
|
|
22590
22615
|
moveSelection(
|
|
22591
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22592
|
-
_nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22616
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1362 => _1362.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex,
|
|
22617
|
+
_nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1363 => _1363.minUsedCol]), () => ( -1)))), () => ( 0)),
|
|
22593
22618
|
event.shiftKey
|
|
22594
22619
|
);
|
|
22595
22620
|
break;
|
|
22596
22621
|
case "End":
|
|
22597
22622
|
event.preventDefault();
|
|
22598
22623
|
moveSelection(
|
|
22599
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22600
|
-
_nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22624
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1364 => _1364.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex,
|
|
22625
|
+
_nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1365 => _1365.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)),
|
|
22601
22626
|
event.shiftKey
|
|
22602
22627
|
);
|
|
22603
22628
|
break;
|
|
@@ -22654,11 +22679,11 @@ function XlsxGrid({
|
|
|
22654
22679
|
gridKeyboardHandlerRef.current = handleGridKeyDown;
|
|
22655
22680
|
const scrollerViewportProps = {
|
|
22656
22681
|
ref: scrollRef,
|
|
22657
|
-
"aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22682
|
+
"aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1366 => _1366.colCount]), () => ( 0)), displayColLimit),
|
|
22658
22683
|
"aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight Home End PageUp PageDown Control+Home Control+End",
|
|
22659
22684
|
"aria-label": activeSheet ? _chunkTLEC4K6Wcjs.formatMessage.call(void 0, messages.worksheetGrid, { sheet: activeSheet.name }) : messages.workbookGrid,
|
|
22660
22685
|
"aria-readonly": readOnly,
|
|
22661
|
-
"aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22686
|
+
"aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1367 => _1367.rowCount]), () => ( 0)), displayRowLimit),
|
|
22662
22687
|
role: "grid",
|
|
22663
22688
|
onScroll: handleScrollerScroll,
|
|
22664
22689
|
onContextMenu: (event) => {
|
|
@@ -22752,7 +22777,7 @@ function XlsxGrid({
|
|
|
22752
22777
|
["--xlsx-selection-header"]: selectionHeaderSurface,
|
|
22753
22778
|
backgroundColor: palette.canvas,
|
|
22754
22779
|
color: palette.text,
|
|
22755
|
-
cursor: _optionalChain([resizeGuide, 'optionalAccess',
|
|
22780
|
+
cursor: _optionalChain([resizeGuide, 'optionalAccess', _1368 => _1368.type]) === "column" ? "col-resize" : _optionalChain([resizeGuide, 'optionalAccess', _1369 => _1369.type]) === "row" ? "row-resize" : void 0,
|
|
22756
22781
|
flex: 1,
|
|
22757
22782
|
height: "100%",
|
|
22758
22783
|
minHeight: 0,
|
|
@@ -22814,7 +22839,7 @@ function XlsxGrid({
|
|
|
22814
22839
|
)];
|
|
22815
22840
|
});
|
|
22816
22841
|
const chartSourceHighlightNodes = (experimentalCanvas ? activeSheetChartHighlights : []).flatMap((highlight, index) => {
|
|
22817
|
-
const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22842
|
+
const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1370 => _1370.mergedRanges]), () => ( mergedRegions)));
|
|
22818
22843
|
const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
|
|
22819
22844
|
const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
|
|
22820
22845
|
if (!rows || !cols) return [];
|
|
@@ -22838,8 +22863,8 @@ function XlsxGrid({
|
|
|
22838
22863
|
];
|
|
22839
22864
|
});
|
|
22840
22865
|
const formulaHighlightNodes = formulaReferences.flatMap((reference, index) => {
|
|
22841
|
-
if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess',
|
|
22842
|
-
const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22866
|
+
if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess', _1371 => _1371.name, 'access', _1372 => _1372.toLowerCase, 'call', _1373 => _1373()])) return [];
|
|
22867
|
+
const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1374 => _1374.mergedRanges]), () => ( mergedRegions)));
|
|
22843
22868
|
const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
|
|
22844
22869
|
const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
|
|
22845
22870
|
if (!rows || !cols) return [];
|
|
@@ -22888,16 +22913,16 @@ function XlsxGrid({
|
|
|
22888
22913
|
boxSizing: "border-box",
|
|
22889
22914
|
boxShadow: `inset 0 0 0 ${selectionBorderWidth}px ${selectionStroke}`,
|
|
22890
22915
|
contain: "layout paint",
|
|
22891
|
-
height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
22892
|
-
left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
22916
|
+
height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1375 => _1375.height]), () => ( 0)),
|
|
22917
|
+
left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1376 => _1376.left]), () => ( 0)),
|
|
22893
22918
|
opacity: resolvedSelectionOverlay ? 1 : 0,
|
|
22894
22919
|
pointerEvents: "none",
|
|
22895
22920
|
position: "absolute",
|
|
22896
|
-
top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
22921
|
+
top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1377 => _1377.top]), () => ( 0)),
|
|
22897
22922
|
transition: canvasSelectionTransition,
|
|
22898
22923
|
visibility: resolvedSelectionOverlay ? "visible" : "hidden",
|
|
22899
22924
|
willChange: shouldAnimateCanvasSelectionGeometry ? "left, top, width, height" : void 0,
|
|
22900
|
-
width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
22925
|
+
width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1378 => _1378.width]), () => ( 0)),
|
|
22901
22926
|
zIndex: 24
|
|
22902
22927
|
}
|
|
22903
22928
|
}
|
|
@@ -23187,7 +23212,7 @@ function XlsxGrid({
|
|
|
23187
23212
|
editingCell && editingOverlayRect ? (() => {
|
|
23188
23213
|
const editingCellData = getCellData(editingCell.row, editingCell.col);
|
|
23189
23214
|
const editingCellStyle = { ...editingCellData.style, ...cellEditorStyle };
|
|
23190
|
-
if (editingCellData.usesGeneralAlignment && _optionalChain([cellEditorStyle, 'optionalAccess',
|
|
23215
|
+
if (editingCellData.usesGeneralAlignment && _optionalChain([cellEditorStyle, 'optionalAccess', _1379 => _1379.textAlign]) === void 0) {
|
|
23191
23216
|
const enteredValue = worksheet && isTextCell(worksheet, editingCell) ? editingValue : coerceUserEnteredValue(editingValue, locale);
|
|
23192
23217
|
editingCellStyle.textAlign = typeof enteredValue === "number" ? "right" : typeof enteredValue === "boolean" ? "center" : "left";
|
|
23193
23218
|
}
|
|
@@ -23249,9 +23274,9 @@ function XlsxGrid({
|
|
|
23249
23274
|
wrapText: editingCellData.style.whiteSpace === "pre-wrap",
|
|
23250
23275
|
references: formulaReferences,
|
|
23251
23276
|
onBlur: handleEditingBlur,
|
|
23252
|
-
onChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23253
|
-
onCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23254
|
-
onCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23277
|
+
onChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1380 => _1380.setValue]), () => ( setEditingValue)),
|
|
23278
|
+
onCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1381 => _1381.commit]), () => ( commitEditing)),
|
|
23279
|
+
onCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1382 => _1382.cancel]), () => ( cancelEditing)),
|
|
23255
23280
|
onNavigate: handleEditingNavigate,
|
|
23256
23281
|
style: {
|
|
23257
23282
|
backgroundColor: editingBackground,
|
|
@@ -23388,7 +23413,7 @@ function XlsxGrid({
|
|
|
23388
23413
|
if (actualRow === void 0) {
|
|
23389
23414
|
return [];
|
|
23390
23415
|
}
|
|
23391
|
-
const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
23416
|
+
const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access', _1383 => _1383[index - 1], 'optionalAccess', _1384 => _1384.end]), () => ( 0));
|
|
23392
23417
|
const gapHeight = Math.max(0, virtualRow.start - previousEnd);
|
|
23393
23418
|
return [
|
|
23394
23419
|
gapHeight > 0 ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "tr", { "aria-hidden": "true", style: { height: gapHeight }, children: /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "td", { colSpan: rowColSpan }) }, `spacer-${virtualRow.key}`) : null,
|
|
@@ -23411,10 +23436,10 @@ function XlsxGrid({
|
|
|
23411
23436
|
onCellDoubleClick: handleCellDoubleClick,
|
|
23412
23437
|
onCellPointerDown: handleCellPointerDown,
|
|
23413
23438
|
onEditingBlur: handleEditingBlur,
|
|
23414
|
-
onEditingCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23415
|
-
onEditingCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23439
|
+
onEditingCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1385 => _1385.cancel]), () => ( cancelEditing)),
|
|
23440
|
+
onEditingCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1386 => _1386.commit]), () => ( commitEditing)),
|
|
23416
23441
|
onEditingNavigate: handleEditingNavigate,
|
|
23417
|
-
onEditingValueChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess',
|
|
23442
|
+
onEditingValueChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1387 => _1387.setValue]), () => ( setEditingValue)),
|
|
23418
23443
|
headerLabelLiveScale,
|
|
23419
23444
|
onRowHeaderRef: setRowHeaderRef,
|
|
23420
23445
|
onRowPointerDown: handleRowPointerDown,
|
|
@@ -23436,11 +23461,11 @@ function XlsxGrid({
|
|
|
23436
23461
|
)
|
|
23437
23462
|
];
|
|
23438
23463
|
}),
|
|
23439
|
-
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
23464
|
+
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1388 => _1388[virtualRows.length - 1], 'optionalAccess', _1389 => _1389.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0,
|
|
23440
23465
|
"tr",
|
|
23441
23466
|
{
|
|
23442
23467
|
style: {
|
|
23443
|
-
height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
23468
|
+
height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1390 => _1390[virtualRows.length - 1], 'optionalAccess', _1391 => _1391.end]), () => ( totalHeight)))
|
|
23444
23469
|
},
|
|
23445
23470
|
children: /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0, "td", { colSpan: rowColSpan })
|
|
23446
23471
|
},
|
|
@@ -23472,7 +23497,7 @@ function XlsxGrid({
|
|
|
23472
23497
|
PivotHeaderControls,
|
|
23473
23498
|
{
|
|
23474
23499
|
pivots: controller.pivotTables,
|
|
23475
|
-
sheetName: _optionalChain([activeSheet, 'optionalAccess',
|
|
23500
|
+
sheetName: _optionalChain([activeSheet, 'optionalAccess', _1392 => _1392.name]),
|
|
23476
23501
|
rectForCell: resolveCellDisplayRect,
|
|
23477
23502
|
viewport: drawingViewport,
|
|
23478
23503
|
stickyTop: stickyTopByRow,
|
|
@@ -23517,7 +23542,7 @@ function XlsxGrid({
|
|
|
23517
23542
|
PivotGroupControls,
|
|
23518
23543
|
{
|
|
23519
23544
|
pivots: controller.pivotTables,
|
|
23520
|
-
sheetName: _optionalChain([activeSheet, 'optionalAccess',
|
|
23545
|
+
sheetName: _optionalChain([activeSheet, 'optionalAccess', _1393 => _1393.name]),
|
|
23521
23546
|
rectForCell: resolveCellDisplayRect,
|
|
23522
23547
|
viewport: drawingViewport,
|
|
23523
23548
|
stickyTop: stickyTopByRow,
|
|
@@ -23642,7 +23667,7 @@ function XlsxGrid({
|
|
|
23642
23667
|
renderSelectionPopover && !secondaryRanges.length && normalizedSelection && activeCell && !isLoading && interactionMode === "idle" && !contextMenu && /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0,
|
|
23643
23668
|
SelectionPopover,
|
|
23644
23669
|
{
|
|
23645
|
-
context: { cell: resolveMergeAnchorCell(activeCell), selection: normalizedSelection, sheetIndex: activeSheetIndex, sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
23670
|
+
context: { cell: resolveMergeAnchorCell(activeCell), selection: normalizedSelection, sheetIndex: activeSheetIndex, sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1394 => _1394.name]), () => ( "")), readOnly },
|
|
23646
23671
|
suspended: !!editingCell,
|
|
23647
23672
|
viewportRef: scrollRef,
|
|
23648
23673
|
getRects: () => {
|
|
@@ -23658,7 +23683,7 @@ function XlsxGrid({
|
|
|
23658
23683
|
const frozenY = pane === "top" || pane === "corner";
|
|
23659
23684
|
if (frozenX ? !stickyLeftByCol.has(normalizedSelection.start.col) : stickyLeftByCol.has(normalizedSelection.end.col)) return [];
|
|
23660
23685
|
if (frozenY ? !stickyTopByRow.has(normalizedSelection.start.row) : stickyTopByRow.has(normalizedSelection.end.row)) return [];
|
|
23661
|
-
const clip = _optionalChain([cellOverlayHosts, 'access',
|
|
23686
|
+
const clip = _optionalChain([cellOverlayHosts, 'access', _1395 => _1395[pane], 'optionalAccess', _1396 => _1396.parentElement]);
|
|
23662
23687
|
const rect = clip ? visibleOverlayRect(element, clip) : null;
|
|
23663
23688
|
return rect ? [rect] : [];
|
|
23664
23689
|
});
|
|
@@ -23675,12 +23700,12 @@ function XlsxGrid({
|
|
|
23675
23700
|
{
|
|
23676
23701
|
editorRef: editorElementRef,
|
|
23677
23702
|
overlayRef: editorOverlayRef,
|
|
23678
|
-
clipElement: editingCell ? _optionalChain([cellOverlayHosts, 'access',
|
|
23703
|
+
clipElement: editingCell ? _optionalChain([cellOverlayHosts, 'access', _1397 => _1397[cellOverlayPaneFor(editingCell)], 'optionalAccess', _1398 => _1398.parentElement]) : null,
|
|
23679
23704
|
session: cellEditorSession,
|
|
23680
23705
|
render: renderCellEditorOverlay,
|
|
23681
23706
|
onExit: exitEditorScope
|
|
23682
23707
|
},
|
|
23683
|
-
`${activeSheetIndex}:${_optionalChain([editingCell, 'optionalAccess',
|
|
23708
|
+
`${activeSheetIndex}:${_optionalChain([editingCell, 'optionalAccess', _1399 => _1399.row])}:${_optionalChain([editingCell, 'optionalAccess', _1400 => _1400.col])}`
|
|
23684
23709
|
),
|
|
23685
23710
|
enableContextMenu && contextMenu && (contextMenu.sizeAxis ? /* @__PURE__ */ _chunkTLEC4K6Wcjs.u.call(void 0,
|
|
23686
23711
|
HeaderSizeDialog,
|
|
@@ -23688,7 +23713,7 @@ function XlsxGrid({
|
|
|
23688
23713
|
axis: contextMenu.sizeAxis,
|
|
23689
23714
|
context: contextMenu.context,
|
|
23690
23715
|
sizes: contextMenu.sizeAxis === "row" ? actualRowHeights : actualColWidths,
|
|
23691
|
-
maxSize: contextMenu.sizeAxis === "row" ? MAX_AUTOFIT_ROW_HEIGHT_PX : _optionalChain([activeSheet, 'optionalAccess',
|
|
23716
|
+
maxSize: contextMenu.sizeAxis === "row" ? MAX_AUTOFIT_ROW_HEIGHT_PX : _optionalChain([activeSheet, 'optionalAccess', _1401 => _1401.officeLayout]) ? _chunkGP5SOQQHcjs.resolveOfficeColumnWidthPixels.call(void 0, MAX_COLUMN_WIDTH_CHARACTERS, activeSheet.officeLayout.columnDigitWidthPt) : _chunkGP5SOQQHcjs.resolveSheetColumnWidthPixels.call(void 0, MAX_COLUMN_WIDTH_CHARACTERS, _optionalChain([activeSheet, 'optionalAccess', _1402 => _1402.columnWidthCharacterWidthPx])),
|
|
23692
23717
|
messages,
|
|
23693
23718
|
locale,
|
|
23694
23719
|
palette,
|
|
@@ -24105,4 +24130,4 @@ function __createContentRoot(container) {
|
|
|
24105
24130
|
|
|
24106
24131
|
|
|
24107
24132
|
exports.formatBinaryBytes = formatBinaryBytes; exports.XlsxFileSizeLimitExceededError = XlsxFileSizeLimitExceededError; exports.XlsxViewer = XlsxViewer2; exports.createXlsxViewer = createXlsxViewer; exports.__createControlledViewer = __createControlledViewer; exports.__createContentNode = __createContentNode; exports.__createContentRoot = __createContentRoot;
|
|
24108
|
-
//# sourceMappingURL=chunk-
|
|
24133
|
+
//# sourceMappingURL=chunk-6TAWBCPV.cjs.map
|