@sheetxl/studio-mui 0.8.0-beta.15 → 0.8.0-beta.17

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 (120) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/{DJVpra0HoPH-4P7P.mjs → 0FLmtunmoRFjO-dk.mjs} +3 -3
  3. package/browser/esm/{6SL2j-85OXrKJNZ5.mjs → B2LvYLt27hzoarA9.mjs} +1807 -1200
  4. package/browser/esm/{D90Bb0GPEwqYkf6R.mjs → BBGsto_-YGhTouc9.mjs} +804 -713
  5. package/browser/esm/{BR51amBhaaHPBhpd.mjs → BEIcp6BzAg3H6JBB.mjs} +3 -3
  6. package/browser/esm/{EFtp_C3sBnP3Nrns.mjs → BFN88LECqMerqLYN.mjs} +7 -7
  7. package/browser/esm/{ghfcAaGu2CuZGdhi.mjs → BGNhe08mdWf8dIuk.mjs} +34 -33
  8. package/browser/esm/BNfIFd07bhGqs-U9.mjs +235 -0
  9. package/browser/esm/{CcJHwg-rLMcCymSD.mjs → BTb_Djaoxz3G27t-.mjs} +6 -6
  10. package/browser/esm/{Cl_OUigCV04_zrRy.mjs → BXhWCOPioL48V_9k.mjs} +2 -2
  11. package/browser/esm/{DsM-NpB32hloRRR8.mjs → Bh1YkrKuSZs-xdlw.mjs} +3 -3
  12. package/browser/esm/{CV-q-xCHVuNFhqEF.mjs → BkABsPS9qbyYS2i7.mjs} +2 -2
  13. package/browser/esm/{Buzx8_zQYPX4DR7v.mjs → BnLdmQ91UIGs0zyR.mjs} +2 -2
  14. package/browser/esm/BnMZSJdWZzdK-AXs.mjs +119 -0
  15. package/browser/esm/BoXCzcrUFER3B585.mjs +225 -0
  16. package/browser/esm/{BNas8wZuvrN45dRi.mjs → BxHaU8-LCw4IHrDn.mjs} +2 -2
  17. package/browser/esm/C2ZbV5cXpGPYeqM1.mjs +106 -0
  18. package/browser/esm/C8kveDS4xm6D2Aaq.mjs +294 -0
  19. package/browser/esm/{OHvsc940xI-m_8cc.mjs → CHm8-sLarqD1--If.mjs} +2 -2
  20. package/browser/esm/{DOWfcHx0MO0J50de.mjs → CMIM0wPs_KvfwLEl.mjs} +92 -87
  21. package/browser/esm/{DY_EGsyx-zNiJS_0.mjs → CP-c6sUINCv0Nf4P.mjs} +5 -5
  22. package/browser/esm/{BCDAnHFMvOd9XS8K.mjs → CaI0Mfu6ECDIzCpr.mjs} +3 -3
  23. package/browser/esm/{Bvq5aZyp5E79JB-s.mjs → Cb3HSSD7snyRPNh8.mjs} +2 -2
  24. package/browser/esm/{BsAoK_t2sn8IHtAO.mjs → Cf855AHLcB7WuFr3.mjs} +3 -3
  25. package/browser/esm/{Bqba-3J9i8HsmusR.mjs → ChORBNItvZW0e8Nb.mjs} +2 -2
  26. package/browser/esm/{DfI4-5XM6AbILSti.mjs → CmMD76_yBG4xmsEr.mjs} +4 -4
  27. package/browser/esm/{idh3Y0jksygPSI3A.mjs → CuysyoZ-rmDHwaJJ.mjs} +2 -2
  28. package/browser/esm/{DMDi2lOps0veJKsM.mjs → Cvbms6f8QMP1ubyI.mjs} +3 -3
  29. package/browser/esm/{DKkKac2vbeui2lDy.mjs → CvzzESAZRMWQ4cGq.mjs} +6 -6
  30. package/browser/esm/{DFAphWcDUw-gVtAl.mjs → D078ssKRI39FdHNq.mjs} +3 -3
  31. package/browser/esm/{BvpzsprI7cmVLuQn.mjs → D1_8p15KJ7DSZEis.mjs} +3 -3
  32. package/browser/esm/{Dz20q7S5vmDWlO0p.mjs → D2Kz08pq5zPz2n3y.mjs} +2 -2
  33. package/browser/esm/{BojGnpAWoIm5yCd8.mjs → D4FRExfK7RsdS08S.mjs} +2 -2
  34. package/browser/esm/{CJWnWqGPw17cp9P3.mjs → D9ija-5d57x-qUQv.mjs} +2 -2
  35. package/browser/esm/{DAYPqhHN3aQ2StjU.mjs → DGkQsCJP29nZteu8.mjs} +14 -14
  36. package/browser/esm/{DR9y7k4jB7stGPaZ.mjs → DK39s_Fn9M22RfJm.mjs} +3 -3
  37. package/browser/esm/{CutWdrVA-c3x8IkL.mjs → DL0r5MrPx8CkL_r_.mjs} +5 -4
  38. package/browser/esm/{IlX2PgLxvyTQu4Fh.mjs → DQjJFUPHg_aU2BDi.mjs} +5 -5
  39. package/browser/esm/{OmA1ClZ36ZMFrZe7.mjs → DcUtMgA17fh_UJlQ.mjs} +2 -2
  40. package/browser/esm/{BfPTOOKhwUojRTef.mjs → Dd6iR6EeV81idc-J.mjs} +13 -9
  41. package/browser/esm/{DLe9DT0DSurLSgiQ.mjs → Dd8j9U2Vlvrue2LA.mjs} +2 -2
  42. package/browser/esm/{BkxJY_YjMAEvhmuy.mjs → DmBu6kgMNT26tmsZ.mjs} +4 -4
  43. package/browser/esm/{DpAlQza0e5h3GGHC.mjs → DrtEkQTJM7oPvC9v.mjs} +3 -3
  44. package/browser/esm/DwiKIdqmaBk2pTBp.mjs +973 -0
  45. package/browser/esm/{C67SLDHwhVlVIMo0.mjs → Dx0ymWD1uI_Q63eZ.mjs} +3 -3
  46. package/browser/esm/{Ci74yk0whfoAP1TL.mjs → DxFw-07oIjr7GRb3.mjs} +2 -2
  47. package/browser/esm/{BH4eDAxZdwheO7d_.mjs → GqSAEzE_2tOJlvNG.mjs} +3 -3
  48. package/browser/esm/{By1IJOkvZJSlXs5f.mjs → JqMZ95e5lhq09vm6.mjs} +3 -3
  49. package/browser/esm/{DzATG8XMcG6mmYbx.mjs → LaC0D0C9yJ8y_l6X.mjs} +9 -9
  50. package/browser/esm/{BYnzaHXySiV-sc6w.mjs → NQzIcNkm0QxNuzx9.mjs} +2 -2
  51. package/browser/esm/{DYDnkmllpYTwfWir.mjs → W5Rvml-3G4XekwoR.mjs} +4 -4
  52. package/browser/esm/_PlChb18jQMPAKJX.mjs +360 -0
  53. package/browser/esm/{BWdpv2xf6GCyd4Te.mjs → cNsbq0TIia7SdBHP.mjs} +5 -5
  54. package/browser/esm/{Cbkg5y4fYjLylYHF.mjs → fSCwNKAcSc0mr2Ec.mjs} +2 -2
  55. package/browser/esm/g_bvg4HpyaF6f_JY.mjs +424 -0
  56. package/browser/esm/index.mjs +278 -277
  57. package/browser/esm/{C8tci3dfo5lzeoK-.mjs → mP32LfcEodsaGDPi.mjs} +6 -6
  58. package/browser/esm/{BvbN9V67wFhTfq1-.mjs → sjJ2Yb_cf_KL--Cl.mjs} +3 -3
  59. package/licenses/dependencies.txt +33 -33
  60. package/node/esm/{DybPyX8U-EqXKarV.mjs → 5Kkr-d9gc7GsfmI5.mjs} +2 -2
  61. package/node/esm/B6YmbuWU-fHrjOnB.mjs +106 -0
  62. package/node/esm/{DwA7rfXJgzoNvjax.mjs → BGWb71anMM4S4UTg.mjs} +8 -8
  63. package/node/esm/{C4eVfVm_Omyt6NbE.mjs → BINV_bzMi8YLqzor.mjs} +12 -12
  64. package/node/esm/{DGtbmp72kfRXLtDu.mjs → BWl0RjNZfoJvRX_2.mjs} +81 -80
  65. package/node/esm/{-Adgw5-ltK-rfp33.mjs → BiVdQ27eA1Rs9liu.mjs} +2 -2
  66. package/node/esm/{CkW8xNdW45Xg7jy7.mjs → Bp6WSG8tmXefxSlk.mjs} +3 -3
  67. package/node/esm/BrHbeFtSmaPq19cu.mjs +224 -0
  68. package/node/esm/BySbwlaepgugcINA.mjs +972 -0
  69. package/node/esm/{q2Byx8RdDnHk8YyG.mjs → BzLnWJ1JhLnookTH.mjs} +2 -2
  70. package/node/esm/{Bg3Yu66oJr6mNvAR.mjs → C-Y0ELSBNT5h6V0l.mjs} +3 -3
  71. package/node/esm/{TgwnKYh-WPxEgmyr.mjs → CA2iwgwOkAwRJU9j.mjs} +2 -2
  72. package/node/esm/{CzKFdVrPSDYOUdWI.mjs → CCy_wcDWd9xbQnyM.mjs} +2 -2
  73. package/node/esm/{D9Ga7FFJDOO3Dpfu.mjs → CD-S0_rfDY5u82_A.mjs} +2 -2
  74. package/node/esm/{Cx4tBEsm3SjAafcw.mjs → CQd5k9d0BWpU8yCQ.mjs} +2 -2
  75. package/node/esm/{BZK6UksX7r-GgRms.mjs → Cb0TicO5Utg9e5Qy.mjs} +2 -2
  76. package/node/esm/{DOuASwH2Lf83hMLe.mjs → ClwmPxZc7Uh4nRcr.mjs} +2 -2
  77. package/node/esm/{dUUbrmGMCILl8EOr.mjs → CyxhIZwqwx_Kt70P.mjs} +2 -2
  78. package/node/esm/D1XvISMVj1HimOTS.mjs +425 -0
  79. package/node/esm/{B26ot2vO6Hd47uH0.mjs → D2ZUCui3Xosjj66H.mjs} +2 -2
  80. package/node/esm/{BaFRVcYZjcLoMQtk.mjs → D71TbUFABfTixyiQ.mjs} +7 -7
  81. package/node/esm/{ISBEql8s7AnELTpd.mjs → D7__y1LhVOR38yxz.mjs} +2 -2
  82. package/node/esm/{Ca31PUiJBGowHeob.mjs → D9jTg0iWTubkisDB.mjs} +3 -3
  83. package/node/esm/{5etzEfk-28CCELyT.mjs → DHiJ5D_q7YVsClMf.mjs} +3 -3
  84. package/node/esm/{BxIyViNSP0STSrfA.mjs → DJuEU0TbZXyTnThP.mjs} +3 -3
  85. package/node/esm/{D_JpopAVQopM26cb.mjs → DMfK0wa8UHeJyxii.mjs} +603 -514
  86. package/node/esm/{CFi_Yls-gurU_CX3.mjs → DN2KKVrC1ye0mldi.mjs} +2 -2
  87. package/node/esm/{HlNuwtpYoOARa894.mjs → DYRV7b1ZSbxrjcuA.mjs} +2 -2
  88. package/node/esm/Dm-skjfQUaumyQPp.mjs +118 -0
  89. package/node/esm/{jGsHbOHP90nnx_hJ.mjs → DvN4Z2Hx4Es0sdaK.mjs} +16 -15
  90. package/node/esm/{CORxK68HpwPUYA6O.mjs → Jp--thwzf0FSnHTH.mjs} +2 -2
  91. package/node/esm/{BKCNFVrdc_gTnOoS.mjs → a69xG_vSg2OC9_22.mjs} +2 -2
  92. package/node/esm/{CX13ASkhdJ0ZSAY4.mjs → akKdwInE4KLNjHQu.mjs} +3 -3
  93. package/node/esm/axzlGUKK8euccdja.mjs +294 -0
  94. package/node/esm/index.mjs +3391 -2778
  95. package/node/esm/{B7vbn_dO_cZnGyGM.mjs → lhMHEjzlz63h_qU0.mjs} +3 -3
  96. package/node/esm/{CexPhV2NPh5ZGHus.mjs → r8bpi-MSpulvmozZ.mjs} +2 -2
  97. package/node/esm/{BFv2GzY6NjmJggAg.mjs → sHdUrEwlYxyLkkL6.mjs} +3 -3
  98. package/package.json +10 -10
  99. package/resources/locales/de/groups.cmd.json +3 -0
  100. package/resources/locales/de/ui.msg.json +41 -0
  101. package/resources/locales/en/groups.cmd.json +3 -0
  102. package/resources/locales/en/ui.msg.json +41 -0
  103. package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
  104. package/types/src/command/index.d.ts +1 -0
  105. package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
  106. package/types/src/filter/PivotMenu.d.ts +31 -0
  107. package/types/src/filter/index.d.ts +1 -0
  108. package/types/src/pivot/PivotChipMenu.d.ts +10 -0
  109. package/types/src/pivot/PivotPlugin.d.ts +3 -0
  110. package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
  111. package/types/src/pivot/PivotTableHeader.d.ts +12 -0
  112. package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
  113. package/types/src/pivot/_pivotSource.d.ts +7 -0
  114. package/types/src/table/_drawStyleSwatch.d.ts +25 -0
  115. package/types/src/workbook/DefaultRenderers.d.ts +10 -4
  116. package/browser/esm/C4ir9dn7q0RUoOm_.mjs +0 -319
  117. package/browser/esm/DEUzUShfyJLvgd6_.mjs +0 -1379
  118. package/browser/esm/xe1B8ohea8qfZlFg.mjs +0 -582
  119. package/node/esm/CKtnUYKjsTf7dYKS.mjs +0 -318
  120. package/node/esm/vf5X26EJO7Q1b8Ln.mjs +0 -1379
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { FormulaField as e, InputField as t } from "./index.mjs";
8
8
  import { useReferenceMode as a } from "@sheetxl/react";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { C as e } from "./index.mjs";
