@sheetxl/sdk 0.8.0-beta.15 → 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/{zjEXdQiQruTkUyf5.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{D8PxKK6OrmancpLT.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{Do8TQqQvnFXRlFu-.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{DDQtExVGSoCzAf6-.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{DA4S5eqog20pG7b2.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{FHp0QfwZMIfP0Sry.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{D4ZCoKyNCJvDQAkx.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{CWyzk_3eDCR9bKq6.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DwH4H_p6gTAcpQ17.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{BsGN0Tk0jVc2n0hy.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{KgTozk3nvOZzEG27.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{Blo0Hwg2ojXt99Dl.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{Bbrhl946_QbCz5WS.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{Cl3jq6y4Idilod82.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CxhXbk-5XhaK8UNs.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/browser/esm/{CNM5d4p0Y7In0rTf.mjs → C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{BGPT-k25jo0UhtT5.mjs → CkZoDPUCK5jMUaeJ.mjs} +26901 -22016
  23. package/browser/esm/{DMbcmIZ-G2fbWn8v.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{KsfZhE6ocmYobGjY.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BVsG6Vpvb1ZzpURJ.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{BzG0p8RdGDWHttVr.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{CZ_ZPliIkoh8BViV.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{CqzKBrmmV-fWRoK7.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{tm7XJ-Zd_04xWKG6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{Blo0jHze0bQxnKh4.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{DJNLo8Rd_5UQP0U5.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{D0KMmRjGOQUs7Ls-.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{Bw66vzKThXKvXvPI.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{Dp4OIVjjAVhpD815.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{D6OqcO9IWPaY211T.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{CPUobTehcKZllBDS.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{XrasOsWQ-64jwMn1.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{CMSeF5rGzeuMUydM.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{CIab4UYcHQQKTHeD.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{L7SKr6r1tmMwFx6Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DpaqR081c-Q7WemN.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{BN1MW1nuBndrzryn.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{DjsOfZn5vYpB7L6U.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BlHlBRvKGt-4CS0A.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{BRnNpoS8VpkAhdVk.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{ZtF9EuipL7Z9Iwfs.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{DKdFasYVvjAitASZ.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{D9RwzPR5s2mWrbCQ.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{-afI0SRg_vgXtea7.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{OnkJkCGFDjamqIUQ.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{BNiG1ISiMjs-G2mE.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{B07QPde9GloqsW8e.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{D9zb5xVRehABdbXL.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{BZ0IRjh2hYuI86xW.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{DVejVdSBXzAFQbqo.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{DDIiQZTdeY4vdK8_.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{BlzPuXtKvF3Qfr0p.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{BfXLtDqsXXYeZ6LX.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{C6b4rM62pIWIywlM.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{DUft-qpAS4MMANwG.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{Cx9nQSsuyqhayyBS.mjs → CVPieTgKCwkL21nD.mjs} +32752 -27295
  66. package/node/esm/{DW3u4bBJIUaHZ6m-.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/node/esm/{C-JEySqMuKdpcKe0.mjs → CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{CjwmkzMtjj6OMJbO.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{MtRwC1PMkOEb1Nty.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{B8KEX44VZTFTTKb3.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{C7h7SvhWNwQ9TfGh.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{WBHD7ECKG6HZ5UpY.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{BqvqbFsPQB0gEvwF.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{D7ia4o3y5Wvl__9Y.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{CHBlLTJaoPUVxA2J.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Dh8o-woVpmUL50BD.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{DyIASfKKPuNl5Xx-.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{DQqXPS05dvF0F-gh.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{j8DqCwPgfIPICFtf.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/{Ddd1y3TP0kqnnSs7.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/BrHplg4RuI5jOmmr.mjs +0 -357
  190. package/browser/esm/eImPONkfn5DstmS8.mjs +0 -184
  191. package/node/esm/03AYPvCda2x9EOlY.mjs +0 -360
  192. package/node/esm/BmVQRGAijOHzgHmz.mjs +0 -199
  193. package/node/esm/Dk4KLs5GoRRuD8J4.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.15
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 "./DKdFasYVvjAitASZ.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 "./Cx9nQSsuyqhayyBS.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,199 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.15
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 { $n as e, Hn as n, Kn as t, Zn as r, er as s, jt as o, qn as l, ur as c, xr as i, zn as a } from "./Cx9nQSsuyqhayyBS.mjs";
8
- var u = Symbol("sheetxl.formulaNode.internal"), f = Symbol("sheetxl.formulaNode.value"), p = Symbol("sheetxl.formulaNode.replaced"), g = { canonical: !0 }, v = (e, n) => {
9
- const t = e.inputs;
10
- let r = null;
11
- if (t) {
12
- const e = t.length;
13
- r = new Array(e);
14
- for (let s = 0; s < e; s++) {
15
- const e = t[s];
16
- r[s] = e ? v(e, n) : e;
17
- }
18
- }
19
- const s = ((e, n) => {
20
- const t = e.type, r = e.value;
21
- if (t === i.Named) {
22
- const t = r;
23
- let s = t?.nameId, l = t?.scope ?? null;
24
- return n && (s = n.resolve(o.NamedFormula, s)?.toString() ?? s, l && (l = n.resolve(o.Sheet, l)?.toString() ?? l)), e.binding?.declaration && e.binding.optional ? {
25
- name: s,
26
- scope: l,
27
- optional: !0
28
- } : {
29
- name: s,
30
- scope: l
31
- };
32
- }
33
- if (t === i.TableReference) {
34
- const e = "string" == typeof r ? r : r?.tableId;
35
- return e ? n ? n.resolve(o.Table, e)?.toString() ?? e : e : "";
36
- }
37
- if (!n) return r;
38
- switch (t) {
39
- case i.Function: return n.resolve(o.Function, r, g)?.toString() ?? r;
40
- case i.TableColumn: return n.resolve(o.TableColumn, r)?.toString() ?? r;
41
- case i.Cell: {
42
- const e = r;
43
- if (e?.scope) {
44
- const t = n.resolve(o.Sheet, e.scope)?.toString() ?? e.scope;
45
- return {
46
- ...e,
47
- scope: t
48
- };
49
- }
50
- return r;
51
- }
52
- case i.Error: {
53
- const e = r;
54
- if (e?.scope) {
55
- const t = n.resolve(o.Sheet, e.scope)?.toString() ?? e.scope;
56
- return {
57
- ...e,
58
- scope: t
59
- };
60
- }
61
- return r;
62
- }
63
- default: return r;
64
- }
65
- })(e, n);
66
- return {
67
- type: e.type,
68
- value: s,
69
- inputs: r,
70
- isReference: e.isReference,
71
- [u]: e,
72
- [f]: s
73
- };
74
- }, m = (e, n, t) => {
75
- const r = e.inputs;
76
- let s;
77
- if (r) {
78
- const n = r.length;
79
- for (let o = 0; o < n; o++) {
80
- const n = r[o];
81
- if (!n) continue;
82
- const l = m(n, e, t);
83
- l !== n && (s || (s = [...r]), s[o] = l);
84
- }
85
- }
86
- let o = e;
87
- s && (o = {
88
- ...e,
89
- inputs: s
90
- });
91
- const l = t(o, n);
92
- return null == l || l === o ? o : (void 0 === l[u] && void 0 !== o[u] && (l[p] = o[u]), l);
93
- }, y = [
94
- ":",
95
- ".:.",
96
- ".:",
97
- ":.",
98
- " "
99
- ], b = (o, a) => {
100
- const u = o.type, f = o.value;
101
- switch (u) {
102
- case i.Function: return t(String(f), a);
103
- case i.Infix: return l(f, a[0], a[1], o.isReference ?? y.includes(f));
104
- case i.Prefix: return s(f, a?.[0], o.isReference ?? "@" === f);
105
- case i.Postfix: return e(f, a?.[0], o.isReference ?? "#" === f);
106
- case i.Named: {
107
- const e = r("string" == typeof f ? f : f?.name), n = "object" == typeof f ? f?.scope : null;
108
- return n && (e.value = {
109
- ...e.value,
110
- scope: n
111
- }), "object" == typeof f && !0 === f?.optional && (e.value = {
112
- ...e.value,
113
- optional: !0
114
- }), e;
115
- }
116
- case i.Cell: return n(f);
117
- case i.TableReference: return {
118
- type: i.TableReference,
119
- value: f,
120
- inputs: a ?? null,
121
- isReference: !0
122
- };
123
- case i.TableSpecifier: return {
124
- type: i.TableSpecifier,
125
- value: f,
126
- image: `[${f}]`,
127
- inputs: null,
128
- isReference: !0
129
- };
130
- case i.TableColumn: {
131
- const e = "string" == typeof f && f.startsWith("[") ? f : `[${c(String(f))}]`;
132
- return {
133
- type: i.TableColumn,
134
- value: f,
135
- image: e,
136
- inputs: null,
137
- isReference: !0
138
- };
139
- }
140
- case i.String:
141
- case i.Number:
142
- case i.Boolean: return {
143
- type: u,
144
- value: f,
145
- inputs: null,
146
- isLiteral: !0
147
- };
148
- default: return {
149
- type: u,
150
- value: f,
151
- inputs: a ?? null,
152
- isReference: o.isReference
153
- };
154
- }
155
- }, d = (e) => {
156
- const n = e[u], t = e.inputs;
157
- let r = null;
158
- if (t) {
159
- const e = t.length;
160
- r = new Array(e);
161
- for (let n = 0; n < e; n++) {
162
- const e = t[n];
163
- r[n] = e ? d(e) : e;
164
- }
165
- }
166
- if (n) {
167
- const t = e.value !== e[f];
168
- let s = !1;
169
- const o = n.inputs;
170
- if (r && o && r.length === o.length) {
171
- for (let e = 0; e < r.length; e++) if (r[e] !== o[e]) {
172
- s = !0;
173
- break;
174
- }
175
- } else s = null === r != (null == o) || (r?.length ?? 0) !== (o?.length ?? 0);
176
- if (!t && !s) return n;
177
- if (!t) return {
178
- ...n,
179
- inputs: r
180
- };
181
- const l = b(e, r);
182
- return S(l, n), l;
183
- }
184
- const s = b(e, r), o = e[p];
185
- return o && S(s, o), s;
186
- }, S = (e, n) => {
187
- a(e, n), e.type !== n.type && void 0 !== e.image && (e.image = void 0);
188
- };
189
- function h(e, n) {
190
- return v(e, n);
191
- }
192
- function R(e, n) {
193
- return e && "function" == typeof n ? m(e, void 0, n) : e;
194
- }
195
- function T(e) {
196
- const n = d(e);
197
- return !0 === e.legacyIntersect && (n.legacyIntersect = !0), n;
198
- }
199
- export { h as n, R as r, T as t };
@@ -1,115 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.15
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 "./Cx9nQSsuyqhayyBS.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 "./CjwmkzMtjj6OMJbO.mjs";
9
- import { n as v, r as w, t as k } from "./BmVQRGAijOHzgHmz.mjs";
10
- import { i as j, r as T } from "./DDIiQZTdeY4vdK8_.mjs";
11
- import { a as b, n as E } from "./DUft-qpAS4MMANwG.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