@sheetxl/studio-mui 0.8.0-beta.11 → 0.8.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/browser/esm/{DTpRkgsTm_zYnWfW.mjs → 0IBZhOJaVmzJxuTv.mjs} +1 -1
  2. package/browser/esm/{LZoYSQAYV2wksnDv.mjs → 2nRxqrNYbmEn8fS8.mjs} +5 -5
  3. package/browser/esm/{DDc6rDuU9JAo1DH_.mjs → 7fVZXXuonYb6Z7FU.mjs} +3 -3
  4. package/browser/esm/{DpD4fg2WcyiKX_2K.mjs → BAzhmMX4Fk_qnUTp.mjs} +5 -5
  5. package/browser/esm/{CBD4RiRKbbZtSXV-.mjs → BGL3x0W74D7qZXlf.mjs} +3 -3
  6. package/browser/esm/{D9ISy7VkaRRFJl46.mjs → BHGr2gsFofTdAFxq.mjs} +4 -4
  7. package/browser/esm/{BknfGJouygmnpFIU.mjs → BKhcJI-G15D3kGap.mjs} +2 -2
  8. package/browser/esm/{CyLn6zOOp_biA3xU.mjs → BNbub9weuqm3mcoF.mjs} +8 -8
  9. package/browser/esm/{CWkOgdL7mOKiTR62.mjs → BSv9MVJaz1DVEffm.mjs} +4 -4
  10. package/browser/esm/{BAbq4-I5f5oUiNaF.mjs → BWfLpYmd3cSgJ0C6.mjs} +4 -4
  11. package/browser/esm/{0BWO0bLZ8Vm_dKd2.mjs → BZqwbIE8qzjSOYcJ.mjs} +13 -13
  12. package/browser/esm/{ttjcNHcFn8O6hfnd.mjs → BZy9xUrYpAtnKeji.mjs} +11 -11
  13. package/browser/esm/{COlZu93LRwuBvjE-.mjs → BnkwC5rsg9LZyhoP.mjs} +2 -2
  14. package/browser/esm/{BvhYPwX3GrRaO9CM.mjs → BpJsBv413cNQpyg0.mjs} +3 -3
  15. package/browser/esm/{DDczwkXhz_MHub4z.mjs → BpVrgbVISiTDyFR3.mjs} +2 -2
  16. package/browser/esm/{DRSCS6aLiYmPjUz1.mjs → BsngRDhvVYGVBJeK.mjs} +365 -362
  17. package/browser/esm/{Ds3XRkne7HxcXD8J.mjs → C29TKq47CbXs652l.mjs} +2 -2
  18. package/browser/esm/{BXhNFzyEGokTF-BL.mjs → C8p2iMad_NNCwGI_.mjs} +2 -2
  19. package/browser/esm/{G0Inqm6Eqw47dMpa.mjs → CBzXksWnb-1gGEWZ.mjs} +1 -1
  20. package/browser/esm/{zqilJefihVd7At2T.mjs → CFIAWgpU3UyepLBn.mjs} +7 -7
  21. package/browser/esm/{DG21x7RKDpge6zAE.mjs → CJD4jF4m9cBGHzr_.mjs} +1 -1
  22. package/browser/esm/{C9pIZVACtl9unFOp.mjs → CMc7G7cevxzPGxr9.mjs} +2 -2
  23. package/browser/esm/{HViD4Wfoi0mmqk9w.mjs → CYtULLhY9M2m3DeH.mjs} +1 -1
  24. package/browser/esm/{Buqcl7J75MJrhpVE.mjs → CeF35ZeFP28Do5Zx.mjs} +8 -8
  25. package/browser/esm/{D3rRUK4dIM5gUSmj.mjs → CjYKDxU4EP2Kf_vo.mjs} +2 -2
  26. package/browser/esm/{BlE_8o8tO2AgAlaj.mjs → Cq82lvdjyBvlJ8xJ.mjs} +1 -1
  27. package/browser/esm/{DEv4pIEgYr5C7etm.mjs → CuRxFAO42JkQvMEx.mjs} +1 -1
  28. package/browser/esm/{C8JU4KsMasmLvojI.mjs → Cvk2yY90hpgXWMAt.mjs} +1 -1
  29. package/browser/esm/{CynTY0oNtyJnoaBq.mjs → D0slJycx3nq53qmf.mjs} +1 -1
  30. package/browser/esm/{DKtJxrpN0axtuQ0l.mjs → D2jzliMwAo2ENpfi.mjs} +1 -1
  31. package/browser/esm/{DdcZrjMLWVukWcU5.mjs → D5Fn0Hqllwv5HY6i.mjs} +768 -660
  32. package/browser/esm/{Bujtz_Guj88d03vI.mjs → D5N4nGaZsXtrHAOh.mjs} +6 -6
  33. package/browser/esm/{ChSVxkPTIjgcC8PL.mjs → D7AqPfyhMiuda5l5.mjs} +2 -2
  34. package/browser/esm/{BED6h6YAwCf1HEQJ.mjs → DHZA48ZMCETvHmeP.mjs} +1 -1
  35. package/browser/esm/{Di3BUxA0SqFWWgeg.mjs → DX2_vf7WX6uRLaOZ.mjs} +1 -1
  36. package/browser/esm/{DnGaP5F7mLwCGUYG.mjs → DaxpbAF1ShkT7hNU.mjs} +206 -124
  37. package/browser/esm/{YThnrg3PadGs7B4j.mjs → Db3oHfXiRtcH015t.mjs} +143 -137
  38. package/browser/esm/{C0wlMAIn9iREPK6w.mjs → Dt47Huh1l3C4_5_w.mjs} +1 -1
  39. package/browser/esm/{xFqkfN8QMCxvsetB.mjs → DtPt0phL7m56YfHZ.mjs} +1 -1
  40. package/browser/esm/{CTjqDD-swFMZzI-Y.mjs → DtTDaXmnWUoG4VBO.mjs} +2 -2
  41. package/browser/esm/{Brsh5yscJ_4uKFXp.mjs → DuuyN4-7K6_io2Py.mjs} +2 -2
  42. package/browser/esm/{w_JrR69vEpvoyeMy.mjs → NeGeLF3gbGMZyV6E.mjs} +1 -1
  43. package/browser/esm/{BokqKEpU6TFgfRs6.mjs → PY3Br5Bo_TxcCnCU.mjs} +2 -2
  44. package/browser/esm/{DV6i9RQZfJiKtEaJ.mjs → WIhvQtBkGiw-oFUs.mjs} +636 -622
  45. package/browser/esm/{DJOOed_OtB-XT7f3.mjs → WgIvwAENeO8LANax.mjs} +6 -6
  46. package/browser/esm/{BjvD_4t2KGsZP5V8.mjs → Yjq3p_7eVGFw2Jod.mjs} +3 -3
  47. package/browser/esm/index.mjs +290 -287
  48. package/browser/esm/{QgaAIDUMmBQBsXP9.mjs → jFRFCWlkD7Dsrhkh.mjs} +84 -84
  49. package/browser/esm/{BYE9gCDWKyx6mnVs.mjs → lKXEDVt2ow1NlWJj.mjs} +114 -103
  50. package/browser/esm/{CEtXsBzEjEKk9GOj.mjs → oC0OwOddhOD0OoCJ.mjs} +2 -2
  51. package/browser/esm/{DsoNMWDwHZP8UXQd.mjs → tIKqpsA0vNXH9EgU.mjs} +1 -1
  52. package/browser/esm/{ClBvNPeNCAhuVWrG.mjs → u84rSnESjxqB6gay.mjs} +1 -1
  53. package/node/esm/{DMXLxp3T0E0SRTQc.mjs → B8Ls4Eh1k8-Yiry_.mjs} +1 -1
  54. package/node/esm/{3WghtBXAvCDwcVrq.mjs → B9X3n8MglL4OitAV.mjs} +1 -1
  55. package/node/esm/{XEDcegsv5AGKBfu2.mjs → BBGoyqs2L_ccSH1e.mjs} +2 -2
  56. package/node/esm/{zITjZ7R4raDqhP-n.mjs → BLv99aovW4R3C5PE.mjs} +3 -3
  57. package/node/esm/{DfCuL8AUxMFoEG2s.mjs → BUGU_5lUtnCRlp3n.mjs} +36 -36
  58. package/node/esm/{BNg4QQY0WAPLE0q7.mjs → BalROFG_oa9PFs9Q.mjs} +3 -3
  59. package/node/esm/{Bph-sR3l6AYWeuxK.mjs → BqVxnA1mo52ubjdf.mjs} +2 -2
  60. package/node/esm/{CZyA9uD4SkTvqp_G.mjs → C3FCh9xju2SccUIE.mjs} +253 -253
  61. package/node/esm/{Do-zCKziWhoG5eAv.mjs → C4F6WY8M4nkLyxdb.mjs} +2 -2
  62. package/node/esm/{CSAnTp5rwId0DUb8.mjs → CKWeipCqqpLnLE5e.mjs} +127 -116
  63. package/node/esm/{DLqBHdFp6wvm6EGs.mjs → CTnVNfz4eqFnM92M.mjs} +1 -1
  64. package/node/esm/{BPzcW4BejRqso338.mjs → Cfi_ly8fBDZZdiZT.mjs} +3 -3
  65. package/node/esm/{Db3dbaYLKUO66T9s.mjs → CgKa6JuyJ1tTodev.mjs} +414 -400
  66. package/node/esm/{4HmLH0bPVJCZLgik.mjs → Cq53M7bAUSXMNq1f.mjs} +1 -1
  67. package/node/esm/{1bf4gn-2vld4BZ9u.mjs → Cr8AYWUoU-XVt0hu.mjs} +1 -1
  68. package/node/esm/CyuOE595I2e-U4cG.mjs +236 -0
  69. package/node/esm/{D-xqQ5qOSd6WrzwJ.mjs → D72CupF9mfy2D1Xa.mjs} +1 -1
  70. package/node/esm/{CyafafEgfmjLqE5O.mjs → DGDHFK8okuVbRCe5.mjs} +1 -1
  71. package/node/esm/{DpJ2gmZJioCyq8La.mjs → DJFkALt4XrwkMbnU.mjs} +166 -160
  72. package/node/esm/{CPq-MIdEnc-53JpF.mjs → DJpwI8PlKBI2rk0r.mjs} +2 -2
  73. package/node/esm/{DWqvf4H5F2wMnZ0L.mjs → DQaGPUYbgL4Y5YZW.mjs} +1 -1
  74. package/node/esm/{CYIoK22I6Yvv12_x.mjs → DsNYnq4NtYBxPmeA.mjs} +1 -1
  75. package/node/esm/{yCUxQuqVuC4DHKPx.mjs → DygDgOpa9sJ6YFVS.mjs} +1 -1
  76. package/node/esm/Dz0Hg87UcJ-awwiI.mjs +489 -0
  77. package/node/esm/{BIMkjQUwG4Ih-6Sh.mjs → M7YxvRPGCuxuk9aK.mjs} +1 -1
  78. package/node/esm/{CWcv7UVXF8IUB0PC.mjs → QNjtpX8rIpqGGLEJ.mjs} +15 -15
  79. package/node/esm/{DdEzhVqYTrGODXrz.mjs → ZzvsynJTCSuChYS-.mjs} +1 -1
  80. package/node/esm/{CjC6s3RUJQNCF7mP.mjs → di_8-pXh90j4BO4j.mjs} +1 -1
  81. package/node/esm/{CvRbu8JPxFarsSR-.mjs → dm8dmEaTIqfmgyeL.mjs} +5 -5
  82. package/node/esm/{CuMePia6i_8yfJ6S.mjs → fmya3XQnTGyQisvT.mjs} +9 -9
  83. package/node/esm/{BR45ogAR-hY2bE60.mjs → gPYAb_A0T5ZwcQ1E.mjs} +1 -1
  84. package/node/esm/index.mjs +2817 -2702
  85. package/node/esm/{DeZJlLk8WJ3BLtLs.mjs → wB8xMpyJ_NvE16yG.mjs} +3 -3
  86. package/node/esm/{BlN7G0DVC24zauig.mjs → zGAcd4Jr7wkvXDBS.mjs} +1 -1
  87. package/package.json +9 -9
  88. package/resources/locales/de/groups.cmd.json +4 -0
  89. package/resources/locales/de/ui.msg.json +3 -1
  90. package/resources/locales/en/groups.cmd.json +4 -0
  91. package/resources/locales/en/ui.msg.json +3 -1
  92. package/types/src/border/BorderPopupButton.d.ts +1 -1
  93. package/types/src/color/ColorPopupButton.d.ts +1 -1
  94. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  95. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  96. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  97. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  98. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  99. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  100. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  101. package/types/src/command/index.d.ts +1 -0
  102. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +1 -1
  103. package/types/src/conditions/ConditionEditor.d.ts +1 -1
  104. package/types/src/conditions/OperatorAndParamEditor.d.ts +1 -1
  105. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  106. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  107. package/types/src/formulaBar/IFormulaBar.d.ts +4 -2
  108. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  109. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  110. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  111. package/types/src/statusBar/index.d.ts +1 -0
  112. package/types/src/studio/StudioProps.d.ts +10 -10
  113. package/types/src/template/TemplatePanel.d.ts +5 -1
  114. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  115. package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
  116. package/types/src/workbook/DefaultRenderers.d.ts +30 -18
  117. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  118. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  119. package/types/src/workbook/index.d.ts +1 -1
  120. package/node/esm/B0bdb_6p7fQI_ivo.mjs +0 -236
  121. package/node/esm/DatM6eEYPpAtIMy-.mjs +0 -405
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { t as e } from "./CSAnTp5rwId0DUb8.mjs";
7
+ import { t as e } from "./CKWeipCqqpLnLE5e.mjs";
8
8
  import { PresetChip as t } from "./index.mjs";