8
8
  import { ReactUtils as t } from "@sheetxl/utils-react";
@@ -0,0 +1,118 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: MIT
6
+ */
7
+ import { FormulaField as e, InputField as o } from "./index.mjs";
8
+ import { n as t } from "./DMfK0wa8UHeJyxii.mjs";
9
+ import { useReferenceMode as n, useWorkbook as a } from "@sheetxl/react";
10
+ import { useCallbackRef as l, useTranslator as i } from "@sheetxl/utils-react";
11
+ import { memo as r, useCallback as c, useMemo as u, useState as s } from "react";
12
+ import { OptionsDialog as m } from "@sheetxl/utils-mui";
13
+ import { jsx as p, jsxs as d } from "react/jsx-runtime";
14
+ import { Box as f } from "@mui/material";
15
+ var g = ["Ok", "Cancel"], h = r((r) => {
16
+ const { onInput: h, onOption: v, onValidateOption: x, onDone: N, options: O = g, defaultOption: w = O?.[0], cancelOption: b = "Cancel", sx: F, initialValue: k, context: C, ...I } = r, y = i(), [M, T] = s(!1), [V, j] = s(() => k?.name ?? ""), [D, S] = s(() => k?.source ?? null), [W, A] = s(() => k?.location ?? null), B = C?.(), E = u(() => {
17
+ const e = k?.source, o = e && "string" != typeof e ? e.getWorksheet?.()?.getName() : void 0;
18
+ return o ? { scope: o } : void 0;
19
+ }, [k]), G = a(), [L] = s(() => {
20
+ const e = G?.getSelectedWorksheet()?.getName();
21
+ return e ? { scope: e } : void 0;
22
+ }), R = "point" === n().getMode()?.mode, q = u(() => W ? B?.checkLocation(W) ?? null : null, [W, B]), z = l((e) => {
23
+ B?.validateName(e, W);
24
+ }, [B, W]), H = l((e) => {
25
+ const o = D && W ? {
26
+ ...k,
27
+ name: V,
28
+ source: D,
29
+ location: W
30
+ } : null, t = e === b || !e;
31
+ h?.(!t && o ? o : void 0), v?.(e ?? b, t, e === w), N?.({
32
+ option: e,
33
+ value: o
34
+ });
35
+ }, [
36
+ N,
37
+ v,
38
+ w,
39
+ b,
40
+ V,
41
+ D,
42
+ W,
43
+ k
44
+ ]), J = c(async (e, o) => {
45
+ if (!D || !W || q) return !1;
46
+ try {
47
+ z(V);
48
+ } catch {
49
+ return !1;
50
+ }
51
+ return !0;
52
+ }, [
53
+ z,
54
+ V,
55
+ D,
56
+ W,
57
+ q
58
+ ]), K = (e) => {
59
+ M || e.target?.select(), T(!0);
60
+ };
61
+ return p(m, {
62
+ title: y("pivotTableNew.title"),
63
+ options: O,
64
+ onDone: H,
65
+ onValidateOption: J,
66
+ defaultOption: w,
67
+ cancelOption: b,
68
+ autoFocusSel: ".autoFocus",
69
+ suspendModal: R,
70
+ sx: {
71
+ width: "360px",
72
+ ...F
73
+ },
74
+ ...I,
75
+ children: d(f, {
76
+ sx: {
77
+ paddingTop: (e) => e.spacing(1),
78
+ paddingBottom: (e) => e.spacing(0),
79
+ rowGap: (e) => e.spacing(1),
80
+ display: "flex",
81
+ flexDirection: "column"
82
+ },
83
+ children: [
84
+ p(o, {
85
+ formName: "name",
86
+ value: V,
87
+ onChangeInput: j,
88
+ onValidate: z,
89
+ onFocus: K
90
+ }),
91
+ p(e, {
92
+ grammar: "reference",
93
+ classNameInput: "autoFocus",
94
+ formName: "source",
95
+ label: y("pivotTableNew.source"),
96
+ value: D,
97
+ allowMulti: !1,
98
+ home: E,
99
+ pickAs: "absolute",
100
+ onChangeInput: (e) => S(t(e)),
101
+ onFocus: K
102
+ }),
103
+ p(e, {
104
+ grammar: "reference",
105
+ formName: "location",
106
+ label: y("pivotTableNew.location"),
107
+ value: W,
108
+ allowMulti: !1,
109
+ home: L,
110
+ validationError: q,
111
+ onChangeInput: (e) => A(e?.getReferences() ?? null),
112
+ onFocus: K
113
+ })
114
+ ]
115
+ })
116
+ });
117
+ });
118
+ export { h as PivotTableNewDialog, h as default };
@@ -1,17 +1,18 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
- import { c as e, t } from "./CKtnUYKjsTf7dYKS.mjs";
8
- import { t as o } from "./C4eVfVm_Omyt6NbE.mjs";
7
+ import { o as e } from "./B6YmbuWU-fHrjOnB.mjs";
8
+ import { t } from "./BrHbeFtSmaPq19cu.mjs";
9
+ import { t as o } from "./BINV_bzMi8YLqzor.mjs";
9
10
  import { IFill as l, ShapeStyleUtils as r } from "@sheetxl/sdk";
