@sheetxl/sdk 0.8.0-beta.14 → 0.8.0-beta.16

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.
Files changed (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
  3. package/browser/esm/{ChYgQL-8qIDFmX31.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{CImFKFaYToUH-bSE.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{DBvu0tdSf-5vol4e.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{B1aH_qa-czVyEVHd.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{BSXQAXwZdJKYTO4P.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{D_XMi4_5iO2rkET5.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{Dhw5XEJYFrkYjdU2.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{MuNBN02MyZ558c_K.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DnR0xY7_iE3TmMcg.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{DonQz2Tc3k9lNT8E.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{aRXqxIzjuSLwawMh.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{SwLp-iElwDjfcJtv.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{AXlD9K1gCwPU4gCO.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{BpwULQPKbb4R9Jew.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CM_X1zZYzEUPaNJL.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/{node/esm/b3XnssSr9lmvAC2N.mjs → browser/esm/C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{CtC__ALh4I8PKIln.mjs → CkZoDPUCK5jMUaeJ.mjs} +26955 -22064
  23. package/browser/esm/{DvvqmUQ9Z0NFm1-4.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{qCqzZW74-fhaIG2V.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BLYl-afJe_3std8i.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{Ln4gsmhqH1LyoANj.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{DIfAk63CvaOZ3QKi.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{Dh84MDs-OhdCPCIg.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{BWoz4kQdA5KKJfl6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{r_EZapMBdyS4gUd-.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{C7hpfT-sX2lyLS-D.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{CPIWV3Enlh_BF2TY.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{3t4S9eda2I6jFad0.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{D39XcmtPXVtMN4yF.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{Cy8uYCggktF83278.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{BPPMKyMn65i1a1mE.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{Bdcd3QOzsc0aVMjN.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{oSCy1X5CJ1iYtGDp.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{UMQTbO0zNmBpzW1V.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{BVqIknGhQCLUB_7Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DiXeQjc0WJGLSVEo.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{yuF8SbWfjBfrxcq5.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{BEBt5fo__rvT2q_u.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BELc5aQ_pFPgbiso.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{C-5JLSNof0FhkuFd.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{YpOpRyciqQLIY1-G.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{I-FZojIFWluC6X-j.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{BuyAYLI4s33-vmgG.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{DiCMnYA2bttmrX3q.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{BSVttk12GXNfKZ9k.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{uLrulyR7IXq0SF4j.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{clgEkmEwfB28nkz2.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{BXg-D8Rc_iyB8p7X.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{pF2vCOTmrxPAB41Q.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{BCjHRVU8tC5lYypg.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{B6jhx5pHPs2W5GE7.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{xRGObcoaGDnAZFnj.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{DbPUG2DcQ3T_QhcJ.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{Cyeq1rDslIqF1LKz.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{BLPrFp_jKGYgWPX1.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{DLdXl0O0TXuyqLU4.mjs → CVPieTgKCwkL21nD.mjs} +28573 -23108
  66. package/node/esm/{Dlk2ZYExFgQ0xE2H.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/{browser/esm/BEDfJP2tcuRy2Y2E.mjs → node/esm/CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{DeFE8QfuCeGw-mvd.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{NA-8urR7T1NCwrgD.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{99miMotf3dOuG5Jk.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{BEdxa3I4VOiCsvy7.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{BfEdeOg4iYXaYTlh.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{B3hBxzqJ2_hUylNr.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{Ccocd9DTvOnlOE9D.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{Lj98EH6coGdKUzuS.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Crn6dnSQQRCQAnQ-.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{D30rC6AWaGGf3CaC.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{CdSTmD2ZvG9NesNR.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{CI8UIWR01z9QDlzH.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
  82. package/node/esm/index.mjs +913 -598
  83. package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
  84. package/node/esm/{B5VmOC0jO9Zbh9Mq.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
  85. package/package.json +7 -7
  86. package/resources/locales/de/model.msg.json +82 -1
  87. package/resources/locales/en/model.msg.json +80 -1
  88. package/types/scripting-api.json +9967 -9497
  89. package/types/scripting-enums.json +27 -0
  90. package/types/scripting.d.ts +2282 -166
  91. package/types/src/.generated/wasm/sdk.d.ts +332 -0
  92. package/types/src/calculation/Calculation.d.ts +8 -0
  93. package/types/src/calculation/ICalculation.d.ts +51 -0
  94. package/types/src/calculation/compiler/Types.d.ts +5 -0
  95. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
  96. package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
  97. package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
  98. package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
  99. package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
  100. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  101. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  102. package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
  103. package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
  104. package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
  105. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  106. package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
  107. package/types/src/calculation/state/CalcNode.d.ts +6 -3
  108. package/types/src/calculation/state/CalculationContext.d.ts +4 -2
  109. package/types/src/calculation/state/_PivotView.d.ts +22 -0
  110. package/types/src/cell/ICell.d.ts +1 -21
  111. package/types/src/cellRange/ICellRange.d.ts +18 -2
  112. package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
  113. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
  114. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
  115. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
  116. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
  117. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
  118. package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
  119. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  120. package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
  121. package/types/src/condition/Condition.d.ts +1 -0
  122. package/types/src/condition/ICondition.d.ts +15 -0
  123. package/types/src/condition/_ConditionUtils.d.ts +14 -0
  124. package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
  125. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  126. package/types/src/license/LicenseDetails.d.ts +27 -0
  127. package/types/src/license/LicenseManager.d.ts +24 -7
  128. package/types/src/license/_Utils.d.ts +34 -3
  129. package/types/src/license/index.d.ts +1 -0
  130. package/types/src/license/runtime.browser.d.ts +32 -4
  131. package/types/src/license/runtime.node.d.ts +8 -5
  132. package/types/src/license/summary.d.ts +18 -0
  133. package/types/src/pivot/IPivotTable.d.ts +1549 -13
  134. package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
  135. package/types/src/pivot/PivotCache.d.ts +95 -11
  136. package/types/src/pivot/PivotDataField.d.ts +73 -0
  137. package/types/src/pivot/PivotField.d.ts +142 -0
  138. package/types/src/pivot/PivotTable.d.ts +548 -14
  139. package/types/src/pivot/PivotTableCollection.d.ts +18 -3
  140. package/types/src/pivot/_PivotAreas.d.ts +48 -0
  141. package/types/src/pivot/_PivotControls.d.ts +140 -0
  142. package/types/src/pivot/_PivotEngine.d.ts +9 -0
  143. package/types/src/pivot/_PivotGroups.d.ts +25 -0
  144. package/types/src/pivot/_PivotItems.d.ts +167 -0
  145. package/types/src/pivot/_PivotStructure.d.ts +237 -0
  146. package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
  147. package/types/src/pivot/_PivotUtils.d.ts +37 -0
  148. package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
  149. package/types/src/pivot/engine/PivotData.d.ts +65 -0
  150. package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
  151. package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
  152. package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
  153. package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
  154. package/types/src/pivot/engine/PivotMove.d.ts +24 -0
  155. package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
  156. package/types/src/pivot/engine/PivotSort.d.ts +26 -0
  157. package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
  158. package/types/src/pivot/engine/index.d.ts +15 -0
  159. package/types/src/pivot/index.d.ts +4 -0
  160. package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
  161. package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
  162. package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
  163. package/types/src/primitives/Range.d.ts +12 -1
  164. package/types/src/sheet/IWorksheet.d.ts +35 -0
  165. package/types/src/sheet/SheetCell.d.ts +21 -14
  166. package/types/src/sheet/SheetRange.d.ts +3 -0
  167. package/types/src/sheet/Worksheet.d.ts +175 -7
  168. package/types/src/sheet/_PivotFootprint.d.ts +42 -0
  169. package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
  170. package/types/src/sheet/_SheetMutations.d.ts +47 -0
  171. package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
  172. package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
  173. package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
  174. package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
  175. package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
  176. package/types/src/slicer/ISlicer.d.ts +114 -34
  177. package/types/src/slicer/ITimeline.d.ts +61 -0
  178. package/types/src/slicer/Slicer.d.ts +76 -3
  179. package/types/src/slicer/_PivotSlicer.d.ts +51 -0
  180. package/types/src/slicer/index.d.ts +1 -0
  181. package/types/src/table/AnchoredTable.d.ts +11 -1
  182. package/types/src/table/ITable.d.ts +5 -6
  183. package/types/src/table/ITableStyle.d.ts +50 -34
  184. package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
  185. package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
  186. package/types/src/type/ITypes.d.ts +5 -1
  187. package/types/src/workbook/IWorkbook.d.ts +8 -2
  188. package/types/src/workbook/Workbook.d.ts +72 -6
  189. package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +0 -184
  190. package/browser/esm/DnqwX3-2NfGBaXXl.mjs +0 -357
  191. package/node/esm/C3S4hF1vn0NyJPPd.mjs +0 -199
  192. package/node/esm/CPsGyt3vnOdLTShj.mjs +0 -360
  193. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. package/types/src/primitives/Grouping.d.ts +0 -65
@@ -1,360 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.14
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 { t } from "./I-FZojIFWluC6X-j.mjs";
8
- import { An as e, Dn as s, Mi as n, Mr as r, On as i, jn as o, kn as a, kr as l } from "./DLdXl0O0TXuyqLU4.mjs";
9
- import { ExpectedError as u, messageKey as h, t as c } from "@sheetxl/utils";
10
- var d = "SlicerStyleLight1", g = "ascending", m = "showItemsWithDataAtTop", _ = h("op.setSlicerCaption"), f = h("op.setSlicerStyle"), p = h("op.setSlicerLayout"), S = h("op.setSlicerSort"), C = h("op.selectSlicerItems"), b = l.BuiltInSelectorNames.Display, k = Object.freeze({
11
- selector: b,
12
- scope: "column"
13
- }), v = Object.freeze({ transactional: !1 }), y = class extends t {
14
- constructor(t) {
15
- const e = a(t.json?.source)?.column ?? "";
16
- let s = t.name;
17
- !s && t.getMovable && (s = e || null), super({
18
- ...t,
19
- name: s
20
- }), this._formula = null, this._wired = null, this._binding = null, this._lossPending = !1, this._columnName = e;
21
- const n = t.json;
22
- n && this._updateState({ data: { ...n } }), n?.source && this._addWatch(n.source, (t) => {
23
- this._formula = t.formula, this._wired ??= t.formula.getExpression(), this._checkSource(!1);
24
- });
25
- }
26
- getType() {
27
- return "slicer";
28
- }
29
- getTypeDescription() {
30
- return "Slicer";
31
- }
32
- getDefaultAnchorType() {
33
- return r.Type.Absolute;
34
- }
35
- getSource() {
36
- const t = this._data()?.source ?? "", e = this._formula?.getExpression() ?? null;
37
- return null === e || e === this._wired ? t : e;
38
- }
39
- getTable() {
40
- return this._resolve()?.table ?? null;
41
- }
42
- getColumn() {
43
- return this._resolve()?.column ?? null;
44
- }
45
- setName(t) {
46
- const e = this._getWorkbook();
47
- if (e && o(e, t, this) !== t) throw new u(c("error.slicer.nameTaken", { name: t }));
48
- return super.setName(t);
49
- }
50
- getCaption() {
51
- return this._data()?.caption ?? this._getColumnName();
52
- }
53
- setCaption(t, e) {
54
- return this._set({ caption: t ?? void 0 }, _, e);
55
- }
56
- isShowCaption() {
57
- return !0 !== this._data()?.hiddenCaption;
58
- }
59
- setShowCaption(t, e) {
60
- return this._set({ hiddenCaption: !t || void 0 }, _, e);
61
- }
62
- getCacheName() {
63
- return this._data()?.cacheName || (e(this._getWorkbook()).get(this) ?? s(this._getColumnName()));
64
- }
65
- getStyle() {
66
- return this._data()?.style ?? d;
67
- }
68
- setStyle(t, e) {
69
- return this._set({ style: t && t !== d ? t : void 0 }, f, e);
70
- }
71
- getSortOrder() {
72
- return this._data()?.sortOrder ?? g;
73
- }
74
- setSortOrder(t, e) {
75
- return this._set({ sortOrder: t !== g ? t : void 0 }, S, e);
76
- }
77
- getCrossFilter() {
78
- return this._data()?.crossFilter ?? m;
79
- }
80
- setCrossFilter(t, e) {
81
- return this._set({ crossFilter: t !== m ? t : void 0 }, S, e);
82
- }
83
- getColumnCount() {
84
- return this._data()?.columnCount ?? 1;
85
- }
86
- setColumnCount(t, e) {
87
- const s = Math.max(1, Math.trunc(t));
88
- return this._set({ columnCount: 1 !== s ? s : void 0 }, p, e);
89
- }
90
- getRowHeight() {
91
- return this._data()?.rowHeight ?? 27;
92
- }
93
- setRowHeight(t, e) {
94
- const s = Math.max(1, t);
95
- return this._set({ rowHeight: 27 !== s ? s : void 0 }, p, e);
96
- }
97
- isLockedPosition() {
98
- return !0 === this._data()?.lockedPosition;
99
- }
100
- setLockedPosition(t, e) {
101
- return this._set({ lockedPosition: t || void 0 }, p, e);
102
- }
103
- isFilterCleared() {
104
- return !this.getColumn()?.getFilter()?.getCondition();
105
- }
106
- async getItems() {
107
- const t = this.getColumn()?.getFilter();
108
- if (!t) return w;
109
- const e = await t.getItems(k), s = t.getCondition(), r = s ? function(t, e) {
110
- const s = t.toJSON();
111
- if (s.operator !== l.BuiltInOperatorNames.InSet) return () => !1;
112
- const n = s.param ?? {}, r = /* @__PURE__ */ new Set(), i = n.items ?? [];
113
- for (let t = 0; t < i.length; t++) null !== i[t] && r.add(String(i[t]).toLowerCase());
114
- const o = n.dateGroups ?? [], a = e.dates?.[e.dates.length - 1] ?? null;
115
- return (t) => {
116
- if (t < 0) return !0 === n.blank;
117
- if (r.has(e.items[t].text.toLowerCase())) return !0;
118
- if (!a || 0 === o.length) return !1;
119
- let s = null;
120
- for (let e = 0; e < a.runs.length && !s; e++) {
121
- const n = a.runs[e];
122
- n.min <= t && t <= n.max && (s = n.value ?? null);
123
- }
124
- if (!s) return !1;
125
- for (let t = 0; t < o.length; t++) if (I(o[t], s)) return !0;
126
- return !1;
127
- };
128
- }(s, e) : null, i = [];
129
- for (let t = 0; t < e.items.length; t++) {
130
- const s = e.items[t], n = !0 === s.passesOthers;
131
- i.push({
132
- item: {
133
- key: s.text,
134
- name: s.text,
135
- value: s.value,
136
- hasData: n,
137
- isSelected: !r || (n ? s.checked : r(t))
138
- },
139
- firstRow: s.firstRow
140
- });
141
- }
142
- const o = this.getSortOrder();
143
- if ("dataSource" === o) i.sort((t, e) => t.firstRow - e.firstRow);
144
- else {
145
- const e = t.getRange().getWorksheet().getRuntime().getLocaleProfile(), s = "descending" === o ? -1 : 1;
146
- i.sort((t, r) => s * (n.compare(t.item.value, r.item.value, e) || n.compare(t.item.key, r.item.key, e)));
147
- }
148
- let a = null;
149
- if (e.hasBlanks) {
150
- const t = !0 === e.blanksPassOthers;
151
- a = {
152
- key: R,
153
- name: c("slicer.blankItem"),
154
- value: null,
155
- hasData: t,
156
- isSelected: !r || (t ? e.blanksChecked : r(-1))
157
- };
158
- }
159
- const u = [], h = this.getCrossFilter();
160
- if ("showItemsWithNoData" === h) {
161
- for (let t = 0; t < i.length; t++) u.push(i[t].item);
162
- return a && u.push(a), u;
163
- }
164
- for (let t = 0; t < i.length; t++) i[t].item.hasData && u.push(i[t].item);
165
- if (a?.hasData && u.push(a), "none" === h) return u;
166
- for (let t = 0; t < i.length; t++) i[t].item.hasData || u.push(i[t].item);
167
- return a && !a.hasData && u.push(a), u;
168
- }
169
- async getItem(t) {
170
- const e = await this.getItems();
171
- for (let s = 0; s < e.length; s++) if (e[s].key === t) return e[s];
172
- return null;
173
- }
174
- async selectItems(t, e) {
175
- const s = this.getColumn()?.getFilter();
176
- if (!s) return this;
177
- if (!t || 0 === t.length) return this.clearFilters(e);
178
- const n = await s.getItems(k), r = new Set(t), i = n.dates?.[n.dates.length - 1] ?? null, o = i && i.runs.length > 0 ? i.runs[i.runs.length - 1].max : -1, a = [], u = [];
179
- let h = !0, c = 0;
180
- for (let t = 0; t < n.items.length; t++) {
181
- if (!r.has(n.items[t].text)) {
182
- h = !1;
183
- continue;
184
- }
185
- if (t > o) {
186
- a.push(n.items[t].text);
187
- continue;
188
- }
189
- for (; i.runs[c].max < t;) c++;
190
- const e = i.runs[c].value;
191
- e && u[u.length - 1] !== e && u.push(e);
192
- }
193
- const d = n.hasBlanks && r.has(R);
194
- if (n.hasBlanks && !d && (h = !1), h && !n.truncated) return this.clearFilters(e);
195
- const g = { items: a };
196
- return u.length > 0 && (g.dateGroups = u), d && (g.blank = !0), await s.setCondition({
197
- selector: b,
198
- operator: l.BuiltInOperatorNames.InSet,
199
- param: g
200
- }, !1, {
201
- description: C,
202
- ...e
203
- }), this;
204
- }
205
- async clearFilters(t) {
206
- return await this.getColumn()?.getFilter()?.delete(t), this;
207
- }
208
- addListeners(t, e) {
209
- const s = super.addListeners(t, e);
210
- if (!this._binding) {
211
- const t = this._resolve();
212
- t && this._bind(t);
213
- }
214
- return s;
215
- }
216
- toJSON(t) {
217
- const e = this._data();
218
- if (!e) return null;
219
- const s = this.getSource();
220
- return s ? {
221
- ...e,
222
- source: s
223
- } : e;
224
- }
225
- get isISlicer() {
226
- return !0;
227
- }
228
- get [Symbol.toStringTag]() {
229
- return "[Slicer]";
230
- }
231
- toString() {
232
- return this.getTypeDescription();
233
- }
234
- _attach() {
235
- this._checkSource(!0);
236
- }
237
- _data() {
238
- return this._getState()?.data ?? null;
239
- }
240
- _getWorkbook() {
241
- try {
242
- return this.getMovable()?.getRange().getWorksheet().getWorkbook() ?? null;
243
- } catch {
244
- return null;
245
- }
246
- }
247
- _resolve() {
248
- if (this._closed) return null;
249
- const t = a(this.getSource());
250
- if (!t) return null;
251
- const e = i(this._getWorkbook(), t.table), s = e?.getColumnByName(t.column) ?? null;
252
- return s ? (this._columnName = s.getName(), {
253
- table: e,
254
- column: s
255
- }) : null;
256
- }
257
- _getColumnName() {
258
- return this._resolve()?.column.getName() ?? this._columnName;
259
- }
260
- _checkSource(t) {
261
- if (this._closed || this.isDeleted()) return;
262
- const e = this._resolve();
263
- if (e) return void this._bind(e);
264
- const s = this._getTransactions();
265
- s.isRestoring() || (s.isOpenTransaction() ? this.delete() : t && !this._lossPending && (this._lossPending = !0, queueMicrotask(() => {
266
- if (this._lossPending = !1, this._closed || this.isDeleted() || s.isOpenTransaction() || s.isRestoring()) return;
267
- const t = this._resolve();
268
- t ? this._bind(t) : s.amend(s.getCurrentCommit(!1).getId(), () => {
269
- this.delete();
270
- });
271
- })));
272
- }
273
- _bind(t) {
274
- const e = t.table;
275
- if (this._binding?.table !== e) {
276
- this._unbind();
277
- const t = () => {
278
- this._checkSource(!0);
279
- };
280
- this._binding = {
281
- table: e,
282
- removeTable: e.addListeners({
283
- onFilterChange: () => {
284
- this._notify("onSelectionChange");
285
- },
286
- onAnyChange: () => {
287
- this._checkSource(!0), this._bindRange(!0);
288
- },
289
- onAnchorCoordsChange: () => {
290
- this._bindRange(!0);
291
- },
292
- onDelete: t
293
- }, v),
294
- coords: null,
295
- removeRange: null
296
- };
297
- }
298
- this._bindRange(!1);
299
- }
300
- _bindRange(t) {
301
- const e = this._binding;
302
- if (!e || this._closed) return;
303
- const s = this.getColumn()?.getFilter()?.getRange() ?? null, n = s ? s.getCoords() : null;
304
- (n && e.coords ? n.rowStart !== e.coords.rowStart || n.rowEnd !== e.coords.rowEnd || n.colStart !== e.coords.colStart || n.colEnd !== e.coords.colEnd : n !== e.coords) && (e.removeRange?.(), e.removeRange = s?.addListener(() => {
305
- this._notify("onItemsChange");
306
- }, {
307
- ignoreAddressChanges: !0,
308
- ...v
309
- }) ?? null, e.coords = n, t && this._notify("onItemsChange"));
310
- }
311
- _unbind() {
312
- const t = this._binding;
313
- t && (this._binding = null, t.removeTable(), t.removeRange?.());
314
- }
315
- _notify(t) {
316
- this._closed || this.isDeleted() || (this._emitter.notify(t), this._emitter.notify("onAnyChange"));
317
- }
318
- _set(t, e, s) {
319
- this._protectionCheck(e);
320
- const n = this._data();
321
- if (!n) return this;
322
- const r = {
323
- ...n,
324
- ...t
325
- };
326
- for (const e in t) void 0 === r[e] && delete r[e];
327
- return this._updateState({ data: r }, {
328
- ...s,
329
- description: e
330
- }, ["onAnyChange"]), this;
331
- }
332
- _processDelete() {
333
- this._unbind(), super._processDelete();
334
- }
335
- _processRestoreOrRevert(t, e) {
336
- if (super._processRestoreOrRevert(t, e), this.isDeleted()) return void this._unbind();
337
- const s = this._resolve();
338
- s && this._bind(s);
339
- }
340
- close() {
341
- this._unbind(), super.close();
342
- }
343
- }, w = Object.freeze([]), R = "";
344
- var D = [
345
- "year",
346
- "month",
347
- "day",
348
- "hour",
349
- "minute",
350
- "second"
351
- ];
352
- function I(t, e) {
353
- for (let s = 0; s < D.length; s++) {
354
- const n = D[s];
355
- if (t[n] !== e[n]) return !1;
356
- if (n === t.group) return !0;
357
- }
358
- return !0;
359
- }
360
- export { y as Slicer };
@@ -1,115 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.14
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 { Bn as r, Qn as e, Xr as t, Yn as n, Zr as o, gt as s, hn as a, ir as i, mt as c, xr as l } from "./DLdXl0O0TXuyqLU4.mjs";
8
- import { C as u, E as m, T as f, h as p, i as d, r as g, w as h, x, y } from "./DeFE8QfuCeGw-mvd.mjs";
9
- import { n as v, r as w, t as k } from "./C3S4hF1vn0NyJPPd.mjs";
10
- import { i as j, r as T } from "./B6jhx5pHPs2W5GE7.mjs";
11
- import { a as b, n as E } from "./BLPrFp_jKGYgWPX1.mjs";
12
- import { ScalarType as I } from "@sheetxl/primitives";
13
- import S from "@sheetxl/formulas/declarations";
14
- import C from "@sheetxl/formulas-extended/declarations";
15
- var O = null;
16
- function z(r) {
17
- return O || (O = (() => {
18
- const r = /* @__PURE__ */ new Map(), e = [
19
- ...S,
20
- ...C,
21
- E
22
- ];
23
- for (const { declarations: t, enums: n } of e) {
24
- const e = /* @__PURE__ */ new Map(), o = (r) => {
25
- let t = e.get(r);
26
- if (!t) {
27
- const o = n?.[r];
28
- if (!o) return;
29
- t = {
30
- id: r,
31
- type: "string" === o.s ? I.String : I.Number,
32
- members: o.m
33
- }, e.set(r, t);
34
- }
35
- return t;
36
- };
37
- for (const e of Object.keys(t)) {
38
- const { decl: n } = b(e, t[e], o), s = new a(n);
39
- r.set(e.toUpperCase(), {
40
- getName: () => e,
41
- getDeclaration: () => s,
42
- isBuiltIn: () => !0
43
- });
44
- }
45
- }
46
- return r;
47
- })()), O.get(r.toUpperCase()) ?? null;
48
- }
49
- var B = null, D = Object.freeze({
50
- rowStart: 0,
51
- colStart: 0,
52
- rowEnd: o,
53
- colEnd: t
54
- }), M = (r) => z(r);
55
- function N(r, e) {
56
- if ("string" != typeof r || 0 === r.length) return null;
57
- B || (B = new T());
58
- const t = e?.anchor;
59
- let n;
60
- try {
61
- const o = B.parse(t?.rowIndex ?? 0, t?.colIndex ?? 0, r);
62
- if (o.errors.length > 0 || !o.root || o.root.type === l.Unparsed) return null;
63
- if (n = o.root, e?.normalize) {
64
- const r = h(n, M);
65
- "string" != typeof r && (n = r), n = m(n, M), n = g(n, M), n = y(n), n = f(n), n = u(n), n = d(n), n = x(n);
66
- }
67
- } catch {
68
- return null;
69
- }
70
- return v(n, null);
71
- }
72
- function U(r, e) {
73
- return w(r, e);
74
- }
75
- function L(r, e) {
76
- const t = p(g(y(k(r)), M)), n = e?.entireCoords ?? D, o = !0 === e?.r1c1;
77
- return (r) => o ? s(t, n) : c(t, n, r?.rowIndex ?? 0, r?.colIndex ?? 0);
78
- }
79
- function P(t) {
80
- const o = t.trim();
81
- if (!o) return;
82
- let s;
83
- try {
84
- const r = j.shared().tokenize(o, !1);
85
- if (r.errors.length > 0) return;
86
- s = r.tokens;
87
- } catch {
88
- return;
89
- }
90
- let a = 0, c = 0;
91
- if (2 === s.length) {
92
- const r = s[0].tokenType?.name;
93
- "MinOp" === r ? (a = -1, c = 1) : "PlusOp" === r && (a = 1, c = 1);
94
- }
95
- if (s.length - c !== 1) return;
96
- const l = s[c], u = l.image;
97
- try {
98
- switch (l.tokenType?.name) {
99
- case "NumberToken":
100
- case "ScientificDigit":
101
- case "DigitToken": {
102
- const r = e(u).value;
103
- return 0 === a ? r : a * r;
104
- }
105
- case "StringToken": return 0 === a ? i(u).value : void 0;
106
- case "BooleanToken": return 0 === a ? r(u).value : void 0;
107
- case "LiteralError":
108
- case "RefError": return 0 === a ? n(u).value : void 0;
109
- default: return;
110
- }
111
- } catch {
112
- return;
113
- }
114
- }
115
- export { z as getFunctionDeclaration, L as imager, N as parse, P as readFormulaLiteral, U as transform };
@@ -1,24 +0,0 @@
1
- import { IRange } from '@sheetxl/primitives';
2
- import { IPivotTable } from './IPivotTable';
3
- /** Character data as the markup spells it, decoded. */
4
- export declare function decodeXml(text: string): string;
5
- /** `text` as an attribute value spells it. */
6
- export declare function encodeXml(text: string): string;
7
- /**
8
- * A plain A1 reference as the part spells it (`B3`, `A1:A7`, relative) made absolute, which is how
9
- * it is held: a relative endpoint in a body that has no position is left where it is written,
10
- * and these name fixed cells.
11
- */
12
- export declare function absoluteA1(ref: string): string;
13
- /** The held text back in the part's spelling: relative. */
14
- export declare function relativeA1(ref: string): string;
15
- /**
16
- * The cells a pivot table's part says it is laid out on (`<location ref>`), as coords on its own
17
- * sheet, or `null` when the part states none it can be anchored at.
18
- */
19
- export declare function locationCoordsOf(json: IPivotTable.JSON | undefined): IRange.Coords | null;
20
- /** `attribute` of the first `element` in `xml`, decoded, or `null` when either is absent. */
21
- export declare function readAttribute(xml: string, element: string, attribute: string): string | null;
22
- /** `xml` with `attribute` of the first `element` restated as `value`; unchanged when either is absent. */
23
- export declare function writeAttribute(xml: string, element: string, attribute: string, value: string): string;
24
- //# sourceMappingURL=_PivotXml.d.ts.map
@@ -1,65 +0,0 @@
1
- import { IFormulaContext, IRange, Scalar } from '@sheetxl/primitives';
2
- /**
3
- * Builds the column a group's members come back in: `size` rows, with `values[i]` at `rows[i]`
4
- * and every other row blank.
5
- */
6
- export type GroupingColumnFactory = (size: number, rows: ArrayLike<number>, values: ArrayLike<Scalar>, count: number) => IRange;
7
- /**
8
- * Records grouped by key — see {@link IFormulaContext.createGrouping}.
9
- *
10
- * @remarks
11
- * ### Not public API
12
- *
13
- * Reached as `IFormulaContext.createGrouping`, the same arrangement `Criteria` has.
14
- *
15
- * ### Shape of the work
16
- *
17
- * Every key column is read once, by its non-blank entries, into one small id per record. A record
18
- * the entries never reached is blank in that column, so a whole-column key over a short table
19
- * costs the table, not the column. The ids then assign each kept record a group, and a counting
20
- * sort numbers each record within its group.
21
- *
22
- * A value column is bucketed the same way the first time it is asked for, so a group's members are
23
- * one bucket rather than a scan of the column. Blank members are not stored at all: the member
24
- * column is created at the group's size and only the non-blank rows are written.
25
- */
26
- export declare class Grouping implements IFormulaContext.Grouping {
27
- private readonly _createColumn;
28
- private readonly _recordCount;
29
- /** Per record, its group, or -1 when the filter left it out. */
30
- private readonly _groupOf;
31
- /** Per group, the number of records. */
32
- private readonly _sizes;
33
- /** Per group, its key (first record's spelling). */
34
- private readonly _keys;
35
- /** Records kept, in record order — `null` when every record is kept. */
36
- private readonly _kept;
37
- /** Kept records ordered by group, record order within each group. */
38
- private readonly _order;
39
- /** Per group, where its records start in `_order`. */
40
- private readonly _offsets;
41
- /** Per record, its place within its group. */
42
- private readonly _rankInGroup;
43
- /** Per group, its first record. */
44
- private readonly _firstRecord;
45
- private readonly _buckets;
46
- constructor(keys: IRange, createColumn: GroupingColumnFactory, options?: IFormulaContext.GroupingOptions);
47
- /** @inheritdoc IFormulaContext.Grouping.getRecordCount */
48
- getRecordCount(): number;
49
- /** @inheritdoc IFormulaContext.Grouping.getGroupCount */
50
- getGroupCount(): number;
51
- /** @inheritdoc IFormulaContext.Grouping.getSize */
52
- getSize(group: number): number;
53
- /** @inheritdoc IFormulaContext.Grouping.getKeys */
54
- getKeys(group: number): readonly Scalar[];
55
- /** @inheritdoc IFormulaContext.Grouping.getGroup */
56
- getGroup(record: number): number;
57
- /** @inheritdoc IFormulaContext.Grouping.getFirstRecord */
58
- getFirstRecord(group: number): number;
59
- /** @inheritdoc IFormulaContext.Grouping.getMembers */
60
- getMembers(values: IRange, groups?: readonly number[]): IRange;
61
- /** The records of some groups, ascending. */
62
- private _recordsOf;
63
- private _getBuckets;
64
- }
65
- //# sourceMappingURL=Grouping.d.ts.map