@sheetxl/sdk 0.8.0-beta.11 → 0.8.0-beta.12
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/browser/esm/{BpgskG1Er_lGQ_yS.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
- package/browser/esm/{BLoUBId2xZpXAK_H.mjs → 2WuhYrIpYmOR5H73.mjs} +15 -15
- package/browser/esm/{Ctjb0SsxV4K4MMqG.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
- package/browser/esm/{CkxWugaJFjDGZNZ-.mjs → B3wf5vZCsWfWsDbj.mjs} +1 -1
- package/browser/esm/{BjkCiv5Jz6WYKZeu.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
- package/browser/esm/{BtvLTTfSBdAKplVG.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
- package/browser/esm/{C4MqfLn9Dm-l3OIk.mjs → BdCJNawfifyPupCP.mjs} +1 -1
- package/browser/esm/{CV5EGEjG5_-CPpP0.mjs → Bg5Di9GLNAkbqQ1P.mjs} +3 -3
- package/browser/esm/{C2VbEI_XVAoseAwa.mjs → BnC4-27Igwb8oDf2.mjs} +2 -2
- package/browser/esm/{CQYjO777cmAznUzK.mjs → Bt8_m94tBdks209L.mjs} +1 -1
- package/browser/esm/{C16ycKja6zG0crV_.mjs → BudSIfXBAsTxvu-K.mjs} +17836 -15712
- package/browser/esm/{DvAaxH6z_tGvrRzl.mjs → C9u8FUewte5ugUjH.mjs} +686 -686
- package/browser/esm/{DEiPS3Dr-s4fPbVZ.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
- package/browser/esm/{Dyq_ivuHvlXLwPCl.mjs → CNdjyofiRu6CYOrr.mjs} +1106 -1102
- package/browser/esm/{PcHFjNzQsE54POri.mjs → CRkYR-siY2C994KV.mjs} +1 -1
- package/browser/esm/{C5E6zSGAALWf61n4.mjs → CTe2qfmIUEad6FJv.mjs} +2 -2
- package/browser/esm/{BoV6zPBnfqCBCqZ7.mjs → CUzYuYTTGsChC_kZ.mjs} +3841 -3148
- package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
- package/browser/esm/{S2dNNx1a5ydRnARM.mjs → CfRqiPDg6RBTg1EN.mjs} +2 -2
- package/browser/esm/{ClbvFbFzFzXLBKNN.mjs → CndRBvVfQUJIYRRj.mjs} +50 -50
- package/browser/esm/{BnG31I6Oj_HEtSPS.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
- package/browser/esm/{CHU6iu_WGlm7fLET.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
- package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
- package/browser/esm/{BkBhLS0l6z8sxI6D.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
- package/browser/esm/{BVDiOXGMc5_FMGfy.mjs → D9xNz46kAfXMZzp4.mjs} +2 -2
- package/browser/esm/{zlLuW405RSguy4Kn.mjs → DK899HhWX1HINMC1.mjs} +53 -53
- package/browser/esm/{B7aUIvgUjncMMD_i.mjs → DPhGQLNGmDZwODwJ.mjs} +5 -4
- package/browser/esm/{gssVX_FH1XFN-twD.mjs → DVroRnhi-5IDXNgM.mjs} +1 -1
- package/{node/esm/CZICGK_ss0HoGHCP.mjs → browser/esm/DZiivy0NmO1Vnyzk.mjs} +2 -2
- package/browser/esm/{ClPfI4lODvCece29.mjs → DgrAuRD2qr2DvFeJ.mjs} +61 -61
- package/browser/esm/{CU3DmJ-YnVVrC1_k.mjs → DobHLF6VjHr7Xi40.mjs} +1 -1
- package/browser/esm/{CaB7J-xgfKO2uAkG.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
- package/browser/esm/{BMyDRQ716j79h_bH.mjs → DwwR3O2sEZApPSTF.mjs} +6 -6
- package/browser/esm/{DLLE0FZNsKxbBzRn.mjs → Tah7cnFb_HNZdLtj.mjs} +45 -45
- package/browser/esm/{Dlmig06rIo7cInRk.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
- package/browser/esm/{DWNzqw7DUKwoxjri.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
- package/browser/esm/index.mjs +679 -542
- package/browser/esm/{BFagR2JeWs74iAG3.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
- package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
- package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
- package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
- package/node/esm/{B21JjOLghRoDOrkx.mjs → B-HUPAcqvK0eeeCz.mjs} +1 -1
- package/node/esm/{DNRhGK-8Tr9xcRyc.mjs → BL2iiEoqxDEV2Xrg.mjs} +3 -3
- package/node/esm/{D1TKBVmoKGAXf37B.mjs → BNXLOEddJ6O9gYws.mjs} +2 -2
- package/node/esm/{BrCKGFRsX_ezFJ4B.mjs → BSvOluusoDM4z_dx.mjs} +15 -15
- package/node/esm/{BIwObuhTJYf0jpUa.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
- package/node/esm/{2Kihw_-5lVTEnwMa.mjs → Btw4148Ot8ifhNc1.mjs} +1 -1
- package/node/esm/{BqiexuA89caYnAPz.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
- package/node/esm/{DUTskXCXref-IJnI.mjs → C99zzq8DImQXi4BQ.mjs} +47 -47
- package/node/esm/{D8zEN-6ZdDqDvTxM.mjs → CBuEu5Jk-LfaDy-H.mjs} +61 -61
- package/node/esm/{yavzZOiZW_EjG9lE.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
- package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
- package/node/esm/{CCN5vD410obwdz38.mjs → CRt3vXe6YmXzqk3H.mjs} +15 -14
- package/node/esm/{CzXT00vrQa1_gvW9.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
- package/node/esm/{CZiqiay42tFTrLI4.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
- package/node/esm/{BIRq1kT7lLRzns9t.mjs → CiIymQN6aJCul62g.mjs} +9 -9
- package/node/esm/{CNCNJNg890KdgkWh.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
- package/{browser/esm/D5np__Jb1euAyaLw.mjs → node/esm/CkRYLed8Mmn3giNg.mjs} +2 -2
- package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
- package/node/esm/{cGwrLA1RCE-WhJ7w.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
- package/node/esm/{mFiBSM7XgBHV9AY7.mjs → D8hO07ToAibIuniw.mjs} +1535 -1531
- package/node/esm/{CDHdgJXH2vS71WMc.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
- package/node/esm/{CGp6VZL-gZa9Uezx.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
- package/node/esm/{De2IONBxQhz-Qbyh.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
- package/node/esm/{Db0v7zXNnyjBIjjI.mjs → DggQ23jKMpwhENfa.mjs} +2 -2
- package/node/esm/{CwePQwTILHHjGDkZ.mjs → DhS6yWjrrSNIJMsn.mjs} +204 -204
- package/node/esm/{D_t5AUxSm7_icjzq.mjs → DhTya_mhmN53vskv.mjs} +1 -1
- package/node/esm/{DOU54VsOjG-m-NyQ.mjs → Dn1M7YWi25DeeYUb.mjs} +1 -1
- package/node/esm/{DkwIPzKc3UwdUIfM.mjs → DrCf6ITcBhVOFpRj.mjs} +6 -6
- package/node/esm/{D2KBymQJd1XhpeQD.mjs → DxazKtROyaI51dWl.mjs} +1 -1
- package/node/esm/{D6e2z7eZpxOJXHc7.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
- package/node/esm/{OVfaSb506tNSIvbv.mjs → Vocy-I9dKzZMr0Ct.mjs} +19038 -16822
- package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
- package/node/esm/{857CIBgQgGpnqrXk.mjs → eimUGjiIP-b8HiM6.mjs} +55 -55
- package/node/esm/{Bbf1Pm9Gk7YpLTvg.mjs → icn2nX5Z8e_3mNAv.mjs} +1 -1
- package/node/esm/index.mjs +740 -603
- package/node/esm/{Ct3h15sCus4Tgt6M.mjs → lGJ42sHqg5if2bba.mjs} +624 -616
- package/node/esm/{CdJHUJSBRHZoryPe.mjs → pYtP7wPyS96NQyXS.mjs} +59 -59
- package/package.json +6 -6
- package/resources/locales/de/model.msg.json +8 -2
- package/resources/locales/en/model.msg.json +9 -2
- package/types/scripting-api.json +10619 -10446
- package/types/scripting-enums.json +20 -1
- package/types/scripting.d.ts +1233 -296
- package/types/src/{sheet → anomalies}/_Anomalies.d.ts +3 -3
- package/types/src/anomalies/_FocusTable.d.ts +11 -0
- package/types/src/{sheet/_AnomalyFormulaChecks.d.ts → anomalies/_FormulaChecks.d.ts} +10 -2
- package/types/src/{sheet/_AnomalyLabelChecks.d.ts → anomalies/_LabelChecks.d.ts} +1 -1
- package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
- package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
- package/types/src/calculation/Calculation.d.ts +47 -9
- package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
- package/types/src/calculation/ICalculation.d.ts +96 -9
- package/types/src/calculation/NamedFormulaCollection.d.ts +104 -8
- package/types/src/calculation/_CloneBoundary.d.ts +1 -1
- package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
- package/types/src/calculation/compiler/Types.d.ts +8 -0
- package/types/src/calculation/engine/CalcBackend.d.ts +104 -6
- package/types/src/calculation/executor/CalcExecutor.d.ts +73 -22
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +17 -1
- package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +4 -3
- package/types/src/calculation/formula/IFormulaBlock.d.ts +5 -0
- package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
- package/types/src/calculation/grid/CalcGrid.d.ts +4 -6
- package/types/src/calculation/grid/CalcGridBackend.d.ts +5 -27
- package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -2
- package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
- package/types/src/calculation/grid/ICalcGrid.d.ts +16 -12
- package/types/src/calculation/grid/_CalcRequest.d.ts +17 -5
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
- package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
- package/types/src/calculation/state/CalcNode.d.ts +0 -1
- package/types/src/calculation/state/CalcScope.d.ts +29 -0
- package/types/src/calculation/state/CalcState.d.ts +26 -4
- package/types/src/calculation/state/CalculationContext.d.ts +28 -1
- package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
- package/types/src/calculation/state/IContextContainer.d.ts +20 -0
- package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
- package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
- package/types/src/cell/ICell.d.ts +53 -34
- package/types/src/cellControl/CellControl.d.ts +67 -0
- package/types/src/cellControl/CellControlCollection.d.ts +29 -0
- package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
- package/types/src/cellControl/ICellControl.d.ts +99 -0
- package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
- package/types/src/cellControl/index.d.ts +4 -0
- package/types/src/cellRange/ICellRange.d.ts +207 -59
- package/types/src/cellRange/ICellRanges.d.ts +4 -3
- package/types/src/chart/layout/ChartLayout.d.ts +5 -1
- package/types/src/chart/resolve/_Resolve.d.ts +10 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +5 -2
- package/types/src/collections/ISparseGrid.d.ts +11 -2
- package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
- package/types/src/collections/SparseGrid.d.ts +3 -8
- package/types/src/condition/AnchoredConditional.d.ts +2 -2
- package/types/src/externalBook/IExternalBook.d.ts +3 -4
- package/types/src/fetch/Fetcher.d.ts +15 -0
- package/types/src/fetch/IFetcher.d.ts +47 -0
- package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
- package/types/src/fetch/index.d.ts +3 -0
- package/types/src/fill/PaintUtils.d.ts +3 -1
- package/types/src/hyperlink/IHyperlink.d.ts +10 -0
- package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
- package/types/src/index.d.ts +2 -1
- package/types/src/named/INamedCollection.d.ts +36 -0
- package/types/src/named/NamedCollection.d.ts +18 -0
- package/types/src/primitives/AsyncValue.d.ts +58 -0
- package/types/src/resource/IResource.d.ts +9 -0
- package/types/src/resource/IResourceCollection.d.ts +4 -0
- package/types/src/resource/Resource.d.ts +2 -0
- package/types/src/resource/_AddResource.d.ts +13 -0
- package/types/src/richData/CellImage.d.ts +95 -0
- package/types/src/richData/Hyperlink.d.ts +49 -0
- package/types/src/richData/IRichDataCollection.d.ts +76 -0
- package/types/src/richData/IRichDataKind.d.ts +55 -11
- package/types/src/richData/RichArray.d.ts +42 -0
- package/types/src/richData/RichDataCollection.d.ts +23 -0
- package/types/src/richData/RichDataRegistry.d.ts +46 -14
- package/types/src/richData/RichDataValues.d.ts +20 -0
- package/types/src/richData/RichRecord.d.ts +68 -0
- package/types/src/richData/RichText.d.ts +5 -5
- package/types/src/richData/index.d.ts +6 -0
- package/types/src/scripting/FunctionArguments.d.ts +17 -1
- package/types/src/scripting/FunctionCollection.d.ts +8 -0
- package/types/src/scripting/Scripts.d.ts +10 -0
- package/types/src/scripting/TypedFunction.d.ts +2 -0
- package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
- package/types/src/sheet/IWorksheet.d.ts +24 -17
- package/types/src/sheet/SheetCell.d.ts +17 -1
- package/types/src/sheet/SheetRange.d.ts +8 -2
- package/types/src/sheet/SheetRanges.d.ts +2 -2
- package/types/src/sheet/Worksheet.d.ts +110 -56
- package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
- package/types/src/sheet/_ScalarListFactory.d.ts +54 -6
- package/types/src/sheet/_SheetMutations.d.ts +4 -1
- package/types/src/sheet/_SheetStateTypes.d.ts +23 -11
- package/types/src/workbook/IWorkbook.d.ts +40 -1
- package/types/src/workbook/Workbook.d.ts +25 -3
- package/types/src/workbook/WorkbookRanges.d.ts +1 -1
- package/browser/esm/BGOFfpxr2jPIdqmV.mjs +0 -40
- package/browser/esm/f1IoRb7tEb0QmCSt.mjs +0 -110
- package/browser/esm/nvU0ClAbf0g94YBK.mjs +0 -1695
- package/node/esm/B084DssTcdBheTp_.mjs +0 -7966
- package/node/esm/Df1bL6VFvrqIdSLB.mjs +0 -40
- package/node/esm/DrTZbfemSLq2mseG.mjs +0 -111
- package/types/src/dataTable/DataTable.d.ts +0 -67
- package/types/src/dataTable/DataTableCollection.d.ts +0 -19
- package/types/src/dataTable/IDataTable.d.ts +0 -99
- package/types/src/dataTable/IDataTableCollection.d.ts +0 -18
- package/types/src/dataTable/index.d.ts +0 -6
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { r as e } from "./D2RZh0O9neOsyLAE.mjs";
|
|
8
|
+
import { FormulaError as t, ScalarType as n } from "@sheetxl/primitives";
|
|
9
|
+
function r(e, t, r) {
|
|
10
|
+
let i = (e) => {
|
|
11
|
+
let t = null;
|
|
12
|
+
e.s ? t = e.s : e.r || e.g || (t = n.Number);
|
|
13
|
+
let a = {
|
|
14
|
+
name: e.n,
|
|
15
|
+
scalar: t,
|
|
16
|
+
range: e.r ?? null,
|
|
17
|
+
arrayDepth: e.d ?? 0,
|
|
18
|
+
optional: e.m === "?",
|
|
19
|
+
rest: e.m === "..."
|
|
20
|
+
};
|
|
21
|
+
return e.e !== void 0 && (a.enum = r(e.e)), e.l && (a.lambda = e.l), e.a !== void 0 && (a.lambdaArity = e.a), e.ae && (a.acceptError = !0), e.v !== void 0 && (a.defaultValue = e.v), e.u && (a.omittable = !0), e.w !== void 0 && (a.omittedValue = e.w), e.nl && (a.noLift = !0), e.nf && (a.noFilter = !0), e.lz && (a.lazy = !0), e.rt && (a.reportType = !0), e.vr && (a.valueOrRange = !0), e.g && (a.repeating = e.g.map(i)), delete a.dim, a;
|
|
22
|
+
}, a = [], o = t.p;
|
|
23
|
+
if (o) for (let e = 0; e < o.length; e++) a.push(i(o[e]));
|
|
24
|
+
let s = null;
|
|
25
|
+
t.r && (s = {}, t.r.s && (s.scalar = t.r.s), t.r.r && (s.range = t.r.r === "p" || t.r.r === "r" || t.r.r === "m" ? t.r.r : null), t.r.d && (s.arrayDepth = t.r.d ?? 0), t.r.l && (s.lambda = t.r.l || null), t.r.k && (s.kind = t.r.k), t.r.vol && (s.volatile = !0));
|
|
26
|
+
let c = {
|
|
27
|
+
name: e,
|
|
28
|
+
parameters: a,
|
|
29
|
+
returnType: s,
|
|
30
|
+
context: t.c ? "calculation" : null,
|
|
31
|
+
maxArguments: t.mx
|
|
32
|
+
};
|
|
33
|
+
t.h && (c.hidden = !0);
|
|
34
|
+
let l = [];
|
|
35
|
+
for (let e of a) for (let t of [e, ...e.repeating ?? []]) t.enum && !l.includes(t.enum.id) && l.push(t.enum.id);
|
|
36
|
+
return {
|
|
37
|
+
decl: c,
|
|
38
|
+
enumIds: l
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
var i = "SheetXL", a = {
|
|
42
|
+
declarations: { TABLE: {
|
|
43
|
+
p: [
|
|
44
|
+
{
|
|
45
|
+
n: "rowInput",
|
|
46
|
+
r: "r",
|
|
47
|
+
m: "?",
|
|
48
|
+
u: 1,
|
|
49
|
+
ae: 1
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
n: "columnInput",
|
|
53
|
+
r: "r",
|
|
54
|
+
m: "?",
|
|
55
|
+
u: 1,
|
|
56
|
+
ae: 1
|
|
57
|
+
},
|
|
58
|
+
{ n: "rows" },
|
|
59
|
+
{ n: "columns" }
|
|
60
|
+
],
|
|
61
|
+
r: { r: "r" }
|
|
62
|
+
} },
|
|
63
|
+
category: i
|
|
64
|
+
}, o = async () => ({ default: { TABLE: {
|
|
65
|
+
s: "Returns a what-if data table: a formula on the table's edge evaluated with each axis value put into the input cells.",
|
|
66
|
+
p: {
|
|
67
|
+
rowInput: { d: "is the cell the values in the row above the results are put into; omit it for a table with one input down a column." },
|
|
68
|
+
columnInput: { d: "is the cell the values in the column left of the results are put into; omit it for a table with one input along a row." },
|
|
69
|
+
rows: { d: "is the number of rows of results." },
|
|
70
|
+
columns: { d: "is the number of columns of results." }
|
|
71
|
+
}
|
|
72
|
+
} } }), s = (e, n, r) => {
|
|
73
|
+
if (r == null) return null;
|
|
74
|
+
if (t.isError(r)) return t.isError(r, t.Code.Ref) ? "ref" : t.BuiltIn.Value;
|
|
75
|
+
let i = r;
|
|
76
|
+
if (!0 !== i.isIReferenceRange) return t.BuiltIn.Value;
|
|
77
|
+
let a = i.getCoords();
|
|
78
|
+
return a.rowStart !== a.rowEnd || a.colStart !== a.colEnd || e._gridIdOfReference(a) !== n ? t.BuiltIn.Value : {
|
|
79
|
+
rowIndex: a.rowStart,
|
|
80
|
+
colIndex: a.colStart
|
|
81
|
+
};
|
|
82
|
+
}, c = (e, t) => {
|
|
83
|
+
if (typeof e != "number" || !Number.isFinite(e)) return null;
|
|
84
|
+
let n = Math.trunc(e);
|
|
85
|
+
return n >= 1 && n <= t ? n : null;
|
|
86
|
+
}, l = (n) => ({ TABLE: (r, i, a, o) => ((n, r, i, a, o) => {
|
|
87
|
+
let l = n(), u = l._gridIdOfReference(null);
|
|
88
|
+
if (!u) return t.BuiltIn.Value;
|
|
89
|
+
let d = s(l, u, r);
|
|
90
|
+
if (t.isError(d)) return d;
|
|
91
|
+
let f = s(l, u, i);
|
|
92
|
+
if (t.isError(f)) return f;
|
|
93
|
+
if (d === null && f === null) return t.BuiltIn.Value;
|
|
94
|
+
let p = l.getEntireCoords(), m = c(a, p.rowEnd + 1), h = c(o, p.colEnd + 1);
|
|
95
|
+
if (m === null || h === null) return t.BuiltIn.Value;
|
|
96
|
+
let g = l.getRow(), _ = l.getColumn();
|
|
97
|
+
if (g === 0 || _ === 0) return t.BuiltIn.Ref;
|
|
98
|
+
if (d === "ref" || f === "ref") return l.createRange(m, h, t.BuiltIn.Ref);
|
|
99
|
+
let v = {
|
|
100
|
+
gridId: u,
|
|
101
|
+
row: g,
|
|
102
|
+
col: _,
|
|
103
|
+
rows: m,
|
|
104
|
+
cols: h,
|
|
105
|
+
rowInput: d,
|
|
106
|
+
colInput: f
|
|
107
|
+
}, y = e(v);
|
|
108
|
+
for (let e = 0; e < y.length; e++) {
|
|
109
|
+
let t = l.getReference(y[e]);
|
|
110
|
+
if (t?.isFormulaError) return t;
|
|
111
|
+
let n = t.getRowCount(), r = t.getColumnCount();
|
|
112
|
+
for (let e = 0; e < n; e++) for (let n = 0; n < r; n++) t.getValueAt(e, n);
|
|
113
|
+
}
|
|
114
|
+
let b = l._evaluateWhatIf(v);
|
|
115
|
+
return b === null ? t.BuiltIn.Value : l.createRange(m, h, b);
|
|
116
|
+
})(n, r, i, a, o) });
|
|
117
|
+
export { r as a, l as i, a as n, o as r, i as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { n as e } from "./
|
|
7
|
+
import { n as e } from "./fXWUMDhZ5yMSO629.mjs";
|
|
8
8
|
import { instantiateWasmBindgen as t } from "@sheetxl/utils";
|
|
9
9
|
var n = e({
|
|
10
10
|
FaceInfo: () => r,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.value"), f = Symbol("sheetxl.formulaNode.replaced"), p = { canonical: !0 }, m = (
|
|
9
|
-
let r =
|
|
7
|
+
import { $n as e, At as t, Gn as n, Kn as r, Qn as i, Rn as a, Vn as o, Xn as s, br as c, lr as l } from "./BudSIfXBAsTxvu-K.mjs";
|
|
8
|
+
var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.value"), f = Symbol("sheetxl.formulaNode.replaced"), p = { canonical: !0 }, m = (e, n) => {
|
|
9
|
+
let r = e.inputs, i = null;
|
|
10
10
|
if (r) {
|
|
11
11
|
let e = r.length;
|
|
12
12
|
i = Array(e);
|
|
@@ -15,11 +15,11 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
15
15
|
i[t] = e && m(e, n);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
let a = ((
|
|
19
|
-
let r =
|
|
20
|
-
if (r ===
|
|
18
|
+
let a = ((e, n) => {
|
|
19
|
+
let r = e.type, i = e.value;
|
|
20
|
+
if (r === c.Named) {
|
|
21
21
|
let r = i, a = r?.nameId, o = r?.scope ?? null;
|
|
22
|
-
return n && (a = n.resolve(
|
|
22
|
+
return n && (a = n.resolve(t.NamedFormula, a)?.toString() ?? a, o &&= n.resolve(t.Sheet, o)?.toString() ?? o), e.binding?.declaration && e.binding.optional ? {
|
|
23
23
|
name: a,
|
|
24
24
|
scope: o,
|
|
25
25
|
optional: !0
|
|
@@ -28,31 +28,31 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
28
28
|
scope: o
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
if (r ===
|
|
32
|
-
let
|
|
33
|
-
return
|
|
31
|
+
if (r === c.TableReference) {
|
|
32
|
+
let e = typeof i == "string" ? i : i?.tableId;
|
|
33
|
+
return e ? n ? n.resolve(t.Table, e)?.toString() ?? e : e : "";
|
|
34
34
|
}
|
|
35
35
|
if (!n) return i;
|
|
36
36
|
switch (r) {
|
|
37
|
-
case
|
|
38
|
-
case
|
|
39
|
-
case
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
42
|
-
let r = n.resolve(
|
|
37
|
+
case c.Function: return n.resolve(t.Function, i, p)?.toString() ?? i;
|
|
38
|
+
case c.TableColumn: return n.resolve(t.TableColumn, i)?.toString() ?? i;
|
|
39
|
+
case c.Cell: {
|
|
40
|
+
let e = i;
|
|
41
|
+
if (e?.scope) {
|
|
42
|
+
let r = n.resolve(t.Sheet, e.scope)?.toString() ?? e.scope;
|
|
43
43
|
return {
|
|
44
|
-
...
|
|
44
|
+
...e,
|
|
45
45
|
scope: r
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
return i;
|
|
49
49
|
}
|
|
50
|
-
case
|
|
51
|
-
let
|
|
52
|
-
if (
|
|
53
|
-
let r = n.resolve(
|
|
50
|
+
case c.Error: {
|
|
51
|
+
let e = i;
|
|
52
|
+
if (e?.scope) {
|
|
53
|
+
let r = n.resolve(t.Sheet, e.scope)?.toString() ?? e.scope;
|
|
54
54
|
return {
|
|
55
|
-
...
|
|
55
|
+
...e,
|
|
56
56
|
scope: r
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -60,13 +60,13 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
60
60
|
}
|
|
61
61
|
default: return i;
|
|
62
62
|
}
|
|
63
|
-
})(
|
|
63
|
+
})(e, n);
|
|
64
64
|
return {
|
|
65
|
-
type:
|
|
65
|
+
type: e.type,
|
|
66
66
|
value: a,
|
|
67
67
|
inputs: i,
|
|
68
|
-
isReference:
|
|
69
|
-
[u]:
|
|
68
|
+
isReference: e.isReference,
|
|
69
|
+
[u]: e,
|
|
70
70
|
[d]: a
|
|
71
71
|
};
|
|
72
72
|
}, h = (e, t, n) => {
|
|
@@ -93,15 +93,15 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
93
93
|
".:",
|
|
94
94
|
":.",
|
|
95
95
|
" "
|
|
96
|
-
], _ = (
|
|
97
|
-
let u =
|
|
96
|
+
], _ = (t, a) => {
|
|
97
|
+
let u = t.type, d = t.value;
|
|
98
98
|
switch (u) {
|
|
99
|
-
case
|
|
100
|
-
case
|
|
101
|
-
case
|
|
102
|
-
case
|
|
103
|
-
case
|
|
104
|
-
let e =
|
|
99
|
+
case c.Function: return n(String(d), a);
|
|
100
|
+
case c.Infix: return r(d, a[0], a[1], t.isReference ?? g.includes(d));
|
|
101
|
+
case c.Prefix: return e(d, a?.[0], t.isReference ?? d === "@");
|
|
102
|
+
case c.Postfix: return i(d, a?.[0], t.isReference ?? d === "#");
|
|
103
|
+
case c.Named: {
|
|
104
|
+
let e = s(typeof d == "string" ? d : d?.name), t = typeof d == "object" ? d?.scope : null;
|
|
105
105
|
return t && (e.value = {
|
|
106
106
|
...e.value,
|
|
107
107
|
scope: t
|
|
@@ -110,33 +110,33 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
110
110
|
optional: !0
|
|
111
111
|
}), e;
|
|
112
112
|
}
|
|
113
|
-
case
|
|
114
|
-
case
|
|
115
|
-
type:
|
|
113
|
+
case c.Cell: return o(d);
|
|
114
|
+
case c.TableReference: return {
|
|
115
|
+
type: c.TableReference,
|
|
116
116
|
value: d,
|
|
117
|
-
inputs:
|
|
117
|
+
inputs: a ?? null,
|
|
118
118
|
isReference: !0
|
|
119
119
|
};
|
|
120
|
-
case
|
|
121
|
-
type:
|
|
120
|
+
case c.TableSpecifier: return {
|
|
121
|
+
type: c.TableSpecifier,
|
|
122
122
|
value: d,
|
|
123
123
|
image: `[${d}]`,
|
|
124
124
|
inputs: null,
|
|
125
125
|
isReference: !0
|
|
126
126
|
};
|
|
127
|
-
case
|
|
128
|
-
let e = typeof d == "string" && d.startsWith("[") ? d : `[${
|
|
127
|
+
case c.TableColumn: {
|
|
128
|
+
let e = typeof d == "string" && d.startsWith("[") ? d : `[${l(String(d))}]`;
|
|
129
129
|
return {
|
|
130
|
-
type:
|
|
130
|
+
type: c.TableColumn,
|
|
131
131
|
value: d,
|
|
132
132
|
image: e,
|
|
133
133
|
inputs: null,
|
|
134
134
|
isReference: !0
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
case
|
|
138
|
-
case
|
|
139
|
-
case
|
|
137
|
+
case c.String:
|
|
138
|
+
case c.Number:
|
|
139
|
+
case c.Boolean: return {
|
|
140
140
|
type: u,
|
|
141
141
|
value: d,
|
|
142
142
|
inputs: null,
|
|
@@ -145,8 +145,8 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
145
145
|
default: return {
|
|
146
146
|
type: u,
|
|
147
147
|
value: d,
|
|
148
|
-
inputs:
|
|
149
|
-
isReference:
|
|
148
|
+
inputs: a ?? null,
|
|
149
|
+
isReference: t.isReference
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
}, v = (e) => {
|
|
@@ -178,7 +178,7 @@ var u = Symbol("sheetxl.formulaNode.internal"), d = Symbol("sheetxl.formulaNode.
|
|
|
178
178
|
let i = _(e, r), a = e[f];
|
|
179
179
|
return a && y(i, a), i;
|
|
180
180
|
}, y = (e, t) => {
|
|
181
|
-
|
|
181
|
+
a(e, t), e.type !== t.type && e.image !== void 0 && (e.image = void 0);
|
|
182
182
|
};
|
|
183
183
|
function b(e, t) {
|
|
184
184
|
return m(e, t);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { Bi as e, Er as t, Sn as n, Vi as r, n as i, na as a, ra as o, ta as s } from "./BudSIfXBAsTxvu-K.mjs";
|
|
8
|
+
import { FormulaError as c, IRange as l } from "@sheetxl/primitives";
|
|
9
|
+
import { CommonUtils as u } from "@sheetxl/utils";
|
|
10
|
+
var d = (e) => {
|
|
11
|
+
let t = e.ext;
|
|
12
|
+
return t === null && (t = e.ext = {
|
|
13
|
+
spillDependents: u.EmptyArray,
|
|
14
|
+
spillRowEnd: -1,
|
|
15
|
+
spillColEnd: -1,
|
|
16
|
+
fixedRef: null,
|
|
17
|
+
demandValue: void 0,
|
|
18
|
+
cycleGroup: 0,
|
|
19
|
+
cycleNext: null,
|
|
20
|
+
shownGroup: 0
|
|
21
|
+
}), t;
|
|
22
|
+
}, f = (e) => {
|
|
23
|
+
let t = e.precedents;
|
|
24
|
+
return t === null ? e.block.getPrecedentsAt(e.rowIndex, e.colIndex) : t;
|
|
25
|
+
}, p = (e) => {
|
|
26
|
+
let t = e.precedents;
|
|
27
|
+
return t === null ? e.block.paramLength : t.length;
|
|
28
|
+
}, m = (t) => {
|
|
29
|
+
if (t instanceof e) return new o(t);
|
|
30
|
+
let n = !0 === t.isIRepeatingList ? t : null, r = n ? n.getPeriod() : t.length, i = Array.isArray(t);
|
|
31
|
+
if (!n && !i && !g(t)) return new o(t);
|
|
32
|
+
let s = null;
|
|
33
|
+
for (let e = 0; e < r; e++) if (h(i ? t[e] : t.at(e))) {
|
|
34
|
+
if (s === null) {
|
|
35
|
+
s = Array(r);
|
|
36
|
+
for (let e = 0; e < r; e++) s[e] = i ? t[e] : t.at(e);
|
|
37
|
+
}
|
|
38
|
+
s[e] = c.BuiltIn.Calc;
|
|
39
|
+
}
|
|
40
|
+
return new o(s === null ? t : n ? new a(s, t.length) : s);
|
|
41
|
+
}, h = (e) => typeof e == "object" && !!e && !c.isError(e) && !0 !== e.isIRichData && !t(e), g = (t) => {
|
|
42
|
+
let n = !1;
|
|
43
|
+
return o.forEachLeaf(t, (t, r, i, a) => {
|
|
44
|
+
if (n || t instanceof e) return;
|
|
45
|
+
let o = r + a - i;
|
|
46
|
+
!0 === t.isIRepeatingList && (o = Math.min(o, r + t.getPeriod() - 1));
|
|
47
|
+
for (let e = r; !n && e <= o; e++) n = h(t.at(e));
|
|
48
|
+
}), n;
|
|
49
|
+
}, _ = class extends n {
|
|
50
|
+
constructor(e, t) {
|
|
51
|
+
super(), this.nodes = e, this.count = t;
|
|
52
|
+
}
|
|
53
|
+
}, v = class extends n {
|
|
54
|
+
constructor(e) {
|
|
55
|
+
super(), this.node = e;
|
|
56
|
+
}
|
|
57
|
+
}, y = class extends n {
|
|
58
|
+
constructor(e) {
|
|
59
|
+
super(), this.node = e;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
function b(e, t = 0, n = 0) {
|
|
63
|
+
let r = (e = e._materializeEmpty())._values, i = e._coords, a = r.getRuns({ bounds: i }), o = r.getAxis() !== l.Axis.Row, c = o ? i.colStart : i.rowStart, u = o ? i.rowStart : i.colStart, d = new s.Builder(null, t, n), f = a.next();
|
|
64
|
+
for (; !f.done;) {
|
|
65
|
+
let e = f.value;
|
|
66
|
+
d.pushMultipleAt(e[0] - c, e[1] - u, e[2]), f = a.next();
|
|
67
|
+
}
|
|
68
|
+
return d.build();
|
|
69
|
+
}
|
|
70
|
+
function x(e) {
|
|
71
|
+
if (typeof e != "object" || !e || !0 !== e.isIRange) return e;
|
|
72
|
+
let t = e, n = t._values, a = new r({
|
|
73
|
+
axis: n.getAxis(),
|
|
74
|
+
createRun: m
|
|
75
|
+
}), o = b(t);
|
|
76
|
+
return o && a.setValues(o.tuples), new i(t._runtime, a, {
|
|
77
|
+
colStart: 0,
|
|
78
|
+
rowStart: 0,
|
|
79
|
+
colEnd: t.getColumnCount() - 1,
|
|
80
|
+
rowEnd: t.getRowCount() - 1
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function S(e, t, n) {
|
|
84
|
+
let r = t.rowEnd - t.rowStart + 1, i = t.colEnd - t.colStart + 1, a = function(e, t, n) {
|
|
85
|
+
let r = e?.isIRange ? e : null, i = r ? r.getRowCount() : 1, a = r ? r.getColumnCount() : 1, o = Array(t);
|
|
86
|
+
for (let s = 0; s < t; s++) {
|
|
87
|
+
let t = Array(n), l = i === 1 ? 0 : s < i ? s : -1;
|
|
88
|
+
for (let i = 0; i < n; i++) {
|
|
89
|
+
let n = a === 1 ? 0 : i < a ? i : -1;
|
|
90
|
+
t[i] = l < 0 || n < 0 ? c.BuiltIn.NA : r ? r.getValueAt(l, n) : e;
|
|
91
|
+
}
|
|
92
|
+
o[s] = t;
|
|
93
|
+
}
|
|
94
|
+
return o;
|
|
95
|
+
}(e, r, i), o = n ? i : r, l = n ? r : i, u = n ? t.colStart : t.rowStart, d = n ? t.rowStart : t.colStart, f = new s.Builder(null), p = !0;
|
|
96
|
+
for (let e = 0; e < o; e++) {
|
|
97
|
+
let t = null, r = 0;
|
|
98
|
+
for (let i = 0; i < l; i++) {
|
|
99
|
+
let o = n ? a[i][e] : a[e][i];
|
|
100
|
+
o == null ? t &&= (f.pushMultipleAt(u + e, d + r, t), null) : (t || (t = [], r = i, p = !1), t.push(o));
|
|
101
|
+
}
|
|
102
|
+
t && f.pushMultipleAt(u + e, d + r, t);
|
|
103
|
+
}
|
|
104
|
+
return p ? null : f.build();
|
|
105
|
+
}
|
|
106
|
+
function C(e, t, n, r, i = null) {
|
|
107
|
+
let a = e.value, o = a.formulaBlockWidth, s = a.formulaBlockHeight, c = a.formulaEntry.value, l = n - e.colStart, u = t - e.rowStart, d = e.rowEnd - e.rowStart - (s - 1), f = e.colEnd - e.colStart - (o - 1), p = a.$absRowEnd ? 0 : Math.max(0, u - d), m = a.$absRowStart ? s - 1 : Math.min(s - 1, u), h = a.$absColEnd ? 0 : Math.max(0, l - f), g = a.$absColStart ? o - 1 : Math.min(o - 1, l), _ = c.ref;
|
|
108
|
+
i === null ? c.forEachNodeIn(_.rowStart + p, _.rowStart + m, _.colStart + h, _.colStart + g, r) : i(c, _.rowStart + p, _.rowStart + m, _.colStart + h, _.colStart + g, r);
|
|
109
|
+
}
|
|
110
|
+
function w(e, t, n, r, i, a, o = null) {
|
|
111
|
+
let s = e.value, c = s.formulaBlockWidth, l = s.formulaBlockHeight, u = Math.max(t, e.rowStart), d = Math.min(r, e.rowEnd);
|
|
112
|
+
if (u > d) return;
|
|
113
|
+
let f = Math.max(n, e.colStart), p = Math.min(i, e.colEnd);
|
|
114
|
+
if (f > p) return;
|
|
115
|
+
let m = e.rowEnd - e.rowStart - (l - 1), h = e.colEnd - e.colStart - (c - 1), g = s.$absRowEnd ? 0 : Math.max(0, u - e.rowStart - m), _ = s.$absRowStart ? l - 1 : Math.min(l - 1, d - e.rowStart), v = s.$absColEnd ? 0 : Math.max(0, f - e.colStart - h), y = s.$absColStart ? c - 1 : Math.min(c - 1, p - e.colStart);
|
|
116
|
+
if (g > _ || v > y) return;
|
|
117
|
+
let b = 1, x = 0, S = 1, C = 0;
|
|
118
|
+
if (t >= e.rowStart && t <= e.rowEnd && n >= e.colStart && n <= e.colEnd) {
|
|
119
|
+
let r = t - e.rowStart, i = n - e.colStart;
|
|
120
|
+
b = s.$absRowEnd ? 0 : Math.max(0, r - m), x = s.$absRowStart ? l - 1 : Math.min(l - 1, r), S = s.$absColEnd ? 0 : Math.max(0, i - h), C = s.$absColStart ? c - 1 : Math.min(c - 1, i);
|
|
121
|
+
}
|
|
122
|
+
let w = s.formulaEntry.value, T = w.ref, E = (e) => {
|
|
123
|
+
let t = e.rowIndex - T.rowStart, n = e.colIndex - T.colStart;
|
|
124
|
+
t >= b && t <= x && n >= S && n <= C || a(e);
|
|
125
|
+
};
|
|
126
|
+
o === null ? w.forEachNodeIn(T.rowStart + g, T.rowStart + _, T.colStart + v, T.colStart + y, E) : o(w, T.rowStart + g, T.rowStart + _, T.colStart + v, T.colStart + y, E);
|
|
127
|
+
}
|
|
128
|
+
function T(e) {
|
|
129
|
+
let { row: t, col: n, rows: r, cols: i, rowInput: a, colInput: o } = e, s = (e, t, n, r) => ({
|
|
130
|
+
rowStart: e,
|
|
131
|
+
colStart: t,
|
|
132
|
+
rowEnd: n,
|
|
133
|
+
colEnd: r
|
|
134
|
+
}), c = s(t - 1, n, t - 1, n + i - 1), l = s(t, n - 1, t + r - 1, n - 1);
|
|
135
|
+
return a !== null && o !== null ? [
|
|
136
|
+
s(t - 1, n - 1, t - 1, n - 1),
|
|
137
|
+
c,
|
|
138
|
+
l
|
|
139
|
+
] : o === null ? [l, c] : [c, l];
|
|
140
|
+
}
|
|
141
|
+
var E = (e, t, n) => {
|
|
142
|
+
let { gridId: r, row: i, col: a } = e;
|
|
143
|
+
return e.rowInput !== null && e.colInput !== null ? {
|
|
144
|
+
gridId: r,
|
|
145
|
+
row: i - 1,
|
|
146
|
+
col: a - 1
|
|
147
|
+
} : e.colInput === null ? {
|
|
148
|
+
gridId: r,
|
|
149
|
+
row: i + t,
|
|
150
|
+
col: a - 1
|
|
151
|
+
} : {
|
|
152
|
+
gridId: r,
|
|
153
|
+
row: i - 1,
|
|
154
|
+
col: a + n
|
|
155
|
+
};
|
|
156
|
+
}, D = (e, t) => ({
|
|
157
|
+
gridId: e.gridId,
|
|
158
|
+
row: e.row - 1,
|
|
159
|
+
col: e.col + t
|
|
160
|
+
}), O = (e, t) => ({
|
|
161
|
+
gridId: e.gridId,
|
|
162
|
+
row: e.row + t,
|
|
163
|
+
col: e.col - 1
|
|
164
|
+
}), k = (e, t) => 32768 * e + t;
|
|
165
|
+
function A(e, t) {
|
|
166
|
+
let n = e.getPrecedents(), r = e.getDynamics(), i = /* @__PURE__ */ new Map(), a = [], o = !1, s = [], l = (e) => {
|
|
167
|
+
if (e.block.hasDataTable()) return;
|
|
168
|
+
let t = e.gridId;
|
|
169
|
+
if (!t) return;
|
|
170
|
+
let n = i.get(t);
|
|
171
|
+
n || (n = {
|
|
172
|
+
byCell: /* @__PURE__ */ new Map(),
|
|
173
|
+
spills: []
|
|
174
|
+
}, i.set(t, n));
|
|
175
|
+
let r = k(e.rowIndex, e.colIndex);
|
|
176
|
+
n.byCell.has(r) || (n.byCell.set(r, e), e.cachedValue?.isIRange && n.spills.push(e), a.push(e));
|
|
177
|
+
}, u = (e, t, n, r, i) => {
|
|
178
|
+
if (e.unanchored) return;
|
|
179
|
+
let a = e.ref;
|
|
180
|
+
e.mintNodesIn(a.rowStart + t, a.rowStart + n, a.colStart + r, a.colStart + i, l);
|
|
181
|
+
}, d = (e, t) => {
|
|
182
|
+
if (t.unanchored || t.hasDataTable()) return;
|
|
183
|
+
o = !0;
|
|
184
|
+
let n = t.ref;
|
|
185
|
+
t.mintNodesIn(n.rowStart, n.rowEnd, n.colStart, n.colEnd, l);
|
|
186
|
+
}, p = {
|
|
187
|
+
colStart: 0,
|
|
188
|
+
rowStart: 0,
|
|
189
|
+
colEnd: 0,
|
|
190
|
+
rowEnd: 0,
|
|
191
|
+
scope: t.gridId
|
|
192
|
+
}, m = (e, t, r, i, a) => {
|
|
193
|
+
p.rowStart = t, p.colStart = r, p.rowEnd = i, p.colEnd = a, p.scope = e, function(e, t, n, r, i) {
|
|
194
|
+
n.length = 0, e.search(t, !1, !1, n);
|
|
195
|
+
let a = n.length;
|
|
196
|
+
if (a === 0) return;
|
|
197
|
+
let o = t.colStart, s = t.rowStart, c = t.colEnd - o, l = t.rowEnd - s;
|
|
198
|
+
for (let e = 0; e < a; e++) {
|
|
199
|
+
let t = n[e], a = t.value, u = a.formulaEntry.value;
|
|
200
|
+
if (a.index < 0) {
|
|
201
|
+
i(t, u);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
let d = u.ref, f = d.colEnd - d.colStart, p = d.rowEnd - d.rowStart, m = t.colEnd - t.colStart - f, h = t.rowEnd - t.rowStart - p, g = 0, _ = p, v = 0, y = f, b = s - t.rowStart, x = o - t.colStart;
|
|
205
|
+
a.$absRowEnd || (g = Math.min(Math.max(b - h, 0), p)), a.$absRowStart || (_ = Math.min(b + l, p)), a.$absColEnd || (v = Math.min(Math.max(x - m, 0), f)), a.$absColStart || (y = Math.min(c + x, f)), r(u, g, _, v, y);
|
|
206
|
+
}
|
|
207
|
+
}(n, p, s, u, d);
|
|
208
|
+
}, { rowInput: h, colInput: g } = t;
|
|
209
|
+
h && m(t.gridId, h.rowIndex, h.colIndex, h.rowIndex, h.colIndex), g && m(t.gridId, g.rowIndex, g.colIndex, g.rowIndex, g.colIndex);
|
|
210
|
+
for (let e = 0; e < a.length; e++) {
|
|
211
|
+
let t = a[e], n = t.gridId, i = t.rowIndex, s = t.colIndex, c = t.cachedValue;
|
|
212
|
+
c?.isIRange ? m(n, i, s, i + c.getRowCount() - 1, s + c.getColumnCount() - 1) : m(n, i, s, i, s), !o && r.has(t.block) && (o = !0);
|
|
213
|
+
}
|
|
214
|
+
if (a.length === 0) return a;
|
|
215
|
+
let _ = [], v = (e) => {
|
|
216
|
+
let t = i.get(e.gridId)?.byCell.get(k(e.row, e.col)) ?? null;
|
|
217
|
+
t === null || _.includes(t) || _.push(t);
|
|
218
|
+
};
|
|
219
|
+
for (let e = 0; e < t.rows; e++) {
|
|
220
|
+
g && v(O(t, e));
|
|
221
|
+
for (let n = 0; n < t.cols; n++) v(E(t, e, n));
|
|
222
|
+
}
|
|
223
|
+
if (h) for (let e = 0; e < t.cols; e++) v(D(t, e));
|
|
224
|
+
if (_.length === 0) return [];
|
|
225
|
+
let y = [], b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), S = (e) => {
|
|
226
|
+
if (b.has(e) || x.has(e)) return;
|
|
227
|
+
x.add(e);
|
|
228
|
+
let t = ((e) => {
|
|
229
|
+
let t = [], n = f(e);
|
|
230
|
+
for (let r = 0; r < n.length; r++) {
|
|
231
|
+
let a = n[r];
|
|
232
|
+
if (c.isError(a)) continue;
|
|
233
|
+
let o = i.get(a.scope ?? e.gridId);
|
|
234
|
+
if (!o) continue;
|
|
235
|
+
let s = a.rowStart, l = a.colStart, u = a.rowEnd, d = a.colEnd;
|
|
236
|
+
if (s === u && l === d) {
|
|
237
|
+
let e = o.byCell.get(k(s, l));
|
|
238
|
+
e && !t.includes(e) && t.push(e);
|
|
239
|
+
} else for (let e of o.byCell.values()) {
|
|
240
|
+
let n = e.rowIndex, r = e.colIndex;
|
|
241
|
+
n >= s && n <= u && r >= l && r <= d && !t.includes(e) && t.push(e);
|
|
242
|
+
}
|
|
243
|
+
let f = o.spills;
|
|
244
|
+
for (let e = 0; e < f.length; e++) {
|
|
245
|
+
let n = f[e], r = n.cachedValue, i = n.rowIndex, a = n.colIndex;
|
|
246
|
+
i <= u && i + r.getRowCount() - 1 >= s && a <= d && a + r.getColumnCount() - 1 >= l && !t.includes(n) && t.push(n);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return t;
|
|
250
|
+
})(e);
|
|
251
|
+
for (let e = 0; e < t.length; e++) S(t[e]);
|
|
252
|
+
x.delete(e), b.add(e), y.push(e);
|
|
253
|
+
};
|
|
254
|
+
if (o) for (let e = 0; e < a.length; e++) S(a[e]);
|
|
255
|
+
else for (let e = 0; e < _.length; e++) S(_[e]);
|
|
256
|
+
return y;
|
|
257
|
+
}
|
|
258
|
+
function j(e, t, n) {
|
|
259
|
+
let { rows: r, cols: i, rowInput: a, colInput: o, gridId: s } = t, c = Array(r);
|
|
260
|
+
for (let e = 0; e < r; e++) c[e] = Array(i);
|
|
261
|
+
let l = (t) => e.layerFor(t.gridId).getValueAt(t.row, t.col) ?? null, u = (t, n) => {
|
|
262
|
+
e.layerFor(s).set(t.rowIndex, t.colIndex, n);
|
|
263
|
+
}, d = (t, n) => {
|
|
264
|
+
let r = e.layerFor(t.gridId), i = t.rowIndex, a = t.colIndex, o = n;
|
|
265
|
+
if (o?.isIRange) {
|
|
266
|
+
let e = o.getRowCount(), t = o.getColumnCount();
|
|
267
|
+
for (let n = 0; n < e; n++) for (let e = 0; e < t; e++) r.set(i + n, a + e, o.getValueAt(n, e) ?? null);
|
|
268
|
+
} else r.set(i, a, n);
|
|
269
|
+
}, f = () => {
|
|
270
|
+
for (let t = 0; t < n.length; t++) {
|
|
271
|
+
let r = n[t];
|
|
272
|
+
d(r, e.evaluate(r));
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
for (let e = 0; e < r; e++) {
|
|
276
|
+
o !== null && (u(o, l(O(t, e))), a === null && f());
|
|
277
|
+
for (let n = 0; n < i; n++) a !== null && (u(a, l(D(t, n))), f()), c[e][n] = l(E(t, e, n));
|
|
278
|
+
}
|
|
279
|
+
return c;
|
|
280
|
+
}
|
|
281
|
+
export { y as a, x as c, w as d, m as f, f as h, v as i, b as l, p as m, A as n, _ as o, d as p, T as r, S as s, j as t, C as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { i as e, n as t, r as n, t as r } from "./
|
|
7
|
+
import { i as e, n as t, r as n, t as r } from "./BIHrHjRGWVlJglcp.mjs";
|
|
8
8
|
var i = 6e4, a = Math.PI / 180 / i, o = 108e5 / Math.PI, s = /^[+-]?\d+$/, c = (e) => s.test(e) ? Number(e) : e, l = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
function u(e) {
|
|
10
10
|
let t = l.get(e);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
7
|
+
import { t as e } from "./DobHLF6VjHr7Xi40.mjs";
|
|
8
8
|
import { FormulaError as t } from "@sheetxl/primitives";
|
|
9
9
|
import { messageKey as n } from "@sheetxl/utils";
|
|
10
10
|
var r = ["linkedCell", "listFillRange"], i = /^(?:'((?:[^']|'')+)'|([^'!]+))!([^!]+)$/, a = Object.freeze([]), o = n("op.setControlCaption"), s = n("op.setControlMacro"), c = n("op.setControlLink"), l = n("op.setControlValue"), u = n("op.setControlRange"), d = n("op.setControlItems"), f = class extends e {
|