9
9
  import { externalBookFileName as n, externalBookLocation as r } from "@sheetxl/sdk";
10
10
  import { DynamicIcon as a, NotifierType as i, useNotifier as l, useTranslator as s } from "@sheetxl/utils-react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,489 @@
1
+ /**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { t as e } from "./CKWeipCqqpLnLE5e.mjs";
8
+ import { FormulaField as t, InputField as n, PresetChip as a, c as r } from "./index.mjs";
9
+ import { useModelSync as o, useWorkbook as i } from "@sheetxl/react";
10
+ import { DynamicIcon as d, NotifierType as l, useCallbackRef as s, useNotifier as m, useTranslator as c } from "@sheetxl/utils-react";
11
+ import { forwardRef as g, memo as u, useCallback as p, useEffect as h, useMemo as x, useState as f } from "react";
12
+ import { SimpleTooltip as b } from "@sheetxl/utils-mui";
13
+ import { Fragment as y, jsx as v, jsxs as C } from "react/jsx-runtime";
14
+ import { Box as k, Button as w, Checkbox as N, Chip as R, FormControlLabel as S, FormHelperText as T, MenuItem as E, Paper as I, TextField as L, Typography as O } from "@mui/material";
15
+ import { messageKey as P, t as z } from "@sheetxl/utils";
16
+ var W = (e) => "formula" === e.getType(), A = (e) => {
17
+ try {
18
+ return W(e) ? String(e.getValue() ?? "") : e.getRanges?.()?.toString() ?? "";
19
+ } catch (e) {
20
+ return "";
21
+ }
22
+ }, D = (e) => {
23
+ try {
24
+ return e.getRanges(e.getWorksheet().getSelectedRange()).getFixed(!0).toString();
25
+ } catch (e) {
26
+ return "";
27
+ }
28
+ }, F = (e, t) => t ? {
29
+ name: t.getName(),
30
+ expression: A(t),
31
+ scope: t.getScope(),
32
+ comment: t.getComment() ?? "",
33
+ hidden: t.isHidden(),
34
+ editable: W(t)
35
+ } : {
36
+ name: e.getNames().findValidName("Name"),
37
+ expression: D(e),
38
+ scope: null,
39
+ comment: "",
40
+ hidden: !1,
41
+ editable: !0
42
+ }, H = (e, t, n) => {
43
+ const a = t.name.trim(), r = t.expression.trim().replace(/^=\s*/, "").trim(), o = t.comment.trim(), i = t.scope || null;
44
+ if (!a) throw new Error(z("error.named.nameEmpty"));
45
+ if (!r) throw new Error(z("named.expressionRequired"));
46
+ if (null !== n) {
47
+ if (a.toLowerCase() !== n.getName().toLowerCase() && e.getNames().validateName(a, i ?? void 0), (n.getScope() ?? null) !== i) {
48
+ if (!t.editable || !n.delete) throw new Error(z("error.named.nameReadonly"));
49
+ const d = e.getTransactions().beginCommit({ description: z("op.updateNamed", { name: a }) });
50
+ try {
51
+ n.delete(), e.getCalculation().getNamedFormulas().add({
52
+ name: a,
53
+ expression: r,
54
+ scope: i,
55
+ comment: o || void 0,
56
+ hidden: t.hidden || void 0
57
+ }), d.commit();
58
+ } catch (e) {
59
+ throw d.rollback(), e;
60
+ }
61
+ return;
62
+ }
63
+ n.doBatch(() => {
64
+ a !== n.getName() && n.setName(a), t.editable && r !== A(n) && n.setExpression(r), (n.getComment() ?? "") !== o && n.setComment(o || null), n.isHidden() !== t.hidden && n.setHidden?.(t.hidden);
65
+ }, { description: z("op.updateNamed", { name: a }) });
66
+ } else e.getCalculation().getNamedFormulas().add({
67
+ name: a,
68
+ expression: r,
69
+ scope: i,
70
+ comment: o || void 0,
71
+ hidden: t.hidden || void 0
72
+ });
73
+ }, M = {
74
+ table: "Table",
75
+ range: "NamedRange",
76
+ formula: "Function"
77
+ }, j = {
78
+ table: P("named.kindTable"),
79
+ range: P("named.kindRange"),
80
+ formula: P("named.kindFormula")
81
+ }, q = (e) => {
82
+ if (!W(e)) return "table";
83
+ try {
84
+ return e.getRanges?.() ? "range" : "formula";
85
+ } catch (e) {
86
+ return "formula";
87
+ }
88
+ }, K = u((e) => {
89
+ const { kind: t, size: n = 28, ...r } = e, o = c();
90
+ return v(a, {
91
+ className: "sxl-named-kind-chip",
92
+ title: o(j[t]),
93
+ sx: {
94
+ width: "auto",
95
+ minWidth: 1.7 * n + "px",
96
+ height: `${n}px`,
97
+ color: "table" === t ? "primary.main" : "text.secondary"
98
+ },
99
+ ...r,
100
+ children: v(d, {
101
+ iconKey: M[t],
102
+ size: Math.round(.7 * n)
103
+ })
104
+ });
105
+ });
106
+ K.displayName = "NamedKindChip";
107
+ var B = "workbook", U = u((e) => {
108
+ const { draft: a, workbook: o } = e, i = c(), [d] = f(() => a.name), [l] = f(() => a.expression), [m, g] = f(null), [u, p] = f(() => a.scope), [h, b] = f(() => a.comment), [y, w] = f(() => a.hidden), [R, P] = f(() => a.editable ? ((e, t) => {
109
+ const n = t.trim().replace(/^=\s*/, "");
110
+ if (!n) return "formula";
111
+ try {
112
+ return e.createFormula(n, void 0, { target: "display" }).isReferenceOnly() ? "range" : "formula";
113
+ } catch (e) {
114
+ return "formula";
115
+ }
116
+ })(o, a.expression) : "table"), z = !a.editable, W = s((e) => {
117
+ e.trim().toLowerCase() !== d.toLowerCase() && o.getNames().validateName(e.trim(), u ?? void 0);
118
+ }, [
119
+ o,
120
+ d,
121
+ u
122
+ ]), A = x(() => {
123
+ try {
124
+ return o.getWorksheets().getItems().map((e) => e.getName());
125
+ } catch (e) {
126
+ return [];
127
+ }
128
+ }, [o]);
129
+ return v(I, {
130
+ tabIndex: 0,
131
+ className: r["editor-panel"],
132
+ sx: {
133
+ gap: (e) => e.spacing(1),
134
+ paddingTop: (e) => e.spacing(1.25),
135
+ paddingBottom: (e) => e.spacing(2),
136
+ paddingLeft: (e) => e.spacing(1.5),
137
+ paddingRight: (e) => e.spacing(1.5),
138
+ border: (e) => `1px solid ${e.palette.divider}`,
139
+ borderRadius: (e) => e.spacing(1.25),
140
+ overflow: "auto"
141
+ },
142
+ children: C(k, {
143
+ sx: {
144
+ display: "flex",
145
+ flexDirection: "column",
146
+ gap: (e) => e.spacing(2),
147
+ margin: (e) => e.spacing(1.25)
148
+ },
149
+ children: [
150
+ C(k, { children: [C(k, {
151
+ sx: {
152
+ display: "flex",
153
+ alignItems: "flex-end",
154
+ gap: (e) => e.spacing(1.5)
155
+ },
156
+ children: [v(K, {
157
+ kind: R,
158
+ size: 48
159
+ }), v(n, {
160
+ label: i("named.name"),
161
+ sx: {
162
+ flex: "1 1 auto",
163
+ minWidth: 0
164
+ },
165
+ helperText: null,
166
+ showError: !1,
167
+ onChangeError: g,
168
+ disabled: z,
169
+ value: d,
170
+ onValidate: W,
171
+ onChangeText: (e) => {
172
+ a.name = e;
173
+ }
174
+ })]
175
+ }), v(T, {
176
+ error: !!m,
177
+ sx: {
178
+ marginTop: (e) => e.spacing(.5),
179
+ marginX: "14px"
180
+ },
181
+ children: m ? i(m) : " "
182
+ })] }),
183
+ v(t, {
184
+ label: i("named.refersTo"),
185
+ value: l,
186
+ workbook: o,
187
+ disabled: z,
188
+ helperText: i("named.refersToHelp"),
189
+ equals: "required",
190
+ pickAs: "absolute",
191
+ onChangeText: (e) => {
192
+ a.expression = e;
193
+ },
194
+ onChangeInput: (e) => {
195
+ e && P(e.isReferenceOnly() ? "range" : "formula");
196
+ }
197
+ }),
198
+ C(L, {
199
+ label: i("named.scope"),
200
+ size: "small",
201
+ fullWidth: !0,
202
+ select: !0,
203
+ disabled: z,
204
+ value: u ?? B,
205
+ helperText: i("named.scopeHelp"),
206
+ onChange: (e) => {
207
+ const t = e.target.value === B ? null : e.target.value;
208
+ p(t), a.scope = t;
209
+ },
210
+ children: [v(E, {
211
+ value: B,
212
+ children: i("named.scopeWorkbook")
213
+ }), A.map((e) => v(E, {
214
+ value: e,
215
+ children: e
216
+ }, e))]
217
+ }),
218
+ v(L, {
219
+ label: i("named.comment"),
220
+ size: "small",
221
+ fullWidth: !0,
222
+ multiline: !0,
223
+ minRows: 2,
224
+ maxRows: 4,
225
+ disabled: z,
226
+ value: h,
227
+ onChange: (e) => {
228
+ b(e.target.value), a.comment = e.target.value;
229
+ }
230
+ }),
231
+ v(S, {
232
+ control: v(N, {
233
+ size: "small",
234
+ disabled: z,
235
+ checked: y,
236
+ onChange: (e) => {
237
+ w(e.target.checked), a.hidden = e.target.checked;
238
+ }
239
+ }),
240
+ label: v(O, {
241
+ variant: "body2",
242
+ children: i("named.hidden")
243
+ })
244
+ }),
245
+ v(O, {
246
+ variant: "caption",
247
+ sx: {
248
+ color: "text.secondary",
249
+ marginTop: "-12px"
250
+ },
251
+ children: i("named.hiddenHelp")
252
+ }),
253
+ z ? v(O, {
254
+ variant: "caption",
255
+ sx: {
256
+ color: "text.secondary",
257
+ fontStyle: "italic"
258
+ },
259
+ children: i("named.derivedReadOnly")
260
+ }) : null
261
+ ]
262
+ })
263
+ });
264
+ });
265
+ U.displayName = "NamedEditorPanel";
266
+ var V = u((e) => {
267
+ const { named: n, label: a, helperText: r } = e, d = c(), s = m(), g = i();
268
+ o(n, ["onAnyChange", "onRangesChange"]);
269
+ const u = W(n) && !n.isReadOnly() && (g?.getProtection().isStructureAllowed() ?? !0), h = p((e, t) => {
270
+ if ("accept" !== t.reason) return;
271
+ const a = e?.getExpression()?.trim();
272
+ if (a && a !== A(n)) try {
273
+ n.setExpression(a);
274
+ } catch (e) {
275
+ s.showMessage?.(e.message, { type: l.Error });
276
+ }
277
+ }, [n, s]);
278
+ return v(t, {
279
+ value: A(n),
280
+ equals: "required",
281
+ pickAs: "absolute",
282
+ changeOn: "done",
283
+ onDone: h,
284
+ label: void 0 === a ? d("named.refersTo") : a,
285
+ helperText: r,
286
+ disabled: !u
287
+ });
288
+ });
289
+ V.displayName = "NamedExpressionField";
290
+ var $ = /^_xlnm\./i, X = (e) => {
291
+ if (!e) return 0;
292
+ const t = e.getCoords();
293
+ let n = 0;
294
+ for (let a = 0; a < e.getCount(); a++) {
295
+ if (e.at(a).isINamedRange) {
296
+ n++;
297
+ continue;
298
+ }
299
+ const r = t[a];
300
+ n += (r.rowEnd - r.rowStart + 1) * (r.colEnd - r.colStart + 1);
301
+ }
302
+ return n;
303
+ }, _ = ({ item: e, workbook: t }) => {
304
+ const n = c(), a = ((e, t) => {
305
+ const [n, a] = f(null);
306
+ return h(() => {
307
+ const n = e;
308
+ if ("function" != typeof n.getDirectDependents) return;
309
+ let r = !0;
310
+ const o = () => {
311
+ n.getDirectDependents().then((e) => {
312
+ r && a(X(e));
313
+ }).catch(() => {});
314
+ };
315
+ o();
316
+ const i = t.getCalculation().addListeners({ onComplete: o }, { transactional: !1 });
317
+ return () => {
318
+ r = !1, i?.();
319
+ };
320
+ }, [e, t]), n;
321
+ })(e, t), r = e.getScope(), o = e.getComment(), i = null !== a && !$.test(e.getName()), d = [r ? n("named.scopedTo", { scope: r }) : n("named.scopeWorkbook")];
322
+ return e.isHidden() && d.push(n("named.hidden")), C(y, { children: [C(k, {
323
+ sx: {
324
+ display: "flex",
325
+ alignItems: "center",
326
+ gap: 1
327
+ },
328
+ children: [v(O, {
329
+ variant: "caption",
330
+ sx: {
331
+ flex: "1 1 auto",
332
+ color: (e) => e.palette.text.secondary
333
+ },
334
+ children: d.join(" · ")
335
+ }), i ? v(b, {
336
+ disableInteractive: !0,
337
+ title: n("named.references", { count: a }),
338
+ children: v(R, {
339
+ size: "small",
340
+ variant: "outlined",
341
+ label: a.toLocaleString(),
342
+ "aria-label": n("named.references", { count: a }),
343
+ sx: {
344
+ height: 20,
345
+ color: 0 === a ? "text.disabled" : void 0
346
+ }
347
+ })
348
+ }) : null]
349
+ }), o ? v(O, {
350
+ variant: "caption",
351
+ sx: {
352
+ color: (e) => e.palette.text.secondary,
353
+ fontStyle: "italic"
354
+ },
355
+ children: o
356
+ }) : null] });
357
+ }, G = u(g((t, n) => {
358
+ const { workbook: a, args: r, ...o } = t, i = c(), d = m(), s = ((e) => {
359
+ const [t, n] = f(0), [a, r] = f(0);
360
+ return h(() => {
361
+ const t = () => r((e) => e + 1), n = e.getNames().addListeners({
362
+ onCollectionChange: t,
363
+ onInvalidated: t
364
+ }, { transactional: !1 }), a = e.getCalculation().addListeners({ onComplete: t }, { transactional: !1 });
365
+ return () => {
366
+ n?.(), a?.();
367
+ };
368
+ }, [e]), h(() => {
369
+ if (!e.getProtection().isStructureAllowed()) return void n(0);
370
+ let t = !0;
371
+ return e.getNames().removeUnused({
372
+ hiddenOnly: !0,
373
+ dryRun: !0
374
+ }).then((e) => {
375
+ t && n(e);
376
+ }).catch(() => {}), () => {
377
+ t = !1;
378
+ };
379
+ }, [e, a]), {
380
+ count: t,
381
+ remove: p(async () => {
382
+ await e.getNames().removeUnused({ hiddenOnly: !0 });
383
+ }, [e])
384
+ };
385
+ })(a), g = x(() => ((e) => ({
386
+ key: "named",
387
+ messageKeys: {
388
+ none: P("named.none"),
389
+ addPrompt: P("named.addPrompt"),
390
+ heading: P("named.heading"),
391
+ insert: P("named.insert"),
392
+ new: P("named.new"),
393
+ edit: P("named.edit"),
394
+ delete: P("named.delete"),
395
+ cancel: P("named.cancel"),
396
+ save: P("named.save"),
397
+ search: P("named.search"),
398
+ clearSearch: P("named.clearSearch"),
399
+ noMatches: P("named.noMatches")
400
+ },
401
+ getItems: (e) => e.getNames().getItems(),
402
+ subscribe: (e, t) => {
403
+ const n = e.getNames().addListeners({
404
+ onCollectionChange: () => t.onChange(),
405
+ onInvalidated: () => t.onChange()
406
+ }, { transactional: !1 }), a = e.addListeners({
407
+ onSheetsChange: () => t.onChange(),
408
+ onProtectionChange: () => t.onChange()
409
+ }, { transactional: !1 });
410
+ return () => {
411
+ n?.(), a?.();
412
+ };
413
+ },
414
+ isReadOnly: (e) => !e.getProtection().isStructureAllowed(),
415
+ isItemReadOnly: (e, t) => !t.getProtection().isStructureAllowed() || "table" === q(e) || e.isReadOnly(),
416
+ getItemKey: (e) => e.getId(),
417
+ subscribeItem: (e, t) => e.addListeners({
418
+ onAnyChange: () => t(),
419
+ onInvalidated: () => t()
420
+ }, { transactional: !1 }),
421
+ createDraft: F,
422
+ save: H,
423
+ delete: (e) => {
424
+ e.delete?.();
425
+ },
426
+ select: (e) => {
427
+ Promise.resolve(e.select()).catch(() => {});
428
+ },
429
+ getSearchText: (e, t) => [
430
+ e.getName(),
431
+ A(e),
432
+ e.getScope() ?? t("named.scopeWorkbook"),
433
+ e.getComment() ?? ""
434
+ ].join("\n"),
435
+ getCardTitle: (e) => e.getName(),
436
+ CardMedia: ({ item: e }) => v(K, {
437
+ kind: q(e),
438
+ size: 32
439
+ }),
440
+ CardSubtitle: ({ item: e }) => v(V, {
441
+ named: e,
442
+ label: null,
443
+ helperText: null
444
+ }),
445
+ CardBody: (t) => v(_, {
446
+ ...t,
447
+ workbook: e
448
+ }),
449
+ EditorBody: ({ draft: e, workbook: t }) => v(U, {
450
+ draft: e,
451
+ workbook: t
452
+ })
453
+ }))(a), [a]), u = x(() => 0 === s.count ? null : v(w, {
454
+ size: "small",
455
+ sx: {
456
+ textTransform: "none",
457
+ width: "100%"
458
+ },
459
+ onClick: () => {
460
+ s.remove().catch((e) => {
461
+ d.showMessage?.(e.message, { type: l.Error });
462
+ });
463
+ },
464
+ children: i("named.removeUnusedHidden", { count: s.count })
465
+ }), [
466
+ s,
467
+ d,
468
+ i
469
+ ]);
470
+ return v(e, {
471
+ ref: n,
472
+ workbook: a,
473
+ descriptor: g,
474
+ args: r,
475
+ footer: u,
476
+ ...o
477
+ });
478
+ }));
479
+ G.displayName = "NamedDetailsPanel";
480
+ var J = (e) => {
481
+ const { model: t, entryKey: n, frame: a, args: r, ref: o, ...i } = e;
482
+ return v(G, {
483
+ ref: o,
484
+ workbook: t,
485
+ args: r,
486
+ ...i
487
+ });
488
+ };
489
+ export { J as NamedDetailsTaskPane };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,16 +1,16 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { BorderStylePopupButton as e, BorderTemplateIcon as t, ColorCommandButton as o, ColorPopupButton as r, E as n, FontFamilyCommandButton as a, FontSizeCommandButton as l, NumberFormatOption as i, numberFormatCategoryLabel as d } from "./index.mjs";
8
- import { a as s, c, i as m, n as g, o as p, r as u, s as h, t as b } from "./BR45ogAR-hY2bE60.mjs";
7
+ import { BorderStylePopupButton as e, BorderTemplateIcon as t, ColorCommandButton as o, ColorPopupButton as r, FontFamilyCommandButton as n, FontSizeCommandButton as a, NumberFormatOption as l, S as i, numberFormatCategoryLabel as d } from "./index.mjs";
8
+ import { a as s, c, i as m, n as g, o as p, r as u, s as h, t as b } from "./gPYAb_A0T5ZwcQ1E.mjs";
9
9
  import { IBorders as f, IRange as y, NumberFormat as x } from "@sheetxl/sdk";
