@extend-ai/react-xlsx 0.20.12 → 0.21.0
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 +144 -1
- package/dist/{chunk-O4S5CRDM.js → chunk-2UFSVI5Z.js} +432 -33
- package/dist/chunk-2UFSVI5Z.js.map +1 -0
- package/dist/{chunk-NIN5D556.cjs → chunk-7IL4KLCD.cjs} +837 -438
- package/dist/chunk-7IL4KLCD.cjs.map +1 -0
- package/dist/index.cjs +215 -147
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -1
- package/dist/index.d.ts +76 -1
- package/dist/index.js +173 -105
- package/dist/index.js.map +1 -1
- package/dist/{internal-D_np3R-w.d.cts → internal-BO70EPFy.d.cts} +71 -1
- package/dist/{internal-D_np3R-w.d.ts → internal-BO70EPFy.d.ts} +71 -1
- package/dist/internal.cjs +2 -2
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/vanilla.cjs +2 -2
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-NIN5D556.cjs.map +0 -1
- package/dist/chunk-O4S5CRDM.js.map +0 -1
|
@@ -11744,6 +11744,28 @@ function useXlsxViewerController(options) {
|
|
|
11744
11744
|
refreshWorkbookState(workbook);
|
|
11745
11745
|
recordCellEditHistory(cell, before, after);
|
|
11746
11746
|
}, [captureCellMutationState, getActiveWorksheet, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
|
|
11747
|
+
const setCellStyles = _chunkA3S3QKJNcjs.q.call(void 0, (updates) => {
|
|
11748
|
+
const worksheet = getActiveWorksheet();
|
|
11749
|
+
if (readOnly || !worksheet || !workbook) return;
|
|
11750
|
+
const beforeStates = /* @__PURE__ */ new Map();
|
|
11751
|
+
for (const { cell, style } of updates) {
|
|
11752
|
+
const key = `${cell.row}:${cell.col}`;
|
|
11753
|
+
if (!beforeStates.has(key)) {
|
|
11754
|
+
const before = captureCellMutationState(cell);
|
|
11755
|
+
if (!before) continue;
|
|
11756
|
+
beforeStates.set(key, { cell: { ...cell }, before });
|
|
11757
|
+
}
|
|
11758
|
+
worksheet.setCellStyleAt(cell.row, cell.col, style);
|
|
11759
|
+
}
|
|
11760
|
+
if (!beforeStates.size) return;
|
|
11761
|
+
const mutations = [];
|
|
11762
|
+
for (const { cell, before } of beforeStates.values()) {
|
|
11763
|
+
const after = captureCellMutationState(cell);
|
|
11764
|
+
if (after) mutations.push({ cell, before, after });
|
|
11765
|
+
}
|
|
11766
|
+
refreshWorkbookState(workbook);
|
|
11767
|
+
recordRangeEditHistory(mutations, selection, activeCell);
|
|
11768
|
+
}, [activeCell, captureCellMutationState, getActiveWorksheet, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
|
|
11747
11769
|
const setSelectedCellValue = _chunkA3S3QKJNcjs.q.call(void 0, (value) => {
|
|
11748
11770
|
if (!activeCell) {
|
|
11749
11771
|
return;
|
|
@@ -12400,6 +12422,7 @@ function useXlsxViewerController(options) {
|
|
|
12400
12422
|
resizeRow,
|
|
12401
12423
|
setCellFormula,
|
|
12402
12424
|
setCellStyle,
|
|
12425
|
+
setCellStyles,
|
|
12403
12426
|
setCellValue,
|
|
12404
12427
|
setRangeStyle,
|
|
12405
12428
|
setSelectedFormula,
|
|
@@ -12524,6 +12547,7 @@ function useXlsxViewerController(options) {
|
|
|
12524
12547
|
resizeRow,
|
|
12525
12548
|
setCellFormula,
|
|
12526
12549
|
setCellStyle,
|
|
12550
|
+
setCellStyles,
|
|
12527
12551
|
setCellValue,
|
|
12528
12552
|
setRangeStyle,
|
|
12529
12553
|
setSelectedFormula,
|
|
@@ -14136,6 +14160,8 @@ function CellEditor({
|
|
|
14136
14160
|
value,
|
|
14137
14161
|
references,
|
|
14138
14162
|
inputRef,
|
|
14163
|
+
editorRef,
|
|
14164
|
+
onFocusOverlay,
|
|
14139
14165
|
canvasText = false,
|
|
14140
14166
|
canvasOffset,
|
|
14141
14167
|
paintCanvasText,
|
|
@@ -14275,7 +14301,12 @@ function CellEditor({
|
|
|
14275
14301
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
14276
14302
|
"div",
|
|
14277
14303
|
{
|
|
14278
|
-
ref:
|
|
14304
|
+
ref: (element) => {
|
|
14305
|
+
rootRef.current = element;
|
|
14306
|
+
if (typeof editorRef === "function") editorRef(element);
|
|
14307
|
+
else if (editorRef) editorRef.current = element;
|
|
14308
|
+
},
|
|
14309
|
+
"data-xlsx-cell-editor": "",
|
|
14279
14310
|
onPointerDown: (event) => event.stopPropagation(),
|
|
14280
14311
|
onClick: (event) => event.stopPropagation(),
|
|
14281
14312
|
onDoubleClick: (event) => event.stopPropagation(),
|
|
@@ -14324,7 +14355,7 @@ function CellEditor({
|
|
|
14324
14355
|
] })
|
|
14325
14356
|
}
|
|
14326
14357
|
),
|
|
14327
|
-
paintCanvasText ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "canvas", { ref: canvasRef, "aria-hidden": "true", style: { position: "absolute", pointerEvents: "none" } }) : null,
|
|
14358
|
+
paintCanvasText ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "canvas", { ref: canvasRef, "data-xlsx-formula-text": "", "aria-hidden": "true", style: { position: "absolute", pointerEvents: "none" } }) : null,
|
|
14328
14359
|
/* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
14329
14360
|
"textarea",
|
|
14330
14361
|
{
|
|
@@ -14334,6 +14365,7 @@ function CellEditor({
|
|
|
14334
14365
|
else if (inputRef) inputRef.current = element;
|
|
14335
14366
|
},
|
|
14336
14367
|
"aria-label": messages.editCell,
|
|
14368
|
+
"aria-keyshortcuts": onFocusOverlay ? "Alt+ArrowDown" : void 0,
|
|
14337
14369
|
autoFocus: true,
|
|
14338
14370
|
autoComplete: "off",
|
|
14339
14371
|
spellCheck: false,
|
|
@@ -14347,7 +14379,9 @@ function CellEditor({
|
|
|
14347
14379
|
onKeyDown: (event) => {
|
|
14348
14380
|
event.stopPropagation();
|
|
14349
14381
|
if (event.nativeEvent.isComposing) return;
|
|
14350
|
-
if (event.key === "
|
|
14382
|
+
if (event.key === "ArrowDown" && event.altKey && _optionalChain([onFocusOverlay, 'optionalCall', _1085 => _1085()])) {
|
|
14383
|
+
event.preventDefault();
|
|
14384
|
+
} else if (event.key === "Enter" && !event.altKey) {
|
|
14351
14385
|
event.preventDefault();
|
|
14352
14386
|
onCommit();
|
|
14353
14387
|
} else if (event.key === "Escape") {
|
|
@@ -14393,6 +14427,260 @@ function CellEditor({
|
|
|
14393
14427
|
);
|
|
14394
14428
|
}
|
|
14395
14429
|
|
|
14430
|
+
// src/cell-editor-overlay.tsx
|
|
14431
|
+
function CellEditorOverlay({ editorRef, overlayRef, session, render, onExit }) {
|
|
14432
|
+
const [geometry, setGeometry] = _chunkA3S3QKJNcjs.d.call(void 0, null);
|
|
14433
|
+
const latest = _chunkA3S3QKJNcjs.A.call(void 0, { onExit, session });
|
|
14434
|
+
latest.current = { onExit, session };
|
|
14435
|
+
_chunkA3S3QKJNcjs._.call(void 0, () => {
|
|
14436
|
+
const editor = editorRef.current;
|
|
14437
|
+
const owner = _optionalChain([editor, 'optionalAccess', _1086 => _1086.ownerDocument]);
|
|
14438
|
+
const win = _optionalChain([owner, 'optionalAccess', _1087 => _1087.defaultView]);
|
|
14439
|
+
const viewport = _optionalChain([editor, 'optionalAccess', _1088 => _1088.closest, 'call', _1089 => _1089('[role="grid"]')]);
|
|
14440
|
+
if (!editor || !owner || !win || !viewport) return;
|
|
14441
|
+
const update = () => {
|
|
14442
|
+
const bounds = editor.getBoundingClientRect();
|
|
14443
|
+
const view = viewport.getBoundingClientRect();
|
|
14444
|
+
const rect = { left: bounds.left, top: bounds.top, width: bounds.width, height: bounds.height };
|
|
14445
|
+
const visible = bounds.width > 0 && bounds.height > 0 && bounds.right > Math.max(view.left, 0) && bounds.bottom > Math.max(view.top, 0) && bounds.left < Math.min(view.right, win.innerWidth) && bounds.top < Math.min(view.bottom, win.innerHeight);
|
|
14446
|
+
setGeometry((previous) => previous && previous.editor === editor && previous.visible === visible && previous.rect.left === rect.left && previous.rect.top === rect.top && previous.rect.width === rect.width && previous.rect.height === rect.height ? previous : { owner, editor, rect, visible });
|
|
14447
|
+
};
|
|
14448
|
+
const outside = (event) => {
|
|
14449
|
+
const target = event.target;
|
|
14450
|
+
if (!latest.current.session.signal.aborted && !editor.contains(target) && !_optionalChain([overlayRef, 'access', _1090 => _1090.current, 'optionalAccess', _1091 => _1091.contains, 'call', _1092 => _1092(target)])) {
|
|
14451
|
+
latest.current.onExit();
|
|
14452
|
+
}
|
|
14453
|
+
};
|
|
14454
|
+
update();
|
|
14455
|
+
const observer = new ResizeObserver(update);
|
|
14456
|
+
observer.observe(editor);
|
|
14457
|
+
observer.observe(viewport);
|
|
14458
|
+
owner.addEventListener("scroll", update, true);
|
|
14459
|
+
owner.addEventListener("pointerdown", outside, true);
|
|
14460
|
+
owner.addEventListener("focusin", outside);
|
|
14461
|
+
win.addEventListener("resize", update);
|
|
14462
|
+
return () => {
|
|
14463
|
+
observer.disconnect();
|
|
14464
|
+
owner.removeEventListener("scroll", update, true);
|
|
14465
|
+
owner.removeEventListener("pointerdown", outside, true);
|
|
14466
|
+
owner.removeEventListener("focusin", outside);
|
|
14467
|
+
win.removeEventListener("resize", update);
|
|
14468
|
+
};
|
|
14469
|
+
}, [editorRef, overlayRef, session.signal]);
|
|
14470
|
+
const content = geometry ? render({ ...session, rect: geometry.rect, editorElement: geometry.editor }) : null;
|
|
14471
|
+
if (!geometry || content == null || content === false) return null;
|
|
14472
|
+
return _chunkA3S3QKJNcjs.$.call(void 0,
|
|
14473
|
+
/* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
14474
|
+
"div",
|
|
14475
|
+
{
|
|
14476
|
+
ref: overlayRef,
|
|
14477
|
+
"data-xlsx-cell-editor-overlay": "",
|
|
14478
|
+
onPointerDown: (event) => {
|
|
14479
|
+
event.stopPropagation();
|
|
14480
|
+
const target = event.target;
|
|
14481
|
+
if (!target.closest('input, textarea, select, [contenteditable="true"]')) event.preventDefault();
|
|
14482
|
+
},
|
|
14483
|
+
onClick: (event) => event.stopPropagation(),
|
|
14484
|
+
onKeyDown: (event) => {
|
|
14485
|
+
event.stopPropagation();
|
|
14486
|
+
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
14487
|
+
event.preventDefault();
|
|
14488
|
+
session.cancel();
|
|
14489
|
+
}
|
|
14490
|
+
},
|
|
14491
|
+
style: { position: "fixed", ...geometry.rect, pointerEvents: "none", visibility: geometry.visible ? "visible" : "hidden", zIndex: 1e4 },
|
|
14492
|
+
children: content
|
|
14493
|
+
}
|
|
14494
|
+
),
|
|
14495
|
+
geometry.owner.body
|
|
14496
|
+
);
|
|
14497
|
+
}
|
|
14498
|
+
|
|
14499
|
+
// src/selection-popover.tsx
|
|
14500
|
+
function SelectionPopover({ context, suspended, viewportRef, getRects, render, onApply, focusGrid }) {
|
|
14501
|
+
const hostRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
14502
|
+
const controller = _chunkA3S3QKJNcjs.T.call(void 0, () => new AbortController(), []);
|
|
14503
|
+
const [closed, setClosed] = _chunkA3S3QKJNcjs.d.call(void 0, false);
|
|
14504
|
+
const [rect, setRect] = _chunkA3S3QKJNcjs.d.call(void 0, null);
|
|
14505
|
+
const latest = _chunkA3S3QKJNcjs.A.call(void 0, { getRects, onApply, context, focusGrid });
|
|
14506
|
+
latest.current = { getRects, onApply, context, focusGrid };
|
|
14507
|
+
const close = _chunkA3S3QKJNcjs.q.call(void 0, () => {
|
|
14508
|
+
controller.abort();
|
|
14509
|
+
setClosed(true);
|
|
14510
|
+
}, [controller]);
|
|
14511
|
+
_chunkA3S3QKJNcjs._.call(void 0, () => {
|
|
14512
|
+
if (suspended) close();
|
|
14513
|
+
}, [close, suspended]);
|
|
14514
|
+
const update = _chunkA3S3QKJNcjs.q.call(void 0, () => {
|
|
14515
|
+
const viewport = viewportRef.current;
|
|
14516
|
+
if (!viewport) return;
|
|
14517
|
+
const bounds = viewport.getBoundingClientRect();
|
|
14518
|
+
const win = viewport.ownerDocument.defaultView;
|
|
14519
|
+
const rects = latest.current.getRects().map((r) => ({
|
|
14520
|
+
left: Math.max(r.left, bounds.left, 0),
|
|
14521
|
+
top: Math.max(r.top, bounds.top, 0),
|
|
14522
|
+
right: Math.min(r.left + r.width, bounds.right, win.innerWidth),
|
|
14523
|
+
bottom: Math.min(r.top + r.height, bounds.bottom, win.innerHeight)
|
|
14524
|
+
})).filter((r) => r.right > r.left && r.bottom > r.top);
|
|
14525
|
+
const next = rects.length ? {
|
|
14526
|
+
left: Math.min(...rects.map((r) => r.left)),
|
|
14527
|
+
top: Math.min(...rects.map((r) => r.top)),
|
|
14528
|
+
width: Math.max(...rects.map((r) => r.right)) - Math.min(...rects.map((r) => r.left)),
|
|
14529
|
+
height: Math.max(...rects.map((r) => r.bottom)) - Math.min(...rects.map((r) => r.top))
|
|
14530
|
+
} : null;
|
|
14531
|
+
setRect((previous) => _optionalChain([previous, 'optionalAccess', _1093 => _1093.left]) === _optionalChain([next, 'optionalAccess', _1094 => _1094.left]) && _optionalChain([previous, 'optionalAccess', _1095 => _1095.top]) === _optionalChain([next, 'optionalAccess', _1096 => _1096.top]) && _optionalChain([previous, 'optionalAccess', _1097 => _1097.width]) === _optionalChain([next, 'optionalAccess', _1098 => _1098.width]) && _optionalChain([previous, 'optionalAccess', _1099 => _1099.height]) === _optionalChain([next, 'optionalAccess', _1100 => _1100.height]) ? previous : next);
|
|
14532
|
+
}, [viewportRef]);
|
|
14533
|
+
_chunkA3S3QKJNcjs._.call(void 0, update);
|
|
14534
|
+
_chunkA3S3QKJNcjs._.call(void 0, () => {
|
|
14535
|
+
const viewport = viewportRef.current;
|
|
14536
|
+
const owner = _optionalChain([viewport, 'optionalAccess', _1101 => _1101.ownerDocument]);
|
|
14537
|
+
const win = _optionalChain([owner, 'optionalAccess', _1102 => _1102.defaultView]);
|
|
14538
|
+
if (!viewport || !owner || !win) return;
|
|
14539
|
+
const outside = (event) => {
|
|
14540
|
+
if (!_optionalChain([hostRef, 'access', _1103 => _1103.current, 'optionalAccess', _1104 => _1104.contains, 'call', _1105 => _1105(event.target)])) close();
|
|
14541
|
+
};
|
|
14542
|
+
const observer = new ResizeObserver(update);
|
|
14543
|
+
observer.observe(viewport);
|
|
14544
|
+
owner.addEventListener("scroll", update, true);
|
|
14545
|
+
viewport.addEventListener("transitionend", update);
|
|
14546
|
+
owner.addEventListener("pointerdown", outside, true);
|
|
14547
|
+
win.addEventListener("resize", update);
|
|
14548
|
+
return () => {
|
|
14549
|
+
controller.abort();
|
|
14550
|
+
observer.disconnect();
|
|
14551
|
+
owner.removeEventListener("scroll", update, true);
|
|
14552
|
+
viewport.removeEventListener("transitionend", update);
|
|
14553
|
+
owner.removeEventListener("pointerdown", outside, true);
|
|
14554
|
+
win.removeEventListener("resize", update);
|
|
14555
|
+
};
|
|
14556
|
+
}, [close, controller, update, viewportRef]);
|
|
14557
|
+
const commit = _chunkA3S3QKJNcjs.q.call(void 0, (apply) => {
|
|
14558
|
+
if (controller.signal.aborted || latest.current.context.readOnly) return false;
|
|
14559
|
+
apply(latest.current.context);
|
|
14560
|
+
close();
|
|
14561
|
+
latest.current.focusGrid();
|
|
14562
|
+
return true;
|
|
14563
|
+
}, [close, controller]);
|
|
14564
|
+
const applyFormula = _chunkA3S3QKJNcjs.q.call(void 0, (formula) => commit(() => latest.current.onApply(formula)), [commit]);
|
|
14565
|
+
if (closed || suspended || !rect || !viewportRef.current) return null;
|
|
14566
|
+
const content = render({ context, rect, signal: controller.signal, applyFormula, commit, close });
|
|
14567
|
+
if (content == null || content === false) return null;
|
|
14568
|
+
return _chunkA3S3QKJNcjs.$.call(void 0,
|
|
14569
|
+
/* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
14570
|
+
"div",
|
|
14571
|
+
{
|
|
14572
|
+
ref: hostRef,
|
|
14573
|
+
"data-xlsx-selection-popover": "",
|
|
14574
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
14575
|
+
onClick: (event) => event.stopPropagation(),
|
|
14576
|
+
onDoubleClick: (event) => event.stopPropagation(),
|
|
14577
|
+
onKeyDown: (event) => {
|
|
14578
|
+
event.stopPropagation();
|
|
14579
|
+
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
14580
|
+
event.preventDefault();
|
|
14581
|
+
close();
|
|
14582
|
+
latest.current.focusGrid();
|
|
14583
|
+
}
|
|
14584
|
+
},
|
|
14585
|
+
style: { position: "fixed", ...rect, pointerEvents: "none", zIndex: 1e4 },
|
|
14586
|
+
children: content
|
|
14587
|
+
}
|
|
14588
|
+
),
|
|
14589
|
+
viewportRef.current.ownerDocument.body
|
|
14590
|
+
);
|
|
14591
|
+
}
|
|
14592
|
+
|
|
14593
|
+
// src/cell-editor-session.ts
|
|
14594
|
+
function useCellEditorSession({
|
|
14595
|
+
enabled,
|
|
14596
|
+
cell,
|
|
14597
|
+
sheetIndex,
|
|
14598
|
+
sheetName,
|
|
14599
|
+
originalValue,
|
|
14600
|
+
trigger,
|
|
14601
|
+
value,
|
|
14602
|
+
inputRef,
|
|
14603
|
+
isEditing,
|
|
14604
|
+
onChange,
|
|
14605
|
+
onCommit,
|
|
14606
|
+
onCancel
|
|
14607
|
+
}) {
|
|
14608
|
+
const state = _chunkA3S3QKJNcjs.T.call(void 0, () => enabled && cell ? {
|
|
14609
|
+
controller: new AbortController(),
|
|
14610
|
+
context: { cell: { ...cell }, sheetIndex, sheetName, originalValue, trigger },
|
|
14611
|
+
beforePreview: null
|
|
14612
|
+
} : null, [enabled, cell]);
|
|
14613
|
+
const latest = _chunkA3S3QKJNcjs.A.call(void 0, { state, sheetIndex, value, isEditing, onChange, onCommit, onCancel });
|
|
14614
|
+
latest.current = { state, sheetIndex, value, isEditing, onChange, onCommit, onCancel };
|
|
14615
|
+
const [, refresh] = _chunkA3S3QKJNcjs.y.call(void 0, (revision) => revision + 1, 0);
|
|
14616
|
+
_chunkA3S3QKJNcjs._.call(void 0, () => () => {
|
|
14617
|
+
_optionalChain([state, 'optionalAccess', _1106 => _1106.controller, 'access', _1107 => _1107.abort, 'call', _1108 => _1108()]);
|
|
14618
|
+
if (_optionalChain([state, 'optionalAccess', _1109 => _1109.beforePreview]) != null && latest.current.state === null && latest.current.isEditing()) {
|
|
14619
|
+
latest.current.onCancel();
|
|
14620
|
+
}
|
|
14621
|
+
}, [state]);
|
|
14622
|
+
_chunkA3S3QKJNcjs._.call(void 0, () => {
|
|
14623
|
+
if (state && state.context.sheetIndex !== sheetIndex) state.controller.abort();
|
|
14624
|
+
}, [state, sheetIndex]);
|
|
14625
|
+
const commands = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
14626
|
+
if (!state) return null;
|
|
14627
|
+
const current = () => latest.current.state === state && latest.current.sheetIndex === state.context.sheetIndex && !state.controller.signal.aborted && latest.current.isEditing();
|
|
14628
|
+
const setValue = (next) => {
|
|
14629
|
+
if (!current()) return false;
|
|
14630
|
+
latest.current.value = next;
|
|
14631
|
+
latest.current.onChange(next);
|
|
14632
|
+
return true;
|
|
14633
|
+
};
|
|
14634
|
+
const focus = () => {
|
|
14635
|
+
if (!current() || !inputRef.current) return false;
|
|
14636
|
+
inputRef.current.focus({ preventScroll: true });
|
|
14637
|
+
return true;
|
|
14638
|
+
};
|
|
14639
|
+
return {
|
|
14640
|
+
getValue: () => current() ? latest.current.value : null,
|
|
14641
|
+
setValue,
|
|
14642
|
+
focus,
|
|
14643
|
+
preview(next) {
|
|
14644
|
+
if (!current()) return false;
|
|
14645
|
+
state.beforePreview ??= latest.current.value;
|
|
14646
|
+
setValue(next);
|
|
14647
|
+
refresh();
|
|
14648
|
+
return true;
|
|
14649
|
+
},
|
|
14650
|
+
discardPreview() {
|
|
14651
|
+
if (!current() || state.beforePreview === null) return false;
|
|
14652
|
+
const previous = state.beforePreview;
|
|
14653
|
+
state.beforePreview = null;
|
|
14654
|
+
setValue(previous);
|
|
14655
|
+
refresh();
|
|
14656
|
+
focus();
|
|
14657
|
+
return true;
|
|
14658
|
+
},
|
|
14659
|
+
commit(next) {
|
|
14660
|
+
if (!current()) return false;
|
|
14661
|
+
state.controller.abort();
|
|
14662
|
+
latest.current.onCommit(_nullishCoalesce(next, () => ( latest.current.value)));
|
|
14663
|
+
return true;
|
|
14664
|
+
},
|
|
14665
|
+
cancel() {
|
|
14666
|
+
if (!current()) return false;
|
|
14667
|
+
state.controller.abort();
|
|
14668
|
+
latest.current.onCancel();
|
|
14669
|
+
return true;
|
|
14670
|
+
}
|
|
14671
|
+
};
|
|
14672
|
+
}, [state, inputRef]);
|
|
14673
|
+
const hasPreview = _chunkA3S3QKJNcjs.q.call(void 0, () => _optionalChain([latest, 'access', _1110 => _1110.current, 'access', _1111 => _1111.state, 'optionalAccess', _1112 => _1112.beforePreview]) != null, []);
|
|
14674
|
+
const session = state && commands && state.context.sheetIndex === sheetIndex ? {
|
|
14675
|
+
...commands,
|
|
14676
|
+
context: state.context,
|
|
14677
|
+
signal: state.controller.signal,
|
|
14678
|
+
value,
|
|
14679
|
+
isPreview: state.beforePreview !== null
|
|
14680
|
+
} : null;
|
|
14681
|
+
return { session, hasPreview };
|
|
14682
|
+
}
|
|
14683
|
+
|
|
14396
14684
|
// src/merged-range-lookup.ts
|
|
14397
14685
|
function createMergedRangeLookup(ranges) {
|
|
14398
14686
|
const normalizedRanges = [];
|
|
@@ -14423,11 +14711,11 @@ function createMergedRangeLookup(ranges) {
|
|
|
14423
14711
|
bounds: {
|
|
14424
14712
|
start: {
|
|
14425
14713
|
row: normalizedRanges[start].start.row,
|
|
14426
|
-
col: Math.min(range.start.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess',
|
|
14714
|
+
col: Math.min(range.start.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1113 => _1113.bounds, 'access', _1114 => _1114.start, 'access', _1115 => _1115.col]), () => ( Infinity)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1116 => _1116.bounds, 'access', _1117 => _1117.start, 'access', _1118 => _1118.col]), () => ( Infinity)))
|
|
14427
14715
|
},
|
|
14428
14716
|
end: {
|
|
14429
|
-
row: Math.max(range.end.row, _nullishCoalesce(_optionalChain([left, 'optionalAccess',
|
|
14430
|
-
col: Math.max(range.end.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess',
|
|
14717
|
+
row: Math.max(range.end.row, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1119 => _1119.bounds, 'access', _1120 => _1120.end, 'access', _1121 => _1121.row]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1122 => _1122.bounds, 'access', _1123 => _1123.end, 'access', _1124 => _1124.row]), () => ( -1))),
|
|
14718
|
+
col: Math.max(range.end.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1125 => _1125.bounds, 'access', _1126 => _1126.end, 'access', _1127 => _1127.col]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1128 => _1128.bounds, 'access', _1129 => _1129.end, 'access', _1130 => _1130.col]), () => ( -1)))
|
|
14431
14719
|
}
|
|
14432
14720
|
}
|
|
14433
14721
|
};
|
|
@@ -14564,6 +14852,7 @@ function XlsxContextMenu({
|
|
|
14564
14852
|
}) {
|
|
14565
14853
|
const { messages } = controller;
|
|
14566
14854
|
const rootRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
14855
|
+
const abortController = _chunkA3S3QKJNcjs.T.call(void 0, () => new AbortController(), []);
|
|
14567
14856
|
const controllerRef = _chunkA3S3QKJNcjs.A.call(void 0, controller);
|
|
14568
14857
|
controllerRef.current = controller;
|
|
14569
14858
|
const aliveRef = _chunkA3S3QKJNcjs.A.call(void 0, true);
|
|
@@ -14574,7 +14863,7 @@ function XlsxContextMenu({
|
|
|
14574
14863
|
const [location, setLocation] = _chunkA3S3QKJNcjs.d.call(void 0, position);
|
|
14575
14864
|
const modifier = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform) ? "\u2318" : "Ctrl+";
|
|
14576
14865
|
const table = controller.tables.find(({ start, end }) => context.cell.row >= start.row && context.cell.row <= end.row && context.cell.col >= start.col && context.cell.col <= end.col);
|
|
14577
|
-
const range = expandHighlightedRange(context.selection, _nullishCoalesce(_optionalChain([controller, 'access',
|
|
14866
|
+
const range = expandHighlightedRange(context.selection, _nullishCoalesce(_optionalChain([controller, 'access', _1131 => _1131.activeSheet, 'optionalAccess', _1132 => _1132.mergedRanges]), () => ( [])));
|
|
14578
14867
|
const multiple = range.start.row !== range.end.row || range.start.col !== range.end.col;
|
|
14579
14868
|
const actions = [
|
|
14580
14869
|
...!controller.readOnly ? [{ id: "cut", label: messages.cut }] : [],
|
|
@@ -14617,7 +14906,7 @@ function XlsxContextMenu({
|
|
|
14617
14906
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
14618
14907
|
aliveRef.current = true;
|
|
14619
14908
|
const outside = (event) => {
|
|
14620
|
-
if (!_optionalChain([rootRef, 'access',
|
|
14909
|
+
if (!_optionalChain([rootRef, 'access', _1133 => _1133.current, 'optionalAccess', _1134 => _1134.contains, 'call', _1135 => _1135(event.target)])) closeMenu(false);
|
|
14621
14910
|
};
|
|
14622
14911
|
const dismiss = () => closeMenu(false);
|
|
14623
14912
|
document.addEventListener("pointerdown", outside, true);
|
|
@@ -14627,13 +14916,14 @@ function XlsxContextMenu({
|
|
|
14627
14916
|
window.addEventListener("blur", dismiss);
|
|
14628
14917
|
return () => {
|
|
14629
14918
|
aliveRef.current = false;
|
|
14919
|
+
abortController.abort();
|
|
14630
14920
|
document.removeEventListener("pointerdown", outside, true);
|
|
14631
14921
|
document.removeEventListener("focusin", outside);
|
|
14632
14922
|
document.removeEventListener("scroll", outside, true);
|
|
14633
14923
|
window.removeEventListener("resize", dismiss);
|
|
14634
14924
|
window.removeEventListener("blur", dismiss);
|
|
14635
14925
|
};
|
|
14636
|
-
}, [closeMenu]);
|
|
14926
|
+
}, [abortController, closeMenu]);
|
|
14637
14927
|
const runAction = async (id) => {
|
|
14638
14928
|
const action = actions.find((item) => item.id === id);
|
|
14639
14929
|
if (!aliveRef.current || runningRef.current || !action || action.disabled) return false;
|
|
@@ -14747,7 +15037,17 @@ function XlsxContextMenu({
|
|
|
14747
15037
|
}
|
|
14748
15038
|
)
|
|
14749
15039
|
] }, action.id));
|
|
14750
|
-
const
|
|
15040
|
+
const close = () => {
|
|
15041
|
+
abortController.abort();
|
|
15042
|
+
closeMenu();
|
|
15043
|
+
};
|
|
15044
|
+
const commit = (apply) => {
|
|
15045
|
+
if (!aliveRef.current || abortController.signal.aborted || controllerRef.current.readOnly || controllerRef.current.workbook !== controller.workbook || controllerRef.current.activeSheetIndex !== context.sheetIndex || controllerRef.current.selection !== controller.selection || controllerRef.current.revision !== controller.revision) return false;
|
|
15046
|
+
apply(context);
|
|
15047
|
+
close();
|
|
15048
|
+
return true;
|
|
15049
|
+
};
|
|
15050
|
+
const content = renderContextMenu ? renderContextMenu({ context, actions, runAction, closeMenu: close, signal: abortController.signal, commit, position: location, isDark: isDarkViewerPalette(palette), busy, error, defaultNode }) : defaultNode;
|
|
14751
15051
|
return _chunkA3S3QKJNcjs.$.call(void 0,
|
|
14752
15052
|
/* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
14753
15053
|
"div",
|
|
@@ -14766,7 +15066,7 @@ function XlsxContextMenu({
|
|
|
14766
15066
|
closeMenu();
|
|
14767
15067
|
return;
|
|
14768
15068
|
}
|
|
14769
|
-
const items = Array.from(_nullishCoalesce(_optionalChain([rootRef, 'access',
|
|
15069
|
+
const items = Array.from(_nullishCoalesce(_optionalChain([rootRef, 'access', _1136 => _1136.current, 'optionalAccess', _1137 => _1137.querySelectorAll, 'call', _1138 => _1138('[role="menuitem"]:not(:disabled):not([aria-disabled="true"])')]), () => ( [])));
|
|
14770
15070
|
const current = items.indexOf(document.activeElement);
|
|
14771
15071
|
let next;
|
|
14772
15072
|
if (event.key === "ArrowDown") next = (current + 1) % items.length;
|
|
@@ -14775,7 +15075,7 @@ function XlsxContextMenu({
|
|
|
14775
15075
|
if (event.key === "End") next = items.length - 1;
|
|
14776
15076
|
if (next !== void 0) {
|
|
14777
15077
|
event.preventDefault();
|
|
14778
|
-
_optionalChain([items, 'access',
|
|
15078
|
+
_optionalChain([items, 'access', _1139 => _1139[next], 'optionalAccess', _1140 => _1140.focus, 'call', _1141 => _1141()]);
|
|
14779
15079
|
}
|
|
14780
15080
|
},
|
|
14781
15081
|
ref: rootRef,
|
|
@@ -14862,7 +15162,7 @@ function preloadChartRenderers(chartsBySheet, experimentalOfficeCharts) {
|
|
|
14862
15162
|
for (const chart of charts) {
|
|
14863
15163
|
const source = chart.renderSource;
|
|
14864
15164
|
hasSharedCharts ||= Boolean(source && !source.experimental);
|
|
14865
|
-
hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess',
|
|
15165
|
+
hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess', _1142 => _1142.experimental]));
|
|
14866
15166
|
}
|
|
14867
15167
|
}
|
|
14868
15168
|
if (experimentalOfficeCharts && (hasExtendedCharts || hasSharedCharts)) void suppliedOfficeChartRenderer.load().catch(() => {
|
|
@@ -15560,7 +15860,7 @@ function parseCanvasGradientStops(value) {
|
|
|
15560
15860
|
if (!match) {
|
|
15561
15861
|
return null;
|
|
15562
15862
|
}
|
|
15563
|
-
const color = _optionalChain([match, 'access',
|
|
15863
|
+
const color = _optionalChain([match, 'access', _1143 => _1143[1], 'optionalAccess', _1144 => _1144.trim, 'call', _1145 => _1145()]);
|
|
15564
15864
|
const percent = match[2] ? Number.parseFloat(match[2]) : Number.NaN;
|
|
15565
15865
|
if (!color) {
|
|
15566
15866
|
return null;
|
|
@@ -15576,7 +15876,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
|
|
|
15576
15876
|
if (linearMatch) {
|
|
15577
15877
|
const parts = splitCssGradientArgs(_nullishCoalesce(linearMatch[1], () => ( "")));
|
|
15578
15878
|
if (parts.length >= 2) {
|
|
15579
|
-
const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access',
|
|
15879
|
+
const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _1146 => _1146[0], 'optionalAccess', _1147 => _1147.trim, 'call', _1148 => _1148()]), () => ( "180deg"));
|
|
15580
15880
|
const angleMatch = rawAngle.match(/(-?\d*\.?\d+)deg/i);
|
|
15581
15881
|
const cssAngle = angleMatch ? Number.parseFloat(_nullishCoalesce(angleMatch[1], () => ( "180"))) : 180;
|
|
15582
15882
|
const radians = (90 - cssAngle) * Math.PI / 180;
|
|
@@ -15606,7 +15906,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
|
|
|
15606
15906
|
const radialMatch = backgroundImage.match(/^radial-gradient\((.*)\)$/i);
|
|
15607
15907
|
if (radialMatch) {
|
|
15608
15908
|
const parts = splitCssGradientArgs(_nullishCoalesce(radialMatch[1], () => ( "")));
|
|
15609
|
-
const stopParts = _optionalChain([parts, 'access',
|
|
15909
|
+
const stopParts = _optionalChain([parts, 'access', _1149 => _1149[0], 'optionalAccess', _1150 => _1150.startsWith, 'call', _1151 => _1151("circle")]) ? parts.slice(1) : parts;
|
|
15610
15910
|
const gradient = context.createRadialGradient(
|
|
15611
15911
|
rect.left + rect.width / 2,
|
|
15612
15912
|
rect.top + rect.height / 2,
|
|
@@ -15784,7 +16084,7 @@ function resolveDarkModeSurface(themePalette, palette) {
|
|
|
15784
16084
|
return "hsl(225 4% 6%)";
|
|
15785
16085
|
}
|
|
15786
16086
|
function resolveSheetSurface(sheet, palette) {
|
|
15787
|
-
return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess',
|
|
16087
|
+
return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _1152 => _1152.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1153 => _1153.themePalette, 'access', _1154 => _1154.colorsByIndex, 'access', _1155 => _1155[0]]), () => ( SHEET_SURFACE));
|
|
15788
16088
|
}
|
|
15789
16089
|
function normalizeRange2(range) {
|
|
15790
16090
|
return {
|
|
@@ -15983,7 +16283,7 @@ function buildVisibleAxisIndices(precomputed, displayLimit, maxUsedIndex, hidden
|
|
|
15983
16283
|
const visible2 = [];
|
|
15984
16284
|
const usedLimit = Math.min(displayLimit, Math.max(0, maxUsedIndex + 1));
|
|
15985
16285
|
for (let index = 0; index < usedLimit; index += 1) {
|
|
15986
|
-
if (!_optionalChain([hiddenIndices, 'optionalAccess',
|
|
16286
|
+
if (!_optionalChain([hiddenIndices, 'optionalAccess', _1156 => _1156.has, 'call', _1157 => _1157(index)])) {
|
|
15987
16287
|
visible2.push(index);
|
|
15988
16288
|
}
|
|
15989
16289
|
}
|
|
@@ -16017,31 +16317,31 @@ function resolveAxisStartOffset(actualIndex, actualIndices, sizes, indexByActual
|
|
|
16017
16317
|
if (actualPrefixSums && actualIndex >= 0 && actualIndex < actualPrefixSums.length) {
|
|
16018
16318
|
return _nullishCoalesce(actualPrefixSums[actualIndex], () => ( 0));
|
|
16019
16319
|
}
|
|
16020
|
-
const visibleIndex = _optionalChain([indexByActual, 'optionalAccess',
|
|
16320
|
+
const visibleIndex = _optionalChain([indexByActual, 'optionalAccess', _1158 => _1158.get, 'call', _1159 => _1159(actualIndex)]);
|
|
16021
16321
|
if (visibleIndex !== void 0 && prefixSums) {
|
|
16022
16322
|
return _nullishCoalesce(prefixSums[visibleIndex], () => ( 0));
|
|
16023
16323
|
}
|
|
16024
16324
|
return sumBeforeActualIndex(actualIndices, sizes, actualIndex);
|
|
16025
16325
|
}
|
|
16026
16326
|
function resolveAnchoredRect(anchor, visibleRows, visibleCols, rowHeights, colWidths, options) {
|
|
16027
|
-
const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16028
|
-
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16029
|
-
const anchorZoomFactor = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16327
|
+
const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1160 => _1160.headerHeight]), () => ( HEADER_HEIGHT));
|
|
16328
|
+
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1161 => _1161.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
|
|
16329
|
+
const anchorZoomFactor = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1162 => _1162.zoomFactor]), () => ( 1));
|
|
16030
16330
|
const resolveMarkerLeft = (col, colOffsetEmu) => rowHeaderWidth + resolveAxisStartOffset(
|
|
16031
16331
|
col,
|
|
16032
16332
|
visibleCols,
|
|
16033
16333
|
colWidths,
|
|
16034
|
-
_optionalChain([options, 'optionalAccess',
|
|
16035
|
-
_optionalChain([options, 'optionalAccess',
|
|
16036
|
-
_optionalChain([options, 'optionalAccess',
|
|
16334
|
+
_optionalChain([options, 'optionalAccess', _1163 => _1163.colIndexByActual]),
|
|
16335
|
+
_optionalChain([options, 'optionalAccess', _1164 => _1164.colPrefixSums]),
|
|
16336
|
+
_optionalChain([options, 'optionalAccess', _1165 => _1165.actualColPrefixSums])
|
|
16037
16337
|
) + emuToPixels(colOffsetEmu) * anchorZoomFactor;
|
|
16038
16338
|
const resolveMarkerTop = (row, rowOffsetEmu) => headerHeight + resolveAxisStartOffset(
|
|
16039
16339
|
row,
|
|
16040
16340
|
visibleRows,
|
|
16041
16341
|
rowHeights,
|
|
16042
|
-
_optionalChain([options, 'optionalAccess',
|
|
16043
|
-
_optionalChain([options, 'optionalAccess',
|
|
16044
|
-
_optionalChain([options, 'optionalAccess',
|
|
16342
|
+
_optionalChain([options, 'optionalAccess', _1166 => _1166.rowIndexByActual]),
|
|
16343
|
+
_optionalChain([options, 'optionalAccess', _1167 => _1167.rowPrefixSums]),
|
|
16344
|
+
_optionalChain([options, 'optionalAccess', _1168 => _1168.actualRowPrefixSums])
|
|
16045
16345
|
) + emuToPixels(rowOffsetEmu) * anchorZoomFactor;
|
|
16046
16346
|
if (anchor.kind === "absolute") {
|
|
16047
16347
|
return {
|
|
@@ -16128,15 +16428,15 @@ function rectIntersectsViewport(rect, viewport, overscan = 240) {
|
|
|
16128
16428
|
return rectRight >= viewportLeft && rect.left <= viewportRight && rectBottom >= viewportTop && rect.top <= viewportBottom;
|
|
16129
16429
|
}
|
|
16130
16430
|
function resolveFrozenDrawingPane(rect, frozenRows, frozenCols, actualRowHeights, actualColWidths, freezePanes, stickyTopByRow, stickyLeftByCol, options) {
|
|
16131
|
-
const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16132
|
-
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16133
|
-
const defaultRowHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16134
|
-
const defaultColWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16135
|
-
const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess',
|
|
16431
|
+
const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1169 => _1169.headerHeight]), () => ( HEADER_HEIGHT));
|
|
16432
|
+
const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1170 => _1170.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
|
|
16433
|
+
const defaultRowHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1171 => _1171.defaultRowHeight]), () => ( DEFAULT_ROW_HEIGHT2));
|
|
16434
|
+
const defaultColWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1172 => _1172.defaultColWidth]), () => ( DEFAULT_COL_WIDTH2));
|
|
16435
|
+
const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess', _1173 => _1173.row]) && freezePanes.row > 0 && frozenRows.length > 0 ? frozenRows.reduce(
|
|
16136
16436
|
(max, row) => Math.max(max, (_nullishCoalesce(stickyTopByRow.get(row), () => ( headerHeight))) + (_nullishCoalesce(actualRowHeights[row], () => ( defaultRowHeight)))),
|
|
16137
16437
|
headerHeight
|
|
16138
16438
|
) : null;
|
|
16139
|
-
const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess',
|
|
16439
|
+
const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess', _1174 => _1174.col]) && freezePanes.col > 0 && frozenCols.length > 0 ? frozenCols.reduce(
|
|
16140
16440
|
(max, col) => Math.max(max, (_nullishCoalesce(stickyLeftByCol.get(col), () => ( rowHeaderWidth))) + (_nullishCoalesce(actualColWidths[col], () => ( defaultColWidth)))),
|
|
16141
16441
|
rowHeaderWidth
|
|
16142
16442
|
) : null;
|
|
@@ -16154,9 +16454,9 @@ function resolveFrozenDrawingPane(rect, frozenRows, frozenCols, actualRowHeights
|
|
|
16154
16454
|
return "scroll";
|
|
16155
16455
|
}
|
|
16156
16456
|
function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
16157
|
-
const borderWidth = _optionalChain([shape, 'access',
|
|
16158
|
-
const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access',
|
|
16159
|
-
const fillColor = _optionalChain([shape, 'access',
|
|
16457
|
+
const borderWidth = _optionalChain([shape, 'access', _1175 => _1175.stroke, 'optionalAccess', _1176 => _1176.none]) ? 0 : Math.max(0, _nullishCoalesce(_optionalChain([shape, 'access', _1177 => _1177.stroke, 'optionalAccess', _1178 => _1178.widthPx]), () => ( 0))) * viewerScale;
|
|
16458
|
+
const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access', _1179 => _1179.stroke, 'optionalAccess', _1180 => _1180.color]), () => ( "transparent"));
|
|
16459
|
+
const fillColor = _optionalChain([shape, 'access', _1181 => _1181.fill, 'optionalAccess', _1182 => _1182.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1183 => _1183.fill, 'optionalAccess', _1184 => _1184.color]), () => ( "transparent"));
|
|
16160
16460
|
const hasVisibleText = shape.paragraphs.some((paragraph) => paragraph.runs.some((run) => run.text.trim().length > 0));
|
|
16161
16461
|
const transformParts = [
|
|
16162
16462
|
shape.rotationDeg ? `rotate(${shape.rotationDeg}deg)` : "",
|
|
@@ -16170,7 +16470,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
|
16170
16470
|
borderRadius = 12 * viewerScale;
|
|
16171
16471
|
}
|
|
16172
16472
|
return {
|
|
16173
|
-
alignItems: _optionalChain([shape, 'access',
|
|
16473
|
+
alignItems: _optionalChain([shape, 'access', _1185 => _1185.textBox, 'optionalAccess', _1186 => _1186.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1187 => _1187.textBox, 'optionalAccess', _1188 => _1188.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
|
|
16174
16474
|
backgroundColor: fillColor,
|
|
16175
16475
|
border: borderWidth > 0 ? `${borderWidth}px solid ${strokeColor}` : "none",
|
|
16176
16476
|
borderRadius,
|
|
@@ -16180,7 +16480,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
|
|
|
16180
16480
|
height: rect.height,
|
|
16181
16481
|
justifyContent: "flex-start",
|
|
16182
16482
|
left: rect.left,
|
|
16183
|
-
opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access',
|
|
16483
|
+
opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1189 => _1189.fill, 'optionalAccess', _1190 => _1190.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1191 => _1191.stroke, 'optionalAccess', _1192 => _1192.opacity]), () => ( 1))),
|
|
16184
16484
|
overflow: hasVisibleText ? "hidden" : "visible",
|
|
16185
16485
|
position: "absolute",
|
|
16186
16486
|
top: rect.top,
|
|
@@ -16197,7 +16497,7 @@ function clampPercent(value, fallback) {
|
|
|
16197
16497
|
return Math.max(0, Math.min(100, value));
|
|
16198
16498
|
}
|
|
16199
16499
|
function resolveShapeAdjustment(shape, name, fallback) {
|
|
16200
|
-
const rawValue = _optionalChain([shape, 'access',
|
|
16500
|
+
const rawValue = _optionalChain([shape, 'access', _1193 => _1193.geometryAdjustments, 'optionalAccess', _1194 => _1194[name]]);
|
|
16201
16501
|
if (typeof rawValue !== "number") {
|
|
16202
16502
|
return fallback;
|
|
16203
16503
|
}
|
|
@@ -17134,9 +17434,9 @@ function renderShapeParagraph(paragraph, index, fallbackAlign = "left", textScal
|
|
|
17134
17434
|
);
|
|
17135
17435
|
}
|
|
17136
17436
|
function clampImageRect(rect, options) {
|
|
17137
|
-
const contentOffsetLeft = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17138
|
-
const contentOffsetTop = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17139
|
-
const minSizePx = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17437
|
+
const contentOffsetLeft = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1195 => _1195.contentOffsetLeft]), () => ( ROW_HEADER_WIDTH));
|
|
17438
|
+
const contentOffsetTop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1196 => _1196.contentOffsetTop]), () => ( HEADER_HEIGHT));
|
|
17439
|
+
const minSizePx = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1197 => _1197.minSizePx]), () => ( IMAGE_MIN_SIZE_PX));
|
|
17140
17440
|
return {
|
|
17141
17441
|
height: Math.max(minSizePx, rect.height),
|
|
17142
17442
|
left: Math.max(contentOffsetLeft, rect.left),
|
|
@@ -17387,24 +17687,24 @@ function escapeCssFontFamily(name) {
|
|
|
17387
17687
|
return /[\s"'(),]/.test(name) ? `"${name.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : name;
|
|
17388
17688
|
}
|
|
17389
17689
|
function resolveSpreadsheetThemeFont(font, themePalette) {
|
|
17390
|
-
const scheme = typeof _optionalChain([font, 'optionalAccess',
|
|
17690
|
+
const scheme = typeof _optionalChain([font, 'optionalAccess', _1198 => _1198.scheme]) === "string" ? font.scheme : null;
|
|
17391
17691
|
if (scheme === "major") {
|
|
17392
|
-
return _optionalChain([themePalette, 'optionalAccess',
|
|
17692
|
+
return _optionalChain([themePalette, 'optionalAccess', _1199 => _1199.majorLatinFont]);
|
|
17393
17693
|
}
|
|
17394
17694
|
if (scheme === "minor") {
|
|
17395
|
-
return _optionalChain([themePalette, 'optionalAccess',
|
|
17695
|
+
return _optionalChain([themePalette, 'optionalAccess', _1200 => _1200.minorLatinFont]);
|
|
17396
17696
|
}
|
|
17397
17697
|
return void 0;
|
|
17398
17698
|
}
|
|
17399
17699
|
function buildSpreadsheetFontFamily(font, themePalette) {
|
|
17400
17700
|
const candidates = [
|
|
17401
|
-
typeof _optionalChain([font, 'optionalAccess',
|
|
17402
|
-
_nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call',
|
|
17701
|
+
typeof _optionalChain([font, 'optionalAccess', _1201 => _1201.name]) === "string" ? font.name.trim() : "",
|
|
17702
|
+
_nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _1202 => _1202(font, themePalette), 'optionalAccess', _1203 => _1203.trim, 'call', _1204 => _1204()]), () => ( ""))
|
|
17403
17703
|
].filter((value, index, array) => value.length > 0 && array.indexOf(value) === index);
|
|
17404
17704
|
if (candidates.length === 0) {
|
|
17405
17705
|
return void 0;
|
|
17406
17706
|
}
|
|
17407
|
-
const primaryFont = _optionalChain([candidates, 'access',
|
|
17707
|
+
const primaryFont = _optionalChain([candidates, 'access', _1205 => _1205[0], 'optionalAccess', _1206 => _1206.toLowerCase, 'call', _1207 => _1207()]);
|
|
17408
17708
|
if (primaryFont === "calibri") {
|
|
17409
17709
|
return [
|
|
17410
17710
|
"Calibri",
|
|
@@ -17437,17 +17737,17 @@ function resolveSpreadsheetLineHeight(fontSizePt) {
|
|
|
17437
17737
|
}
|
|
17438
17738
|
function buildGridlineShadow(color, options) {
|
|
17439
17739
|
const parts = [];
|
|
17440
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
17740
|
+
if (_optionalChain([options, 'optionalAccess', _1208 => _1208.right]) !== false) {
|
|
17441
17741
|
parts.push(`inset -1px 0 0 ${color}`);
|
|
17442
17742
|
}
|
|
17443
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
17743
|
+
if (_optionalChain([options, 'optionalAccess', _1209 => _1209.bottom]) !== false) {
|
|
17444
17744
|
parts.push(`inset 0 -1px 0 ${color}`);
|
|
17445
17745
|
}
|
|
17446
17746
|
return parts.join(", ");
|
|
17447
17747
|
}
|
|
17448
17748
|
function buildCellStyle(style, palette, themePalette, options) {
|
|
17449
|
-
const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17450
|
-
const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess',
|
|
17749
|
+
const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1210 => _1210.showGridLines]), () => ( true));
|
|
17750
|
+
const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _1211 => _1211.colorsByIndex, 'access', _1212 => _1212[0]]), () => ( SHEET_SURFACE));
|
|
17451
17751
|
const gridlineShadow = showGridLines ? buildGridlineShadow(palette.border) : void 0;
|
|
17452
17752
|
const css = {
|
|
17453
17753
|
backgroundColor: baseSurface,
|
|
@@ -17460,7 +17760,7 @@ function buildCellStyle(style, palette, themePalette, options) {
|
|
|
17460
17760
|
lineHeight: String(resolveSpreadsheetLineHeight(11)),
|
|
17461
17761
|
overflow: "hidden",
|
|
17462
17762
|
padding: DEFAULT_CELL_PADDING,
|
|
17463
|
-
textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17763
|
+
textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1213 => _1213.generalAlignment]), () => ( "left")),
|
|
17464
17764
|
textOverflow: "clip",
|
|
17465
17765
|
verticalAlign: "bottom",
|
|
17466
17766
|
whiteSpace: "nowrap"
|
|
@@ -17544,24 +17844,24 @@ function buildCellStyle(style, palette, themePalette, options) {
|
|
|
17544
17844
|
}
|
|
17545
17845
|
const border = style.border;
|
|
17546
17846
|
if (border) {
|
|
17547
|
-
const hasRightBorder = Boolean(_optionalChain([border, 'access',
|
|
17548
|
-
const hasBottomBorder = Boolean(_optionalChain([border, 'access',
|
|
17847
|
+
const hasRightBorder = Boolean(_optionalChain([border, 'access', _1214 => _1214.right, 'optionalAccess', _1215 => _1215.style]) && border.right.style !== "none");
|
|
17848
|
+
const hasBottomBorder = Boolean(_optionalChain([border, 'access', _1216 => _1216.bottom, 'optionalAccess', _1217 => _1217.style]) && border.bottom.style !== "none");
|
|
17549
17849
|
if (showGridLines && (hasRightBorder || hasBottomBorder)) {
|
|
17550
17850
|
css.boxShadow = buildGridlineShadow(palette.border, {
|
|
17551
17851
|
bottom: !hasBottomBorder,
|
|
17552
17852
|
right: !hasRightBorder
|
|
17553
17853
|
}) || void 0;
|
|
17554
17854
|
}
|
|
17555
|
-
if (_optionalChain([border, 'access',
|
|
17855
|
+
if (_optionalChain([border, 'access', _1218 => _1218.top, 'optionalAccess', _1219 => _1219.style]) && border.top.style !== "none") {
|
|
17556
17856
|
css.borderTop = mapBorder2(border.top, themePalette);
|
|
17557
17857
|
}
|
|
17558
|
-
if (_optionalChain([border, 'access',
|
|
17858
|
+
if (_optionalChain([border, 'access', _1220 => _1220.right, 'optionalAccess', _1221 => _1221.style]) && border.right.style !== "none") {
|
|
17559
17859
|
css.borderRight = mapBorder2(border.right, themePalette);
|
|
17560
17860
|
}
|
|
17561
|
-
if (_optionalChain([border, 'access',
|
|
17861
|
+
if (_optionalChain([border, 'access', _1222 => _1222.bottom, 'optionalAccess', _1223 => _1223.style]) && border.bottom.style !== "none") {
|
|
17562
17862
|
css.borderBottom = mapBorder2(border.bottom, themePalette);
|
|
17563
17863
|
}
|
|
17564
|
-
if (_optionalChain([border, 'access',
|
|
17864
|
+
if (_optionalChain([border, 'access', _1224 => _1224.left, 'optionalAccess', _1225 => _1225.style]) && border.left.style !== "none") {
|
|
17565
17865
|
css.borderLeft = mapBorder2(border.left, themePalette);
|
|
17566
17866
|
}
|
|
17567
17867
|
}
|
|
@@ -17640,7 +17940,7 @@ function canReceiveOverflowText(data) {
|
|
|
17640
17940
|
}
|
|
17641
17941
|
function getCellDisplayValue(worksheet, row, col, activeSheet, locale = "en-US") {
|
|
17642
17942
|
const formula = worksheet.getFormulaAt(row, col);
|
|
17643
|
-
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess',
|
|
17943
|
+
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1226 => _1226.cachedFormulaValues, 'optionalAccess', _1227 => _1227[cellAddressToA12({ row, col })]]) : void 0;
|
|
17644
17944
|
const formatted = worksheet.getFormattedValueAt(row, col);
|
|
17645
17945
|
if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
|
|
17646
17946
|
return localizeCellNumber(worksheet, row, col, decodeHtmlEntities2(formatted), locale);
|
|
@@ -17753,13 +18053,13 @@ function resolveChartFormulaRange(formula, fallbackSheetIndex, sheets, workbook)
|
|
|
17753
18053
|
}
|
|
17754
18054
|
}
|
|
17755
18055
|
const split = splitSheetFormulaReference(reference);
|
|
17756
|
-
const range = parseA1RangeReference3((_nullishCoalesce(_optionalChain([split, 'optionalAccess',
|
|
18056
|
+
const range = parseA1RangeReference3((_nullishCoalesce(_optionalChain([split, 'optionalAccess', _1228 => _1228.range]), () => ( reference))).replace(/\$/g, ""));
|
|
17757
18057
|
if (!range) {
|
|
17758
18058
|
return null;
|
|
17759
18059
|
}
|
|
17760
18060
|
let workbookSheetIndex = fallbackSheetIndex;
|
|
17761
|
-
if (_optionalChain([split, 'optionalAccess',
|
|
17762
|
-
const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess',
|
|
18061
|
+
if (_optionalChain([split, 'optionalAccess', _1229 => _1229.sheetName])) {
|
|
18062
|
+
const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess', _1230 => _1230.sheetIndex, 'call', _1231 => _1231(split.sheetName)]);
|
|
17763
18063
|
if (typeof workbookResolvedIndex === "number" && Number.isInteger(workbookResolvedIndex) && workbookResolvedIndex >= 0) {
|
|
17764
18064
|
workbookSheetIndex = workbookResolvedIndex;
|
|
17765
18065
|
} else {
|
|
@@ -17780,26 +18080,26 @@ function collectChartRangeHighlights(chart, selectedElement, sheets, workbook, i
|
|
|
17780
18080
|
}
|
|
17781
18081
|
const highlights = [];
|
|
17782
18082
|
const seenRanges = /* @__PURE__ */ new Set();
|
|
17783
|
-
const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess',
|
|
18083
|
+
const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess', _1232 => _1232.chartId]) === chart.id && selectedElement.kind !== "chart" && selectedElement.kind !== "legend" ? selectedElement.seriesIndex : null;
|
|
17784
18084
|
const seriesEntries = chart.series.map((series, seriesIndex) => ({ series, seriesIndex })).filter(({ series, seriesIndex }) => series.hidden !== true && (selectedSeriesIndex == null || seriesIndex === selectedSeriesIndex));
|
|
17785
18085
|
const references = seriesEntries.flatMap(({ series, seriesIndex }) => [
|
|
17786
18086
|
{
|
|
17787
|
-
formula: typeof _optionalChain([series, 'access',
|
|
18087
|
+
formula: typeof _optionalChain([series, 'access', _1233 => _1233.raw, 'optionalAccess', _1234 => _1234.name]) === "string" ? series.raw.name : void 0,
|
|
17788
18088
|
role: "name",
|
|
17789
18089
|
seriesIndex
|
|
17790
18090
|
},
|
|
17791
18091
|
{
|
|
17792
|
-
formula: _optionalChain([series, 'access',
|
|
18092
|
+
formula: _optionalChain([series, 'access', _1235 => _1235.categoriesRef, 'optionalAccess', _1236 => _1236.formula]),
|
|
17793
18093
|
role: "category",
|
|
17794
18094
|
seriesIndex
|
|
17795
18095
|
},
|
|
17796
18096
|
{
|
|
17797
|
-
formula: _optionalChain([series, 'access',
|
|
18097
|
+
formula: _optionalChain([series, 'access', _1237 => _1237.valuesRef, 'optionalAccess', _1238 => _1238.formula]),
|
|
17798
18098
|
role: "value",
|
|
17799
18099
|
seriesIndex
|
|
17800
18100
|
},
|
|
17801
18101
|
{
|
|
17802
|
-
formula: _optionalChain([series, 'access',
|
|
18102
|
+
formula: _optionalChain([series, 'access', _1239 => _1239.bubbleSizeRef, 'optionalAccess', _1240 => _1240.formula]),
|
|
17803
18103
|
role: "bubble",
|
|
17804
18104
|
seriesIndex
|
|
17805
18105
|
}
|
|
@@ -17971,7 +18271,7 @@ function normalizeBatchedMergeSpan(value) {
|
|
|
17971
18271
|
}
|
|
17972
18272
|
function normalizeBatchedCellValue(rawValue, formula, row, col, activeSheet) {
|
|
17973
18273
|
const value = typeof rawValue === "string" ? decodeHtmlEntities2(rawValue) : rawValue === null || rawValue === void 0 ? "" : String(rawValue);
|
|
17974
|
-
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess',
|
|
18274
|
+
const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1241 => _1241.cachedFormulaValues, 'optionalAccess', _1242 => _1242[cellAddressToA12({ row, col })]]) : void 0;
|
|
17975
18275
|
if (formula && cachedFormulaValue !== void 0 && value.startsWith("#")) {
|
|
17976
18276
|
return cachedFormulaValue;
|
|
17977
18277
|
}
|
|
@@ -18023,31 +18323,31 @@ function mergeResolvedCellStyle(base, overlay, options) {
|
|
|
18023
18323
|
..._nullishCoalesce(base, () => ( {})),
|
|
18024
18324
|
..._nullishCoalesce(overlay, () => ( {}))
|
|
18025
18325
|
};
|
|
18026
|
-
const baseAlignment = _optionalChain([base, 'optionalAccess',
|
|
18027
|
-
const overlayAlignment = _optionalChain([overlay, 'optionalAccess',
|
|
18326
|
+
const baseAlignment = _optionalChain([base, 'optionalAccess', _1243 => _1243.alignment]);
|
|
18327
|
+
const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _1244 => _1244.alignment]);
|
|
18028
18328
|
if (baseAlignment || overlayAlignment) {
|
|
18029
18329
|
nextStyle.alignment = {
|
|
18030
18330
|
..._nullishCoalesce(baseAlignment, () => ( {})),
|
|
18031
18331
|
..._nullishCoalesce(overlayAlignment, () => ( {}))
|
|
18032
18332
|
};
|
|
18033
18333
|
}
|
|
18034
|
-
const baseBorder = _optionalChain([base, 'optionalAccess',
|
|
18035
|
-
const overlayBorder = _optionalChain([overlay, 'optionalAccess',
|
|
18334
|
+
const baseBorder = _optionalChain([base, 'optionalAccess', _1245 => _1245.border]);
|
|
18335
|
+
const overlayBorder = _optionalChain([overlay, 'optionalAccess', _1246 => _1246.border]);
|
|
18036
18336
|
if (baseBorder || overlayBorder) {
|
|
18037
|
-
nextStyle.border = _optionalChain([options, 'optionalAccess',
|
|
18337
|
+
nextStyle.border = _optionalChain([options, 'optionalAccess', _1247 => _1247.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
|
|
18038
18338
|
..._nullishCoalesce(baseBorder, () => ( {})),
|
|
18039
18339
|
..._nullishCoalesce(overlayBorder, () => ( {}))
|
|
18040
18340
|
};
|
|
18041
18341
|
}
|
|
18042
|
-
const baseFill = _optionalChain([base, 'optionalAccess',
|
|
18043
|
-
const overlayFill = _optionalChain([overlay, 'optionalAccess',
|
|
18342
|
+
const baseFill = _optionalChain([base, 'optionalAccess', _1248 => _1248.fill]);
|
|
18343
|
+
const overlayFill = _optionalChain([overlay, 'optionalAccess', _1249 => _1249.fill]);
|
|
18044
18344
|
if (baseFill || overlayFill) {
|
|
18045
|
-
nextStyle.fill = _optionalChain([options, 'optionalAccess',
|
|
18345
|
+
nextStyle.fill = _optionalChain([options, 'optionalAccess', _1250 => _1250.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
|
|
18046
18346
|
}
|
|
18047
|
-
const baseFont = _optionalChain([base, 'optionalAccess',
|
|
18048
|
-
const overlayFont = _optionalChain([overlay, 'optionalAccess',
|
|
18347
|
+
const baseFont = _optionalChain([base, 'optionalAccess', _1251 => _1251.font]);
|
|
18348
|
+
const overlayFont = _optionalChain([overlay, 'optionalAccess', _1252 => _1252.font]);
|
|
18049
18349
|
if (baseFont || overlayFont) {
|
|
18050
|
-
nextStyle.font = _optionalChain([options, 'optionalAccess',
|
|
18350
|
+
nextStyle.font = _optionalChain([options, 'optionalAccess', _1253 => _1253.replaceXfSubtrees]) && overlayFont ? overlayFont : {
|
|
18051
18351
|
..._nullishCoalesce(baseFont, () => ( {})),
|
|
18052
18352
|
..._nullishCoalesce(overlayFont, () => ( {}))
|
|
18053
18353
|
};
|
|
@@ -18055,10 +18355,10 @@ function mergeResolvedCellStyle(base, overlay, options) {
|
|
|
18055
18355
|
return nextStyle;
|
|
18056
18356
|
}
|
|
18057
18357
|
function resolveCellTableOverrides(rawStyle, sheet, row, col) {
|
|
18058
|
-
const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
18059
|
-
const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess',
|
|
18358
|
+
const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1254 => _1254.cellStyleIds, 'optionalAccess', _1255 => _1255[cellAddressToA12({ row, col })]]), () => ( _optionalChain([sheet, 'optionalAccess', _1256 => _1256.rowStyleIds, 'access', _1257 => _1257[row]]))), () => ( _optionalChain([sheet, 'optionalAccess', _1258 => _1258.colStyleIds, 'access', _1259 => _1259[col]])));
|
|
18359
|
+
const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess', _1260 => _1260.styleById, 'access', _1261 => _1261[styleId], 'optionalAccess', _1262 => _1262.tableStyleOverrides]);
|
|
18060
18360
|
const overrides = {};
|
|
18061
|
-
const font = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
18361
|
+
const font = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1263 => _1263.font]));
|
|
18062
18362
|
if (font) {
|
|
18063
18363
|
const explicitFont = {};
|
|
18064
18364
|
const fontDefaults = {
|
|
@@ -18071,28 +18371,28 @@ function resolveCellTableOverrides(rawStyle, sheet, row, col) {
|
|
|
18071
18371
|
verticalAlign: "baseline"
|
|
18072
18372
|
};
|
|
18073
18373
|
for (const [key, value] of Object.entries(font)) {
|
|
18074
|
-
const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call',
|
|
18374
|
+
const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call', _1264 => _1264(value), 'optionalAccess', _1265 => _1265.colorType]) !== "auto" : value !== fontDefaults[key];
|
|
18075
18375
|
if (isExplicit) {
|
|
18076
18376
|
explicitFont[key] = value;
|
|
18077
18377
|
}
|
|
18078
18378
|
}
|
|
18079
18379
|
overrides.font = explicitFont;
|
|
18080
18380
|
}
|
|
18081
|
-
const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
18381
|
+
const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1266 => _1266.fill]));
|
|
18082
18382
|
if (fill && fill.fillType !== "none") {
|
|
18083
18383
|
overrides.fill = fill;
|
|
18084
18384
|
}
|
|
18085
|
-
const border = asRecord(_optionalChain([rawStyle, 'optionalAccess',
|
|
18385
|
+
const border = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1267 => _1267.border]));
|
|
18086
18386
|
if (border) {
|
|
18087
18387
|
overrides.border = Object.fromEntries(Object.entries(border).filter(([, edge]) => {
|
|
18088
|
-
const style = _optionalChain([asRecord, 'call',
|
|
18388
|
+
const style = _optionalChain([asRecord, 'call', _1268 => _1268(edge), 'optionalAccess', _1269 => _1269.style]);
|
|
18089
18389
|
return typeof style === "string" && style !== "none";
|
|
18090
18390
|
}));
|
|
18091
18391
|
}
|
|
18092
18392
|
return overrides;
|
|
18093
18393
|
}
|
|
18094
18394
|
function resolveBorderEdgePriority(edge) {
|
|
18095
|
-
const style = typeof _optionalChain([edge, 'optionalAccess',
|
|
18395
|
+
const style = typeof _optionalChain([edge, 'optionalAccess', _1270 => _1270.style]) === "string" ? edge.style : "none";
|
|
18096
18396
|
const stylePriority = {
|
|
18097
18397
|
dashed: 2,
|
|
18098
18398
|
dashDot: 3,
|
|
@@ -18126,8 +18426,8 @@ function resolvePreferredBorderEdge(current, candidate) {
|
|
|
18126
18426
|
return current;
|
|
18127
18427
|
}
|
|
18128
18428
|
function resolveMergedRegionBorderOverlay(row, col, merge, resolveBaseCellStyle) {
|
|
18129
|
-
const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
18130
|
-
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
18429
|
+
const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1271 => _1271.rowSpan]), () => ( 1)));
|
|
18430
|
+
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1272 => _1272.colSpan]), () => ( 1)));
|
|
18131
18431
|
if (rowSpan === 1 && colSpan === 1) {
|
|
18132
18432
|
return null;
|
|
18133
18433
|
}
|
|
@@ -18139,19 +18439,19 @@ function resolveMergedRegionBorderOverlay(row, col, merge, resolveBaseCellStyle)
|
|
|
18139
18439
|
let left = null;
|
|
18140
18440
|
for (let targetCol = col; targetCol <= endCol; targetCol += 1) {
|
|
18141
18441
|
const topStyle = resolveBaseCellStyle(row, targetCol);
|
|
18142
|
-
const topBorder = _optionalChain([topStyle, 'optionalAccess',
|
|
18143
|
-
top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess',
|
|
18442
|
+
const topBorder = _optionalChain([topStyle, 'optionalAccess', _1273 => _1273.border]);
|
|
18443
|
+
top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess', _1274 => _1274.top]), () => ( null)));
|
|
18144
18444
|
const bottomStyle = resolveBaseCellStyle(endRow, targetCol);
|
|
18145
|
-
const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess',
|
|
18146
|
-
bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess',
|
|
18445
|
+
const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess', _1275 => _1275.border]);
|
|
18446
|
+
bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess', _1276 => _1276.bottom]), () => ( null)));
|
|
18147
18447
|
}
|
|
18148
18448
|
for (let targetRow = row; targetRow <= endRow; targetRow += 1) {
|
|
18149
18449
|
const leftStyle = resolveBaseCellStyle(targetRow, col);
|
|
18150
|
-
const leftBorder = _optionalChain([leftStyle, 'optionalAccess',
|
|
18151
|
-
left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess',
|
|
18450
|
+
const leftBorder = _optionalChain([leftStyle, 'optionalAccess', _1277 => _1277.border]);
|
|
18451
|
+
left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess', _1278 => _1278.left]), () => ( null)));
|
|
18152
18452
|
const rightStyle = resolveBaseCellStyle(targetRow, endCol);
|
|
18153
|
-
const rightBorder = _optionalChain([rightStyle, 'optionalAccess',
|
|
18154
|
-
right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess',
|
|
18453
|
+
const rightBorder = _optionalChain([rightStyle, 'optionalAccess', _1279 => _1279.border]);
|
|
18454
|
+
right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess', _1280 => _1280.right]), () => ( null)));
|
|
18155
18455
|
}
|
|
18156
18456
|
const border = {};
|
|
18157
18457
|
if (top) {
|
|
@@ -18210,7 +18510,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
|
|
|
18210
18510
|
if (!table || !activeSheet) {
|
|
18211
18511
|
return null;
|
|
18212
18512
|
}
|
|
18213
|
-
const styleName = _optionalChain([table, 'access',
|
|
18513
|
+
const styleName = _optionalChain([table, 'access', _1281 => _1281.styleInfo, 'optionalAccess', _1282 => _1282.name]);
|
|
18214
18514
|
if (!styleName) {
|
|
18215
18515
|
return null;
|
|
18216
18516
|
}
|
|
@@ -18249,7 +18549,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
|
|
|
18249
18549
|
resolved = mergeResolvedCellStyle(resolved, nextStyle);
|
|
18250
18550
|
};
|
|
18251
18551
|
applyElement("wholeTable", tableRegion);
|
|
18252
|
-
if (isBodyRow && _optionalChain([table, 'access',
|
|
18552
|
+
if (isBodyRow && _optionalChain([table, 'access', _1283 => _1283.styleInfo, 'optionalAccess', _1284 => _1284.showColumnStripes])) {
|
|
18253
18553
|
const isFirstStripe = (col - table.start.col) % 2 === 0;
|
|
18254
18554
|
applyElement(isFirstStripe ? "firstColumnStripe" : "secondColumnStripe", {
|
|
18255
18555
|
endCol: col,
|
|
@@ -18258,7 +18558,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
|
|
|
18258
18558
|
startRow: bodyStartRow
|
|
18259
18559
|
});
|
|
18260
18560
|
}
|
|
18261
|
-
if (isBodyRow && _optionalChain([table, 'access',
|
|
18561
|
+
if (isBodyRow && _optionalChain([table, 'access', _1285 => _1285.styleInfo, 'optionalAccess', _1286 => _1286.showRowStripes])) {
|
|
18262
18562
|
const isFirstStripe = (row - bodyStartRow) % 2 === 0;
|
|
18263
18563
|
applyElement(isFirstStripe ? "firstRowStripe" : "secondRowStripe", {
|
|
18264
18564
|
...tableRegion,
|
|
@@ -18266,8 +18566,8 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
|
|
|
18266
18566
|
startRow: row
|
|
18267
18567
|
});
|
|
18268
18568
|
}
|
|
18269
|
-
applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access',
|
|
18270
|
-
applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access',
|
|
18569
|
+
applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access', _1287 => _1287.styleInfo, 'optionalAccess', _1288 => _1288.showLastColumn])) && isLastColumn);
|
|
18570
|
+
applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access', _1289 => _1289.styleInfo, 'optionalAccess', _1290 => _1290.showFirstColumn])) && isFirstColumn);
|
|
18271
18571
|
applyElement("headerRow", headerRegion, isHeaderRow);
|
|
18272
18572
|
if (isHeaderRow && table.headerRowCellStyle) {
|
|
18273
18573
|
const namedHeaderStyle = activeSheet.namedCellStyleByName[table.headerRowCellStyle];
|
|
@@ -19125,11 +19425,11 @@ function resolveConditionalFormulaComparable(formula, worksheet, sheet, batchedC
|
|
|
19125
19425
|
return literal;
|
|
19126
19426
|
}
|
|
19127
19427
|
const splitReference = splitSheetFormulaReference(normalized);
|
|
19128
|
-
const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess',
|
|
19129
|
-
if (targetSheetName && _optionalChain([sheet, 'optionalAccess',
|
|
19428
|
+
const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1291 => _1291.sheetName]), () => ( null));
|
|
19429
|
+
if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _1292 => _1292.name]) && targetSheetName !== sheet.name) {
|
|
19130
19430
|
return literal;
|
|
19131
19431
|
}
|
|
19132
|
-
const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess',
|
|
19432
|
+
const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1293 => _1293.range]), () => ( normalized));
|
|
19133
19433
|
const cell = parseA1CellReference3(cellRef.replace(/\$/g, ""));
|
|
19134
19434
|
if (!cell) {
|
|
19135
19435
|
return literal;
|
|
@@ -19161,8 +19461,8 @@ function normalizeConditionalTextOperand(value) {
|
|
|
19161
19461
|
}
|
|
19162
19462
|
function resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells) {
|
|
19163
19463
|
const normalizedRuleType = rule.ruleType.trim().toLowerCase();
|
|
19164
|
-
const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access',
|
|
19165
|
-
const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access',
|
|
19464
|
+
const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1294 => _1294.formulas, 'optionalAccess', _1295 => _1295[0]]), () => ( "")), worksheet, sheet, batchedCells);
|
|
19465
|
+
const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1296 => _1296.formulas, 'optionalAccess', _1297 => _1297[1]]), () => ( "")), worksheet, sheet, batchedCells);
|
|
19166
19466
|
if (normalizedRuleType === "cellis") {
|
|
19167
19467
|
return resolveConditionalCellIsMatch(_nullishCoalesce(rule.operator, () => ( "equal")), left, right, numericValue, textValue);
|
|
19168
19468
|
}
|
|
@@ -19193,7 +19493,7 @@ function getStyledConditionalRules(rules) {
|
|
|
19193
19493
|
return styledRules;
|
|
19194
19494
|
}
|
|
19195
19495
|
function resolveConditionalCellStyleForCell(row, col, sheet, readNumericValue, readTextValue, worksheet, batchedCells) {
|
|
19196
|
-
const rules = _optionalChain([sheet, 'optionalAccess',
|
|
19496
|
+
const rules = _optionalChain([sheet, 'optionalAccess', _1298 => _1298.conditionalFormatRules]);
|
|
19197
19497
|
if (!sheet || !rules || rules.length === 0) {
|
|
19198
19498
|
return null;
|
|
19199
19499
|
}
|
|
@@ -19472,7 +19772,7 @@ function resolveFormControlLabel(control) {
|
|
|
19472
19772
|
return label.replace(/\u00a0/g, " ").replace(/^\s+/, "");
|
|
19473
19773
|
}
|
|
19474
19774
|
function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCache) {
|
|
19475
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
19775
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1299 => _1299.conditionalFormatRules]), () => ( []));
|
|
19476
19776
|
const matchingRule = rules.find(
|
|
19477
19777
|
(rule) => rule.kind === "dataBar" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
|
|
19478
19778
|
);
|
|
@@ -19510,23 +19810,23 @@ function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCac
|
|
|
19510
19810
|
const span = maxValue - minValue;
|
|
19511
19811
|
const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
|
|
19512
19812
|
const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
|
|
19513
|
-
const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess',
|
|
19813
|
+
const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess', _1300 => _1300.themePalette]));
|
|
19514
19814
|
if (!color || widthPercent <= 0) {
|
|
19515
19815
|
return null;
|
|
19516
19816
|
}
|
|
19517
19817
|
return {
|
|
19518
|
-
axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess',
|
|
19818
|
+
axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _1301 => _1301.themePalette])), () => ( void 0)),
|
|
19519
19819
|
border: _nullishCoalesce(matchingRule.border, () => ( void 0)),
|
|
19520
|
-
borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess',
|
|
19820
|
+
borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _1302 => _1302.themePalette])), () => ( void 0)),
|
|
19521
19821
|
color,
|
|
19522
19822
|
gradient: _nullishCoalesce(matchingRule.gradient, () => ( void 0)),
|
|
19523
|
-
negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess',
|
|
19524
|
-
negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess',
|
|
19823
|
+
negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _1303 => _1303.themePalette])), () => ( void 0)),
|
|
19824
|
+
negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _1304 => _1304.themePalette])), () => ( void 0)),
|
|
19525
19825
|
widthPercent
|
|
19526
19826
|
};
|
|
19527
19827
|
}
|
|
19528
19828
|
function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metricsCache) {
|
|
19529
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
19829
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1305 => _1305.conditionalFormatRules]), () => ( []));
|
|
19530
19830
|
const matchingRule = rules.find(
|
|
19531
19831
|
(rule) => rule.kind === "colorScale" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
|
|
19532
19832
|
);
|
|
@@ -19554,7 +19854,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
|
|
|
19554
19854
|
});
|
|
19555
19855
|
metricsCache.set(cacheKey, ruleValues);
|
|
19556
19856
|
}
|
|
19557
|
-
const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess',
|
|
19857
|
+
const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess', _1306 => _1306.themePalette]))).filter((color) => typeof color === "string");
|
|
19558
19858
|
const thresholds = matchingRule.cfvos.map((threshold) => resolveConditionalRuleThreshold(threshold, ruleValues)).filter((value) => typeof value === "number" && Number.isFinite(value));
|
|
19559
19859
|
if (colors.length < 2 || thresholds.length < 2) {
|
|
19560
19860
|
return null;
|
|
@@ -19573,7 +19873,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
|
|
|
19573
19873
|
return { color: resolvedColor };
|
|
19574
19874
|
}
|
|
19575
19875
|
function resolveConditionalIconForCell(row, col, worksheet, sheet, metricsCache) {
|
|
19576
|
-
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess',
|
|
19876
|
+
const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1307 => _1307.conditionalFormatRules]), () => ( []));
|
|
19577
19877
|
const matchingRule = rules.find(
|
|
19578
19878
|
(rule) => rule.kind === "iconSet" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
|
|
19579
19879
|
);
|
|
@@ -19613,7 +19913,7 @@ function resolveConditionalIconForCell(row, col, worksheet, sheet, metricsCache)
|
|
|
19613
19913
|
return icon ? buildConditionalIcon(icon.iconSet, icon.iconId) : null;
|
|
19614
19914
|
}
|
|
19615
19915
|
function resolveCellDataValidation(row, col, sheet) {
|
|
19616
|
-
const validation = _optionalChain([sheet, 'optionalAccess',
|
|
19916
|
+
const validation = _optionalChain([sheet, 'optionalAccess', _1308 => _1308.dataValidations, 'access', _1309 => _1309.find, 'call', _1310 => _1310((entry) => entry.ranges.some((range) => isCellInRange({ row, col }, range)))]);
|
|
19617
19917
|
if (!validation) {
|
|
19618
19918
|
return null;
|
|
19619
19919
|
}
|
|
@@ -19675,6 +19975,10 @@ function GridRow({
|
|
|
19675
19975
|
editingValue,
|
|
19676
19976
|
formulaReferences,
|
|
19677
19977
|
editorBoxShadow,
|
|
19978
|
+
editorRef,
|
|
19979
|
+
editorInputRef,
|
|
19980
|
+
cellEditorStyle,
|
|
19981
|
+
onFocusEditorOverlay,
|
|
19678
19982
|
frozenRowHeaderZIndex,
|
|
19679
19983
|
getCellData,
|
|
19680
19984
|
headerLabelLiveScale,
|
|
@@ -19904,7 +20208,7 @@ function GridRow({
|
|
|
19904
20208
|
whiteSpace: "nowrap",
|
|
19905
20209
|
width: "max-content"
|
|
19906
20210
|
} : null;
|
|
19907
|
-
const title = [_optionalChain([cellData, 'access',
|
|
20211
|
+
const title = [_optionalChain([cellData, 'access', _1311 => _1311.hyperlink, 'optionalAccess', _1312 => _1312.tooltip]), _optionalChain([cellData, 'access', _1313 => _1313.validation, 'optionalAccess', _1314 => _1314.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
|
|
19908
20212
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
19909
20213
|
"td",
|
|
19910
20214
|
{
|
|
@@ -20010,6 +20314,9 @@ function GridRow({
|
|
|
20010
20314
|
isEditing ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
20011
20315
|
CellEditor,
|
|
20012
20316
|
{
|
|
20317
|
+
editorRef,
|
|
20318
|
+
inputRef: editorInputRef,
|
|
20319
|
+
onFocusOverlay: onFocusEditorOverlay,
|
|
20013
20320
|
value: editingValue,
|
|
20014
20321
|
references: formulaReferences,
|
|
20015
20322
|
onBlur: onEditingBlur,
|
|
@@ -20024,7 +20331,8 @@ function GridRow({
|
|
|
20024
20331
|
font: "inherit",
|
|
20025
20332
|
lineHeight: cellData.style.lineHeight,
|
|
20026
20333
|
verticalAlign: cellData.style.verticalAlign,
|
|
20027
|
-
padding: cellData.style.padding
|
|
20334
|
+
padding: cellData.style.padding,
|
|
20335
|
+
...cellEditorStyle
|
|
20028
20336
|
}
|
|
20029
20337
|
}
|
|
20030
20338
|
) : isSpilling ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
@@ -20088,11 +20396,11 @@ function GridRow({
|
|
|
20088
20396
|
] });
|
|
20089
20397
|
}
|
|
20090
20398
|
var MemoGridRow = _chunkA3S3QKJNcjs.N.call(void 0, GridRow, (prev, next) => {
|
|
20091
|
-
if (prev.actualRow !== next.actualRow || prev.rowHeight !== next.rowHeight || prev.headerLabelLiveScale !== next.headerLabelLiveScale || prev.palette !== next.palette || prev.readOnly !== next.readOnly || prev.visibleCols !== next.visibleCols || prev.leadingSpacerWidth !== next.leadingSpacerWidth || prev.rowHeaderWidth !== next.rowHeaderWidth || prev.stickyLeftByCol !== next.stickyLeftByCol || prev.stickyTop !== next.stickyTop || prev.trailingSpacerWidth !== next.trailingSpacerWidth || prev.zoomFactor !== next.zoomFactor || prev.getCellData !== next.getCellData || prev.onCellClick !== next.onCellClick || prev.onCellDoubleClick !== next.onCellDoubleClick || prev.onCellPointerDown !== next.onCellPointerDown || prev.onEditingBlur !== next.onEditingBlur || prev.onEditingCancel !== next.onEditingCancel || prev.onEditingCommit !== next.onEditingCommit || prev.onEditingNavigate !== next.onEditingNavigate || prev.onEditingValueChange !== next.onEditingValueChange || prev.onRowHeaderRef !== next.onRowHeaderRef || prev.onRowPointerDown !== next.onRowPointerDown || prev.onRowResizePointerDown !== next.onRowResizePointerDown || prev.renderCellAdornment !== next.renderCellAdornment) {
|
|
20399
|
+
if (prev.actualRow !== next.actualRow || prev.rowHeight !== next.rowHeight || prev.headerLabelLiveScale !== next.headerLabelLiveScale || prev.palette !== next.palette || prev.readOnly !== next.readOnly || prev.visibleCols !== next.visibleCols || prev.leadingSpacerWidth !== next.leadingSpacerWidth || prev.rowHeaderWidth !== next.rowHeaderWidth || prev.stickyLeftByCol !== next.stickyLeftByCol || prev.stickyTop !== next.stickyTop || prev.trailingSpacerWidth !== next.trailingSpacerWidth || prev.zoomFactor !== next.zoomFactor || prev.getCellData !== next.getCellData || prev.onCellClick !== next.onCellClick || prev.onCellDoubleClick !== next.onCellDoubleClick || prev.onCellPointerDown !== next.onCellPointerDown || prev.onEditingBlur !== next.onEditingBlur || prev.onEditingCancel !== next.onEditingCancel || prev.onEditingCommit !== next.onEditingCommit || prev.onEditingNavigate !== next.onEditingNavigate || prev.onEditingValueChange !== next.onEditingValueChange || prev.onRowHeaderRef !== next.onRowHeaderRef || prev.onRowPointerDown !== next.onRowPointerDown || prev.onRowResizePointerDown !== next.onRowResizePointerDown || prev.renderCellAdornment !== next.renderCellAdornment || prev.cellEditorStyle !== next.cellEditorStyle || prev.onFocusEditorOverlay !== next.onFocusEditorOverlay) {
|
|
20092
20400
|
return false;
|
|
20093
20401
|
}
|
|
20094
|
-
const prevEditingCol = _optionalChain([prev, 'access',
|
|
20095
|
-
const nextEditingCol = _optionalChain([next, 'access',
|
|
20402
|
+
const prevEditingCol = _optionalChain([prev, 'access', _1315 => _1315.editingCell, 'optionalAccess', _1316 => _1316.row]) === prev.actualRow ? prev.editingCell.col : -1;
|
|
20403
|
+
const nextEditingCol = _optionalChain([next, 'access', _1317 => _1317.editingCell, 'optionalAccess', _1318 => _1318.row]) === next.actualRow ? next.editingCell.col : -1;
|
|
20096
20404
|
if (prevEditingCol !== nextEditingCol) {
|
|
20097
20405
|
return false;
|
|
20098
20406
|
}
|
|
@@ -20125,6 +20433,9 @@ function XlsxGrid({
|
|
|
20125
20433
|
renderImageSelection,
|
|
20126
20434
|
renderTableHeaderMenu,
|
|
20127
20435
|
renderActiveCellOverlay,
|
|
20436
|
+
renderCellEditorOverlay,
|
|
20437
|
+
renderSelectionPopover,
|
|
20438
|
+
cellEditorStyle,
|
|
20128
20439
|
renderScroller,
|
|
20129
20440
|
enableGestureZoom = true,
|
|
20130
20441
|
experimentalCanvas = true,
|
|
@@ -20277,6 +20588,10 @@ function XlsxGrid({
|
|
|
20277
20588
|
const commitEditingRef = _chunkA3S3QKJNcjs.A.call(void 0, () => {
|
|
20278
20589
|
});
|
|
20279
20590
|
const editingInputRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
20591
|
+
const editorElementRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
20592
|
+
const editorOverlayRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
20593
|
+
const editingSavedValueRef = _chunkA3S3QKJNcjs.A.call(void 0, "");
|
|
20594
|
+
const editingTriggerRef = _chunkA3S3QKJNcjs.A.call(void 0, "keyboard");
|
|
20280
20595
|
const readOnlyRef = _chunkA3S3QKJNcjs.A.call(void 0, readOnly);
|
|
20281
20596
|
const committedZoomScaleRef = _chunkA3S3QKJNcjs.A.call(void 0, zoomScale);
|
|
20282
20597
|
const gestureZoomScaleRef = _chunkA3S3QKJNcjs.A.call(void 0, zoomScale);
|
|
@@ -20321,9 +20636,9 @@ function XlsxGrid({
|
|
|
20321
20636
|
const formulaReferences = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20322
20637
|
() => {
|
|
20323
20638
|
const worksheet2 = getActiveWorksheet();
|
|
20324
|
-
return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20639
|
+
return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1319 => _1319.name]), () => ( ""))) : [];
|
|
20325
20640
|
},
|
|
20326
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
20641
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1320 => _1320.name]), editingCell, editingValue, getActiveWorksheet]
|
|
20327
20642
|
);
|
|
20328
20643
|
const [openTableMenu, setOpenTableMenu] = _chunkA3S3QKJNcjs.d.call(void 0, null);
|
|
20329
20644
|
const [fillPreviewRange, setFillPreviewRange] = _chunkA3S3QKJNcjs.d.call(void 0, null);
|
|
@@ -20379,22 +20694,24 @@ function XlsxGrid({
|
|
|
20379
20694
|
const skipNextImageClickRef = _chunkA3S3QKJNcjs.A.call(void 0, null);
|
|
20380
20695
|
const [pendingNavigation, setPendingNavigation] = _chunkA3S3QKJNcjs.d.call(void 0, null);
|
|
20381
20696
|
const interactionModeRef = _chunkA3S3QKJNcjs.A.call(void 0, "idle");
|
|
20697
|
+
const [interactionMode, setRenderedInteractionMode] = _chunkA3S3QKJNcjs.d.call(void 0, "idle");
|
|
20382
20698
|
const setInteractionMode = _chunkA3S3QKJNcjs.q.call(void 0, (mode) => {
|
|
20383
20699
|
interactionModeRef.current = mode;
|
|
20384
|
-
|
|
20700
|
+
if (renderSelectionPopover) setRenderedInteractionMode(mode);
|
|
20701
|
+
}, [!!renderSelectionPopover]);
|
|
20385
20702
|
const worksheet = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20386
20703
|
() => getActiveWorksheet(),
|
|
20387
20704
|
[activeSheetIndex, getActiveWorksheet, revision]
|
|
20388
20705
|
);
|
|
20389
20706
|
const mergedRegions = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
20390
20707
|
const regions = [];
|
|
20391
|
-
const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess',
|
|
20708
|
+
const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess', _1321 => _1321.mergedRegions])) ? worksheet.mergedRegions : [];
|
|
20392
20709
|
for (const entry of rawMergedRegions) {
|
|
20393
20710
|
const region = asRecord(entry);
|
|
20394
|
-
const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
20395
|
-
const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
20396
|
-
const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
20397
|
-
const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess',
|
|
20711
|
+
const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1322 => _1322.startRow]));
|
|
20712
|
+
const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1323 => _1323.startCol]));
|
|
20713
|
+
const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1324 => _1324.endRow]));
|
|
20714
|
+
const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1325 => _1325.endCol]));
|
|
20398
20715
|
if (startRow === null || startCol === null || endRow === null || endCol === null) {
|
|
20399
20716
|
continue;
|
|
20400
20717
|
}
|
|
@@ -20406,11 +20723,11 @@ function XlsxGrid({
|
|
|
20406
20723
|
return regions;
|
|
20407
20724
|
}, [worksheet]);
|
|
20408
20725
|
const findMergedRange = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20409
|
-
() => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20410
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
20726
|
+
() => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1326 => _1326.mergedRanges]), () => ( mergedRegions))),
|
|
20727
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1327 => _1327.mergedRanges]), mergedRegions]
|
|
20411
20728
|
);
|
|
20412
20729
|
const resolveMergeAnchorCell = _chunkA3S3QKJNcjs.q.call(void 0, (cell) => {
|
|
20413
|
-
return _nullishCoalesce(_optionalChain([findMergedRange, 'call',
|
|
20730
|
+
return _nullishCoalesce(_optionalChain([findMergedRange, 'call', _1328 => _1328(cell), 'optionalAccess', _1329 => _1329.start]), () => ( cell));
|
|
20414
20731
|
}, [findMergedRange]);
|
|
20415
20732
|
const resolveCellSelectionRange = _chunkA3S3QKJNcjs.q.call(void 0, (range) => {
|
|
20416
20733
|
const normalized = normalizeRange2(range);
|
|
@@ -20419,11 +20736,11 @@ function XlsxGrid({
|
|
|
20419
20736
|
if (isSameCell(start, end)) {
|
|
20420
20737
|
return { start, end };
|
|
20421
20738
|
}
|
|
20422
|
-
return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20423
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
20739
|
+
return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1330 => _1330.mergedRanges]), () => ( mergedRegions)));
|
|
20740
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1331 => _1331.mergedRanges]), mergedRegions, resolveMergeAnchorCell]);
|
|
20424
20741
|
const highlightedCellRanges = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20425
|
-
() => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess',
|
|
20426
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
20742
|
+
() => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess', _1332 => _1332.workbookSheetIndex]) === highlight.workbookSheetIndex ? [{ highlight, index, range: expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1333 => _1333.mergedRanges]), () => ( mergedRegions))) }] : []),
|
|
20743
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1334 => _1334.mergedRanges]), _optionalChain([activeSheet, 'optionalAccess', _1335 => _1335.workbookSheetIndex]), highlightedRanges, mergedRegions]
|
|
20427
20744
|
);
|
|
20428
20745
|
const normalizedSelection = _chunkA3S3QKJNcjs.T.call(void 0, () => selection ? normalizeRange2(selection) : null, [selection]);
|
|
20429
20746
|
const zoomFactor = _chunkA3S3QKJNcjs.T.call(void 0, () => Math.max(0.1, zoomScale / 100), [zoomScale]);
|
|
@@ -20431,7 +20748,7 @@ function XlsxGrid({
|
|
|
20431
20748
|
const effectiveTables = tables;
|
|
20432
20749
|
const [displayRowLimit, setDisplayRowLimit] = _chunkA3S3QKJNcjs.d.call(void 0,
|
|
20433
20750
|
() => resolveInitialDisplayExtent(
|
|
20434
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20751
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1336 => _1336.maxUsedRow]), () => ( -1)),
|
|
20435
20752
|
MIN_OPEN_GRID_ROWS,
|
|
20436
20753
|
OPEN_GRID_ROW_PADDING,
|
|
20437
20754
|
Boolean(isWorkerBacked),
|
|
@@ -20440,15 +20757,15 @@ function XlsxGrid({
|
|
|
20440
20757
|
);
|
|
20441
20758
|
const [displayColLimit, setDisplayColLimit] = _chunkA3S3QKJNcjs.d.call(void 0,
|
|
20442
20759
|
() => resolveInitialDisplayExtent(
|
|
20443
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20760
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1337 => _1337.maxUsedCol]), () => ( -1)),
|
|
20444
20761
|
MIN_OPEN_GRID_COLS,
|
|
20445
20762
|
OPEN_GRID_COL_PADDING,
|
|
20446
20763
|
Boolean(isWorkerBacked),
|
|
20447
20764
|
INITIAL_WORKER_GRID_COLS
|
|
20448
20765
|
)
|
|
20449
20766
|
);
|
|
20450
|
-
const hiddenRowSet = _chunkA3S3QKJNcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20451
|
-
const hiddenColSet = _chunkA3S3QKJNcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20767
|
+
const hiddenRowSet = _chunkA3S3QKJNcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1338 => _1338.hiddenRows]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1339 => _1339.hiddenRows])]);
|
|
20768
|
+
const hiddenColSet = _chunkA3S3QKJNcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1340 => _1340.hiddenCols]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1341 => _1341.hiddenCols])]);
|
|
20452
20769
|
const displayDefaultRowHeight = DEFAULT_ROW_HEIGHT2 * zoomFactor;
|
|
20453
20770
|
const displayDefaultColWidth = DEFAULT_COL_WIDTH2 * zoomFactor;
|
|
20454
20771
|
const displayHeaderHeight = HEADER_HEIGHT * zoomFactor;
|
|
@@ -20484,27 +20801,27 @@ function XlsxGrid({
|
|
|
20484
20801
|
const liveZoomAnchorX = resolveClampedLiveZoomAnchor(
|
|
20485
20802
|
nextLiveViewport.left,
|
|
20486
20803
|
nextLiveViewport.width,
|
|
20487
|
-
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
20488
|
-
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess',
|
|
20804
|
+
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1342 => _1342.scrollWidth]), () => ( nextLiveViewport.width)),
|
|
20805
|
+
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1343 => _1343.anchor, 'access', _1344 => _1344.x]), () => ( 0))
|
|
20489
20806
|
);
|
|
20490
20807
|
const liveZoomAnchorY = resolveClampedLiveZoomAnchor(
|
|
20491
20808
|
nextLiveViewport.top,
|
|
20492
20809
|
nextLiveViewport.height,
|
|
20493
|
-
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
20494
|
-
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess',
|
|
20810
|
+
_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1345 => _1345.scrollHeight]), () => ( nextLiveViewport.height)),
|
|
20811
|
+
_nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1346 => _1346.anchor, 'access', _1347 => _1347.y]), () => ( 0))
|
|
20495
20812
|
);
|
|
20496
20813
|
const applyElementTransform = (element, transform, willChange, transformOrigin = null) => {
|
|
20497
20814
|
if (!element) {
|
|
20498
20815
|
return;
|
|
20499
20816
|
}
|
|
20500
20817
|
const cached = canvasTransformStyleCacheRef.current.get(element);
|
|
20501
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
20818
|
+
if (_optionalChain([cached, 'optionalAccess', _1348 => _1348.transform]) !== transform || element.style.transform !== transform) {
|
|
20502
20819
|
element.style.transform = transform;
|
|
20503
20820
|
}
|
|
20504
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
20821
|
+
if (_optionalChain([cached, 'optionalAccess', _1349 => _1349.willChange]) !== willChange || element.style.willChange !== willChange) {
|
|
20505
20822
|
element.style.willChange = willChange;
|
|
20506
20823
|
}
|
|
20507
|
-
if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess',
|
|
20824
|
+
if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess', _1350 => _1350.transformOrigin]) !== transformOrigin || element.style.transformOrigin !== transformOrigin)) {
|
|
20508
20825
|
element.style.transformOrigin = transformOrigin;
|
|
20509
20826
|
}
|
|
20510
20827
|
canvasTransformStyleCacheRef.current.set(element, {
|
|
@@ -20725,7 +21042,7 @@ function XlsxGrid({
|
|
|
20725
21042
|
pendingLiveZoomCommitRef.current = null;
|
|
20726
21043
|
updateLiveGestureZoomState((current) => ({
|
|
20727
21044
|
anchor,
|
|
20728
|
-
baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
21045
|
+
baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _1351 => _1351.baseZoomScale]), () => ( committedZoomScaleRef.current)),
|
|
20729
21046
|
targetZoomScale: clampedZoomScale
|
|
20730
21047
|
}));
|
|
20731
21048
|
}, [maxZoomScale, minZoomScale, updateLiveGestureZoomState]);
|
|
@@ -20775,7 +21092,7 @@ function XlsxGrid({
|
|
|
20775
21092
|
const matchesLiveViewport = liveViewport.left === nextViewport.left && liveViewport.top === nextViewport.top && liveViewport.width === nextViewport.width && liveViewport.height === nextViewport.height;
|
|
20776
21093
|
liveDrawingViewportRef.current = nextViewport;
|
|
20777
21094
|
applyCanvasViewportCompensation(nextViewport);
|
|
20778
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
21095
|
+
if (_optionalChain([options, 'optionalAccess', _1352 => _1352.immediate])) {
|
|
20779
21096
|
pendingDrawingViewportRef.current = null;
|
|
20780
21097
|
if (drawingViewportFrameRef.current !== null) {
|
|
20781
21098
|
window.cancelAnimationFrame(drawingViewportFrameRef.current);
|
|
@@ -20841,51 +21158,51 @@ function XlsxGrid({
|
|
|
20841
21158
|
}, []);
|
|
20842
21159
|
const visibleRows = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
20843
21160
|
return buildVisibleAxisIndices(
|
|
20844
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21161
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1353 => _1353.visibleRows]), () => ( [])),
|
|
20845
21162
|
displayRowLimit,
|
|
20846
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21163
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1354 => _1354.maxUsedRow]), () => ( -1)),
|
|
20847
21164
|
hiddenRowSet
|
|
20848
21165
|
);
|
|
20849
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
21166
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1355 => _1355.maxUsedRow]), _optionalChain([activeSheet, 'optionalAccess', _1356 => _1356.visibleRows]), displayRowLimit, hiddenRowSet]);
|
|
20850
21167
|
const visibleCols = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
20851
21168
|
return buildVisibleAxisIndices(
|
|
20852
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21169
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1357 => _1357.visibleCols]), () => ( [])),
|
|
20853
21170
|
displayColLimit,
|
|
20854
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21171
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1358 => _1358.maxUsedCol]), () => ( -1)),
|
|
20855
21172
|
hiddenColSet
|
|
20856
21173
|
);
|
|
20857
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
21174
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1359 => _1359.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1360 => _1360.visibleCols]), displayColLimit, hiddenColSet]);
|
|
20858
21175
|
const frozenRows = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
20859
|
-
const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21176
|
+
const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1361 => _1361.freezePanes, 'optionalAccess', _1362 => _1362.row]), () => ( 0));
|
|
20860
21177
|
if (freezeRow <= 0) {
|
|
20861
21178
|
return [];
|
|
20862
21179
|
}
|
|
20863
21180
|
return visibleRows.filter((row) => row < freezeRow);
|
|
20864
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
21181
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1363 => _1363.freezePanes, 'optionalAccess', _1364 => _1364.row]), visibleRows]);
|
|
20865
21182
|
const frozenCols = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
20866
|
-
const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21183
|
+
const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1365 => _1365.freezePanes, 'optionalAccess', _1366 => _1366.col]), () => ( 0));
|
|
20867
21184
|
if (freezeCol <= 0) {
|
|
20868
21185
|
return [];
|
|
20869
21186
|
}
|
|
20870
21187
|
return visibleCols.filter((col) => col < freezeCol);
|
|
20871
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
21188
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1367 => _1367.freezePanes, 'optionalAccess', _1368 => _1368.col]), visibleCols]);
|
|
20872
21189
|
const actualColWidths = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20873
21190
|
() => {
|
|
20874
|
-
const office = _optionalChain([activeSheet, 'optionalAccess',
|
|
21191
|
+
const office = _optionalChain([activeSheet, 'optionalAccess', _1369 => _1369.officeLayout]);
|
|
20875
21192
|
if (office) {
|
|
20876
21193
|
return Array.from({ length: displayColLimit }, (_2, index) => {
|
|
20877
21194
|
if (hiddenColSet.has(index)) return 0;
|
|
20878
21195
|
const original = office.columns[index];
|
|
20879
|
-
const override = _optionalChain([activeSheet, 'optionalAccess',
|
|
20880
|
-
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess',
|
|
20881
|
-
const width = _optionalChain([worksheet, 'optionalAccess',
|
|
20882
|
-
return width !== void 0 && width !== null ? resolveOfficeColumnWidthPixels(width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess',
|
|
21196
|
+
const override = _optionalChain([activeSheet, 'optionalAccess', _1370 => _1370.colWidthOverridesPx, 'access', _1371 => _1371[index]]);
|
|
21197
|
+
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1372 => _1372.sourcePx])) return override;
|
|
21198
|
+
const width = _optionalChain([worksheet, 'optionalAccess', _1373 => _1373.getColumnWidth, 'call', _1374 => _1374(index)]);
|
|
21199
|
+
return width !== void 0 && width !== null ? resolveOfficeColumnWidthPixels(width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1375 => _1375.sizePx]), () => ( office.defaultColumnPx));
|
|
20883
21200
|
});
|
|
20884
21201
|
}
|
|
20885
21202
|
const widths = new Array(displayColLimit).fill(0);
|
|
20886
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21203
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1376 => _1376.showGridLines]), () => ( true));
|
|
20887
21204
|
const fallbackWidth = Math.max(
|
|
20888
|
-
resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21205
|
+
resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1377 => _1377.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)), showGridLines),
|
|
20889
21206
|
DEFAULT_COL_WIDTH2 / 2
|
|
20890
21207
|
);
|
|
20891
21208
|
if (worksheet) {
|
|
@@ -20897,7 +21214,7 @@ function XlsxGrid({
|
|
|
20897
21214
|
if (width !== void 0 && width !== null) {
|
|
20898
21215
|
widths[col] = Math.max(
|
|
20899
21216
|
resolveRenderedSheetAxisPixels(
|
|
20900
|
-
resolveSheetColumnWidthPixels(width, _optionalChain([activeSheet, 'optionalAccess',
|
|
21217
|
+
resolveSheetColumnWidthPixels(width, _optionalChain([activeSheet, 'optionalAccess', _1378 => _1378.columnWidthCharacterWidthPx])),
|
|
20901
21218
|
showGridLines
|
|
20902
21219
|
),
|
|
20903
21220
|
DEFAULT_COL_WIDTH2 / 2
|
|
@@ -20906,7 +21223,7 @@ function XlsxGrid({
|
|
|
20906
21223
|
}
|
|
20907
21224
|
widths[col] = Math.max(
|
|
20908
21225
|
resolveRenderedSheetAxisPixels(
|
|
20909
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21226
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1379 => _1379.colWidthOverridesPx, 'access', _1380 => _1380[col]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1381 => _1381.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
|
|
20910
21227
|
showGridLines
|
|
20911
21228
|
),
|
|
20912
21229
|
DEFAULT_COL_WIDTH2 / 2
|
|
@@ -20914,8 +21231,8 @@ function XlsxGrid({
|
|
|
20914
21231
|
}
|
|
20915
21232
|
return widths;
|
|
20916
21233
|
}
|
|
20917
|
-
const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20918
|
-
const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21234
|
+
const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1382 => _1382.visibleCols]), () => ( []));
|
|
21235
|
+
const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1383 => _1383.colWidths]), () => ( []));
|
|
20919
21236
|
for (let index = 0; index < precomputedCols.length; index += 1) {
|
|
20920
21237
|
const col = precomputedCols[index];
|
|
20921
21238
|
if (col === void 0 || col >= displayColLimit) {
|
|
@@ -20923,27 +21240,27 @@ function XlsxGrid({
|
|
|
20923
21240
|
}
|
|
20924
21241
|
widths[col] = Math.max(
|
|
20925
21242
|
resolveRenderedSheetAxisPixels(
|
|
20926
|
-
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21243
|
+
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1384 => _1384.colWidthOverridesPx, 'access', _1385 => _1385[col]]), () => ( precomputedWidths[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1386 => _1386.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
|
|
20927
21244
|
showGridLines
|
|
20928
21245
|
),
|
|
20929
21246
|
DEFAULT_COL_WIDTH2 / 2
|
|
20930
21247
|
);
|
|
20931
21248
|
}
|
|
20932
|
-
for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
20933
|
-
const overrideWidth = _optionalChain([activeSheet, 'optionalAccess',
|
|
21249
|
+
for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1387 => _1387.maxUsedCol]), () => ( -1))) + 1); col < displayColLimit; col += 1) {
|
|
21250
|
+
const overrideWidth = _optionalChain([activeSheet, 'optionalAccess', _1388 => _1388.colWidthOverridesPx, 'access', _1389 => _1389[col]]);
|
|
20934
21251
|
widths[col] = overrideWidth === void 0 ? fallbackWidth : Math.max(resolveRenderedSheetAxisPixels(overrideWidth, showGridLines), DEFAULT_COL_WIDTH2 / 2);
|
|
20935
21252
|
}
|
|
20936
21253
|
return widths;
|
|
20937
21254
|
},
|
|
20938
21255
|
[
|
|
20939
21256
|
hiddenColSet,
|
|
20940
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20941
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20942
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20943
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20944
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20945
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
20946
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21257
|
+
_optionalChain([activeSheet, 'optionalAccess', _1390 => _1390.officeLayout]),
|
|
21258
|
+
_optionalChain([activeSheet, 'optionalAccess', _1391 => _1391.colWidthOverridesPx]),
|
|
21259
|
+
_optionalChain([activeSheet, 'optionalAccess', _1392 => _1392.colWidths]),
|
|
21260
|
+
_optionalChain([activeSheet, 'optionalAccess', _1393 => _1393.defaultColWidthPx]),
|
|
21261
|
+
_optionalChain([activeSheet, 'optionalAccess', _1394 => _1394.maxUsedCol]),
|
|
21262
|
+
_optionalChain([activeSheet, 'optionalAccess', _1395 => _1395.showGridLines]),
|
|
21263
|
+
_optionalChain([activeSheet, 'optionalAccess', _1396 => _1396.visibleCols]),
|
|
20947
21264
|
displayColLimit,
|
|
20948
21265
|
worksheet,
|
|
20949
21266
|
revision,
|
|
@@ -20952,21 +21269,21 @@ function XlsxGrid({
|
|
|
20952
21269
|
);
|
|
20953
21270
|
const actualRowHeights = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
20954
21271
|
() => {
|
|
20955
|
-
const office = _optionalChain([activeSheet, 'optionalAccess',
|
|
21272
|
+
const office = _optionalChain([activeSheet, 'optionalAccess', _1397 => _1397.officeLayout]);
|
|
20956
21273
|
if (office) {
|
|
20957
21274
|
return Array.from({ length: displayRowLimit }, (_2, index) => {
|
|
20958
21275
|
if (hiddenRowSet.has(index)) return 0;
|
|
20959
21276
|
const original = office.rows[index];
|
|
20960
|
-
const override = _optionalChain([activeSheet, 'optionalAccess',
|
|
20961
|
-
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess',
|
|
20962
|
-
const height = _optionalChain([worksheet, 'optionalAccess',
|
|
20963
|
-
return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess',
|
|
21277
|
+
const override = _optionalChain([activeSheet, 'optionalAccess', _1398 => _1398.rowHeightOverridesPx, 'access', _1399 => _1399[index]]);
|
|
21278
|
+
if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1400 => _1400.sourcePx])) return override;
|
|
21279
|
+
const height = _optionalChain([worksheet, 'optionalAccess', _1401 => _1401.getRowHeight, 'call', _1402 => _1402(index)]);
|
|
21280
|
+
return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1403 => _1403.sizePx]), () => ( office.defaultRowPx));
|
|
20964
21281
|
});
|
|
20965
21282
|
}
|
|
20966
21283
|
const heights = new Array(displayRowLimit).fill(0);
|
|
20967
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21284
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1404 => _1404.showGridLines]), () => ( true));
|
|
20968
21285
|
const fallbackHeight = Math.max(
|
|
20969
|
-
resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21286
|
+
resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1405 => _1405.defaultRowHeightPx]), () => ( DEFAULT_ROW_HEIGHT2)), showGridLines),
|
|
20970
21287
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
20971
21288
|
);
|
|
20972
21289
|
if (worksheet) {
|
|
@@ -20982,7 +21299,7 @@ function XlsxGrid({
|
|
|
20982
21299
|
);
|
|
20983
21300
|
continue;
|
|
20984
21301
|
}
|
|
20985
|
-
const maxMeasuredCol = Math.min(displayColLimit - 1, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21302
|
+
const maxMeasuredCol = Math.min(displayColLimit - 1, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1406 => _1406.maxUsedCol]), () => ( -1)));
|
|
20986
21303
|
let estimatedAutoHeight = 0;
|
|
20987
21304
|
if (maxMeasuredCol >= 0) {
|
|
20988
21305
|
for (let col = 0; col <= maxMeasuredCol; col += 1) {
|
|
@@ -20994,17 +21311,17 @@ function XlsxGrid({
|
|
|
20994
21311
|
continue;
|
|
20995
21312
|
}
|
|
20996
21313
|
const rawStyle = _nullishCoalesce(worksheet.getCellStyleAt(row, col), () => ( null));
|
|
20997
|
-
const cellStyle = buildCellStyle(rawStyle, palette, _optionalChain([activeSheet, 'optionalAccess',
|
|
20998
|
-
showGridLines: _optionalChain([activeSheet, 'optionalAccess',
|
|
21314
|
+
const cellStyle = buildCellStyle(rawStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1407 => _1407.themePalette]), {
|
|
21315
|
+
showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1408 => _1408.showGridLines])
|
|
20999
21316
|
});
|
|
21000
21317
|
if (cellStyle.whiteSpace !== "pre-wrap" && !cellValue.includes("\n") && !cellValue.includes("\r")) {
|
|
21001
21318
|
continue;
|
|
21002
21319
|
}
|
|
21003
21320
|
const merge = worksheet.getMergeSpan(row, col);
|
|
21004
|
-
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
21321
|
+
const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1409 => _1409.colSpan]), () => ( 1)));
|
|
21005
21322
|
let cellWidth = 0;
|
|
21006
21323
|
for (let spanCol = col; spanCol < Math.min(displayColLimit, col + colSpan); spanCol += 1) {
|
|
21007
|
-
cellWidth += _nullishCoalesce(actualColWidths[spanCol], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21324
|
+
cellWidth += _nullishCoalesce(actualColWidths[spanCol], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1410 => _1410.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)))));
|
|
21008
21325
|
}
|
|
21009
21326
|
estimatedAutoHeight = Math.max(
|
|
21010
21327
|
estimatedAutoHeight,
|
|
@@ -21021,7 +21338,7 @@ function XlsxGrid({
|
|
|
21021
21338
|
}
|
|
21022
21339
|
heights[row] = Math.max(
|
|
21023
21340
|
resolveRenderedSheetAxisPixels(
|
|
21024
|
-
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21341
|
+
_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1411 => _1411.rowHeightOverridesPx, 'access', _1412 => _1412[row]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1413 => _1413.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
|
|
21025
21342
|
showGridLines
|
|
21026
21343
|
),
|
|
21027
21344
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
@@ -21029,8 +21346,8 @@ function XlsxGrid({
|
|
|
21029
21346
|
}
|
|
21030
21347
|
return heights;
|
|
21031
21348
|
}
|
|
21032
|
-
const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21033
|
-
const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21349
|
+
const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1414 => _1414.visibleRows]), () => ( []));
|
|
21350
|
+
const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1415 => _1415.rowHeights]), () => ( []));
|
|
21034
21351
|
for (let index = 0; index < precomputedRows.length; index += 1) {
|
|
21035
21352
|
const row = precomputedRows[index];
|
|
21036
21353
|
if (row === void 0 || row >= displayRowLimit) {
|
|
@@ -21038,29 +21355,29 @@ function XlsxGrid({
|
|
|
21038
21355
|
}
|
|
21039
21356
|
heights[row] = Math.max(
|
|
21040
21357
|
resolveRenderedSheetAxisPixels(
|
|
21041
|
-
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21358
|
+
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1416 => _1416.rowHeightOverridesPx, 'access', _1417 => _1417[row]]), () => ( precomputedHeights[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1418 => _1418.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
|
|
21042
21359
|
showGridLines
|
|
21043
21360
|
),
|
|
21044
21361
|
DEFAULT_ROW_HEIGHT2 / 1.5
|
|
21045
21362
|
);
|
|
21046
21363
|
}
|
|
21047
|
-
for (let row = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21048
|
-
const overrideHeight = _optionalChain([activeSheet, 'optionalAccess',
|
|
21364
|
+
for (let row = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1419 => _1419.maxUsedRow]), () => ( -1))) + 1); row < displayRowLimit; row += 1) {
|
|
21365
|
+
const overrideHeight = _optionalChain([activeSheet, 'optionalAccess', _1420 => _1420.rowHeightOverridesPx, 'access', _1421 => _1421[row]]);
|
|
21049
21366
|
heights[row] = overrideHeight === void 0 ? fallbackHeight : Math.max(resolveRenderedSheetAxisPixels(overrideHeight, showGridLines), DEFAULT_ROW_HEIGHT2 / 1.5);
|
|
21050
21367
|
}
|
|
21051
21368
|
return heights;
|
|
21052
21369
|
},
|
|
21053
21370
|
[
|
|
21054
21371
|
hiddenRowSet,
|
|
21055
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21056
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21057
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21058
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21059
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21060
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21061
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21062
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21063
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21372
|
+
_optionalChain([activeSheet, 'optionalAccess', _1422 => _1422.officeLayout]),
|
|
21373
|
+
_optionalChain([activeSheet, 'optionalAccess', _1423 => _1423.defaultRowHeightPx]),
|
|
21374
|
+
_optionalChain([activeSheet, 'optionalAccess', _1424 => _1424.maxUsedRow]),
|
|
21375
|
+
_optionalChain([activeSheet, 'optionalAccess', _1425 => _1425.maxUsedCol]),
|
|
21376
|
+
_optionalChain([activeSheet, 'optionalAccess', _1426 => _1426.rowHeightOverridesPx]),
|
|
21377
|
+
_optionalChain([activeSheet, 'optionalAccess', _1427 => _1427.rowHeights]),
|
|
21378
|
+
_optionalChain([activeSheet, 'optionalAccess', _1428 => _1428.showGridLines]),
|
|
21379
|
+
_optionalChain([activeSheet, 'optionalAccess', _1429 => _1429.themePalette]),
|
|
21380
|
+
_optionalChain([activeSheet, 'optionalAccess', _1430 => _1430.visibleRows]),
|
|
21064
21381
|
actualColWidths,
|
|
21065
21382
|
displayRowLimit,
|
|
21066
21383
|
displayColLimit,
|
|
@@ -21259,19 +21576,19 @@ function XlsxGrid({
|
|
|
21259
21576
|
[currentColVirtualItems]
|
|
21260
21577
|
);
|
|
21261
21578
|
const maxRowDisplayLimit = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
21262
|
-
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21263
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
21579
|
+
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1431 => _1431.maxUsedRow]), () => ( -1)), MIN_OPEN_GRID_ROWS, OPEN_GRID_ROW_PADDING),
|
|
21580
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1432 => _1432.maxUsedRow])]
|
|
21264
21581
|
);
|
|
21265
21582
|
const maxColDisplayLimit = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
21266
|
-
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21267
|
-
[_optionalChain([activeSheet, 'optionalAccess',
|
|
21583
|
+
() => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1433 => _1433.maxUsedCol]), () => ( -1)), MIN_OPEN_GRID_COLS, OPEN_GRID_COL_PADDING),
|
|
21584
|
+
[_optionalChain([activeSheet, 'optionalAccess', _1434 => _1434.maxUsedCol])]
|
|
21268
21585
|
);
|
|
21269
21586
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
21270
21587
|
if (!isWorkerBacked) {
|
|
21271
21588
|
return;
|
|
21272
21589
|
}
|
|
21273
|
-
const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access',
|
|
21274
|
-
const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access',
|
|
21590
|
+
const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access', _1435 => _1435[currentRowVirtualItems.length - 1], 'optionalAccess', _1436 => _1436.index]), () => ( -1));
|
|
21591
|
+
const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access', _1437 => _1437[currentColVirtualItems.length - 1], 'optionalAccess', _1438 => _1438.index]), () => ( -1));
|
|
21275
21592
|
if (lastVirtualRowIndex >= visibleRows.length - WORKER_GRID_GROW_THRESHOLD_ROWS && displayRowLimit < maxRowDisplayLimit) {
|
|
21276
21593
|
setDisplayRowLimit((current) => Math.min(maxRowDisplayLimit, current + WORKER_GRID_GROW_ROWS));
|
|
21277
21594
|
}
|
|
@@ -21490,7 +21807,7 @@ function XlsxGrid({
|
|
|
21490
21807
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
21491
21808
|
setDisplayRowLimit(
|
|
21492
21809
|
resolveInitialDisplayExtent(
|
|
21493
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21810
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1439 => _1439.maxUsedRow]), () => ( -1)),
|
|
21494
21811
|
MIN_OPEN_GRID_ROWS,
|
|
21495
21812
|
OPEN_GRID_ROW_PADDING,
|
|
21496
21813
|
Boolean(isWorkerBacked),
|
|
@@ -21499,38 +21816,38 @@ function XlsxGrid({
|
|
|
21499
21816
|
);
|
|
21500
21817
|
setDisplayColLimit(
|
|
21501
21818
|
resolveInitialDisplayExtent(
|
|
21502
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21819
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1440 => _1440.maxUsedCol]), () => ( -1)),
|
|
21503
21820
|
MIN_OPEN_GRID_COLS,
|
|
21504
21821
|
OPEN_GRID_COL_PADDING,
|
|
21505
21822
|
Boolean(isWorkerBacked),
|
|
21506
21823
|
INITIAL_WORKER_GRID_COLS
|
|
21507
21824
|
)
|
|
21508
21825
|
);
|
|
21509
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
21826
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1441 => _1441.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1442 => _1442.maxUsedRow]), activeSheetIndex, isWorkerBacked]);
|
|
21510
21827
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
21511
|
-
const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess',
|
|
21512
|
-
const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess',
|
|
21828
|
+
const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1443 => _1443.end, 'access', _1444 => _1444.row]), () => ( -1));
|
|
21829
|
+
const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1445 => _1445.end, 'access', _1446 => _1446.col]), () => ( -1));
|
|
21513
21830
|
const nextRowLimit = Math.max(
|
|
21514
21831
|
resolveInitialDisplayExtent(
|
|
21515
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21832
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1447 => _1447.maxUsedRow]), () => ( -1)),
|
|
21516
21833
|
MIN_OPEN_GRID_ROWS,
|
|
21517
21834
|
OPEN_GRID_ROW_PADDING,
|
|
21518
21835
|
false,
|
|
21519
21836
|
INITIAL_WORKER_GRID_ROWS
|
|
21520
21837
|
),
|
|
21521
|
-
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess',
|
|
21838
|
+
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1448 => _1448.row]), () => ( -1))) + OPEN_GRID_ROW_PADDING + 1,
|
|
21522
21839
|
selectionEndRow + OPEN_GRID_ROW_PADDING + 1,
|
|
21523
21840
|
drawingExtents.maxRow + OPEN_GRID_ROW_PADDING + 1
|
|
21524
21841
|
);
|
|
21525
21842
|
const nextColLimit = Math.max(
|
|
21526
21843
|
resolveInitialDisplayExtent(
|
|
21527
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21844
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1449 => _1449.maxUsedCol]), () => ( -1)),
|
|
21528
21845
|
MIN_OPEN_GRID_COLS,
|
|
21529
21846
|
OPEN_GRID_COL_PADDING,
|
|
21530
21847
|
false,
|
|
21531
21848
|
INITIAL_WORKER_GRID_COLS
|
|
21532
21849
|
),
|
|
21533
|
-
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess',
|
|
21850
|
+
(_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1450 => _1450.col]), () => ( -1))) + OPEN_GRID_COL_PADDING + 1,
|
|
21534
21851
|
selectionEndCol + OPEN_GRID_COL_PADDING + 1,
|
|
21535
21852
|
drawingExtents.maxCol + OPEN_GRID_COL_PADDING + 1
|
|
21536
21853
|
);
|
|
@@ -21538,28 +21855,28 @@ function XlsxGrid({
|
|
|
21538
21855
|
setDisplayColLimit((current) => current < nextColLimit ? nextColLimit : current);
|
|
21539
21856
|
}, [
|
|
21540
21857
|
activeCell,
|
|
21541
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21542
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21858
|
+
_optionalChain([activeSheet, 'optionalAccess', _1451 => _1451.maxUsedCol]),
|
|
21859
|
+
_optionalChain([activeSheet, 'optionalAccess', _1452 => _1452.maxUsedRow]),
|
|
21543
21860
|
drawingExtents.maxCol,
|
|
21544
21861
|
drawingExtents.maxRow,
|
|
21545
|
-
_optionalChain([normalizedSelection, 'optionalAccess',
|
|
21546
|
-
_optionalChain([normalizedSelection, 'optionalAccess',
|
|
21862
|
+
_optionalChain([normalizedSelection, 'optionalAccess', _1453 => _1453.end, 'access', _1454 => _1454.col]),
|
|
21863
|
+
_optionalChain([normalizedSelection, 'optionalAccess', _1455 => _1455.end, 'access', _1456 => _1456.row])
|
|
21547
21864
|
]);
|
|
21548
21865
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
21549
21866
|
const initialScrollKey = [
|
|
21550
21867
|
displayFileName,
|
|
21551
21868
|
activeSheetIndex,
|
|
21552
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21553
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21554
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21555
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21869
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1457 => _1457.workbookSheetIndex]), () => ( -1)),
|
|
21870
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1458 => _1458.name]), () => ( "")),
|
|
21871
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1459 => _1459.minUsedRow]), () => ( -1)),
|
|
21872
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1460 => _1460.minUsedCol]), () => ( -1)),
|
|
21556
21873
|
isWorkerBacked ? "worker" : "main"
|
|
21557
21874
|
].join("|");
|
|
21558
21875
|
if (initialScrollKeyRef.current === initialScrollKey) {
|
|
21559
21876
|
return;
|
|
21560
21877
|
}
|
|
21561
|
-
const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21562
|
-
const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
21878
|
+
const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1461 => _1461.minUsedRow]), () => ( -1)));
|
|
21879
|
+
const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1462 => _1462.minUsedCol]), () => ( -1)));
|
|
21563
21880
|
const initialScrollTop = initialUsedRow > 0 ? sumPrefixRange(actualRowPrefixSums, 0, initialUsedRow - 1) : 0;
|
|
21564
21881
|
const initialScrollLeft = initialUsedCol > 0 ? sumPrefixRange(actualColPrefixSums, 0, initialUsedCol - 1) : 0;
|
|
21565
21882
|
if (shouldUseDomVirtualizer && shouldVirtualizeRows) {
|
|
@@ -21578,10 +21895,10 @@ function XlsxGrid({
|
|
|
21578
21895
|
}
|
|
21579
21896
|
initialScrollKeyRef.current = initialScrollKey;
|
|
21580
21897
|
}, [
|
|
21581
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21582
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21583
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21584
|
-
_optionalChain([activeSheet, 'optionalAccess',
|
|
21898
|
+
_optionalChain([activeSheet, 'optionalAccess', _1463 => _1463.minUsedCol]),
|
|
21899
|
+
_optionalChain([activeSheet, 'optionalAccess', _1464 => _1464.minUsedRow]),
|
|
21900
|
+
_optionalChain([activeSheet, 'optionalAccess', _1465 => _1465.name]),
|
|
21901
|
+
_optionalChain([activeSheet, 'optionalAccess', _1466 => _1466.workbookSheetIndex]),
|
|
21585
21902
|
activeSheetIndex,
|
|
21586
21903
|
actualColPrefixSums,
|
|
21587
21904
|
actualRowPrefixSums,
|
|
@@ -21820,7 +22137,7 @@ function XlsxGrid({
|
|
|
21820
22137
|
return;
|
|
21821
22138
|
}
|
|
21822
22139
|
function handlePointerDown(event) {
|
|
21823
|
-
if (_optionalChain([tableMenuRef, 'access',
|
|
22140
|
+
if (_optionalChain([tableMenuRef, 'access', _1467 => _1467.current, 'optionalAccess', _1468 => _1468.contains, 'call', _1469 => _1469(event.target)])) {
|
|
21824
22141
|
return;
|
|
21825
22142
|
}
|
|
21826
22143
|
setOpenTableMenu(null);
|
|
@@ -21887,7 +22204,7 @@ function XlsxGrid({
|
|
|
21887
22204
|
if (!(element instanceof HTMLElement)) {
|
|
21888
22205
|
continue;
|
|
21889
22206
|
}
|
|
21890
|
-
const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access',
|
|
22207
|
+
const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access', _1470 => _1470.closest, 'call', _1471 => _1471("[data-xlsx-cell]"), 'optionalAccess', _1472 => _1472.getAttribute, 'call', _1473 => _1473("data-xlsx-cell")]), () => ( null)));
|
|
21891
22208
|
if (cell) {
|
|
21892
22209
|
return cell;
|
|
21893
22210
|
}
|
|
@@ -21919,8 +22236,8 @@ function XlsxGrid({
|
|
|
21919
22236
|
const resolveDraggedSelectionCell = _chunkA3S3QKJNcjs.q.call(void 0, (dragState, clientX, clientY) => {
|
|
21920
22237
|
const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
|
|
21921
22238
|
const hitCell = resolvePointerCellFromHitTest(clientX, clientY);
|
|
21922
|
-
const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess',
|
|
21923
|
-
const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess',
|
|
22239
|
+
const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1474 => _1474.row]), () => ( (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0)));
|
|
22240
|
+
const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1475 => _1475.col]), () => ( _optionalChain([hitCell, 'optionalAccess', _1476 => _1476.col])));
|
|
21924
22241
|
if (actualRow === void 0 || actualCol === void 0) {
|
|
21925
22242
|
return null;
|
|
21926
22243
|
}
|
|
@@ -22026,18 +22343,18 @@ function XlsxGrid({
|
|
|
22026
22343
|
}
|
|
22027
22344
|
}, [displayDefaultColWidth, displayEffectiveColWidths, displayRowHeaderWidth, visibleCols]);
|
|
22028
22345
|
const applyRowPreview = _chunkA3S3QKJNcjs.q.call(void 0, (actualRow, heightPx) => {
|
|
22029
|
-
const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access',
|
|
22346
|
+
const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access', _1477 => _1477.current, 'optionalAccess', _1478 => _1478.querySelector, 'call', _1479 => _1479(`tr[data-xlsx-row="${actualRow}"]`)]))), () => ( null));
|
|
22030
22347
|
if (rowElement) {
|
|
22031
22348
|
rowElementRefs.current.set(actualRow, rowElement);
|
|
22032
22349
|
rowElement.style.height = heightPx === null ? "" : `${heightPx}px`;
|
|
22033
22350
|
}
|
|
22034
22351
|
}, []);
|
|
22035
22352
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
22036
|
-
_optionalChain([pendingSelectionDragCleanupRef, 'access',
|
|
22037
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
22038
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
22039
|
-
_optionalChain([chartInteractionCleanupRef, 'access',
|
|
22040
|
-
_optionalChain([imageInteractionCleanupRef, 'access',
|
|
22353
|
+
_optionalChain([pendingSelectionDragCleanupRef, 'access', _1480 => _1480.current, 'optionalCall', _1481 => _1481()]);
|
|
22354
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1482 => _1482.current, 'optionalCall', _1483 => _1483()]);
|
|
22355
|
+
_optionalChain([fillDragCleanupRef, 'access', _1484 => _1484.current, 'optionalCall', _1485 => _1485()]);
|
|
22356
|
+
_optionalChain([chartInteractionCleanupRef, 'access', _1486 => _1486.current, 'optionalCall', _1487 => _1487()]);
|
|
22357
|
+
_optionalChain([imageInteractionCleanupRef, 'access', _1488 => _1488.current, 'optionalCall', _1489 => _1489()]);
|
|
22041
22358
|
pendingSelectionDragCleanupRef.current = null;
|
|
22042
22359
|
selectionDragCleanupRef.current = null;
|
|
22043
22360
|
fillDragCleanupRef.current = null;
|
|
@@ -22053,6 +22370,7 @@ function XlsxGrid({
|
|
|
22053
22370
|
rowPreviewRef.current = null;
|
|
22054
22371
|
setResizeGuide(null);
|
|
22055
22372
|
clearGlobalCursor();
|
|
22373
|
+
editingCellRef.current = null;
|
|
22056
22374
|
setEditingCell(null);
|
|
22057
22375
|
setEditingValue("");
|
|
22058
22376
|
setFillPreviewRange(null);
|
|
@@ -22098,7 +22416,7 @@ function XlsxGrid({
|
|
|
22098
22416
|
if (!scroller || interactiveTarget && interactiveTarget !== scroller) {
|
|
22099
22417
|
return;
|
|
22100
22418
|
}
|
|
22101
|
-
_optionalChain([gridKeyboardHandlerRef, 'access',
|
|
22419
|
+
_optionalChain([gridKeyboardHandlerRef, 'access', _1490 => _1490.current, 'optionalCall', _1491 => _1491(event)]);
|
|
22102
22420
|
};
|
|
22103
22421
|
document.addEventListener("pointerdown", handleDocumentPointerDown, true);
|
|
22104
22422
|
document.addEventListener("keydown", handleDocumentKeyDown);
|
|
@@ -22124,7 +22442,7 @@ function XlsxGrid({
|
|
|
22124
22442
|
return;
|
|
22125
22443
|
}
|
|
22126
22444
|
}
|
|
22127
|
-
const externalTarget = _optionalChain([target, 'optionalAccess',
|
|
22445
|
+
const externalTarget = _optionalChain([target, 'optionalAccess', _1492 => _1492.trim, 'call', _1493 => _1493()]);
|
|
22128
22446
|
if (!externalTarget || externalTarget.startsWith("#") || typeof window === "undefined") {
|
|
22129
22447
|
return;
|
|
22130
22448
|
}
|
|
@@ -22140,17 +22458,20 @@ function XlsxGrid({
|
|
|
22140
22458
|
window.open(url.href, "_blank", "noopener,noreferrer");
|
|
22141
22459
|
}, [activeSheetIndex, selectCell, setActiveSheetIndex, sheets]);
|
|
22142
22460
|
const startEditing = _chunkA3S3QKJNcjs.q.call(void 0,
|
|
22143
|
-
(cell, initialValue) => {
|
|
22461
|
+
(cell, initialValue, trigger = "keyboard") => {
|
|
22144
22462
|
if (readOnly) {
|
|
22145
22463
|
return;
|
|
22146
22464
|
}
|
|
22147
22465
|
selectCell(cell);
|
|
22148
|
-
|
|
22149
|
-
|
|
22466
|
+
const target = { ...cell };
|
|
22467
|
+
editingCellRef.current = target;
|
|
22468
|
+
setEditingCell(target);
|
|
22150
22469
|
const formula = getCellFormula(cell);
|
|
22151
22470
|
const worksheet2 = getActiveWorksheet();
|
|
22152
22471
|
const value = formula ? formula.startsWith("=") ? formula : `=${formula}` : worksheet2 ? getCellEditingValue(worksheet2, cell, locale) : getControllerCellDisplayValue(cell);
|
|
22153
22472
|
editingOriginalValueRef.current = initialValue === void 0 ? value : null;
|
|
22473
|
+
editingSavedValueRef.current = value;
|
|
22474
|
+
editingTriggerRef.current = trigger;
|
|
22154
22475
|
setEditingValue(_nullishCoalesce(initialValue, () => ( value)));
|
|
22155
22476
|
},
|
|
22156
22477
|
[getActiveWorksheet, getCellFormula, getControllerCellDisplayValue, locale, readOnly, selectCell]
|
|
@@ -22165,7 +22486,7 @@ function XlsxGrid({
|
|
|
22165
22486
|
setCellValue(cell, value);
|
|
22166
22487
|
}
|
|
22167
22488
|
}, [getActiveWorksheet, locale, setCellFormula, setCellValue]);
|
|
22168
|
-
const commitEditing = _chunkA3S3QKJNcjs.q.call(void 0, () => {
|
|
22489
|
+
const commitEditing = _chunkA3S3QKJNcjs.q.call(void 0, (nextValue) => {
|
|
22169
22490
|
if (!editingCell || !editingCellRef.current) {
|
|
22170
22491
|
return;
|
|
22171
22492
|
}
|
|
@@ -22176,7 +22497,7 @@ function XlsxGrid({
|
|
|
22176
22497
|
focusGrid();
|
|
22177
22498
|
return;
|
|
22178
22499
|
}
|
|
22179
|
-
saveEditingValue(editingCell, editingValue);
|
|
22500
|
+
saveEditingValue(editingCell, _nullishCoalesce(nextValue, () => ( editingValue)));
|
|
22180
22501
|
editingCellRef.current = null;
|
|
22181
22502
|
setEditingCell(null);
|
|
22182
22503
|
setEditingValue("");
|
|
@@ -22188,12 +22509,37 @@ function XlsxGrid({
|
|
|
22188
22509
|
setEditingValue("");
|
|
22189
22510
|
focusGrid();
|
|
22190
22511
|
}, [focusGrid]);
|
|
22191
|
-
const
|
|
22512
|
+
const { session: cellEditorSession, hasPreview: hasEditorPreview } = useCellEditorSession({
|
|
22513
|
+
enabled: !!renderCellEditorOverlay && !readOnly && !isLoading,
|
|
22514
|
+
cell: editingCell,
|
|
22515
|
+
sheetIndex: activeSheetIndex,
|
|
22516
|
+
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1494 => _1494.name]), () => ( "")),
|
|
22517
|
+
originalValue: editingSavedValueRef.current,
|
|
22518
|
+
trigger: editingTriggerRef.current,
|
|
22519
|
+
value: editingValue,
|
|
22520
|
+
inputRef: editingInputRef,
|
|
22521
|
+
isEditing: () => editingCell !== null && editingCellRef.current === editingCell && !readOnlyRef.current,
|
|
22522
|
+
onChange: setEditingValue,
|
|
22523
|
+
onCommit: commitEditing,
|
|
22524
|
+
onCancel: cancelEditing
|
|
22525
|
+
});
|
|
22526
|
+
const exitEditorScope = _chunkA3S3QKJNcjs.q.call(void 0, () => {
|
|
22527
|
+
if (hasEditorPreview()) cancelEditing();
|
|
22528
|
+
else commitEditing();
|
|
22529
|
+
}, [cancelEditing, commitEditing, hasEditorPreview]);
|
|
22530
|
+
const focusEditorOverlay = _chunkA3S3QKJNcjs.q.call(void 0, () => {
|
|
22531
|
+
const target = _optionalChain([editorOverlayRef, 'access', _1495 => _1495.current, 'optionalAccess', _1496 => _1496.querySelector, 'call', _1497 => _1497('button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex="0"]')]);
|
|
22532
|
+
if (!target) return false;
|
|
22533
|
+
target.focus({ preventScroll: true });
|
|
22534
|
+
return true;
|
|
22535
|
+
}, []);
|
|
22536
|
+
const handleEditingBlur = _chunkA3S3QKJNcjs.q.call(void 0, (event) => {
|
|
22192
22537
|
if (!editingCellRef.current) {
|
|
22193
22538
|
return;
|
|
22194
22539
|
}
|
|
22195
|
-
|
|
22196
|
-
|
|
22540
|
+
if (event.relatedTarget && _optionalChain([editorOverlayRef, 'access', _1498 => _1498.current, 'optionalAccess', _1499 => _1499.contains, 'call', _1500 => _1500(event.relatedTarget)])) return;
|
|
22541
|
+
exitEditorScope();
|
|
22542
|
+
}, [exitEditorScope]);
|
|
22197
22543
|
const handleEditingNavigate = _chunkA3S3QKJNcjs.q.call(void 0, (key, value) => {
|
|
22198
22544
|
const cell = editingCellRef.current;
|
|
22199
22545
|
if (!cell) {
|
|
@@ -22202,7 +22548,7 @@ function XlsxGrid({
|
|
|
22202
22548
|
const currentRowIndex = rowIndexByActual.get(cell.row);
|
|
22203
22549
|
const currentColIndex = colIndexByActual.get(cell.col);
|
|
22204
22550
|
if (currentRowIndex === void 0 || currentColIndex === void 0) {
|
|
22205
|
-
if (!readOnlyRef.current) {
|
|
22551
|
+
if (!readOnlyRef.current && !hasEditorPreview()) {
|
|
22206
22552
|
saveEditingValue(cell, value);
|
|
22207
22553
|
}
|
|
22208
22554
|
editingCellRef.current = null;
|
|
@@ -22229,7 +22575,7 @@ function XlsxGrid({
|
|
|
22229
22575
|
default:
|
|
22230
22576
|
return;
|
|
22231
22577
|
}
|
|
22232
|
-
if (!readOnlyRef.current) {
|
|
22578
|
+
if (!readOnlyRef.current && !hasEditorPreview()) {
|
|
22233
22579
|
saveEditingValue(cell, value);
|
|
22234
22580
|
}
|
|
22235
22581
|
editingCellRef.current = null;
|
|
@@ -22237,7 +22583,7 @@ function XlsxGrid({
|
|
|
22237
22583
|
setEditingValue("");
|
|
22238
22584
|
moveSelection(nextRowIndex, nextColIndex, false);
|
|
22239
22585
|
focusGrid();
|
|
22240
|
-
}, [colIndexByActual, focusGrid, rowIndexByActual, saveEditingValue, visibleCols, visibleRows]);
|
|
22586
|
+
}, [colIndexByActual, focusGrid, hasEditorPreview, rowIndexByActual, saveEditingValue, visibleCols, visibleRows]);
|
|
22241
22587
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
22242
22588
|
commitEditingRef.current = commitEditing;
|
|
22243
22589
|
}, [commitEditing]);
|
|
@@ -22352,11 +22698,11 @@ function XlsxGrid({
|
|
|
22352
22698
|
}, [activeSheetIndex, revision, locale]);
|
|
22353
22699
|
const sparklinesByCell = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
22354
22700
|
const map = /* @__PURE__ */ new Map();
|
|
22355
|
-
for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22701
|
+
for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1501 => _1501.sparklines]), () => ( []))) {
|
|
22356
22702
|
map.set(`${sparkline.target.row}:${sparkline.target.col}`, sparkline);
|
|
22357
22703
|
}
|
|
22358
22704
|
return map;
|
|
22359
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
22705
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1502 => _1502.sparklines])]);
|
|
22360
22706
|
const chartRangeHighlights = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
22361
22707
|
() => collectChartRangeHighlights(selectedChart, selectedChartElement, sheets, workbook, paletteIsDark(palette)),
|
|
22362
22708
|
[palette, selectedChart, selectedChartElement, sheets, workbook]
|
|
@@ -22411,8 +22757,8 @@ function XlsxGrid({
|
|
|
22411
22757
|
return cached;
|
|
22412
22758
|
}
|
|
22413
22759
|
const batchCoversRow = viewportRowBatch ? row >= viewportRowBatch.startRow && row <= viewportRowBatch.endRow : false;
|
|
22414
|
-
const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess',
|
|
22415
|
-
const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess',
|
|
22760
|
+
const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1503 => _1503.cells, 'access', _1504 => _1504.get, 'call', _1505 => _1505(cacheKey)]) : void 0;
|
|
22761
|
+
const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1506 => _1506.isMergedSecondary, 'call', _1507 => _1507(row, col)]), () => ( false));
|
|
22416
22762
|
if (!worksheet && !batchedCell) {
|
|
22417
22763
|
const emptyData = {
|
|
22418
22764
|
isMergedSecondary: false,
|
|
@@ -22420,7 +22766,7 @@ function XlsxGrid({
|
|
|
22420
22766
|
backgroundColor: resolveSheetSurface(activeSheet, palette),
|
|
22421
22767
|
borderBottom: "none",
|
|
22422
22768
|
borderRight: "none",
|
|
22423
|
-
boxShadow: _optionalChain([activeSheet, 'optionalAccess',
|
|
22769
|
+
boxShadow: _optionalChain([activeSheet, 'optionalAccess', _1508 => _1508.showGridLines]) ? buildGridlineShadow(palette.border) : void 0,
|
|
22424
22770
|
padding: DEFAULT_CELL_PADDING,
|
|
22425
22771
|
verticalAlign: "bottom",
|
|
22426
22772
|
whiteSpace: "nowrap"
|
|
@@ -22430,7 +22776,7 @@ function XlsxGrid({
|
|
|
22430
22776
|
cellRenderCacheRef.current.set(cacheKey, emptyData);
|
|
22431
22777
|
return emptyData;
|
|
22432
22778
|
}
|
|
22433
|
-
if (_optionalChain([batchedCell, 'optionalAccess',
|
|
22779
|
+
if (_optionalChain([batchedCell, 'optionalAccess', _1509 => _1509.isMergedSecondary]) || worksheetMergedSecondary) {
|
|
22434
22780
|
const mergedSecondaryData = {
|
|
22435
22781
|
isMergedSecondary: true,
|
|
22436
22782
|
style: {},
|
|
@@ -22439,7 +22785,7 @@ function XlsxGrid({
|
|
|
22439
22785
|
cellRenderCacheRef.current.set(cacheKey, mergedSecondaryData);
|
|
22440
22786
|
return mergedSecondaryData;
|
|
22441
22787
|
}
|
|
22442
|
-
const merge = worksheet ? worksheet.getMergeSpan(row, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess',
|
|
22788
|
+
const merge = worksheet ? worksheet.getMergeSpan(row, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1510 => _1510.mergeSpan]) : null;
|
|
22443
22789
|
const resolveBaseResolvedStyle = (targetRow, targetCol) => {
|
|
22444
22790
|
const targetCacheKey = `${targetRow}:${targetCol}`;
|
|
22445
22791
|
const cachedBaseStyle = cellBaseRawStyleCacheRef.current.get(targetCacheKey);
|
|
@@ -22447,9 +22793,9 @@ function XlsxGrid({
|
|
|
22447
22793
|
return cachedBaseStyle;
|
|
22448
22794
|
}
|
|
22449
22795
|
const targetBatchCoversRow = viewportRowBatch ? targetRow >= viewportRowBatch.startRow && targetRow <= viewportRowBatch.endRow : false;
|
|
22450
|
-
const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess',
|
|
22796
|
+
const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1511 => _1511.cells, 'access', _1512 => _1512.get, 'call', _1513 => _1513(targetCacheKey)]) : void 0;
|
|
22451
22797
|
const targetInheritedStyle = resolveInheritedCellStyle2(activeSheet, targetRow, targetCol);
|
|
22452
|
-
const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess',
|
|
22798
|
+
const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess', _1514 => _1514.style]), () => ( null)) : _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1515 => _1515.getCellStyleAt, 'call', _1516 => _1516(targetRow, targetCol)]), () => ( null));
|
|
22453
22799
|
const targetRawStyle = mergeResolvedCellStyle(targetInheritedStyle, targetWorksheetStyle, {
|
|
22454
22800
|
replaceXfSubtrees: true
|
|
22455
22801
|
});
|
|
@@ -22463,8 +22809,8 @@ function XlsxGrid({
|
|
|
22463
22809
|
return resolvedStyle;
|
|
22464
22810
|
};
|
|
22465
22811
|
const table = getTableAtCell(effectiveTables, row, col);
|
|
22466
|
-
const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
22467
|
-
const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess',
|
|
22812
|
+
const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1517 => _1517.rowSpan]), () => ( 1)));
|
|
22813
|
+
const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1518 => _1518.colSpan]), () => ( 1)));
|
|
22468
22814
|
let mergedBorderOverlay = null;
|
|
22469
22815
|
if (mergeRowSpan > 1 || mergeColSpan > 1) {
|
|
22470
22816
|
const mergedBorderOverlayCacheKey = `${row}:${col}:${mergeRowSpan}:${mergeColSpan}`;
|
|
@@ -22486,7 +22832,7 @@ function XlsxGrid({
|
|
|
22486
22832
|
let displayValue = null;
|
|
22487
22833
|
const readDisplayValue = () => {
|
|
22488
22834
|
if (displayValue === null) {
|
|
22489
|
-
displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess',
|
|
22835
|
+
displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _1519 => _1519.value]), () => ( "")) : getCellDisplayValue(worksheet, row, col, activeSheet, locale);
|
|
22490
22836
|
}
|
|
22491
22837
|
return displayValue;
|
|
22492
22838
|
};
|
|
@@ -22497,13 +22843,13 @@ function XlsxGrid({
|
|
|
22497
22843
|
() => worksheet ? getCellNumericValue(worksheet, row, col) : getBatchedCellNumericValue(batchedCell),
|
|
22498
22844
|
readDisplayValue,
|
|
22499
22845
|
worksheet,
|
|
22500
|
-
_optionalChain([viewportRowBatch, 'optionalAccess',
|
|
22846
|
+
_optionalChain([viewportRowBatch, 'optionalAccess', _1520 => _1520.cells])
|
|
22501
22847
|
);
|
|
22502
22848
|
const finalResolvedStyle = mergeResolvedCellStyle(resolvedMergedStyle, conditionalCellStyle);
|
|
22503
|
-
const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess',
|
|
22504
|
-
const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess',
|
|
22849
|
+
const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _1521 => _1521.alignment]);
|
|
22850
|
+
const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _1522 => _1522.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _1523 => _1523.textRotation]))));
|
|
22505
22851
|
const headerRowCount = table ? Math.max(table.headerRowCount, 1) : 0;
|
|
22506
|
-
const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess',
|
|
22852
|
+
const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1524 => _1524.hyperlink]) : _optionalChain([worksheet, 'optionalAccess', _1525 => _1525.getHyperlinkAt, 'call', _1526 => _1526(row, col)]);
|
|
22507
22853
|
const sparkline = _nullishCoalesce(sparklinesByCell.get(cacheKey), () => ( null));
|
|
22508
22854
|
const sparklineValues = sparkline && worksheet ? sparkline.range.start.row === sparkline.range.end.row ? Array.from(
|
|
22509
22855
|
{ length: Math.abs(sparkline.range.end.col - sparkline.range.start.col) + 1 },
|
|
@@ -22520,13 +22866,13 @@ function XlsxGrid({
|
|
|
22520
22866
|
sparkline.range.start.col
|
|
22521
22867
|
)
|
|
22522
22868
|
) : null;
|
|
22523
|
-
const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess',
|
|
22869
|
+
const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _1527 => _1527.cellControl]) && worksheet ? getCellBooleanValue(worksheet, row, col) : null;
|
|
22524
22870
|
const chartHighlight = resolveCellChartHighlight({ row, col }, activeSheetChartHighlights);
|
|
22525
22871
|
const nextData = {
|
|
22526
22872
|
canvas: void 0,
|
|
22527
22873
|
chartHighlight,
|
|
22528
22874
|
checkboxState,
|
|
22529
|
-
colSpan: _optionalChain([merge, 'optionalAccess',
|
|
22875
|
+
colSpan: _optionalChain([merge, 'optionalAccess', _1528 => _1528.colSpan]),
|
|
22530
22876
|
conditionalDataBar: worksheet ? resolveConditionalDataBarForCell(
|
|
22531
22877
|
row,
|
|
22532
22878
|
col,
|
|
@@ -22550,15 +22896,15 @@ function XlsxGrid({
|
|
|
22550
22896
|
) : null,
|
|
22551
22897
|
hyperlink: _nullishCoalesce(rawHyperlink, () => ( null)),
|
|
22552
22898
|
isMergedSecondary: false,
|
|
22553
|
-
shrinkToFit: _optionalChain([alignment, 'optionalAccess',
|
|
22899
|
+
shrinkToFit: _optionalChain([alignment, 'optionalAccess', _1529 => _1529.shrinkToFit]) === true,
|
|
22554
22900
|
isTableHeader: Boolean(table && row >= table.start.row && row < table.start.row + headerRowCount),
|
|
22555
|
-
rowSpan: _optionalChain([merge, 'optionalAccess',
|
|
22901
|
+
rowSpan: _optionalChain([merge, 'optionalAccess', _1530 => _1530.rowSpan]),
|
|
22556
22902
|
sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
|
|
22557
|
-
style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess',
|
|
22558
|
-
generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess',
|
|
22559
|
-
showGridLines: _optionalChain([activeSheet, 'optionalAccess',
|
|
22903
|
+
style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1531 => _1531.themePalette]), {
|
|
22904
|
+
generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess', _1532 => _1532.generalAlignment]),
|
|
22905
|
+
showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1533 => _1533.showGridLines])
|
|
22560
22906
|
}), zoomFactor),
|
|
22561
|
-
usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess',
|
|
22907
|
+
usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess', _1534 => _1534.horizontal]) || alignment.horizontal === "general",
|
|
22562
22908
|
textRotationDeg,
|
|
22563
22909
|
validation: resolveCellDataValidation(row, col, activeSheet),
|
|
22564
22910
|
value: sparkline ? "" : checkboxState !== null ? "" : readDisplayValue()
|
|
@@ -22575,9 +22921,9 @@ function XlsxGrid({
|
|
|
22575
22921
|
isMerged: Boolean(nextData.colSpan || nextData.rowSpan),
|
|
22576
22922
|
isTableHeader: Boolean(nextData.isTableHeader),
|
|
22577
22923
|
resolvedStyle: { ...nextData.style },
|
|
22578
|
-
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22924
|
+
sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1535 => _1535.name]), () => ( "")),
|
|
22579
22925
|
value: nextData.value,
|
|
22580
|
-
workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
22926
|
+
workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1536 => _1536.workbookSheetIndex]), () => ( -1))
|
|
22581
22927
|
});
|
|
22582
22928
|
if (styleOverrides) {
|
|
22583
22929
|
nextData.style = { ...nextData.style, ...styleOverrides };
|
|
@@ -22697,7 +23043,7 @@ function XlsxGrid({
|
|
|
22697
23043
|
]);
|
|
22698
23044
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
22699
23045
|
conditionalFormatMetricsCacheRef.current.clear();
|
|
22700
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
23046
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1537 => _1537.conditionalFormatRules]), _optionalChain([activeSheet, 'optionalAccess', _1538 => _1538.workbookSheetIndex]), revision]);
|
|
22701
23047
|
const selectionOverlay = _chunkA3S3QKJNcjs.T.call(void 0, () => {
|
|
22702
23048
|
if (!displayedSelection) {
|
|
22703
23049
|
return null;
|
|
@@ -22746,11 +23092,11 @@ function XlsxGrid({
|
|
|
22746
23092
|
}
|
|
22747
23093
|
setDisplayRowLimit((current) => Math.max(current, requiredRows));
|
|
22748
23094
|
setDisplayColLimit((current) => Math.max(current, requiredCols));
|
|
22749
|
-
}, [_optionalChain([activeSheet, 'optionalAccess',
|
|
23095
|
+
}, [_optionalChain([activeSheet, 'optionalAccess', _1539 => _1539.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1540 => _1540.maxUsedRow]), highlightedCellRanges, activeSheetIndex, isWorkerBacked]);
|
|
22750
23096
|
_chunkA3S3QKJNcjs.h.call(void 0, () => {
|
|
22751
23097
|
const scroller = scrollRef.current;
|
|
22752
23098
|
const target = rangeHighlightRects.find(({ highlight: highlight2 }) => highlight2.autoScroll);
|
|
22753
|
-
if (!scroller || !_optionalChain([target, 'optionalAccess',
|
|
23099
|
+
if (!scroller || !_optionalChain([target, 'optionalAccess', _1541 => _1541.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) {
|
|
22754
23100
|
return;
|
|
22755
23101
|
}
|
|
22756
23102
|
const { highlight, rect } = target;
|
|
@@ -22773,11 +23119,11 @@ function XlsxGrid({
|
|
|
22773
23119
|
() => domExpandedWindow.colIndices.map((index) => {
|
|
22774
23120
|
const virtualCol = colVirtualItemByIndex.get(index);
|
|
22775
23121
|
return {
|
|
22776
|
-
end: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess',
|
|
23122
|
+
end: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1542 => _1542.end]), () => ( (_nullishCoalesce(colPrefixSums[index + 1], () => ( 0))))),
|
|
22777
23123
|
index,
|
|
22778
23124
|
key: _nullishCoalesce(visibleCols[index], () => ( index)),
|
|
22779
|
-
size: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess',
|
|
22780
|
-
start: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess',
|
|
23125
|
+
size: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1543 => _1543.size]), () => ( (_nullishCoalesce(displayEffectiveColWidths[index], () => ( displayDefaultColWidth))))),
|
|
23126
|
+
start: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1544 => _1544.start]), () => ( (_nullishCoalesce(colPrefixSums[index], () => ( 0)))))
|
|
22781
23127
|
};
|
|
22782
23128
|
}),
|
|
22783
23129
|
[colPrefixSums, colVirtualItemByIndex, displayDefaultColWidth, displayEffectiveColWidths, domExpandedWindow.colIndices, visibleCols]
|
|
@@ -22898,8 +23244,8 @@ function XlsxGrid({
|
|
|
22898
23244
|
};
|
|
22899
23245
|
}, [canvasVisibleColItems, canvasVisibleRowItems, colIndexByActual, frozenCols, frozenRows, rowIndexByActual]);
|
|
22900
23246
|
const totalContentWidth = _nullishCoalesce(colPrefixSums[colPrefixSums.length - 1], () => ( 0));
|
|
22901
|
-
const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access',
|
|
22902
|
-
const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access',
|
|
23247
|
+
const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access', _1545 => _1545[0], 'optionalAccess', _1546 => _1546.start]), () => ( 0)) : 0;
|
|
23248
|
+
const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access', _1547 => _1547[virtualCols.length - 1], 'optionalAccess', _1548 => _1548.end]), () => ( 0))) : 0;
|
|
22903
23249
|
const imageRects = _chunkA3S3QKJNcjs.T.call(void 0,
|
|
22904
23250
|
() => showImages ? images.map((image) => ({
|
|
22905
23251
|
image,
|
|
@@ -23103,8 +23449,8 @@ function XlsxGrid({
|
|
|
23103
23449
|
const normalized = normalizeRange2(range);
|
|
23104
23450
|
const isSingleCellSelection = normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col;
|
|
23105
23451
|
const mergedRange = isSingleCellSelection ? findMergedRange(normalized.start) : null;
|
|
23106
|
-
const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess',
|
|
23107
|
-
const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess',
|
|
23452
|
+
const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1549 => _1549.start]), () => ( normalized.start));
|
|
23453
|
+
const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1550 => _1550.end]), () => ( normalized.end));
|
|
23108
23454
|
const startRowIndex = rowIndexByActual.get(startCell.row);
|
|
23109
23455
|
const endRowIndex = rowIndexByActual.get(endCell.row);
|
|
23110
23456
|
const startColIndex = colIndexByActual.get(startCell.col);
|
|
@@ -23339,14 +23685,14 @@ function XlsxGrid({
|
|
|
23339
23685
|
const applyPreviewOverlay = _chunkA3S3QKJNcjs.q.call(void 0, (range, options) => {
|
|
23340
23686
|
const overlays = experimentalCanvas ? [...selectionPaneOverlayRefs.current.values()] : [selectionOverlayRef.current];
|
|
23341
23687
|
if (!range) {
|
|
23342
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
23688
|
+
if (_optionalChain([options, 'optionalAccess', _1551 => _1551.updateHeaderSelection]) !== false) {
|
|
23343
23689
|
applyHeaderSelection(range);
|
|
23344
23690
|
}
|
|
23345
23691
|
return;
|
|
23346
23692
|
}
|
|
23347
|
-
const nextRect = experimentalCanvas || _optionalChain([options, 'optionalAccess',
|
|
23693
|
+
const nextRect = experimentalCanvas || _optionalChain([options, 'optionalAccess', _1552 => _1552.preferGeometry]) ? _nullishCoalesce(resolveGeometryOverlayRect(range), () => ( resolveOverlayRect(range))) : _optionalChain([selectionDragRef, 'access', _1553 => _1553.current, 'optionalAccess', _1554 => _1554.didDrag]) || fillDragRef.current ? _nullishCoalesce(_nullishCoalesce(resolveDragPreviewRect(range), () => ( resolveGeometryOverlayRect(range))), () => ( resolveOverlayRect(range))) : resolveOverlayRect(range);
|
|
23348
23694
|
if (!nextRect) {
|
|
23349
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
23695
|
+
if (_optionalChain([options, 'optionalAccess', _1555 => _1555.updateHeaderSelection]) !== false) {
|
|
23350
23696
|
applyHeaderSelection(range);
|
|
23351
23697
|
}
|
|
23352
23698
|
return;
|
|
@@ -23368,7 +23714,7 @@ function XlsxGrid({
|
|
|
23368
23714
|
fillHandle.style.top = `${nextRect.top + nextRect.height - 4 * zoomFactor}px`;
|
|
23369
23715
|
}
|
|
23370
23716
|
}
|
|
23371
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
23717
|
+
if (_optionalChain([options, 'optionalAccess', _1556 => _1556.updateHeaderSelection]) !== false) {
|
|
23372
23718
|
applyHeaderSelection(range);
|
|
23373
23719
|
}
|
|
23374
23720
|
}, [applyHeaderSelection, experimentalCanvas, resolveDragPreviewRect, resolveGeometryOverlayRect, resolveOverlayRect, zoomFactor]);
|
|
@@ -23409,7 +23755,7 @@ function XlsxGrid({
|
|
|
23409
23755
|
return;
|
|
23410
23756
|
}
|
|
23411
23757
|
const cellData = getCellData(cell.row, cell.col);
|
|
23412
|
-
const shouldShow = _optionalChain([cellData, 'access',
|
|
23758
|
+
const shouldShow = _optionalChain([cellData, 'access', _1557 => _1557.validation, 'optionalAccess', _1558 => _1558.validationType]) === "list" && cellData.validation.showDropdown;
|
|
23413
23759
|
const rect = shouldShow ? resolveOverlayRect({ start: cell, end: cell }) : null;
|
|
23414
23760
|
if (!rect) {
|
|
23415
23761
|
overlay.style.opacity = "0";
|
|
@@ -23453,7 +23799,7 @@ function XlsxGrid({
|
|
|
23453
23799
|
}, [applyPreviewOverlay]);
|
|
23454
23800
|
const resolveResizeGuidePositionFromClient = _chunkA3S3QKJNcjs.q.call(void 0, (type, clientPosition) => {
|
|
23455
23801
|
const scroller = scrollRef.current;
|
|
23456
|
-
const scrollerRect = _optionalChain([scroller, 'optionalAccess',
|
|
23802
|
+
const scrollerRect = _optionalChain([scroller, 'optionalAccess', _1559 => _1559.getBoundingClientRect, 'call', _1560 => _1560()]);
|
|
23457
23803
|
if (!scroller || !scrollerRect) {
|
|
23458
23804
|
return null;
|
|
23459
23805
|
}
|
|
@@ -23505,7 +23851,7 @@ function XlsxGrid({
|
|
|
23505
23851
|
});
|
|
23506
23852
|
}
|
|
23507
23853
|
function handlePointerUp(event) {
|
|
23508
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
23854
|
+
if (_optionalChain([resizeStateRef, 'access', _1561 => _1561.current, 'optionalAccess', _1562 => _1562.pointerId]) === event.pointerId) {
|
|
23509
23855
|
const resizeState = resizeStateRef.current;
|
|
23510
23856
|
const preview = pendingResizePreviewRef.current;
|
|
23511
23857
|
resizeStateRef.current = null;
|
|
@@ -23595,7 +23941,7 @@ function XlsxGrid({
|
|
|
23595
23941
|
const cleanup = pendingSelectionDragCleanupRef.current;
|
|
23596
23942
|
pendingSelectionDragCleanupRef.current = null;
|
|
23597
23943
|
pendingSelectionDragRef.current = null;
|
|
23598
|
-
_optionalChain([cleanup, 'optionalCall',
|
|
23944
|
+
_optionalChain([cleanup, 'optionalCall', _1563 => _1563()]);
|
|
23599
23945
|
}
|
|
23600
23946
|
function finishPendingSelectionDrag() {
|
|
23601
23947
|
const pendingState = pendingSelectionDragRef.current;
|
|
@@ -23610,7 +23956,7 @@ function XlsxGrid({
|
|
|
23610
23956
|
return;
|
|
23611
23957
|
}
|
|
23612
23958
|
clearPendingSelectionDrag();
|
|
23613
|
-
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
23959
|
+
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1564 => _1564.current, 'optionalAccess', _1565 => _1565.getBoundingClientRect, 'call', _1566 => _1566()]), () => ( null));
|
|
23614
23960
|
pendingState.didDrag = true;
|
|
23615
23961
|
selectionDragRef.current = pendingState;
|
|
23616
23962
|
selectionPreviewRangeRef.current = pendingState.previewRange;
|
|
@@ -23623,10 +23969,10 @@ function XlsxGrid({
|
|
|
23623
23969
|
function installPendingSelectionDragListeners(pointerId, target) {
|
|
23624
23970
|
const existingCleanup = pendingSelectionDragCleanupRef.current;
|
|
23625
23971
|
pendingSelectionDragCleanupRef.current = null;
|
|
23626
|
-
_optionalChain([existingCleanup, 'optionalCall',
|
|
23972
|
+
_optionalChain([existingCleanup, 'optionalCall', _1567 => _1567()]);
|
|
23627
23973
|
const pointerTarget = target;
|
|
23628
23974
|
try {
|
|
23629
|
-
_optionalChain([pointerTarget, 'access',
|
|
23975
|
+
_optionalChain([pointerTarget, 'access', _1568 => _1568.setPointerCapture, 'optionalCall', _1569 => _1569(pointerId)]);
|
|
23630
23976
|
} catch (e29) {
|
|
23631
23977
|
}
|
|
23632
23978
|
const handlePointerMove = (event) => {
|
|
@@ -23661,15 +24007,15 @@ function XlsxGrid({
|
|
|
23661
24007
|
target.removeEventListener("pointerup", handlePointerEnd);
|
|
23662
24008
|
target.removeEventListener("pointercancel", handlePointerEnd);
|
|
23663
24009
|
try {
|
|
23664
|
-
if (_optionalChain([pointerTarget, 'access',
|
|
23665
|
-
_optionalChain([pointerTarget, 'access',
|
|
24010
|
+
if (_optionalChain([pointerTarget, 'access', _1570 => _1570.hasPointerCapture, 'optionalCall', _1571 => _1571(pointerId)])) {
|
|
24011
|
+
_optionalChain([pointerTarget, 'access', _1572 => _1572.releasePointerCapture, 'optionalCall', _1573 => _1573(pointerId)]);
|
|
23666
24012
|
}
|
|
23667
24013
|
} catch (e30) {
|
|
23668
24014
|
}
|
|
23669
24015
|
};
|
|
23670
24016
|
}
|
|
23671
24017
|
function installSelectionDragListeners(pointerId) {
|
|
23672
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
24018
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1574 => _1574.current, 'optionalCall', _1575 => _1575()]);
|
|
23673
24019
|
let pendingClientPoint = null;
|
|
23674
24020
|
let pointerMoveFrame = null;
|
|
23675
24021
|
const flushPointerMove = () => {
|
|
@@ -23714,23 +24060,23 @@ function XlsxGrid({
|
|
|
23714
24060
|
pendingClientPoint = null;
|
|
23715
24061
|
const dragState = selectionDragRef.current;
|
|
23716
24062
|
const nextCell = dragState ? resolveDraggedSelectionCell(dragState, event.clientX, event.clientY) : null;
|
|
23717
|
-
let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess',
|
|
23718
|
-
if (_optionalChain([dragState, 'optionalAccess',
|
|
24063
|
+
let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess', _1576 => _1576.previewRange]), () => ( null));
|
|
24064
|
+
if (_optionalChain([dragState, 'optionalAccess', _1577 => _1577.didDrag]) && nextCell && dragState) {
|
|
23719
24065
|
nextRange = buildDraggedSelectionRange(dragState, nextCell);
|
|
23720
24066
|
}
|
|
23721
24067
|
selectionDragRef.current = null;
|
|
23722
24068
|
cachedScrollerRectRef.current = null;
|
|
23723
|
-
if (nextRange && (_optionalChain([dragState, 'optionalAccess',
|
|
24069
|
+
if (nextRange && (_optionalChain([dragState, 'optionalAccess', _1578 => _1578.didDrag]) || !_optionalChain([dragState, 'optionalAccess', _1579 => _1579.committedOnPointerDown]))) {
|
|
23724
24070
|
selectionPreviewRangeRef.current = nextRange;
|
|
23725
24071
|
displayedSelectionRef.current = nextRange;
|
|
23726
|
-
if (_optionalChain([dragState, 'optionalAccess',
|
|
24072
|
+
if (_optionalChain([dragState, 'optionalAccess', _1580 => _1580.axis]) === "column") {
|
|
23727
24073
|
const normalized = normalizeRange2(nextRange);
|
|
23728
24074
|
axisSelectionRef.current = {
|
|
23729
24075
|
axis: "column",
|
|
23730
24076
|
startCol: normalized.start.col,
|
|
23731
24077
|
endCol: normalized.end.col
|
|
23732
24078
|
};
|
|
23733
|
-
} else if (_optionalChain([dragState, 'optionalAccess',
|
|
24079
|
+
} else if (_optionalChain([dragState, 'optionalAccess', _1581 => _1581.axis]) === "row") {
|
|
23734
24080
|
const normalized = normalizeRange2(nextRange);
|
|
23735
24081
|
axisSelectionRef.current = {
|
|
23736
24082
|
axis: "row",
|
|
@@ -23747,7 +24093,7 @@ function XlsxGrid({
|
|
|
23747
24093
|
setInteractionMode("idle");
|
|
23748
24094
|
document.body.style.cursor = "";
|
|
23749
24095
|
document.body.style.userSelect = "";
|
|
23750
|
-
_optionalChain([selectionDragCleanupRef, 'access',
|
|
24096
|
+
_optionalChain([selectionDragCleanupRef, 'access', _1582 => _1582.current, 'optionalCall', _1583 => _1583()]);
|
|
23751
24097
|
selectionDragCleanupRef.current = null;
|
|
23752
24098
|
};
|
|
23753
24099
|
window.addEventListener("pointermove", handlePointerMove);
|
|
@@ -23765,7 +24111,7 @@ function XlsxGrid({
|
|
|
23765
24111
|
};
|
|
23766
24112
|
}
|
|
23767
24113
|
function installFillDragListeners(pointerId, sourceRange) {
|
|
23768
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
24114
|
+
_optionalChain([fillDragCleanupRef, 'access', _1584 => _1584.current, 'optionalCall', _1585 => _1585()]);
|
|
23769
24115
|
let pendingClientPoint = null;
|
|
23770
24116
|
let pointerMoveFrame = null;
|
|
23771
24117
|
const flushPointerMove = () => {
|
|
@@ -23803,7 +24149,7 @@ function XlsxGrid({
|
|
|
23803
24149
|
if (nextCell) {
|
|
23804
24150
|
updateFillPreview(nextCell);
|
|
23805
24151
|
}
|
|
23806
|
-
const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access',
|
|
24152
|
+
const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access', _1586 => _1586.current, 'optionalAccess', _1587 => _1587.previewRange]), () => ( sourceRange));
|
|
23807
24153
|
fillDragRef.current = null;
|
|
23808
24154
|
cachedScrollerRectRef.current = null;
|
|
23809
24155
|
setInteractionMode("idle");
|
|
@@ -23811,7 +24157,7 @@ function XlsxGrid({
|
|
|
23811
24157
|
document.body.style.cursor = "";
|
|
23812
24158
|
document.body.style.userSelect = "";
|
|
23813
24159
|
fillSelection(nextRange);
|
|
23814
|
-
_optionalChain([fillDragCleanupRef, 'access',
|
|
24160
|
+
_optionalChain([fillDragCleanupRef, 'access', _1588 => _1588.current, 'optionalCall', _1589 => _1589()]);
|
|
23815
24161
|
fillDragCleanupRef.current = null;
|
|
23816
24162
|
};
|
|
23817
24163
|
window.addEventListener("pointermove", handlePointerMove);
|
|
@@ -23874,7 +24220,7 @@ function XlsxGrid({
|
|
|
23874
24220
|
const inside = current && cell.row >= current.start.row && cell.row <= current.end.row && cell.col >= current.start.col && cell.col <= current.end.col;
|
|
23875
24221
|
let range = inside ? current : { start: cell, end: cell };
|
|
23876
24222
|
if (kind !== "cell") {
|
|
23877
|
-
const sameAxis = _optionalChain([axisSelectionRef, 'access',
|
|
24223
|
+
const sameAxis = _optionalChain([axisSelectionRef, 'access', _1590 => _1590.current, 'optionalAccess', _1591 => _1591.axis]) === kind;
|
|
23878
24224
|
range = getContextExtent(kind, sameAxis && inside ? range : { start: cell, end: cell });
|
|
23879
24225
|
selectContextExtent(kind, range);
|
|
23880
24226
|
} else if (!inside) {
|
|
@@ -23888,7 +24234,7 @@ function XlsxGrid({
|
|
|
23888
24234
|
});
|
|
23889
24235
|
}
|
|
23890
24236
|
const handleCellDoubleClick = _chunkA3S3QKJNcjs.q.call(void 0, (cell) => {
|
|
23891
|
-
startEditing(cell);
|
|
24237
|
+
startEditing(cell, void 0, "double-click");
|
|
23892
24238
|
}, [startEditing]);
|
|
23893
24239
|
const handleCellClick = _chunkA3S3QKJNcjs.q.call(void 0, (cell, cellData) => {
|
|
23894
24240
|
if (!cellData.hyperlink) {
|
|
@@ -24065,7 +24411,7 @@ function XlsxGrid({
|
|
|
24065
24411
|
{
|
|
24066
24412
|
"aria-haspopup": "menu",
|
|
24067
24413
|
"aria-label": _chunkA3S3QKJNcjs.formatMessage.call(void 0, messages.openMenuForColumn, { column: tableColumn.name }),
|
|
24068
|
-
"aria-expanded": _optionalChain([openTableMenu, 'optionalAccess',
|
|
24414
|
+
"aria-expanded": _optionalChain([openTableMenu, 'optionalAccess', _1592 => _1592.tableName]) === table.name && openTableMenu.col === cell.col && openTableMenu.row === cell.row,
|
|
24069
24415
|
onPointerDown: (event) => {
|
|
24070
24416
|
event.preventDefault();
|
|
24071
24417
|
event.stopPropagation();
|
|
@@ -24191,7 +24537,7 @@ function XlsxGrid({
|
|
|
24191
24537
|
if (!canResizeHeaders) {
|
|
24192
24538
|
return null;
|
|
24193
24539
|
}
|
|
24194
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
24540
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1593 => _1593.current, 'optionalAccess', _1594 => _1594.getBoundingClientRect, 'call', _1595 => _1595()]);
|
|
24195
24541
|
if (!scrollerRect) {
|
|
24196
24542
|
return null;
|
|
24197
24543
|
}
|
|
@@ -24204,7 +24550,7 @@ function XlsxGrid({
|
|
|
24204
24550
|
return null;
|
|
24205
24551
|
}, [canResizeHeaders, canvasColumnHeaderCells]);
|
|
24206
24552
|
const resolveCanvasColumnHeaderTarget = _chunkA3S3QKJNcjs.q.call(void 0, (clientX) => {
|
|
24207
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
24553
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1596 => _1596.current, 'optionalAccess', _1597 => _1597.getBoundingClientRect, 'call', _1598 => _1598()]);
|
|
24208
24554
|
if (!scrollerRect) {
|
|
24209
24555
|
return null;
|
|
24210
24556
|
}
|
|
@@ -24220,7 +24566,7 @@ function XlsxGrid({
|
|
|
24220
24566
|
if (!canResizeHeaders) {
|
|
24221
24567
|
return null;
|
|
24222
24568
|
}
|
|
24223
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
24569
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1599 => _1599.current, 'optionalAccess', _1600 => _1600.getBoundingClientRect, 'call', _1601 => _1601()]);
|
|
24224
24570
|
if (!scrollerRect) {
|
|
24225
24571
|
return null;
|
|
24226
24572
|
}
|
|
@@ -24233,7 +24579,7 @@ function XlsxGrid({
|
|
|
24233
24579
|
return null;
|
|
24234
24580
|
}, [canResizeHeaders, canvasRowHeaderCells]);
|
|
24235
24581
|
const resolveCanvasRowHeaderTarget = _chunkA3S3QKJNcjs.q.call(void 0, (clientY) => {
|
|
24236
|
-
const scrollerRect = _optionalChain([scrollRef, 'access',
|
|
24582
|
+
const scrollerRect = _optionalChain([scrollRef, 'access', _1602 => _1602.current, 'optionalAccess', _1603 => _1603.getBoundingClientRect, 'call', _1604 => _1604()]);
|
|
24237
24583
|
if (!scrollerRect) {
|
|
24238
24584
|
return null;
|
|
24239
24585
|
}
|
|
@@ -24246,14 +24592,14 @@ function XlsxGrid({
|
|
|
24246
24592
|
return null;
|
|
24247
24593
|
}, [canvasRowHeaderCells]);
|
|
24248
24594
|
const handleCanvasColumnHeaderPointerMove = _chunkA3S3QKJNcjs.q.call(void 0, (event) => {
|
|
24249
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
24595
|
+
if (_optionalChain([resizeStateRef, 'access', _1605 => _1605.current, 'optionalAccess', _1606 => _1606.type]) === "column") {
|
|
24250
24596
|
event.currentTarget.style.cursor = "col-resize";
|
|
24251
24597
|
return;
|
|
24252
24598
|
}
|
|
24253
24599
|
event.currentTarget.style.cursor = resolveCanvasColumnResizeTarget(event.clientX) ? "col-resize" : "default";
|
|
24254
24600
|
}, [resolveCanvasColumnResizeTarget]);
|
|
24255
24601
|
const handleCanvasRowHeaderPointerMove = _chunkA3S3QKJNcjs.q.call(void 0, (event) => {
|
|
24256
|
-
if (_optionalChain([resizeStateRef, 'access',
|
|
24602
|
+
if (_optionalChain([resizeStateRef, 'access', _1607 => _1607.current, 'optionalAccess', _1608 => _1608.type]) === "row") {
|
|
24257
24603
|
event.currentTarget.style.cursor = "row-resize";
|
|
24258
24604
|
return;
|
|
24259
24605
|
}
|
|
@@ -24281,7 +24627,7 @@ function XlsxGrid({
|
|
|
24281
24627
|
const column = getTableHeaderColumn(table, cell.row, cell.col);
|
|
24282
24628
|
const columnRect = resolveCanvasColumnHeaderRect(cell.col);
|
|
24283
24629
|
const rowRect = resolveCanvasRowHeaderRect(cell.row);
|
|
24284
|
-
const viewportRect = _optionalChain([scrollRef, 'access',
|
|
24630
|
+
const viewportRect = _optionalChain([scrollRef, 'access', _1609 => _1609.current, 'optionalAccess', _1610 => _1610.getBoundingClientRect, 'call', _1611 => _1611()]);
|
|
24285
24631
|
if (table && column && columnRect && rowRect && viewportRect) {
|
|
24286
24632
|
const right = viewportRect.left + columnRect.left + columnRect.width - zoomFactor;
|
|
24287
24633
|
const bottom = viewportRect.top + rowRect.top + rowRect.height - zoomFactor;
|
|
@@ -24365,7 +24711,7 @@ function XlsxGrid({
|
|
|
24365
24711
|
if (!cell) {
|
|
24366
24712
|
return;
|
|
24367
24713
|
}
|
|
24368
|
-
startEditing(cell);
|
|
24714
|
+
startEditing(cell, void 0, "double-click");
|
|
24369
24715
|
}, [readOnly, resolvePointerCellFromClient, startEditing]);
|
|
24370
24716
|
const handleCanvasColumnHeaderPointerDown = _chunkA3S3QKJNcjs.q.call(void 0, (event) => {
|
|
24371
24717
|
if (event.button !== 0 || firstVisibleRow === void 0 || lastVisibleRow === void 0) {
|
|
@@ -24549,7 +24895,7 @@ function XlsxGrid({
|
|
|
24549
24895
|
return null;
|
|
24550
24896
|
}
|
|
24551
24897
|
context.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
24552
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
24898
|
+
if (_optionalChain([options, 'optionalAccess', _1612 => _1612.clear]) !== false) {
|
|
24553
24899
|
context.clearRect(0, 0, width, height);
|
|
24554
24900
|
}
|
|
24555
24901
|
return context;
|
|
@@ -24663,7 +25009,7 @@ function XlsxGrid({
|
|
|
24663
25009
|
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)) {
|
|
24664
25010
|
return;
|
|
24665
25011
|
}
|
|
24666
|
-
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
25012
|
+
const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1613 => _1613.showGridLines]), () => ( true));
|
|
24667
25013
|
const sheetSurface = resolveSheetSurface(activeSheet, palette);
|
|
24668
25014
|
const deferredSpillTextsByPane = {
|
|
24669
25015
|
corner: [],
|
|
@@ -24708,11 +25054,11 @@ function XlsxGrid({
|
|
|
24708
25054
|
if (shape.paragraphs.length === 0) {
|
|
24709
25055
|
return;
|
|
24710
25056
|
}
|
|
24711
|
-
const inset = _optionalChain([shape, 'access',
|
|
24712
|
-
const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
24713
|
-
const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
24714
|
-
const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
24715
|
-
const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
25057
|
+
const inset = _optionalChain([shape, 'access', _1614 => _1614.textBox, 'optionalAccess', _1615 => _1615.insetPx]);
|
|
25058
|
+
const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1616 => _1616.left]), () => ( 6))) * zoomFactor;
|
|
25059
|
+
const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1617 => _1617.right]), () => ( 6))) * zoomFactor;
|
|
25060
|
+
const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1618 => _1618.top]), () => ( 4))) * zoomFactor;
|
|
25061
|
+
const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1619 => _1619.bottom]), () => ( 4))) * zoomFactor;
|
|
24716
25062
|
const textLeft = left + paddingLeft;
|
|
24717
25063
|
const textTop = top + paddingTop;
|
|
24718
25064
|
const textWidth = Math.max(0, width - paddingLeft - paddingRight);
|
|
@@ -24734,9 +25080,9 @@ function XlsxGrid({
|
|
|
24734
25080
|
});
|
|
24735
25081
|
const totalTextHeight = lineMetrics.reduce((total, metric) => total + metric.lineHeight, 0);
|
|
24736
25082
|
let y2 = textTop;
|
|
24737
|
-
if (_optionalChain([shape, 'access',
|
|
25083
|
+
if (_optionalChain([shape, 'access', _1620 => _1620.textBox, 'optionalAccess', _1621 => _1621.verticalAlign]) === "middle") {
|
|
24738
25084
|
y2 = textTop + Math.max(0, (textHeight - totalTextHeight) / 2);
|
|
24739
|
-
} else if (_optionalChain([shape, 'access',
|
|
25085
|
+
} else if (_optionalChain([shape, 'access', _1622 => _1622.textBox, 'optionalAccess', _1623 => _1623.verticalAlign]) === "bottom") {
|
|
24740
25086
|
y2 = textTop + Math.max(0, textHeight - totalTextHeight);
|
|
24741
25087
|
}
|
|
24742
25088
|
context.save();
|
|
@@ -24747,7 +25093,7 @@ function XlsxGrid({
|
|
|
24747
25093
|
shape.paragraphs.forEach((paragraph, paragraphIndex) => {
|
|
24748
25094
|
const metric = _nullishCoalesce(lineMetrics[paragraphIndex], () => ( { lineHeight: 14 * zoomFactor, widthPx: 0 }));
|
|
24749
25095
|
let x2 = textLeft;
|
|
24750
|
-
const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access',
|
|
25096
|
+
const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _1624 => _1624.textBox, 'optionalAccess', _1625 => _1625.horizontalAlign]))), () => ( "left"));
|
|
24751
25097
|
if (align === "center") {
|
|
24752
25098
|
x2 = textLeft + Math.max(0, (textWidth - metric.widthPx) / 2);
|
|
24753
25099
|
} else if (align === "right") {
|
|
@@ -24776,11 +25122,11 @@ function XlsxGrid({
|
|
|
24776
25122
|
context.restore();
|
|
24777
25123
|
};
|
|
24778
25124
|
const drawBakedShape = (context, shape, rect) => {
|
|
24779
|
-
const fillColor = _optionalChain([shape, 'access',
|
|
24780
|
-
const strokeColor = _optionalChain([shape, 'access',
|
|
24781
|
-
const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access',
|
|
25125
|
+
const fillColor = _optionalChain([shape, 'access', _1626 => _1626.fill, 'optionalAccess', _1627 => _1627.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1628 => _1628.fill, 'optionalAccess', _1629 => _1629.color]), () => ( "transparent"));
|
|
25126
|
+
const strokeColor = _optionalChain([shape, 'access', _1630 => _1630.stroke, 'optionalAccess', _1631 => _1631.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1632 => _1632.stroke, 'optionalAccess', _1633 => _1633.color]), () => ( "transparent"));
|
|
25127
|
+
const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _1634 => _1634.stroke, 'optionalAccess', _1635 => _1635.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
|
|
24782
25128
|
const vectorShape = resolveShapeVector(shape);
|
|
24783
|
-
const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access',
|
|
25129
|
+
const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1636 => _1636.fill, 'optionalAccess', _1637 => _1637.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1638 => _1638.stroke, 'optionalAccess', _1639 => _1639.opacity]), () => ( 1)));
|
|
24784
25130
|
context.save();
|
|
24785
25131
|
context.translate(rect.left + rect.width / 2, rect.top + rect.height / 2);
|
|
24786
25132
|
if (shape.rotationDeg) {
|
|
@@ -24791,7 +25137,7 @@ function XlsxGrid({
|
|
|
24791
25137
|
context.lineWidth = lineWidth;
|
|
24792
25138
|
context.strokeStyle = strokeColor;
|
|
24793
25139
|
context.fillStyle = fillColor;
|
|
24794
|
-
applyCanvasShapeDash(context, _optionalChain([shape, 'access',
|
|
25140
|
+
applyCanvasShapeDash(context, _optionalChain([shape, 'access', _1640 => _1640.stroke, 'optionalAccess', _1641 => _1641.dash]), lineWidth);
|
|
24795
25141
|
const localLeft = -rect.width / 2;
|
|
24796
25142
|
const localTop = -rect.height / 2;
|
|
24797
25143
|
if (vectorShape && typeof Path2D !== "undefined") {
|
|
@@ -24977,13 +25323,13 @@ function XlsxGrid({
|
|
|
24977
25323
|
drawnMergedAnchorKeys.add(anchorKey);
|
|
24978
25324
|
}
|
|
24979
25325
|
const displayRect = cellData.colSpan || cellData.rowSpan ? resolveCellDisplayRect(drawCell) : null;
|
|
24980
|
-
const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
24981
|
-
const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
25326
|
+
const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1642 => _1642.left]), () => ( baseCellLeft));
|
|
25327
|
+
const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1643 => _1643.top]), () => ( baseCellTop));
|
|
24982
25328
|
const localRect = {
|
|
24983
|
-
height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
25329
|
+
height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1644 => _1644.height]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[drawRowIndex], () => ( rowItem.size))))),
|
|
24984
25330
|
left: (useFrozenHorizontalPosition ? _nullishCoalesce(stickyLeftByCol.get(drawCell.col), () => ( baseLeft - drawingViewport.left)) : baseLeft - drawingViewport.left) - paneBoundsForCell.left,
|
|
24985
25331
|
top: (useFrozenVerticalPosition ? _nullishCoalesce(stickyTopByRow.get(drawCell.row), () => ( baseTop - drawingViewport.top)) : baseTop - drawingViewport.top) - paneBoundsForCell.top,
|
|
24986
|
-
width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess',
|
|
25332
|
+
width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1645 => _1645.width]), () => ( (_nullishCoalesce(displayEffectiveColWidths[drawColIndex], () => ( colItem.size)))))
|
|
24987
25333
|
};
|
|
24988
25334
|
const spillOffsetX = Math.min(0, _nullishCoalesce(cellData.spillOffsetX, () => ( 0)));
|
|
24989
25335
|
const drawableLeft = localRect.left + spillOffsetX;
|
|
@@ -24998,7 +25344,7 @@ function XlsxGrid({
|
|
|
24998
25344
|
canvasProfilePaintedCells += 1;
|
|
24999
25345
|
const cellStyle = cellData.style;
|
|
25000
25346
|
const canvasCellStyle = _nullishCoalesce(cellData.canvas, () => ( buildCanvasCellStyleCache(cellStyle)));
|
|
25001
|
-
const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access',
|
|
25347
|
+
const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _1646 => _1646.conditionalColorScale, 'optionalAccess', _1647 => _1647.color]), () => ( (typeof cellStyle.backgroundColor === "string" ? cellStyle.backgroundColor : sheetSurface)));
|
|
25002
25348
|
const gradientFill = !cellData.conditionalColorScale && typeof cellStyle.backgroundImage === "string" ? resolveCanvasGradientFill(paneContext, localRect, cellStyle.backgroundImage) : null;
|
|
25003
25349
|
if (cellData.chartHighlight) {
|
|
25004
25350
|
flushPendingGridlines();
|
|
@@ -25034,23 +25380,23 @@ function XlsxGrid({
|
|
|
25034
25380
|
const rightNeighborCol = visibleCols[drawColIndex + Math.max(1, _nullishCoalesce(cellData.colSpan, () => ( 1)))];
|
|
25035
25381
|
const rightNeighborCell = rightNeighborCol === void 0 ? null : { row: drawCell.row, col: rightNeighborCol };
|
|
25036
25382
|
const rightNeighborData = rightNeighborCell ? getCellData(rightNeighborCell.row, rightNeighborCell.col) : null;
|
|
25037
|
-
let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess',
|
|
25038
|
-
if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess',
|
|
25383
|
+
let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess', _1648 => _1648.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([rightNeighborData, 'optionalAccess', _1649 => _1649.canvas, 'optionalAccess', _1650 => _1650.leftBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([rightNeighborData, 'optionalAccess', _1651 => _1651.style, 'access', _1652 => _1652.borderLeft]))));
|
|
25384
|
+
if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess', _1653 => _1653.isMergedSecondary])) {
|
|
25039
25385
|
const rightNeighborAnchorCell = resolveMergeAnchorCell(rightNeighborCell);
|
|
25040
25386
|
if (rightNeighborAnchorCell.col === rightNeighborCell.col) {
|
|
25041
25387
|
const rightNeighborAnchorData = getCellData(rightNeighborAnchorCell.row, rightNeighborAnchorCell.col);
|
|
25042
|
-
rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access',
|
|
25388
|
+
rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access', _1654 => _1654.canvas, 'optionalAccess', _1655 => _1655.leftBorder]), () => ( parseCanvasBorderDeclaration(rightNeighborAnchorData.style.borderLeft)));
|
|
25043
25389
|
}
|
|
25044
25390
|
}
|
|
25045
25391
|
const bottomNeighborRow = visibleRows[drawRowIndex + Math.max(1, _nullishCoalesce(cellData.rowSpan, () => ( 1)))];
|
|
25046
25392
|
const bottomNeighborCell = bottomNeighborRow === void 0 ? null : { row: bottomNeighborRow, col: drawCell.col };
|
|
25047
25393
|
const bottomNeighborData = bottomNeighborCell ? getCellData(bottomNeighborCell.row, bottomNeighborCell.col) : null;
|
|
25048
|
-
let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess',
|
|
25049
|
-
if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess',
|
|
25394
|
+
let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess', _1656 => _1656.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([bottomNeighborData, 'optionalAccess', _1657 => _1657.canvas, 'optionalAccess', _1658 => _1658.topBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([bottomNeighborData, 'optionalAccess', _1659 => _1659.style, 'access', _1660 => _1660.borderTop]))));
|
|
25395
|
+
if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess', _1661 => _1661.isMergedSecondary])) {
|
|
25050
25396
|
const bottomNeighborAnchorCell = resolveMergeAnchorCell(bottomNeighborCell);
|
|
25051
25397
|
if (bottomNeighborAnchorCell.row === bottomNeighborCell.row) {
|
|
25052
25398
|
const bottomNeighborAnchorData = getCellData(bottomNeighborAnchorCell.row, bottomNeighborAnchorCell.col);
|
|
25053
|
-
bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access',
|
|
25399
|
+
bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access', _1662 => _1662.canvas, 'optionalAccess', _1663 => _1663.topBorder]), () => ( parseCanvasBorderDeclaration(bottomNeighborAnchorData.style.borderTop)));
|
|
25054
25400
|
}
|
|
25055
25401
|
}
|
|
25056
25402
|
const resolvedRightBorder = resolveCanvasBoundaryBorder(rightBorder, rightNeighborLeftBorder);
|
|
@@ -25340,7 +25686,7 @@ function XlsxGrid({
|
|
|
25340
25686
|
if (cellData.isTableHeader && !renderTableHeaderMenu) {
|
|
25341
25687
|
const table = getTableAtCell(effectiveTables, drawCell.row, drawCell.col);
|
|
25342
25688
|
const column = getTableHeaderColumn(table, drawCell.row, drawCell.col);
|
|
25343
|
-
const direction = table && column && _optionalChain([sortState, 'optionalAccess',
|
|
25689
|
+
const direction = table && column && _optionalChain([sortState, 'optionalAccess', _1664 => _1664.tableName]) === table.name && sortState.columnIndex === column.index ? sortState.direction : null;
|
|
25344
25690
|
drawCanvasTableHeaderTrigger(paneContext, localRect, direction, palette, zoomFactor);
|
|
25345
25691
|
}
|
|
25346
25692
|
}
|
|
@@ -25618,7 +25964,7 @@ function XlsxGrid({
|
|
|
25618
25964
|
if (readOnlyRef.current || chart.editable === false) {
|
|
25619
25965
|
return;
|
|
25620
25966
|
}
|
|
25621
|
-
_optionalChain([event, 'access',
|
|
25967
|
+
_optionalChain([event, 'access', _1665 => _1665.currentTarget, 'access', _1666 => _1666.setPointerCapture, 'optionalCall', _1667 => _1667(event.pointerId)]);
|
|
25622
25968
|
chartInteractionRef.current = {
|
|
25623
25969
|
baseRect: rect,
|
|
25624
25970
|
chartId: chart.id,
|
|
@@ -25643,7 +25989,7 @@ function XlsxGrid({
|
|
|
25643
25989
|
event.stopPropagation();
|
|
25644
25990
|
focusGrid();
|
|
25645
25991
|
selectChart(chart.id);
|
|
25646
|
-
_optionalChain([event, 'access',
|
|
25992
|
+
_optionalChain([event, 'access', _1668 => _1668.currentTarget, 'access', _1669 => _1669.setPointerCapture, 'optionalCall', _1670 => _1670(event.pointerId)]);
|
|
25647
25993
|
chartInteractionRef.current = {
|
|
25648
25994
|
baseRect: rect,
|
|
25649
25995
|
chartId: chart.id,
|
|
@@ -25672,7 +26018,7 @@ function XlsxGrid({
|
|
|
25672
26018
|
if (readOnlyRef.current || image.editable === false) {
|
|
25673
26019
|
return;
|
|
25674
26020
|
}
|
|
25675
|
-
_optionalChain([event, 'access',
|
|
26021
|
+
_optionalChain([event, 'access', _1671 => _1671.currentTarget, 'access', _1672 => _1672.setPointerCapture, 'optionalCall', _1673 => _1673(event.pointerId)]);
|
|
25676
26022
|
imageInteractionRef.current = {
|
|
25677
26023
|
baseRect: rect,
|
|
25678
26024
|
didMove: false,
|
|
@@ -25697,7 +26043,7 @@ function XlsxGrid({
|
|
|
25697
26043
|
event.stopPropagation();
|
|
25698
26044
|
focusGrid();
|
|
25699
26045
|
selectImage(image.id);
|
|
25700
|
-
_optionalChain([event, 'access',
|
|
26046
|
+
_optionalChain([event, 'access', _1674 => _1674.currentTarget, 'access', _1675 => _1675.setPointerCapture, 'optionalCall', _1676 => _1676(event.pointerId)]);
|
|
25701
26047
|
imageInteractionRef.current = {
|
|
25702
26048
|
baseRect: rect,
|
|
25703
26049
|
didMove: false,
|
|
@@ -25765,7 +26111,7 @@ function XlsxGrid({
|
|
|
25765
26111
|
}
|
|
25766
26112
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, _chunkA3S3QKJNcjs.S, { children: renderError(errorState, error, palette, messages) });
|
|
25767
26113
|
}
|
|
25768
|
-
if (!activeSheet && _optionalChain([activeTab, 'optionalAccess',
|
|
26114
|
+
if (!activeSheet && _optionalChain([activeTab, 'optionalAccess', _1677 => _1677.kind]) === "chartsheet") {
|
|
25769
26115
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
25770
26116
|
"div",
|
|
25771
26117
|
{
|
|
@@ -25795,10 +26141,10 @@ function XlsxGrid({
|
|
|
25795
26141
|
children: charts.length > 0 ? charts.map((chart) => {
|
|
25796
26142
|
const sourceSize = chart.anchor.kind !== "two-cell" ? chart.anchor.sizeEmu : void 0;
|
|
25797
26143
|
const chartsheetRect = {
|
|
25798
|
-
height: _optionalChain([sourceSize, 'optionalAccess',
|
|
26144
|
+
height: _optionalChain([sourceSize, 'optionalAccess', _1678 => _1678.cy]) ? emuToPixels(sourceSize.cy) : 320,
|
|
25799
26145
|
left: 0,
|
|
25800
26146
|
top: 0,
|
|
25801
|
-
width: _optionalChain([sourceSize, 'optionalAccess',
|
|
26147
|
+
width: _optionalChain([sourceSize, 'optionalAccess', _1679 => _1679.cx]) ? emuToPixels(sourceSize.cx) : 640
|
|
25802
26148
|
};
|
|
25803
26149
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "div", { style: {
|
|
25804
26150
|
minHeight: sourceSize ? void 0 : 320,
|
|
@@ -25844,11 +26190,11 @@ function XlsxGrid({
|
|
|
25844
26190
|
const virtualRows = domExpandedWindow.rowIndices.map((index) => {
|
|
25845
26191
|
const virtualRow = rowVirtualItemByIndex.get(index);
|
|
25846
26192
|
return {
|
|
25847
|
-
end: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess',
|
|
26193
|
+
end: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1680 => _1680.end]), () => ( (_nullishCoalesce(rowPrefixSums[index + 1], () => ( 0))))),
|
|
25848
26194
|
index,
|
|
25849
26195
|
key: _nullishCoalesce(visibleRows[index], () => ( index)),
|
|
25850
|
-
size: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess',
|
|
25851
|
-
start: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess',
|
|
26196
|
+
size: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1681 => _1681.size]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[index], () => ( displayDefaultRowHeight))))),
|
|
26197
|
+
start: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1682 => _1682.start]), () => ( (_nullishCoalesce(rowPrefixSums[index], () => ( 0)))))
|
|
25852
26198
|
};
|
|
25853
26199
|
});
|
|
25854
26200
|
const totalHeight = shouldUseDomVirtualizer && shouldVirtualizeRows ? rowVirtualizer.getTotalSize() : _nullishCoalesce(rowPrefixSums[rowPrefixSums.length - 1], () => ( 0));
|
|
@@ -25856,8 +26202,8 @@ function XlsxGrid({
|
|
|
25856
26202
|
const sheetContentHeight = displayHeaderHeight + totalHeight;
|
|
25857
26203
|
const isLiveZooming = liveGestureZoom !== null && zoomScale === liveGestureZoom.baseZoomScale;
|
|
25858
26204
|
const liveZoomScale = isLiveZooming ? Math.max(0.1, liveGestureZoom.targetZoomScale / liveGestureZoom.baseZoomScale) : 1;
|
|
25859
|
-
const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
25860
|
-
const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
26205
|
+
const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1683 => _1683.current, 'optionalAccess', _1684 => _1684.scrollLeft]), () => ( drawingViewport.left));
|
|
26206
|
+
const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1685 => _1685.current, 'optionalAccess', _1686 => _1686.scrollTop]), () => ( drawingViewport.top));
|
|
25861
26207
|
const liveZoomTranslateX = isLiveZooming ? (liveZoomScrollLeft + liveGestureZoom.anchor.x) * (1 - liveZoomScale) : 0;
|
|
25862
26208
|
const liveZoomTranslateY = isLiveZooming ? (liveZoomScrollTop + liveGestureZoom.anchor.y) * (1 - liveZoomScale) : 0;
|
|
25863
26209
|
const headerLabelLiveScale = isLiveZooming ? liveZoomScale : 1;
|
|
@@ -26024,7 +26370,7 @@ function XlsxGrid({
|
|
|
26024
26370
|
}) : [];
|
|
26025
26371
|
const activeCellOverlayCell = renderActiveCellOverlay && activeCell ? resolveMergeAnchorCell(activeCell) : null;
|
|
26026
26372
|
const activeCellOverlayRect = activeCellOverlayCell ? resolveCellDisplayRect(activeCellOverlayCell) : null;
|
|
26027
|
-
const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall',
|
|
26373
|
+
const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall', _1687 => _1687({ cell: activeCellOverlayCell, rect: activeCellOverlayRect })]) : null;
|
|
26028
26374
|
function drawingIntersectsPane(rect, pane) {
|
|
26029
26375
|
if (experimentalCanvas) {
|
|
26030
26376
|
const frozenX = pane === "left" || pane === "corner";
|
|
@@ -26041,7 +26387,7 @@ function XlsxGrid({
|
|
|
26041
26387
|
frozenCols,
|
|
26042
26388
|
displayActualRowHeights,
|
|
26043
26389
|
displayActualColWidths,
|
|
26044
|
-
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
26390
|
+
_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1688 => _1688.freezePanes]), () => ( null)),
|
|
26045
26391
|
stickyTopByRow,
|
|
26046
26392
|
stickyLeftByCol,
|
|
26047
26393
|
{
|
|
@@ -26061,7 +26407,7 @@ function XlsxGrid({
|
|
|
26061
26407
|
return null;
|
|
26062
26408
|
}
|
|
26063
26409
|
const isFrozenDrawing = pane !== "scroll";
|
|
26064
|
-
const inset = _optionalChain([shape, 'access',
|
|
26410
|
+
const inset = _optionalChain([shape, 'access', _1689 => _1689.textBox, 'optionalAccess', _1690 => _1690.insetPx]);
|
|
26065
26411
|
const groupScaleX = _nullishCoalesce(shape.scaleX, () => ( 1));
|
|
26066
26412
|
const groupScaleY = _nullishCoalesce(shape.scaleY, () => ( 1));
|
|
26067
26413
|
const strokeScale = Math.max(groupScaleX, groupScaleY);
|
|
@@ -26069,12 +26415,12 @@ function XlsxGrid({
|
|
|
26069
26415
|
const textWidth = groupScaleX !== 0 ? rect.width / groupScaleX : rect.width;
|
|
26070
26416
|
const textHeight = groupScaleY !== 0 ? rect.height / groupScaleY : rect.height;
|
|
26071
26417
|
const vectorShape = resolveShapeVector(shape);
|
|
26072
|
-
const strokeColor = _optionalChain([shape, 'access',
|
|
26073
|
-
const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access',
|
|
26418
|
+
const strokeColor = _optionalChain([shape, 'access', _1691 => _1691.stroke, 'optionalAccess', _1692 => _1692.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1693 => _1693.stroke, 'optionalAccess', _1694 => _1694.color]), () => ( "transparent"));
|
|
26419
|
+
const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access', _1695 => _1695.stroke, 'optionalAccess', _1696 => _1696.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * strokeScale * zoomFactor;
|
|
26074
26420
|
const headMarkerId = `${shape.id}-${pane}-head-marker`;
|
|
26075
26421
|
const tailMarkerId = `${shape.id}-${pane}-tail-marker`;
|
|
26076
26422
|
const headMarker = vectorShape ? resolveShapeLineEndMarker(
|
|
26077
|
-
_optionalChain([shape, 'access',
|
|
26423
|
+
_optionalChain([shape, 'access', _1697 => _1697.stroke, 'optionalAccess', _1698 => _1698.headEndType]),
|
|
26078
26424
|
headMarkerId,
|
|
26079
26425
|
strokeColor,
|
|
26080
26426
|
scaledStrokeWidth,
|
|
@@ -26082,7 +26428,7 @@ function XlsxGrid({
|
|
|
26082
26428
|
vectorShape.viewBox
|
|
26083
26429
|
) : null;
|
|
26084
26430
|
const tailMarker = vectorShape ? resolveShapeLineEndMarker(
|
|
26085
|
-
_optionalChain([shape, 'access',
|
|
26431
|
+
_optionalChain([shape, 'access', _1699 => _1699.stroke, 'optionalAccess', _1700 => _1700.tailEndType]),
|
|
26086
26432
|
tailMarkerId,
|
|
26087
26433
|
strokeColor,
|
|
26088
26434
|
scaledStrokeWidth,
|
|
@@ -26132,12 +26478,12 @@ function XlsxGrid({
|
|
|
26132
26478
|
"path",
|
|
26133
26479
|
{
|
|
26134
26480
|
d: vectorShape.path,
|
|
26135
|
-
fill: _optionalChain([shape, 'access',
|
|
26136
|
-
fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access',
|
|
26481
|
+
fill: _optionalChain([shape, 'access', _1701 => _1701.fill, 'optionalAccess', _1702 => _1702.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1703 => _1703.fill, 'optionalAccess', _1704 => _1704.color]), () => ( "transparent")),
|
|
26482
|
+
fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1705 => _1705.fill, 'optionalAccess', _1706 => _1706.opacity]), () => ( 1)),
|
|
26137
26483
|
markerEnd: tailMarker ? `url(#${tailMarkerId})` : void 0,
|
|
26138
26484
|
markerStart: headMarker ? `url(#${headMarkerId})` : void 0,
|
|
26139
26485
|
stroke: strokeColor,
|
|
26140
|
-
strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access',
|
|
26486
|
+
strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1707 => _1707.stroke, 'optionalAccess', _1708 => _1708.opacity]), () => ( 1)),
|
|
26141
26487
|
strokeWidth: scaledStrokeWidth,
|
|
26142
26488
|
vectorEffect: "non-scaling-stroke"
|
|
26143
26489
|
}
|
|
@@ -26155,11 +26501,11 @@ function XlsxGrid({
|
|
|
26155
26501
|
flexDirection: "column",
|
|
26156
26502
|
gap: 2 * zoomFactor,
|
|
26157
26503
|
height: textHeight,
|
|
26158
|
-
justifyContent: _optionalChain([shape, 'access',
|
|
26159
|
-
paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
26160
|
-
paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
26161
|
-
paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
26162
|
-
paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess',
|
|
26504
|
+
justifyContent: _optionalChain([shape, 'access', _1709 => _1709.textBox, 'optionalAccess', _1710 => _1710.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1711 => _1711.textBox, 'optionalAccess', _1712 => _1712.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
|
|
26505
|
+
paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1713 => _1713.bottom]), () => ( 4))) * zoomFactor,
|
|
26506
|
+
paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1714 => _1714.left]), () => ( 6))) * zoomFactor,
|
|
26507
|
+
paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1715 => _1715.right]), () => ( 6))) * zoomFactor,
|
|
26508
|
+
paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1716 => _1716.top]), () => ( 4))) * zoomFactor,
|
|
26163
26509
|
pointerEvents: "none",
|
|
26164
26510
|
position: "relative",
|
|
26165
26511
|
transform: groupScaleX !== 1 || groupScaleY !== 1 ? `scale(${groupScaleX}, ${groupScaleY})` : void 0,
|
|
@@ -26170,7 +26516,7 @@ function XlsxGrid({
|
|
|
26170
26516
|
children: shape.paragraphs.map((paragraph, index) => renderShapeParagraph(
|
|
26171
26517
|
paragraph,
|
|
26172
26518
|
index,
|
|
26173
|
-
_nullishCoalesce(_optionalChain([shape, 'access',
|
|
26519
|
+
_nullishCoalesce(_optionalChain([shape, 'access', _1717 => _1717.textBox, 'optionalAccess', _1718 => _1718.horizontalAlign]), () => ( "left")),
|
|
26174
26520
|
textScale
|
|
26175
26521
|
))
|
|
26176
26522
|
}
|
|
@@ -26234,7 +26580,7 @@ function XlsxGrid({
|
|
|
26234
26580
|
}
|
|
26235
26581
|
const didUpdate = updateFormControl(control.controlIndex, { kind }, control.sheetIndex);
|
|
26236
26582
|
if (didUpdate) {
|
|
26237
|
-
_optionalChain([onFormControlChange, 'optionalCall',
|
|
26583
|
+
_optionalChain([onFormControlChange, 'optionalCall', _1719 => _1719({
|
|
26238
26584
|
control: { ...control, ...nextControl },
|
|
26239
26585
|
previousControl: control,
|
|
26240
26586
|
type: "change"
|
|
@@ -26244,13 +26590,13 @@ function XlsxGrid({
|
|
|
26244
26590
|
};
|
|
26245
26591
|
const setControlState = (state = "unchecked") => {
|
|
26246
26592
|
const kind = buildFormControlKindInput(control);
|
|
26247
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
26593
|
+
if (_optionalChain([kind, 'optionalAccess', _1720 => _1720.kind]) === "checkbox") {
|
|
26248
26594
|
return commitControlKind(
|
|
26249
26595
|
{ ...kind, state },
|
|
26250
26596
|
{ checked: state === "checked", state }
|
|
26251
26597
|
);
|
|
26252
26598
|
}
|
|
26253
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
26599
|
+
if (_optionalChain([kind, 'optionalAccess', _1721 => _1721.kind]) === "optionButton" && state !== "mixed") {
|
|
26254
26600
|
return commitControlKind(
|
|
26255
26601
|
{ ...kind, state },
|
|
26256
26602
|
{ checked: state === "checked", state }
|
|
@@ -26260,14 +26606,14 @@ function XlsxGrid({
|
|
|
26260
26606
|
};
|
|
26261
26607
|
const setControlSelected = (selected) => {
|
|
26262
26608
|
const kind = buildFormControlKindInput(control);
|
|
26263
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
26609
|
+
if (_optionalChain([kind, 'optionalAccess', _1722 => _1722.kind]) === "dropdown") {
|
|
26264
26610
|
const nextSelected = typeof selected === "number" ? selected : void 0;
|
|
26265
26611
|
return commitControlKind(
|
|
26266
26612
|
{ ...kind, selected: nextSelected },
|
|
26267
26613
|
{ selected: nextSelected }
|
|
26268
26614
|
);
|
|
26269
26615
|
}
|
|
26270
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
26616
|
+
if (_optionalChain([kind, 'optionalAccess', _1723 => _1723.kind]) === "listBox") {
|
|
26271
26617
|
const nextSelected = Array.isArray(selected) ? selected : typeof selected === "number" ? [selected] : [];
|
|
26272
26618
|
return commitControlKind(
|
|
26273
26619
|
{ ...kind, selected: nextSelected },
|
|
@@ -26281,7 +26627,7 @@ function XlsxGrid({
|
|
|
26281
26627
|
return false;
|
|
26282
26628
|
}
|
|
26283
26629
|
const kind = buildFormControlKindInput(control);
|
|
26284
|
-
if (_optionalChain([kind, 'optionalAccess',
|
|
26630
|
+
if (_optionalChain([kind, 'optionalAccess', _1724 => _1724.kind]) !== "scrollbar" && _optionalChain([kind, 'optionalAccess', _1725 => _1725.kind]) !== "spinner") {
|
|
26285
26631
|
return false;
|
|
26286
26632
|
}
|
|
26287
26633
|
const nextValue = Math.max(kind.min, Math.min(kind.max, value));
|
|
@@ -26289,7 +26635,7 @@ function XlsxGrid({
|
|
|
26289
26635
|
};
|
|
26290
26636
|
const activateControl = () => {
|
|
26291
26637
|
if (!readOnly && control.kind === "button") {
|
|
26292
|
-
_optionalChain([onFormControlAction, 'optionalCall',
|
|
26638
|
+
_optionalChain([onFormControlAction, 'optionalCall', _1726 => _1726({ control, type: "activate" })]);
|
|
26293
26639
|
}
|
|
26294
26640
|
};
|
|
26295
26641
|
if (renderFormControl) {
|
|
@@ -27053,7 +27399,7 @@ function XlsxGrid({
|
|
|
27053
27399
|
if (readOnly) {
|
|
27054
27400
|
return;
|
|
27055
27401
|
}
|
|
27056
|
-
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
27402
|
+
cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1727 => _1727.current, 'optionalAccess', _1728 => _1728.getBoundingClientRect, 'call', _1729 => _1729()]), () => ( null));
|
|
27057
27403
|
const normalizedSource = normalizeRange2(sourceRange);
|
|
27058
27404
|
fillDragRef.current = {
|
|
27059
27405
|
pointerId,
|
|
@@ -27076,7 +27422,7 @@ function XlsxGrid({
|
|
|
27076
27422
|
applyPreviewOverlay(nextRange);
|
|
27077
27423
|
}
|
|
27078
27424
|
function installImageInteractionListeners(pointerId) {
|
|
27079
|
-
_optionalChain([imageInteractionCleanupRef, 'access',
|
|
27425
|
+
_optionalChain([imageInteractionCleanupRef, 'access', _1730 => _1730.current, 'optionalCall', _1731 => _1731()]);
|
|
27080
27426
|
const resolveInteractionRect = (interaction, clientX, clientY) => {
|
|
27081
27427
|
const deltaX = clientX - interaction.startClientX;
|
|
27082
27428
|
const deltaY = clientY - interaction.startClientY;
|
|
@@ -27156,7 +27502,7 @@ function XlsxGrid({
|
|
|
27156
27502
|
imageInteractionCleanupRef.current = cleanup;
|
|
27157
27503
|
}
|
|
27158
27504
|
function installChartInteractionListeners(pointerId) {
|
|
27159
|
-
_optionalChain([chartInteractionCleanupRef, 'access',
|
|
27505
|
+
_optionalChain([chartInteractionCleanupRef, 'access', _1732 => _1732.current, 'optionalCall', _1733 => _1733()]);
|
|
27160
27506
|
const resolveInteractionRect = (interaction, clientX, clientY) => {
|
|
27161
27507
|
const deltaX = clientX - interaction.startClientX;
|
|
27162
27508
|
const deltaY = clientY - interaction.startClientY;
|
|
@@ -27303,7 +27649,7 @@ function XlsxGrid({
|
|
|
27303
27649
|
const scroller = scrollRef.current;
|
|
27304
27650
|
const viewportHeight = Math.max(
|
|
27305
27651
|
displayDefaultRowHeight,
|
|
27306
|
-
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
27652
|
+
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1734 => _1734.clientHeight]), () => ( displayDefaultRowHeight * 20))) - frozenPaneBottom
|
|
27307
27653
|
);
|
|
27308
27654
|
const currentOffset = _nullishCoalesce(rowPrefixSums[currentRowIndex], () => ( 0));
|
|
27309
27655
|
const targetOffset = direction > 0 ? currentOffset + viewportHeight : currentOffset - viewportHeight;
|
|
@@ -27313,7 +27659,7 @@ function XlsxGrid({
|
|
|
27313
27659
|
const scroller = scrollRef.current;
|
|
27314
27660
|
const viewportWidth = Math.max(
|
|
27315
27661
|
displayDefaultColWidth,
|
|
27316
|
-
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess',
|
|
27662
|
+
(_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1735 => _1735.clientWidth]), () => ( displayDefaultColWidth * 8))) - frozenPaneRight
|
|
27317
27663
|
);
|
|
27318
27664
|
const currentOffset = _nullishCoalesce(colPrefixSums[currentColIndex], () => ( 0));
|
|
27319
27665
|
const targetOffset = direction > 0 ? currentOffset + viewportWidth : currentOffset - viewportWidth;
|
|
@@ -27321,7 +27667,7 @@ function XlsxGrid({
|
|
|
27321
27667
|
}
|
|
27322
27668
|
function resolveColumnSelectionNavigation(eventKey) {
|
|
27323
27669
|
const axisSelection = axisSelectionRef.current;
|
|
27324
|
-
if (_optionalChain([axisSelection, 'optionalAccess',
|
|
27670
|
+
if (_optionalChain([axisSelection, 'optionalAccess', _1736 => _1736.axis]) !== "column" || firstVisibleRow === void 0) {
|
|
27325
27671
|
return null;
|
|
27326
27672
|
}
|
|
27327
27673
|
const startCol = Math.min(axisSelection.startCol, axisSelection.endCol);
|
|
@@ -27339,7 +27685,7 @@ function XlsxGrid({
|
|
|
27339
27685
|
}
|
|
27340
27686
|
function resolveRowSelectionNavigation(eventKey) {
|
|
27341
27687
|
const axisSelection = axisSelectionRef.current;
|
|
27342
|
-
if (_optionalChain([axisSelection, 'optionalAccess',
|
|
27688
|
+
if (_optionalChain([axisSelection, 'optionalAccess', _1737 => _1737.axis]) !== "row" || firstVisibleCol === void 0) {
|
|
27343
27689
|
return null;
|
|
27344
27690
|
}
|
|
27345
27691
|
const startRow = Math.min(axisSelection.startRow, axisSelection.endRow);
|
|
@@ -27361,13 +27707,13 @@ function XlsxGrid({
|
|
|
27361
27707
|
}
|
|
27362
27708
|
if (enableContextMenu && (event.key === "ContextMenu" || event.shiftKey && event.key === "F10")) {
|
|
27363
27709
|
const cell = resolveCurrentCell();
|
|
27364
|
-
const rect = _optionalChain([scrollRef, 'access',
|
|
27710
|
+
const rect = _optionalChain([scrollRef, 'access', _1738 => _1738.current, 'optionalAccess', _1739 => _1739.getBoundingClientRect, 'call', _1740 => _1740()]);
|
|
27365
27711
|
if (cell && rect) {
|
|
27366
27712
|
event.preventDefault();
|
|
27367
27713
|
const overlay = resolveOverlayRect({ start: cell, end: cell });
|
|
27368
27714
|
openContextMenu(cell, "cell", {
|
|
27369
|
-
x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess',
|
|
27370
|
-
y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access',
|
|
27715
|
+
x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess', _1741 => _1741.left]), () => ( displayRowHeaderWidth))) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1742 => _1742.current, 'optionalAccess', _1743 => _1743.scrollLeft]), () => ( 0))),
|
|
27716
|
+
y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1744 => _1744.current, 'optionalAccess', _1745 => _1745.scrollTop]), () => ( 0)))
|
|
27371
27717
|
});
|
|
27372
27718
|
}
|
|
27373
27719
|
return;
|
|
@@ -27399,7 +27745,7 @@ function XlsxGrid({
|
|
|
27399
27745
|
const isCommandNavigation = event.ctrlKey || event.metaKey;
|
|
27400
27746
|
if (!readOnly && isPrintableKey(event)) {
|
|
27401
27747
|
event.preventDefault();
|
|
27402
|
-
startEditing(currentCell, event.key);
|
|
27748
|
+
startEditing(currentCell, event.key, "typing");
|
|
27403
27749
|
return;
|
|
27404
27750
|
}
|
|
27405
27751
|
switch (event.key) {
|
|
@@ -27413,7 +27759,7 @@ function XlsxGrid({
|
|
|
27413
27759
|
}
|
|
27414
27760
|
}
|
|
27415
27761
|
moveSelection(
|
|
27416
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27762
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1746 => _1746.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex + 1,
|
|
27417
27763
|
currentColIndex,
|
|
27418
27764
|
event.shiftKey
|
|
27419
27765
|
);
|
|
@@ -27428,7 +27774,7 @@ function XlsxGrid({
|
|
|
27428
27774
|
}
|
|
27429
27775
|
}
|
|
27430
27776
|
moveSelection(
|
|
27431
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27777
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1747 => _1747.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex - 1,
|
|
27432
27778
|
currentColIndex,
|
|
27433
27779
|
event.shiftKey
|
|
27434
27780
|
);
|
|
@@ -27444,7 +27790,7 @@ function XlsxGrid({
|
|
|
27444
27790
|
}
|
|
27445
27791
|
moveSelection(
|
|
27446
27792
|
currentRowIndex,
|
|
27447
|
-
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27793
|
+
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1748 => _1748.minUsedCol]), () => ( -1)))), () => ( 0)) : currentColIndex - 1,
|
|
27448
27794
|
event.shiftKey
|
|
27449
27795
|
);
|
|
27450
27796
|
break;
|
|
@@ -27459,23 +27805,23 @@ function XlsxGrid({
|
|
|
27459
27805
|
}
|
|
27460
27806
|
moveSelection(
|
|
27461
27807
|
currentRowIndex,
|
|
27462
|
-
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27808
|
+
isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1749 => _1749.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)) : currentColIndex + 1,
|
|
27463
27809
|
event.shiftKey
|
|
27464
27810
|
);
|
|
27465
27811
|
break;
|
|
27466
27812
|
case "Home":
|
|
27467
27813
|
event.preventDefault();
|
|
27468
27814
|
moveSelection(
|
|
27469
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27470
|
-
_nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27815
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1750 => _1750.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex,
|
|
27816
|
+
_nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1751 => _1751.minUsedCol]), () => ( -1)))), () => ( 0)),
|
|
27471
27817
|
event.shiftKey
|
|
27472
27818
|
);
|
|
27473
27819
|
break;
|
|
27474
27820
|
case "End":
|
|
27475
27821
|
event.preventDefault();
|
|
27476
27822
|
moveSelection(
|
|
27477
|
-
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27478
|
-
_nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27823
|
+
isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1752 => _1752.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex,
|
|
27824
|
+
_nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1753 => _1753.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)),
|
|
27479
27825
|
event.shiftKey
|
|
27480
27826
|
);
|
|
27481
27827
|
break;
|
|
@@ -27542,11 +27888,11 @@ function XlsxGrid({
|
|
|
27542
27888
|
gridKeyboardHandlerRef.current = handleGridKeyDown;
|
|
27543
27889
|
const scrollerViewportProps = {
|
|
27544
27890
|
ref: scrollRef,
|
|
27545
|
-
"aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27891
|
+
"aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1754 => _1754.colCount]), () => ( 0)), displayColLimit),
|
|
27546
27892
|
"aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight Home End PageUp PageDown Control+Home Control+End",
|
|
27547
27893
|
"aria-label": activeSheet ? _chunkA3S3QKJNcjs.formatMessage.call(void 0, messages.worksheetGrid, { sheet: activeSheet.name }) : messages.workbookGrid,
|
|
27548
27894
|
"aria-readonly": readOnly,
|
|
27549
|
-
"aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
27895
|
+
"aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1755 => _1755.rowCount]), () => ( 0)), displayRowLimit),
|
|
27550
27896
|
role: "grid",
|
|
27551
27897
|
onScroll: handleScrollerScroll,
|
|
27552
27898
|
onContextMenu: (event) => {
|
|
@@ -27629,7 +27975,7 @@ function XlsxGrid({
|
|
|
27629
27975
|
["--xlsx-selection-header"]: selectionHeaderSurface,
|
|
27630
27976
|
backgroundColor: palette.canvas,
|
|
27631
27977
|
color: palette.text,
|
|
27632
|
-
cursor: _optionalChain([resizeGuide, 'optionalAccess',
|
|
27978
|
+
cursor: _optionalChain([resizeGuide, 'optionalAccess', _1756 => _1756.type]) === "column" ? "col-resize" : _optionalChain([resizeGuide, 'optionalAccess', _1757 => _1757.type]) === "row" ? "row-resize" : void 0,
|
|
27633
27979
|
flex: 1,
|
|
27634
27980
|
height: "100%",
|
|
27635
27981
|
minHeight: 0,
|
|
@@ -27660,7 +28006,7 @@ function XlsxGrid({
|
|
|
27660
28006
|
)
|
|
27661
28007
|
] : []);
|
|
27662
28008
|
const chartSourceHighlightNodes = (experimentalCanvas ? activeSheetChartHighlights : []).flatMap((highlight, index) => {
|
|
27663
|
-
const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
28009
|
+
const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1758 => _1758.mergedRanges]), () => ( mergedRegions)));
|
|
27664
28010
|
const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
|
|
27665
28011
|
const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
|
|
27666
28012
|
if (!rows || !cols) return [];
|
|
@@ -27684,8 +28030,8 @@ function XlsxGrid({
|
|
|
27684
28030
|
];
|
|
27685
28031
|
});
|
|
27686
28032
|
const formulaHighlightNodes = formulaReferences.flatMap((reference, index) => {
|
|
27687
|
-
if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess',
|
|
27688
|
-
const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess',
|
|
28033
|
+
if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess', _1759 => _1759.name, 'access', _1760 => _1760.toLowerCase, 'call', _1761 => _1761()])) return [];
|
|
28034
|
+
const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1762 => _1762.mergedRanges]), () => ( mergedRegions)));
|
|
27689
28035
|
const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
|
|
27690
28036
|
const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
|
|
27691
28037
|
if (!rows || !cols) return [];
|
|
@@ -27726,16 +28072,16 @@ function XlsxGrid({
|
|
|
27726
28072
|
boxSizing: "border-box",
|
|
27727
28073
|
boxShadow: `inset 0 0 0 ${selectionBorderWidth}px ${selectionStroke}`,
|
|
27728
28074
|
contain: "layout paint",
|
|
27729
|
-
height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
27730
|
-
left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
28075
|
+
height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1763 => _1763.height]), () => ( 0)),
|
|
28076
|
+
left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1764 => _1764.left]), () => ( 0)),
|
|
27731
28077
|
opacity: resolvedSelectionOverlay ? 1 : 0,
|
|
27732
28078
|
pointerEvents: "none",
|
|
27733
28079
|
position: "absolute",
|
|
27734
|
-
top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
28080
|
+
top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1765 => _1765.top]), () => ( 0)),
|
|
27735
28081
|
transition: canvasSelectionTransition,
|
|
27736
28082
|
visibility: resolvedSelectionOverlay ? "visible" : "hidden",
|
|
27737
28083
|
willChange: shouldAnimateCanvasSelectionGeometry ? "left, top, width, height" : void 0,
|
|
27738
|
-
width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess',
|
|
28084
|
+
width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1766 => _1766.width]), () => ( 0)),
|
|
27739
28085
|
zIndex: 24
|
|
27740
28086
|
}
|
|
27741
28087
|
}
|
|
@@ -27967,8 +28313,8 @@ function XlsxGrid({
|
|
|
27967
28313
|
] }),
|
|
27968
28314
|
editingCell && editingOverlayRect ? (() => {
|
|
27969
28315
|
const editingCellData = getCellData(editingCell.row, editingCell.col);
|
|
27970
|
-
const editingCellStyle = { ...editingCellData.style };
|
|
27971
|
-
if (editingCellData.usesGeneralAlignment) {
|
|
28316
|
+
const editingCellStyle = { ...editingCellData.style, ...cellEditorStyle };
|
|
28317
|
+
if (editingCellData.usesGeneralAlignment && _optionalChain([cellEditorStyle, 'optionalAccess', _1767 => _1767.textAlign]) === void 0) {
|
|
27972
28318
|
const enteredValue = worksheet && isTextCell(worksheet, editingCell) ? editingValue : coerceUserEnteredValue(editingValue, locale);
|
|
27973
28319
|
editingCellStyle.textAlign = typeof enteredValue === "number" ? "right" : typeof enteredValue === "boolean" ? "center" : "left";
|
|
27974
28320
|
}
|
|
@@ -27988,6 +28334,8 @@ function XlsxGrid({
|
|
|
27988
28334
|
children: /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
27989
28335
|
CellEditor,
|
|
27990
28336
|
{
|
|
28337
|
+
editorRef: editorElementRef,
|
|
28338
|
+
onFocusOverlay: renderCellEditorOverlay ? focusEditorOverlay : void 0,
|
|
27991
28339
|
canvasText: true,
|
|
27992
28340
|
canvasOffset: {
|
|
27993
28341
|
left: editingOverlayRect.left - drawingViewport.left - (stickyLeftByCol.has(editingCell.col) ? displayRowHeaderWidth : scrollBodyCanvasLeft),
|
|
@@ -28027,9 +28375,9 @@ function XlsxGrid({
|
|
|
28027
28375
|
value: editingValue,
|
|
28028
28376
|
references: formulaReferences,
|
|
28029
28377
|
onBlur: handleEditingBlur,
|
|
28030
|
-
onChange: setEditingValue,
|
|
28031
|
-
onCommit: commitEditing,
|
|
28032
|
-
onCancel: cancelEditing,
|
|
28378
|
+
onChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1768 => _1768.setValue]), () => ( setEditingValue)),
|
|
28379
|
+
onCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1769 => _1769.commit]), () => ( commitEditing)),
|
|
28380
|
+
onCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1770 => _1770.cancel]), () => ( cancelEditing)),
|
|
28033
28381
|
onNavigate: handleEditingNavigate,
|
|
28034
28382
|
style: {
|
|
28035
28383
|
backgroundColor: editingBackground,
|
|
@@ -28039,7 +28387,8 @@ function XlsxGrid({
|
|
|
28039
28387
|
lineHeight: editingCellStyle.lineHeight,
|
|
28040
28388
|
textAlign: editingCellStyle.textAlign,
|
|
28041
28389
|
verticalAlign: editingCellStyle.verticalAlign,
|
|
28042
|
-
padding: editingCellStyle.padding
|
|
28390
|
+
padding: editingCellStyle.padding,
|
|
28391
|
+
...cellEditorStyle
|
|
28043
28392
|
}
|
|
28044
28393
|
}
|
|
28045
28394
|
)
|
|
@@ -28160,7 +28509,7 @@ function XlsxGrid({
|
|
|
28160
28509
|
if (actualRow === void 0) {
|
|
28161
28510
|
return null;
|
|
28162
28511
|
}
|
|
28163
|
-
const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
28512
|
+
const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access', _1771 => _1771[index - 1], 'optionalAccess', _1772 => _1772.end]), () => ( 0));
|
|
28164
28513
|
const gapHeight = Math.max(0, virtualRow.start - previousEnd);
|
|
28165
28514
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, _chunkA3S3QKJNcjs.S, { children: [
|
|
28166
28515
|
gapHeight > 0 ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "tr", { "aria-hidden": "true", style: { height: gapHeight }, children: /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "td", { colSpan: rowColSpan }) }) : null,
|
|
@@ -28170,6 +28519,10 @@ function XlsxGrid({
|
|
|
28170
28519
|
actualRow,
|
|
28171
28520
|
editingCell,
|
|
28172
28521
|
editingValue,
|
|
28522
|
+
editorRef: editorElementRef,
|
|
28523
|
+
editorInputRef: editingInputRef,
|
|
28524
|
+
cellEditorStyle,
|
|
28525
|
+
onFocusEditorOverlay: renderCellEditorOverlay ? focusEditorOverlay : void 0,
|
|
28173
28526
|
formulaReferences,
|
|
28174
28527
|
editorBoxShadow: `inset 0 0 0 ${selectionBorderWidth}px ${selectionStroke}`,
|
|
28175
28528
|
frozenRowHeaderZIndex: frozenRowHeaderOverlayZIndex,
|
|
@@ -28179,10 +28532,10 @@ function XlsxGrid({
|
|
|
28179
28532
|
onCellDoubleClick: handleCellDoubleClick,
|
|
28180
28533
|
onCellPointerDown: handleCellPointerDown,
|
|
28181
28534
|
onEditingBlur: handleEditingBlur,
|
|
28182
|
-
onEditingCancel: cancelEditing,
|
|
28183
|
-
onEditingCommit: commitEditing,
|
|
28535
|
+
onEditingCancel: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1773 => _1773.cancel]), () => ( cancelEditing)),
|
|
28536
|
+
onEditingCommit: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1774 => _1774.commit]), () => ( commitEditing)),
|
|
28184
28537
|
onEditingNavigate: handleEditingNavigate,
|
|
28185
|
-
onEditingValueChange: setEditingValue,
|
|
28538
|
+
onEditingValueChange: _nullishCoalesce(_optionalChain([cellEditorSession, 'optionalAccess', _1775 => _1775.setValue]), () => ( setEditingValue)),
|
|
28186
28539
|
headerLabelLiveScale,
|
|
28187
28540
|
onRowHeaderRef: setRowHeaderRef,
|
|
28188
28541
|
onRowPointerDown: handleRowPointerDown,
|
|
@@ -28203,11 +28556,11 @@ function XlsxGrid({
|
|
|
28203
28556
|
)
|
|
28204
28557
|
] }, `row-fragment-${virtualRow.key}`);
|
|
28205
28558
|
}),
|
|
28206
|
-
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
28559
|
+
virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1776 => _1776[virtualRows.length - 1], 'optionalAccess', _1777 => _1777.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
28207
28560
|
"tr",
|
|
28208
28561
|
{
|
|
28209
28562
|
style: {
|
|
28210
|
-
height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access',
|
|
28563
|
+
height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1778 => _1778[virtualRows.length - 1], 'optionalAccess', _1779 => _1779.end]), () => ( totalHeight)))
|
|
28211
28564
|
},
|
|
28212
28565
|
children: /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "td", { colSpan: rowColSpan })
|
|
28213
28566
|
}
|
|
@@ -28334,6 +28687,42 @@ function XlsxGrid({
|
|
|
28334
28687
|
);
|
|
28335
28688
|
return /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "div", { style: { backgroundColor: palette.canvas, display: "flex", flex: 1, minHeight: 0, minWidth: 0 }, children: [
|
|
28336
28689
|
renderScroller ? renderScroller({ children: scrollerContent, viewportProps: scrollerViewportProps }) : /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0, "div", { ...scrollerViewportProps, children: scrollerContent }, activeTabIndex),
|
|
28690
|
+
renderSelectionPopover && normalizedSelection && activeCell && !isLoading && interactionMode === "idle" && !contextMenu && /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
28691
|
+
SelectionPopover,
|
|
28692
|
+
{
|
|
28693
|
+
context: { cell: resolveMergeAnchorCell(activeCell), selection: normalizedSelection, sheetIndex: activeSheetIndex, sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1780 => _1780.name]), () => ( "")), readOnly },
|
|
28694
|
+
suspended: !!editingCell,
|
|
28695
|
+
viewportRef: scrollRef,
|
|
28696
|
+
getRects: () => {
|
|
28697
|
+
const elements = experimentalCanvas ? [...selectionPaneOverlayRefs.current.values()] : [selectionOverlayRef.current];
|
|
28698
|
+
return elements.flatMap((element) => {
|
|
28699
|
+
if (!element) return [];
|
|
28700
|
+
const bounds = element.getBoundingClientRect();
|
|
28701
|
+
const pane = experimentalCanvas ? _optionalChain([element, 'access', _1781 => _1781.parentElement, 'optionalAccess', _1782 => _1782.parentElement, 'optionalAccess', _1783 => _1783.getBoundingClientRect, 'call', _1784 => _1784()]) : null;
|
|
28702
|
+
const left = Math.max(bounds.left, _nullishCoalesce(_optionalChain([pane, 'optionalAccess', _1785 => _1785.left]), () => ( -Infinity)));
|
|
28703
|
+
const top = Math.max(bounds.top, _nullishCoalesce(_optionalChain([pane, 'optionalAccess', _1786 => _1786.top]), () => ( -Infinity)));
|
|
28704
|
+
const right = Math.min(bounds.right, _nullishCoalesce(_optionalChain([pane, 'optionalAccess', _1787 => _1787.right]), () => ( Infinity)));
|
|
28705
|
+
const bottom = Math.min(bounds.bottom, _nullishCoalesce(_optionalChain([pane, 'optionalAccess', _1788 => _1788.bottom]), () => ( Infinity)));
|
|
28706
|
+
return right > left && bottom > top ? [{ left, top, width: right - left, height: bottom - top }] : [];
|
|
28707
|
+
});
|
|
28708
|
+
},
|
|
28709
|
+
render: renderSelectionPopover,
|
|
28710
|
+
onApply: (formula) => setCellFormula(resolveMergeAnchorCell(activeCell), formula),
|
|
28711
|
+
focusGrid
|
|
28712
|
+
},
|
|
28713
|
+
`${activeSheetIndex}:${readOnly}:${activeCell.row}:${activeCell.col}:${normalizedSelection.start.row}:${normalizedSelection.start.col}:${normalizedSelection.end.row}:${normalizedSelection.end.col}`
|
|
28714
|
+
),
|
|
28715
|
+
renderCellEditorOverlay && cellEditorSession && /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
28716
|
+
CellEditorOverlay,
|
|
28717
|
+
{
|
|
28718
|
+
editorRef: editorElementRef,
|
|
28719
|
+
overlayRef: editorOverlayRef,
|
|
28720
|
+
session: cellEditorSession,
|
|
28721
|
+
render: renderCellEditorOverlay,
|
|
28722
|
+
onExit: exitEditorScope
|
|
28723
|
+
},
|
|
28724
|
+
`${activeSheetIndex}:${_optionalChain([editingCell, 'optionalAccess', _1789 => _1789.row])}:${_optionalChain([editingCell, 'optionalAccess', _1790 => _1790.col])}`
|
|
28725
|
+
),
|
|
28337
28726
|
enableContextMenu && contextMenu && /* @__PURE__ */ _chunkA3S3QKJNcjs.u.call(void 0,
|
|
28338
28727
|
XlsxContextMenu,
|
|
28339
28728
|
{
|
|
@@ -28341,7 +28730,7 @@ function XlsxGrid({
|
|
|
28341
28730
|
controller,
|
|
28342
28731
|
palette,
|
|
28343
28732
|
closeMenu: closeContextMenu,
|
|
28344
|
-
editCell: () => startEditing(contextMenu.context.cell),
|
|
28733
|
+
editCell: () => startEditing(contextMenu.context.cell, void 0, "context-menu"),
|
|
28345
28734
|
selectExtent: (kind) => selectContextExtent(kind, contextMenu.context.selection),
|
|
28346
28735
|
renderContextMenu,
|
|
28347
28736
|
contextMenuClassName,
|
|
@@ -28386,6 +28775,9 @@ function XlsxViewerInner({
|
|
|
28386
28775
|
renderScroller,
|
|
28387
28776
|
renderTableHeaderMenu,
|
|
28388
28777
|
renderActiveCellOverlay,
|
|
28778
|
+
renderCellEditorOverlay,
|
|
28779
|
+
renderSelectionPopover,
|
|
28780
|
+
cellEditorStyle,
|
|
28389
28781
|
rounded = true,
|
|
28390
28782
|
selectionColor,
|
|
28391
28783
|
selectionFillColor,
|
|
@@ -28488,6 +28880,9 @@ function XlsxViewerInner({
|
|
|
28488
28880
|
renderScroller,
|
|
28489
28881
|
renderTableHeaderMenu,
|
|
28490
28882
|
renderActiveCellOverlay,
|
|
28883
|
+
renderCellEditorOverlay,
|
|
28884
|
+
renderSelectionPopover,
|
|
28885
|
+
cellEditorStyle,
|
|
28491
28886
|
selectionColor,
|
|
28492
28887
|
selectionFillColor,
|
|
28493
28888
|
selectionHeaderColor,
|
|
@@ -28536,6 +28931,8 @@ function toReactOptions(options) {
|
|
|
28536
28931
|
fileTooLargeState,
|
|
28537
28932
|
loadingState,
|
|
28538
28933
|
renderActiveCellOverlay,
|
|
28934
|
+
renderCellEditorOverlay,
|
|
28935
|
+
renderSelectionPopover,
|
|
28539
28936
|
renderChartLoading,
|
|
28540
28937
|
renderContextMenu,
|
|
28541
28938
|
renderFormControl,
|
|
@@ -28550,6 +28947,8 @@ function toReactOptions(options) {
|
|
|
28550
28947
|
fileTooLargeState: typeof fileTooLargeState === "function" ? ({ defaultNode: _defaultNode, ...props }) => toReactContent(fileTooLargeState(props)) : toReactContent(fileTooLargeState),
|
|
28551
28948
|
loadingState: toReactContent(loadingState),
|
|
28552
28949
|
renderActiveCellOverlay: renderActiveCellOverlay ? (props) => toReactContent(renderActiveCellOverlay(props)) : void 0,
|
|
28950
|
+
renderSelectionPopover: renderSelectionPopover ? (props) => toReactContent(renderSelectionPopover(props)) : void 0,
|
|
28951
|
+
renderCellEditorOverlay: renderCellEditorOverlay ? (props) => toReactContent(renderCellEditorOverlay(props)) : void 0,
|
|
28553
28952
|
renderChartLoading: renderChartLoading ? ({ defaultNode: _defaultNode, ...props }) => toReactContent(renderChartLoading(props)) : void 0,
|
|
28554
28953
|
renderContextMenu: renderContextMenu ? ({ defaultNode: _defaultNode, ...props }) => toReactContent(renderContextMenu(props)) : void 0,
|
|
28555
28954
|
renderFormControl: renderFormControl ? (props) => toReactContent(renderFormControl({ ...props, stopPropagation: (event) => event.stopPropagation() })) : void 0,
|
|
@@ -28715,4 +29114,4 @@ function __createContentRoot(container) {
|
|
|
28715
29114
|
|
|
28716
29115
|
|
|
28717
29116
|
exports.parseXlsxRange = parseXlsxRange; exports.formatBinaryBytes = formatBinaryBytes; exports.XlsxFileSizeLimitExceededError = XlsxFileSizeLimitExceededError; exports.setWasmSource = setWasmSource; exports.initWasm = initWasm; exports.canUseConfiguredWasmSourceInWorker = canUseConfiguredWasmSourceInWorker; exports.getConfiguredWorkerWasmSource = getConfiguredWorkerWasmSource; exports.getSheetsWasmModule = getSheetsWasmModule; exports.XlsxViewer = XlsxViewer2; exports.createXlsxViewer = createXlsxViewer; exports.__createControlledViewer = __createControlledViewer; exports.__createContentNode = __createContentNode; exports.__createContentRoot = __createContentRoot;
|
|
28718
|
-
//# sourceMappingURL=chunk-
|
|
29117
|
+
//# sourceMappingURL=chunk-7IL4KLCD.cjs.map
|