10
11
  import { useGridColorScheme as s } from "@sheetxl/react";
11
12
  import { useTranslator as i } from "@sheetxl/utils-react";
12
13
  import { memo as a, useEffect as n, useReducer as p } from "react";
13
- import { jsx as m, jsxs as c } from "react/jsx-runtime";
14
- import { Box as d, Typography as h } from "@mui/material";
14
+ import { jsx as m, jsxs as d } from "react/jsx-runtime";
15
+ import { Box as c, Typography as h } from "@mui/material";
15
16
  var u = (e, t, o) => {
16
17
  const s = e.toJSON();
17
18
  let i = null;
@@ -30,12 +31,12 @@ var u = (e, t, o) => {
30
31
  component: "div",
31
32
  children: e.children
32
33
  }), g = a((l) => {
33
- const { movable: r, sheet: a } = l, h = i(), g = r.getContent(), [, y] = p((e) => e + 1, 0);
34
- n(() => g.addListeners({ onAnyChange: y }), [g]);
35
- const f = a.getStyles(), S = "dark" === s(), v = g.isReadOnly(), C = g.getStyle(), x = {
34
+ const { movable: r, sheet: a } = l, h = i(), g = r.getContent(), [, f] = p((e) => e + 1, 0);
35
+ n(() => g.addListeners({ onAnyChange: f }), [g]);
36
+ const y = a.getStyles(), S = "dark" === s(), v = g.isReadOnly(), C = g.getStyle(), x = {
36
37
  fill: C.getFill(),
37
- styles: f,
38
- schemeLookup: f.schemeLookup(),
38
+ styles: y,
39
+ schemeLookup: y.schemeLookup(),
39
40
  darkMode: S,
40
41
  disabled: v,
41
42
  createCell: (e) => a.createCell(e),
@@ -45,16 +46,16 @@ var u = (e, t, o) => {
45
46
  }, F = {
46
47
  stroke: C.getStroke(),
47
48
  stated: C.toJSON()?.stroke ?? null,
48
- autoColor: u(g, r, f),
49
- styles: f,
50
- schemeLookup: f.schemeLookup(),
49
+ autoColor: u(g, r, y),
50
+ styles: y,
51
+ schemeLookup: y.schemeLookup(),
51
52
  darkMode: S,
52
53
  disabled: v,
53
54
  applyStroke: (e, t) => {
54
55
  C.setStroke(e, { description: t });
55
56
  }
56
57
  };
57
- return c(d, {
58
+ return d(c, {
58
59
  sx: {
59
60
  ...e,
60
61
  gap: 2,
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { useCallbackRef as t, useTranslator as o } from "@sheetxl/utils-react";
8
8
  import { memo as e, useState as i } from "react";
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { FormulaField as e, InputField as t, PresetTableStylesCommandButton as n, TableStylePreview as o } from "./index.mjs";
8
8
  import { useModelListener as a, useWorksheet as l } from "@sheetxl/react";
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.15
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { PasswordField as e, c as t } from "./index.mjs";
8
- import { n as o, t as n } from "./BFv2GzY6NjmJggAg.mjs";
8
+ import { n as o, t as n } from "./sHdUrEwlYxyLkkL6.mjs";
9
9
  import { ICellRange as i } from "@sheetxl/sdk";
10
10
  import { promptUnlockProtectedRanges as r, useModelListener as a, useModelSync as s } from "@sheetxl/react";
11
11
  import { DynamicIcon as l, NotifierType as c, useNotifier as d, useTranslator as p } from "@sheetxl/utils-react";
@@ -0,0 +1,294 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.17
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: MIT
6
+ */
7
+ import { t as e } from "./D1XvISMVj1HimOTS.mjs";
8
+ import { useCallbackRef as t, useTranslator as n } from "@sheetxl/utils-react";
9
+ import { memo as i, useMemo as a, useState as o } from "react";
10
+ import { OptionsDialog as l } from "@sheetxl/utils-mui";
11
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
12
+ import { Box as u, List as p, ListItemButton as c, ListItemText as m, MenuItem as d, Tab as v, Tabs as f, TextField as g, Typography as h } from "@mui/material";
13
+ import { messageKey as b } from "@sheetxl/utils";
14
+ var S = ["Ok", "Cancel"], O = [
15
+ "sum",
16
+ "count",
17
+ "average",
18
+ "max",
19
+ "min",
20
+ "product",
21
+ "countNums",
22
+ "stdDev",
23
+ "stdDevp",
24
+ "var",
25
+ "varp"
26
+ ], V = {
27
+ sum: b("pivot.function.sum"),
28
+ count: b("pivot.function.count"),
29
+ average: b("pivot.function.average"),
30
+ max: b("pivot.function.max"),
31
+ min: b("pivot.function.min"),
32
+ product: b("pivot.function.product"),
33
+ countNums: b("pivot.function.countNums"),
34
+ stdDev: b("pivot.function.stdDev"),
35
+ stdDevp: b("pivot.function.stdDevp"),
36
+ var: b("pivot.function.var"),
37
+ varp: b("pivot.function.varp")
38
+ }, k = [
39
+ "normal",
40
+ "percentOfTotal",
41
+ "percentOfCol",
42
+ "percentOfRow",
43
+ "percent",
44
+ "percentOfParentRow",
45
+ "percentOfParentCol",
46
+ "percentOfParent",
47
+ "difference",
48
+ "percentDiff",
49
+ "runTotal",
50
+ "percentOfRunningTotal",
51
+ "rankAscending",
52
+ "rankDescending",
53
+ "index"
54
+ ], x = {
55
+ normal: b("pivotValueSettings.kind.normal"),
56
+ percentOfTotal: b("pivotValueSettings.kind.percentOfTotal"),
57
+ percentOfCol: b("pivotValueSettings.kind.percentOfCol"),
58
+ percentOfRow: b("pivotValueSettings.kind.percentOfRow"),
59
+ percent: b("pivotValueSettings.kind.percent"),
60
+ percentOfParentRow: b("pivotValueSettings.kind.percentOfParentRow"),
61
+ percentOfParentCol: b("pivotValueSettings.kind.percentOfParentCol"),
62
+ percentOfParent: b("pivotValueSettings.kind.percentOfParent"),
63
+ difference: b("pivotValueSettings.kind.difference"),
64
+ percentDiff: b("pivotValueSettings.kind.percentDiff"),
65
+ runTotal: b("pivotValueSettings.kind.runTotal"),
66
+ percentOfRunningTotal: b("pivotValueSettings.kind.percentOfRunningTotal"),
67
+ rankAscending: b("pivotValueSettings.kind.rankAscending"),
68
+ rankDescending: b("pivotValueSettings.kind.rankDescending"),
69
+ index: b("pivotValueSettings.kind.index")
70
+ }, F = /* @__PURE__ */ new Set([
71
+ "percent",
72
+ "percentOfParent",
73
+ "difference",
74
+ "percentDiff",
75
+ "runTotal",
76
+ "percentOfRunningTotal",
77
+ "rankAscending",
78
+ "rankDescending"
79
+ ]), w = /* @__PURE__ */ new Set([
80
+ "percent",
81
+ "difference",
82
+ "percentDiff"
83
+ ]), N = "(previous)", D = i((i) => {
84
+ const { initialValue: b, onOption: D, onValidateOption: C, onInput: A, onDone: T, options: P = S, defaultOption: R = P?.[0], cancelOption: I = "Cancel", sx: y, ...z } = i, j = n(), H = b.value, B = a(() => ({
85
+ name: H.getName(),
86
+ fn: H.getFunction(),
87
+ showAs: H.getShowAs(),
88
+ numberFormat: H.getNumberFormat()
89
+ }), [H]), M = a(() => H.getPivotTable().getFields(), [H]), [W, q] = o("function"), [E, G] = o(B.name), [J, K] = o(!1), [L, Q] = o(B.fn), [U, X] = o(B.showAs?.kind ?? "normal"), [Y, Z] = o(B.showAs?.baseField ?? M[0]?.getName() ?? ""), [$, _] = o(B.showAs?.baseItem ?? N), [ee, te] = o(B.numberFormat), [ne, ie] = o(!1), ae = a(() => {
90
+ const e = M.find((e) => e.getName() === Y);
91
+ return e ? e.getItems().map((e) => e.getName()) : [];
92
+ }, [M, Y]), oe = (e) => {
93
+ Q(e), J || G(H.getCaptionFor(e));
94
+ }, le = () => {
95
+ const e = "normal" === U ? null : {
96
+ kind: U,
97
+ ...F.has(U) ? { baseField: Y } : {},
98
+ ...w.has(U) ? { baseItem: $ } : {}
99
+ }, t = E.trim();
100
+ return {
101
+ ...L !== B.fn ? { function: L } : {},
102
+ ...(n = e, i = B.showAs, (n?.kind ?? null) !== (i?.kind ?? null) || n?.baseField !== i?.baseField || n?.baseItem !== i?.baseItem ? { showAs: e } : {}),
103
+ ...ne && ee !== B.numberFormat ? { numberFormat: ee } : {},
104
+ ...J && t && t !== H.getCaptionFor(L) ? { name: t } : {}
105
+ };
106
+ var n, i;
107
+ }, re = t(async (e) => {
108
+ const t = e === I;
109
+ t || A?.({
110
+ value: H,
111
+ changes: le()
112
+ }, e), D?.(e, t, e === R), T?.();
113
+ }, [
114
+ A,
115
+ T,
116
+ D,
117
+ I,
118
+ R,
119
+ H,
120
+ L,
121
+ U,
122
+ Y,
123
+ $,
124
+ ee,
125
+ ne,
126
+ E,
127
+ J
128
+ ]);
129
+ return r(l, {
130
+ title: j("pivotValueSettings.title"),
131
+ options: P,
132
+ onDone: T,
133
+ onOption: (e) => re(e),
134
+ onValidateOption: C,
135
+ defaultOption: R,
136
+ cancelOption: I,
137
+ autoFocusSel: ".autoFocus input",
138
+ sx: {
139
+ width: "440px",
140
+ ...y
141
+ },
142
+ ...z,
143
+ children: s(u, {
144
+ sx: {
145
+ display: "flex",
146
+ flexDirection: "column",
147
+ gap: (e) => e.spacing(1.5)
148
+ },
149
+ children: [
150
+ r(h, {
151
+ variant: "body2",
152
+ className: "pivot-source-name",
153
+ children: j("pivotValueSettings.sourceName", { name: H.getField().getName() })
154
+ }),
155
+ r(g, {
156
+ className: "autoFocus",
157
+ size: "small",
158
+ label: j("pivotValueSettings.customName"),
159
+ value: E,
160
+ onChange: (e) => {
161
+ G(e.target.value), K(!0);
162
+ }
163
+ }),
164
+ s(f, {
165
+ value: W,
166
+ onChange: (e, t) => q(t),
167
+ sx: {
168
+ minHeight: "36px",
169
+ borderBottom: 1,
170
+ borderColor: "divider",
171
+ "& .MuiTab-root": {
172
+ minHeight: "36px",
173
+ textTransform: "none",
174
+ pt: .5,
175
+ pb: .5,
176
+ px: 1.5,
177
+ minWidth: 0
178
+ }
179
+ },
180
+ children: [
181
+ r(v, {
182
+ value: "function",
183
+ label: j("pivotValueSettings.tabFunction")
184
+ }),
185
+ r(v, {
186
+ value: "showAs",
187
+ label: j("pivotValueSettings.tabShowAs")
188
+ }),
189
+ r(v, {
190
+ value: "numberFormat",
191
+ label: j("pivotValueSettings.tabNumberFormat")
192
+ })
193
+ ]
194
+ }),
195
+ s(u, {
196
+ sx: {
197
+ height: "300px",
198
+ overflow: "auto"
199
+ },
200
+ children: [
201
+ "function" === W ? r(p, {
202
+ dense: !0,
203
+ disablePadding: !0,
204
+ role: "listbox",
205
+ "aria-label": j("pivotValueSettings.tabFunction"),
206
+ className: "pivot-functions",
207
+ children: O.map((e) => r(c, {
208
+ role: "option",
209
+ "aria-selected": e === L,
210
+ selected: e === L,
211
+ onClick: () => oe(e),
212
+ onDoubleClick: () => {
213
+ oe(e), re(R);
214
+ },
215
+ children: r(m, { primary: j(V[e]) })
216
+ }, e))
217
+ }) : null,
218
+ "showAs" === W ? s(u, {
219
+ sx: {
220
+ display: "flex",
221
+ flexDirection: "column",
222
+ gap: (e) => e.spacing(2),
223
+ pt: 1
224
+ },
225
+ children: [
226
+ r(g, {
227
+ select: !0,
228
+ size: "small",
229
+ className: "pivot-show-as",
230
+ label: j("pivotValueSettings.showAs"),
231
+ value: U,
232
+ onChange: (e) => X(e.target.value),
233
+ children: k.map((e) => r(d, {
234
+ value: e,
235
+ children: j(x[e])
236
+ }, e))
237
+ }),
238
+ r(g, {
239
+ select: !0,
240
+ size: "small",
241
+ className: "pivot-base-field",
242
+ label: j("pivotValueSettings.baseField"),
243
+ value: Y,
244
+ disabled: !F.has(U),
245
+ onChange: (e) => {
246
+ Z(e.target.value), _(N);
247
+ },
248
+ children: M.map((e) => r(d, {
249
+ value: e.getName(),
250
+ children: e.getName()
251
+ }, e.getName()))
252
+ }),
253
+ s(g, {
254
+ select: !0,
255
+ size: "small",
256
+ className: "pivot-base-item",
257
+ label: j("pivotValueSettings.baseItem"),
258
+ value: $,
259
+ disabled: !w.has(U),
260
+ onChange: (e) => _(e.target.value),
261
+ children: [
262
+ r(d, {
263
+ value: N,
264
+ children: j("pivotValueSettings.previous")
265
+ }),
266
+ r(d, {
267
+ value: "(next)",
268
+ children: j("pivotValueSettings.next")
269
+ }),
270
+ ae.map((e) => r(d, {
271
+ value: e,
272
+ children: e
273
+ }, e))
274
+ ]
275
+ })
276
+ ]
277
+ }) : null,
278
+ "numberFormat" === W ? r(e, {
279
+ value: ee,
280
+ onChange: (e) => {
281
+ te(e), ie(!0);
282
+ },
283
+ onCommit: () => {
284
+ re(R);
285
+ }
286
+ }) : null
287
+ ]
288
+ })
289
+ ]
290
+ })
291
+ });
292
+ });
293
+ D.displayName = "PivotValueSettingsDialog";
294
+ export { D as PivotValueSettingsDialog, D as default };