10
10
  import { StaticBorderRenderer as S, StaticCellRenderer as v, useGridColorScheme as E, useModelListener as w, useModelSync as T } from "@sheetxl/react";
11
11
  import { DynamicIcon as K, useCallbackRef as C, useCommands as F, usePersistentState as k, useTranslator as A } from "@sheetxl/utils-react";
12
12
  import { forwardRef as O, memo as N, useCallback as z, useEffect as R, useMemo as B, useReducer as P, useRef as I, useState as M } from "react";
13
- import { CommandButton as H, ExhibitIconButton as V, ExhibitMenuItem as L, ExhibitPopupIconButton as U, PopupButtonType as $, SelectedIcon as j, defaultCreatePopupPanel as W } from "@sheetxl/utils-mui";
13
+ import { CommandButton as H, ExhibitIconButton as V, ExhibitMenuItem as L, ExhibitPopupIconButton as U, PopupButtonType as $, SelectedIcon as j, defaultRenderPopupPanel as W } from "@sheetxl/utils-mui";
14
14
  import { Fragment as _, jsx as G, jsxs as Y } from "react/jsx-runtime";
15
15
  import { Box as q, Checkbox as Q, FormControl as J, FormControlLabel as Z, InputLabel as X, List as ee, ListItemButton as te, ListItemText as oe, MenuItem as re, Paper as ne, Select as ae, Tab as le, Tabs as ie, TextField as de, Typography as se, alpha as ce } from "@mui/material";
16
16
  import { messageKey as me } from "@sheetxl/utils";
@@ -95,11 +95,11 @@ function Se(e, t, o) {
95
95
  }
96
96
  }
97
97
  var ve = N(O((e, t) => {
98
- const { value: o, onChange: r, context: a, onCommit: l, hideSample: s = !1, showQuickFormats: c = !1, disabled: g = !1, className: u, onKeyDown: b, ...f } = e, y = A(), [S, v] = M(() => he.parse(o));
98
+ const { value: o, onChange: r, context: n, onCommit: a, hideSample: s = !1, showQuickFormats: c = !1, disabled: g = !1, className: u, onKeyDown: b, ...f } = e, y = A(), [S, v] = M(() => he.parse(o));
99
99
  R(() => {
100
100
  he.build(S) !== o && v(he.parse(o));
101
101
  }, [o]);
102
- const E = a?.() ?? null, w = C((e) => {
102
+ const E = n?.() ?? null, w = C((e) => {
103
103
  v(e), r(he.build(e));
104
104
  }, [r]), T = C((e) => {
105
105
  w({
@@ -118,9 +118,9 @@ var ve = N(O((e, t) => {
118
118
  }, [S.category, w]), k = C((e) => {
119
119
  if (b?.(e), "Enter" === e.key) {
120
120
  if (e.target.closest("[role=\"combobox\"], [role=\"menuitem\"]")) return;
121
- e.preventDefault(), e.stopPropagation(), l?.();
121
+ e.preventDefault(), e.stopPropagation(), a?.();
122
122
  }
123
- }, [b, l]), D = (e, t, o) => (r) => {
123
+ }, [b, a]), D = (e, t, o) => (r) => {
124
124
  let n = t;
125
125
  switch (r.key) {
126
126
  case "ArrowDown":
@@ -368,7 +368,7 @@ var ve = N(O((e, t) => {
368
368
  },
369
369
  children: z || " "
370
370
  })] }),
371
- c ? G(n, {
371
+ c ? G(i, {
372
372
  disabled: g,
373
373
  sx: {
374
374
  justifyContent: "flex-start",
@@ -382,7 +382,7 @@ var ve = N(O((e, t) => {
382
382
  outlined: !0,
383
383
  disabled: g,
384
384
  sx: { width: "100%" },
385
- createPopupPanel: (e) => {
385
+ renderPopupPanel: (e) => {
386
386
  const { closeFloatAll: t } = e, r = he.CATEGORIES.map((e) => {
387
387
  const r = e === O, n = () => {
388
388
  ((e) => {
@@ -405,7 +405,7 @@ var ve = N(O((e, t) => {
405
405
  onKeyDown: (e) => {
406
406
  "Enter" !== e.key && " " !== e.key || n();
407
407
  },
408
- children: G(i, {
408
+ children: G(l, {
409
409
  label: d(y, e),
410
410
  sample: (a = e, "Custom" === a && a !== O ? "" : Se(a === O ? o : he.defaultCodeForCategory(a), xe(a, E, y("numberFormat.sampleText")), E))
411
411
  })
@@ -672,15 +672,15 @@ var Ee = {
672
672
  });
673
673
  Ke.displayName = "AlignmentPanel";
674
674
  var Ce = N((e) => {
675
- const { selection: t, disabled: r, className: n, ...i } = e, d = A(), m = r || t.disabled;
675
+ const { selection: t, disabled: r, className: l, ...i } = e, d = A(), m = r || t.disabled;
676
676
  return Y(q, {
677
- className: ge("sxl-format-font-panel", n),
677
+ className: ge("sxl-format-font-panel", l),
678
678
  sx: c,
679
679
  ...i,
680
680
  children: [
681
681
  G(p, {
682
682
  label: d("format.fontFamily"),
683
- children: G(a, {
683
+ children: G(n, {
684
684
  commandKey: "formatFontFamily",
685
685
  disabled: m,
686
686
  sx: { width: "100%" }
@@ -689,7 +689,7 @@ var Ce = N((e) => {
689
689
  G(p, {
690
690
  label: d("format.fontSize"),
691
691
  children: Y(s, { children: [
692
- G(l, {
692
+ G(a, {
693
693
  commandKey: "formatFontSize",
694
694
  disabled: m,
695
695
  sx: { width: 96 }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.12
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { PresetChip as a, c as e, f as t, o as i, s as l } from "./index.mjs";
8
- import { n as o, t as n } from "./BNg4QQY0WAPLE0q7.mjs";
7
+ import { PresetChip as a, c as e, i as t, n as i, r as l } from "./index.mjs";
8
+ import { n as o, t as n } from "./BalROFG_oa9PFs9Q.mjs";
9
9
  import { ICondition as r, IDataValidation as d } from "@sheetxl/sdk";
10
10
  import { useModelSync as s } from "@sheetxl/react";
11
11
  import { DynamicIcon as p, useTranslator as m } from "@sheetxl/utils-react";
@@ -71,7 +71,7 @@ var B = (a, e) => {
71
71
  s(o, "onAnyChange");
72
72
  const d = o.isProtected(), g = o.getRenderHints().includes("list"), [c, P] = u("rule"), T = V(w, {
73
73
  tabIndex: 0,
74
- className: t["editor-panel"],
74
+ className: e["editor-panel"],
75
75
  sx: {
76
76
  gap: (a) => a.spacing(1),
77
77
  paddingTop: (a) => a.spacing(1.25),
@@ -278,7 +278,7 @@ var B = (a, e) => {
278
278
  })] })
279
279
  ]
280
280
  });
281
- return x(e.Provider, {
281
+ return x(t.Provider, {
282
282
  value: o,
283
283
  children: T
284
284
  });