@sheetxl/studio-mui 0.4.20 → 0.4.22

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 (98) hide show
  1. package/browser/cjs/2d2J6QkipnGWfI99.cjs +6 -0
  2. package/browser/cjs/BY09bxecVOSMwQA3.cjs +6 -0
  3. package/browser/cjs/BYJI3FMxQ-z5UGsU.cjs +6 -0
  4. package/browser/cjs/B_nvuo0kEXu5G0Gf.cjs +7 -0
  5. package/browser/cjs/BfnxiVEhzO5reOYH.cjs +42 -0
  6. package/browser/cjs/Bil3fXnJ3lk7aGF5.cjs +6 -0
  7. package/browser/cjs/{DItuuqkIamMzp7Im.cjs → BzbKSVugPof6dqQI.cjs} +1 -1
  8. package/browser/cjs/CU0utErelA1oX0n8.cjs +6 -0
  9. package/browser/cjs/CWp8_mrz0htdOXMM.cjs +20 -0
  10. package/browser/cjs/D2Cp7gwb6bRupSZY.cjs +6 -0
  11. package/browser/cjs/DC70SHoaPVkOUEHx.cjs +6 -0
  12. package/browser/cjs/DRUx3PLS_NrkJ6Yw.cjs +18 -0
  13. package/browser/cjs/index.cjs +2 -2
  14. package/browser/esm/-0XEuwqNVFTlDKEX.mjs +25 -0
  15. package/browser/esm/-AR3L_VjwMbtQVbL.mjs +62 -0
  16. package/browser/esm/BLhZj1SgWlsmeviw.mjs +4443 -0
  17. package/browser/esm/{BW3_mz5_8i9VLBYB.mjs → BXNl9EEQzO53Hoh5.mjs} +87 -85
  18. package/browser/esm/BqnVpwK0Q2fKGA2S.mjs +53 -0
  19. package/browser/esm/D4rFOqwrrtVMpgbc.mjs +49 -0
  20. package/browser/esm/DEbllEGmvtLkCug_.mjs +2156 -0
  21. package/browser/esm/{C60ZnLCvtztDLuoT.mjs → DXRFs7VZM4IShMju.mjs} +100 -98
  22. package/browser/esm/{C5xUbwpUPDeNua-i.mjs → DeGATuYv4-5bhQcD.mjs} +1 -1
  23. package/browser/esm/{5u-JEG1IfQBstjq0.mjs → EMqbYi0X_krk5yOL.mjs} +11 -10
  24. package/browser/esm/fWsCG2WBM3kCpC5p.mjs +46 -0
  25. package/browser/esm/index.mjs +29 -29
  26. package/browser/esm/{CxXpPYi4eOFhBNt2.mjs → pARZF2O230qNvxWd.mjs} +27 -26
  27. package/licenses/dependencies.txt +0 -271
  28. package/node/esm/{D6A_o47zvz5ITIJK.mjs → 0JTY0jNrXiIiOqWY.mjs} +79 -78
  29. package/node/esm/{Ds5dinNcyNdC8ta6.mjs → BqQ6JNhQ1K321g9U.mjs} +13 -11
  30. package/node/esm/{CrDbLKJh9omVo_TF.mjs → Bu58psaOsDy_zPOJ.mjs} +29 -28
  31. package/node/esm/BzBHqe1ThbCP-l_d.mjs +88 -0
  32. package/node/esm/CE_I2ijQF8MeexHD.mjs +63 -0
  33. package/node/esm/{Bv12-Yyv0C86Iquy.mjs → CuomeW-4DDc1ywFW.mjs} +7 -6
  34. package/node/esm/DRt8kMDuCJn53CIE.mjs +46 -0
  35. package/node/esm/{CH6p2H0CMCoz4NgJ.mjs → DgHCTCARk1Gv_msN.mjs} +23 -22
  36. package/node/esm/{Bn5TJPQAEMY-lGpF.mjs → Do7y7aKPA48-93AV.mjs} +4 -3
  37. package/node/esm/{rlqvGCJlj4a2UcSM.mjs → X11ONmg6R1Y6hfue.mjs} +11 -10
  38. package/node/esm/index.mjs +2381 -18514
  39. package/package.json +8 -8
  40. package/browser/cjs/-Z37a-mzY5SKXy--.cjs +0 -6
  41. package/browser/cjs/B384kb1_rsiCsdZG.cjs +0 -6
  42. package/browser/cjs/B8nWvy4zDv1CZsr_.cjs +0 -110
  43. package/browser/cjs/BBnMJiXp9lru0Rcq.cjs +0 -6
  44. package/browser/cjs/BFbHTu65n1oE-l0N.cjs +0 -6
  45. package/browser/cjs/BQMSHnQdWtqeakER.cjs +0 -6
  46. package/browser/cjs/BvjA0ybox6653eb5.cjs +0 -6
  47. package/browser/cjs/Cocgl4ghzWE9yVYS.cjs +0 -161
  48. package/browser/cjs/D21Q1NdM1zQ7uFlH.cjs +0 -6
  49. package/browser/cjs/D4LmaKqYiwjxp0Hs.cjs +0 -15
  50. package/browser/cjs/D6egUillMqBwTaEq.cjs +0 -6
  51. package/browser/cjs/D9lY6pd9tRxPeLKs.cjs +0 -18
  52. package/browser/cjs/DNqIYSqRYZkUpFxW.cjs +0 -7
  53. package/browser/cjs/DUImSlPsM-OipgBZ.cjs +0 -6
  54. package/browser/cjs/DUVLcBcwkTsuLb6q.cjs +0 -6
  55. package/browser/cjs/Db7IyKXFzo8IocDa.cjs +0 -145
  56. package/browser/cjs/DsHPj69dMFG09uD_.cjs +0 -16
  57. package/browser/cjs/DypblOPNMRx5Twgx.cjs +0 -12
  58. package/browser/cjs/QK7YNBstmN86K-xL.cjs +0 -6
  59. package/browser/cjs/VNWvn2kP6ZF0Snzw.cjs +0 -11
  60. package/browser/cjs/dc1YAArM3bSHvRcF.cjs +0 -7
  61. package/browser/cjs/mInXvB8P6r6q7pRY.cjs +0 -11
  62. package/browser/cjs/nop6N-Oi_LKy1Bpc.cjs +0 -42
  63. package/browser/cjs/s45oNHeIvJVeRjn5.cjs +0 -6
  64. package/browser/esm/1y10o01h14oGJtKG.mjs +0 -43
  65. package/browser/esm/BFpc8KBa-fb0nLSt.mjs +0 -46
  66. package/browser/esm/Bmjhrc6YMmfx_1Yi.mjs +0 -1703
  67. package/browser/esm/BnlJVFlQeWerd3KW.mjs +0 -3803
  68. package/browser/esm/BpuH_QvBidPOXgAR.mjs +0 -392
  69. package/browser/esm/CAiWSkkPRgUjk8CN.mjs +0 -424
  70. package/browser/esm/CW8taieVozHhyBOC.mjs +0 -1467
  71. package/browser/esm/CzyEerZmfWrW3i3U.mjs +0 -59
  72. package/browser/esm/D0FBHwm0Oz_wf0tR.mjs +0 -12
  73. package/browser/esm/DM9GPrZpbCcKOnyU.mjs +0 -1352
  74. package/browser/esm/DO1doKZhwYiL7vbF.mjs +0 -1672
  75. package/browser/esm/DS3anstzAV3EJBRw.mjs +0 -84
  76. package/browser/esm/DuEmdSQsXlkCWZIB.mjs +0 -1366
  77. package/browser/esm/FvK-pQsicRjtrKoS.mjs +0 -48
  78. package/browser/esm/KCTJzQeDChqf1yBO.mjs +0 -52
  79. package/browser/esm/P-3pIbidOtRCNsw3.mjs +0 -23
  80. package/browser/esm/W3EFMOPLR1aNXWvF.mjs +0 -2250
  81. package/browser/esm/Z_Sh-N3xHHWLCbEw.mjs +0 -23412
  82. package/browser/esm/mOmzoYDWAtgYndCA.mjs +0 -13391
  83. package/browser/esm/tnJECoiQzUzgUQZE.mjs +0 -44
  84. package/node/esm/54SjtcD6mOreKcCy.mjs +0 -1719
  85. package/node/esm/B2BlMiDOVpIp1FDQ.mjs +0 -1706
  86. package/node/esm/BNEvR1srnnwBgnrF.mjs +0 -1479
  87. package/node/esm/BZ20_F64yjZgn-_G.mjs +0 -1246
  88. package/node/esm/BfzRLuswtxg9uDsX.mjs +0 -78
  89. package/node/esm/C0ZBbkFa-24tJTnw.mjs +0 -60
  90. package/node/esm/CEVO60fX3MAPG0Hg.mjs +0 -1378
  91. package/node/esm/CdFmhVFplZFgBvTo.mjs +0 -44
  92. package/node/esm/Cx4mn0YEVkG-M1VL.mjs +0 -553
  93. package/node/esm/DDWek3aquTe_okr_.mjs +0 -392
  94. package/node/esm/DSLWcwr4qgHARs36.mjs +0 -13464
  95. package/node/esm/iXG86MN0JrtJkpqe.mjs +0 -44
  96. package/node/esm/m2teXjBzZLfLDFPx.mjs +0 -46
  97. package/node/esm/oykDy4erHC0NNHHq.mjs +0 -3776
  98. package/node/esm/sVOd1y3oNBREsKJ7.mjs +0 -86
@@ -1,153 +1,155 @@
1
1
  import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
2
  import { memo as ie, useRef as C, useState as b, useEffect as D, useLayoutEffect as ce, useMemo as pe } from "react";
3
+ import { alpha as I, getOverlayAlpha as k } from "@mui/material/styles";
3
4
  import { DialogContent as de, Box as O, TextField as Z, InputAdornment as ue, Collapse as _, MenuItem as fe, FormControl as ge, InputLabel as me, Select as xe } from "@mui/material";
4
5
  import { ArrowBack as he, ArrowUpward as Oe, ArrowForward as Ce, ArrowDownward as ye } from "@mui/icons-material";
5
6
  import { ICell as c, IRange as R } from "@sheetxl/sdk";
6
- import { T as W, a as be, u as Te, j as ve, b as m, w as x, I as Re, c as y, d as ke, F as we, $ as Fe, W as Ie, g as k, f as Se, B as Ee, P as De } from "./Z_Sh-N3xHHWLCbEw.mjs";
7
- import { alpha as w } from "@mui/system";
7
+ import { useCallbackRef as $, KeyCodes as be, KeyModifiers as y } from "@sheetxl/utils-react";
8
+ import { InternalWindow as Te, ExhibitOptionButton as m, themeIcon as x, FindOptionsIcon as ve, FindReplaceToggleIcon as Re, FindCaseSensitiveIcon as Ie, FindWholeWordIcon as ke, FindRegExIcon as Fe, FindReplaceIcon as we, FindReplaceAllIcon as Ee, ExhibitDivider as Se } from "@sheetxl/utils-mui";
9
+ import { u as De } from "./BLhZj1SgWlsmeviw.mjs";
8
10
  /**
9
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
11
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
10
12
  *
11
13
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
14
  * License: The license can be found at https://www.sheetxl.com/license.
13
15
  */
14
16
  const L = ie((F) => {
15
- const { label: h, value: a, options: s, onSelect: d, tabIndex: T = 0, ...P } = F, [A, v] = b(() => ne(a, s));
17
+ const { label: h, value: a, options: l, onSelect: d, tabIndex: T = 0, ...A } = F, [K, v] = b(() => te(a, l));
16
18
  D(() => {
17
- v(ne(a, s));
18
- }, [a, s]);
19
- const K = W((u) => {
20
- v(u.target.value), d?.(s[u.target.value]);
21
- }, [d, s]), l = pe(() => Object.keys(s).map((u) => i(fe, { value: u, children: u }, u)), [s]);
22
- return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value: A, label: h, onChange: K, sx: { backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, ...P, children: l })] });
23
- }), ee = { Workbook: "workbook", Sheet: "sheet" }, te = { enter: 140, exit: 140 }, oe = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, se = { ...oe };
24
- delete se.Values;
25
- const Pe = { "By Rows": !0, "By Columns": !1 }, ne = (F, h) => {
19
+ v(te(a, l));
20
+ }, [a, l]);
21
+ const P = $((u) => {
22
+ v(u.target.value), d?.(l[u.target.value]);
23
+ }, [d, l]), s = pe(() => Object.keys(l).map((u) => i(fe, { value: u, children: u }, u)), [l]);
24
+ return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value: K, label: h, onChange: P, sx: { backgroundImage: `linear-gradient(${I("#fff", k(5))}, ${I("#fff", k(5))})` }, ...A, children: s })] });
25
+ }), ee = { Workbook: "workbook", Sheet: "sheet" }, ne = { enter: 140, exit: 140 }, oe = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, le = { ...oe };
26
+ delete le.Values;
27
+ const Ae = { "By Rows": !0, "By Columns": !1 }, te = (F, h) => {
26
28
  const a = Object.keys(h);
27
- for (let s = 0; s < a.length; s++) {
28
- const d = a[s];
29
+ for (let l = 0; l < a.length; l++) {
30
+ const d = a[l];
29
31
  if (h[d] === F) return d;
30
32
  }
31
- }, je = ie((F) => {
32
- const { replace: h = !1, findText: a, replaceText: s, findOptions: d, replaceOptions: T, title: P, onHide: A, onFindOrReplace: v, ...K } = F, l = C(null), u = C(null), j = C(null), V = C(null), N = C(null), H = C(null), z = (e, t) => {
33
- t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
34
- }, [U, E] = b(!1), [B, le] = b(!1), [f, M] = b(h), [X, $] = b(!1), [G, q] = b(!1), [o, r] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: ee.Sheet }), I = W(async (e, t, n, S) => {
33
+ }, Ne = ie((F) => {
34
+ const { replace: h = !1, findText: a, replaceText: l, findOptions: d, replaceOptions: T, title: A, onHide: K, onFindOrReplace: v, ...P } = F, s = C(null), u = C(null), V = C(null), j = C(null), N = C(null), H = C(null), z = (e, n) => {
35
+ n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
36
+ }, [U, S] = b(!1), [M, se] = b(!1), [f, B] = b(h), [X, W] = b(!1), [G, q] = b(!1), [o, r] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: ee.Sheet }), w = $(async (e, n, t, E) => {
35
37
  if (!v) return;
36
38
  const g = { ...o };
37
- g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = n ? void 0 : 1, g.replace = t, t && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
38
- const ae = await v({ autoFocus: S, ...g });
39
- $(ae === 0);
39
+ g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = t ? void 0 : 1, g.replace = n, n && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
40
+ const ae = await v({ autoFocus: E, ...g });
41
+ W(ae === 0);
40
42
  }, [o, v]);
41
43
  D(() => {
42
- $(!1);
43
- }, [o, B, f]);
44
- const J = W((e, t) => {
44
+ W(!1);
45
+ }, [o, M, f]);
46
+ const J = $((e, n) => {
45
47
  if (e.keyCode === be.Enter) {
46
48
  if (!o.findText) return;
47
- let n = !0, S = !1;
48
- e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (S = !0), z(e, S ? H.current : N.current)) : z(e, n ? V.current : j.current), I(n, t, S, !1);
49
+ let t = !0, E = !1;
50
+ e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (E = !0), z(e, E ? H.current : N.current)) : z(e, t ? j.current : V.current), w(t, n, E, !1);
49
51
  }
50
52
  }, [o]), Q = C(null);
51
53
  ce(() => {
52
54
  r((e) => {
53
- const t = { ...e };
54
- t.findText = a && a.length > 0 ? a : e.findText ?? "", E(!0), s !== void 0 && (t.replaceText = s), d && (t.findOptions = { ...t.findOptions, ...d }), t.replaceText || (t.replaceText = ""), t.replaceOptions && (t.replaceOptions = { ...t.replaceOptions }), T && (t.replaceOptions = { ...t.replaceOptions, ...T }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
55
- const n = !(!T && s === void 0);
56
- return n && M(n), t;
55
+ const n = { ...e };
56
+ n.findText = a && a.length > 0 ? a : e.findText ?? "", S(!0), l !== void 0 && (n.replaceText = l), d && (n.findOptions = { ...n.findOptions, ...d }), n.replaceText || (n.replaceText = ""), n.replaceOptions && (n.replaceOptions = { ...n.replaceOptions }), T && (n.replaceOptions = { ...n.replaceOptions, ...T }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
57
+ const t = !(!T && l === void 0);
58
+ return t && B(t), n;
57
59
  }), G || Q.current?.focus();
58
- }, [a, s, d, T]), D(() => {
59
- f ? (o.findOptions.fields[0], c.Content.Values) : E(!0);
60
+ }, [a, l, d, T]), D(() => {
61
+ f ? (o.findOptions.fields[0], c.Content.Values) : S(!0);
60
62
  }, [f]), D(() => {
61
- if (U && l.current && o.findText === l.current.value) return l.current === document.activeElement || l.current.contains(document.activeElement) ? (l.current?.select(), void E(!1)) : void l.current.addEventListener("focus", () => {
62
- l.current?.select(), E(!1);
63
+ if (U && s.current && o.findText === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void S(!1)) : void s.current.addEventListener("focus", () => {
64
+ s.current?.select(), S(!1);
63
65
  }, { once: !0 });
64
66
  }, [U, o]);
65
- const [re, { width: Y }] = Te();
66
- return i(ve, { ref: Q, title: P ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: A, onFocus: () => q(!0), onBlur: () => {
67
- q(!1), $(!1);
68
- }, PaperProps: { elevation: G ? 3 : 1 }, ...K, children: p(de, { dividers: !0, ref: re, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
69
- if (e.key === "h" && e.ctrlKey) M(!0), l.current?.contains(document.activeElement) && u.current?.focus();
70
- else if (e.key === "f" && e.ctrlKey) l.current?.focus();
71
- else if (e.key === "c" && e.altKey) r((t) => {
72
- const n = { ...t };
73
- return n.findOptions.matchCase = !t.findOptions.matchCase, n;
67
+ const [re, { width: Y }] = De();
68
+ return i(Te, { ref: Q, title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: K, onFocus: () => q(!0), onBlur: () => {
69
+ q(!1), W(!1);
70
+ }, PaperProps: { elevation: G ? 3 : 1 }, ...P, children: p(de, { dividers: !0, ref: re, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
71
+ if (e.key === "h" && e.ctrlKey) B(!0), s.current?.contains(document.activeElement) && u.current?.focus();
72
+ else if (e.key === "f" && e.ctrlKey) s.current?.focus();
73
+ else if (e.key === "c" && e.altKey) r((n) => {
74
+ const t = { ...n };
75
+ return t.findOptions.matchCase = !n.findOptions.matchCase, t;
74
76
  });
75
- else if (e.key === "e" && e.altKey) r((t) => {
76
- const n = { ...t };
77
- return n.findOptions.matchEntireCell = !t.findOptions.matchEntireCell, n;
77
+ else if (e.key === "e" && e.altKey) r((n) => {
78
+ const t = { ...n };
79
+ return t.findOptions.matchEntireCell = !n.findOptions.matchEntireCell, t;
78
80
  });
79
81
  else {
80
82
  if (e.key !== "r" || !e.altKey) return;
81
- r((t) => {
82
- const n = { ...t };
83
- return n.findOptions.useRegex = !t.findOptions.useRegex, n;
83
+ r((n) => {
84
+ const t = { ...n };
85
+ return t.findOptions.useRegex = !n.findOptions.useRegex, t;
84
86
  });
85
87
  }
86
88
  e.preventDefault();
87
- }, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: B, onSelectToggle: (e) => {
88
- le(e);
89
- }, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(Re, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
90
- M(e);
91
- }, preventFocus: !0, label: "Toggle Replace", icon: x(i(ke, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(Z, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Y > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, inputProps: { draggable: !1, ref: l, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(ue, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
92
- r((t) => {
93
- const n = { ...t };
94
- return n.findOptions.matchCase = e, n;
89
+ }, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(m, { selected: M, onSelectToggle: (e) => {
90
+ se(e);
91
+ }, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(ve, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
92
+ B(e);
93
+ }, preventFocus: !0, label: "Toggle Replace", icon: x(i(Re, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(Z, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Y > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${I("#fff", k(5))}, ${I("#fff", k(5))})` }, inputProps: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(ue, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
94
+ r((n) => {
95
+ const t = { ...n };
96
+ return t.findOptions.matchCase = e, t;
95
97
  });
96
- }, label: "Match Case", shortcut: { key: "C", modifiers: [y.Alt] }, icon: x(i(we, {})) }), i(m, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
97
- r((t) => {
98
- const n = { ...t };
99
- return n.findOptions.matchEntireCell = e, n;
98
+ }, label: "Match Case", shortcut: { key: "C", modifiers: [y.Alt] }, icon: x(i(Ie, {})) }), i(m, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
99
+ r((n) => {
100
+ const t = { ...n };
101
+ return t.findOptions.matchEntireCell = e, t;
100
102
  });
101
- }, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(Fe, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
102
- r((t) => {
103
- const n = { ...t };
104
- return n.findOptions.useRegex = e, n;
103
+ }, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(ke, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
104
+ r((n) => {
105
+ const t = { ...n };
106
+ return t.findOptions.useRegex = e, t;
105
107
  });
106
- }, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(Ie, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => X ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => X ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
107
- r((t) => {
108
- const n = { ...t };
109
- return n.findText = e.target.value, n;
108
+ }, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(Fe, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => X ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => X ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
109
+ r((n) => {
110
+ const t = { ...n };
111
+ return t.findText = e.target.value, t;
110
112
  });
111
113
  }, onKeyDown: (e) => J(e, !1), onContextMenu: (e) => {
112
114
  e.stopPropagation();
113
115
  } }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
114
- I(!1, !1);
115
- }, touchRippleRef: j, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(he, {}) : i(Oe, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
116
- I(!0, !1);
117
- }, touchRippleRef: V, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Ce, {}) : i(ye, {})), disabled: !o.findText })] }), i(_, { in: f, timeout: te, onExit: () => {
118
- l.current?.focus();
119
- }, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Z, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${w("#fff", k(5))}, ${w("#fff", k(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
120
- r((t) => {
121
- const n = { ...t };
122
- return n.replaceText = e.target.value, n;
116
+ w(!1, !1);
117
+ }, touchRippleRef: V, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(he, {}) : i(Oe, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
118
+ w(!0, !1);
119
+ }, touchRippleRef: j, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Ce, {}) : i(ye, {})), disabled: !o.findText })] }), i(_, { in: f, timeout: ne, onExit: () => {
120
+ s.current?.focus();
121
+ }, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Z, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${I("#fff", k(5))}, ${I("#fff", k(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
122
+ r((n) => {
123
+ const t = { ...n };
124
+ return t.replaceText = e.target.value, t;
123
125
  });
124
126
  }, onKeyDown: (e) => J(e, !0), onContextMenu: (e) => {
125
127
  e.stopPropagation();
126
128
  } }), i(m, { onSelectToggle: (e) => {
127
- I(!0, !0);
128
- }, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(Se, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
129
- I(!0, !0, !0);
130
- }, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Ee, {})), disabled: !o.findText })] }) })] })] }), i(_, { in: B, timeout: te, onExit: () => {
131
- l.current?.focus();
132
- }, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(De, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Y >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(L, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
133
- r((t) => {
134
- const n = { ...t };
135
- return n.scope = e, n;
129
+ w(!0, !0);
130
+ }, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(we, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
131
+ w(!0, !0, !0);
132
+ }, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Ee, {})), disabled: !o.findText })] }) })] })] }), i(_, { in: M, timeout: ne, onExit: () => {
133
+ s.current?.focus();
134
+ }, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(Se, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Y >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(L, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
135
+ r((n) => {
136
+ const t = { ...n };
137
+ return t.scope = e, t;
136
138
  });
137
- } }), i(L, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Pe, onSelect: (e) => {
138
- r((t) => {
139
- const n = { ...t };
140
- return n.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, n;
139
+ } }), i(L, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Ae, onSelect: (e) => {
140
+ r((n) => {
141
+ const t = { ...n };
142
+ return t.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, t;
141
143
  });
142
- } }), i(L, { label: "Look in", value: f && o.findOptions.fields?.[0] === c.Content.Values ? c.Content.Formulas : o.findOptions.fields?.[0], options: f ? se : oe, onSelect: (e) => {
143
- r((t) => {
144
- const n = { ...t };
145
- return n.findOptions.fields = [e], n;
144
+ } }), i(L, { label: "Look in", value: f && o.findOptions.fields?.[0] === c.Content.Values ? c.Content.Formulas : o.findOptions.fields?.[0], options: f ? le : oe, onSelect: (e) => {
145
+ r((n) => {
146
+ const t = { ...n };
147
+ return t.findOptions.fields = [e], t;
146
148
  });
147
149
  } })] })] }) })] }) });
148
150
  });
149
151
  export {
150
- je as FindReplaceWindow,
152
+ Ne as FindReplaceWindow,
151
153
  ee as ScopeOptions,
152
- je as default
154
+ Ne as default
153
155
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,25 +1,26 @@
1
1
  import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
2
  import { useState as v } from "react";
3
- import { Box as O, FormControlLabel as a, Checkbox as s } from "@mui/material";
4
- import { Sort as l, IRange as r } from "@sheetxl/sdk";
5
- import { T as b, D as S } from "./Z_Sh-N3xHHWLCbEw.mjs";
3
+ import { Box as O, FormControlLabel as a, Checkbox as l } from "@mui/material";
4
+ import { Sort as s, IRange as r } from "@sheetxl/sdk";
5
+ import { useCallbackRef as b } from "@sheetxl/utils-react";
6
+ import { OptionsDialog as f } from "@sheetxl/utils-mui";
6
7
  /**
7
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
8
9
  *
9
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
11
  * License: The license can be found at https://www.sheetxl.com/license.
11
12
  */
12
- const k = ({ range: p, options: c, cell: m, onDone: d, ...C }) => {
13
- const [o, t] = v(c ?? l.DefaultRangeOptions), h = b((e) => {
13
+ const R = ({ range: p, options: c, cell: m, onDone: d, ...C }) => {
14
+ const [o, t] = v(c ?? s.DefaultRangeOptions), h = b((e) => {
14
15
  let i = null;
15
16
  e === "Sort" && (i = { ...c, options: o }), d?.(i);
16
17
  }, [o, d, c]);
17
- return n(S, { title: "Sort", options: ["Sort", "Cancel"], onDone: h, ...C, children: u(O, { sx: { display: "flex", flexDirection: "column" }, children: [n(a, { control: n(s, { checked: !o.reverse, onChange: () => t((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.hasHeader, onChange: () => t((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity, onChange: () => t((e) => ({ ...e, collatorOptions: o.collatorOptions?.sensitivity === l.CaseSensitiveOptions.sensitivity ? l.CaseInsensitiveOptions : l.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.orientation === r.Orientation.Row, onChange: () => t((e) => {
18
+ return n(f, { title: "Sort", options: ["Sort", "Cancel"], onDone: h, ...C, children: u(O, { sx: { display: "flex", flexDirection: "column" }, children: [n(a, { control: n(l, { checked: !o.reverse, onChange: () => t((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.hasHeader, onChange: () => t((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity, onChange: () => t((e) => ({ ...e, collatorOptions: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity ? s.CaseInsensitiveOptions : s.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.orientation === r.Orientation.Row, onChange: () => t((e) => {
18
19
  const i = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
19
20
  return { ...p.getDefaultSortCriteria(i, m).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: i };
20
- }) }), label: "Row Sort", labelPlacement: "end" }), n(a, { control: n(s, { checked: o.includeHidden, onChange: () => t((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
21
+ }) }), label: "Row Sort", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.includeHidden, onChange: () => t((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
21
22
  };
22
23
  export {
23
- k as SortDialog,
24
- k as default
24
+ R as SortDialog,
25
+ R as default
25
26
  };
@@ -0,0 +1,46 @@
1
+ import { jsx as p, jsxs as j } from "react/jsx-runtime";
2
+ import { memo as E, useMemo as R, useState as d, useCallback as V } from "react";
3
+ import { Box as L } from "@mui/material";
4
+ import { useCallbackRef as m } from "@sheetxl/utils-react";
5
+ import { OptionsDialog as S } from "@sheetxl/utils-mui";
6
+ import { N as A, R as G } from "./BLhZj1SgWlsmeviw.mjs";
7
+ /**
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
9
+ *
10
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
+ * License: The license can be found at https://www.sheetxl.com/license.
12
+ */
13
+ const M = ["Ok", "Cancel"], P = E((C) => {
14
+ const { value: a = null, context: t, onOption: u, onValidateOption: U, onDone: c, onUpdate: g, options: f = M, defaultOption: x = f?.[0], cancelOption: N = "Cancel", sx: h, ...v } = C, y = R(() => t?.getNames().findValidName("Range1"), []), i = R(() => {
15
+ if (!a) return !0;
16
+ }, []), [o, D] = d({ displayText: a?.getName() ?? y, errorText: null }), [n, w] = d({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [T, O] = d(!1), F = V(async (e) => !o.errorText && !n.errorText, [t]), b = m((e, l, r) => {
17
+ if (!l) {
18
+ let s = null;
19
+ i ? s = t?.getNames().addReference(o?.displayText, n?.displayValue, !1) : (a.getType() === "reference" && a.doBatch(() => {
20
+ a.setName(o?.displayText), a.setReference(n?.displayValue);
21
+ }, `Edit Named '${o?.displayText}'`), s = a), s && (s.select(), g(s, i));
22
+ }
23
+ u?.(e, l, r), c?.();
24
+ }, [t, o, n, c, u, x, N, g]), k = m((e) => {
25
+ let l = null;
26
+ try {
27
+ t?.getNames().validateName(e);
28
+ } catch (r) {
29
+ l = r.message;
30
+ }
31
+ D({ displayText: e, errorText: l });
32
+ }, []), B = m((e) => {
33
+ a && a.getName().toLowerCase() === e.toLowerCase() || t?.getNames().validateName(e);
34
+ }, [t, a]), I = V((e) => {
35
+ w({ displayValue: e ?? null, errorText: null });
36
+ }, []);
37
+ return p(S, { title: (i ? "Define" : "Edit") + " Range", options: f, onOption: b, onValidateOption: F, defaultOption: x, cancelOption: N, autoFocusSel: ".autoFocus", sx: { width: "460px", ...h }, ...v, children: j(L, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), range: "flex", flexDirection: "column" }, children: [p(A, { formName: "name", defaultInput: y, value: o.displayText, onChangeInput: k, onValidate: B, onFocus: (e) => {
38
+ T || e.target?.select(), O(!0);
39
+ } }), p(G, { formName: "range", value: n.displayValue, onChangeInput: I, resolvedAddress: t.getNames().getRanges.bind(t.getNames()), onFocus: (e) => {
40
+ T || e.target?.select(), O(!0);
41
+ } })] }) });
42
+ });
43
+ export {
44
+ P as NamedReferenceDialog,
45
+ P as default
46
+ };
@@ -1,8 +1,8 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_ods65_1{display:block;margin:0;padding:0;line-height:normal}._sheetxl-reset_ods65_1 table,._sheetxl-reset_ods65_1 thead,._sheetxl-reset_ods65_1 tbody,._sheetxl-reset_ods65_1 tfoot,._sheetxl-reset_ods65_1 tr,._sheetxl-reset_ods65_1 th,._sheetxl-reset_ods65_1 td{display:block;width:auto;height:auto;margin:0;padding:0;border:none;border-collapse:inherit;border-spacing:0;border-color:inherit;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0}._sheetxl-reset_ods65_1 th,._sheetxl-reset_ods65_1 td{display:inline}html{color:initial}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4{fill:currentColor}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor{fill:var(--sxl-color-active)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background{fill:var(--sxl-app-color-background)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey{fill:var(--sxl-app-color-grey)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast{fill:var(--sxl-app-color-high)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info{fill:var(--sxl-app-color-info)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light{fill:var(--sxl-app-color-info-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark{fill:var(--sxl-app-color-info-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary{fill:var(--sxl-app-color-secondary)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light{fill:var(--sxl-app-color-secondary-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark{fill:var(--sxl-app-color-secondary-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success{fill:var(--sxl-app-color-success)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light{fill:var(--sxl-app-color-success-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark{fill:var(--sxl-app-color-success-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning{fill:var(--sxl-app-color-warning)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light{fill:var(--sxl-app-color-warning-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark{fill:var(--sxl-app-color-warning-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error{fill:var(--sxl-app-color-error)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light{fill:var(--sxl-app-color-error-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark{fill:var(--sxl-app-color-error-dark)}._sheetxl-workbook_1j3lu_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;outline:none}._sheetxl-workbook_1j3lu_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_1j3lu_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_1j3lu_5 .splitPane.dragging .styled-resizer{background-color:var(--sxl-app-color-primary, blue)}._card_1a398_7{width:100%}._actionRoot_1a398_11{padding:8px 8px 8px 16px;justify-content:space-between}._icons_1a398_16{margin-left:auto;display:flex;align-items:center}._expand_1a398_22{padding:8px;transform:rotate(0);color:#d32f2f;transition:all .2s ease-in-out}._expandOpen_1a398_29{transform:rotate(180deg)}._stackTraceContainer_1a398_33{padding:16px}._paper_1a398_37{background-color:#fff;padding:16px}._checkIcon_1a398_42{font-size:20px;padding-right:4px}._button_1a398_47{padding:0;text-transform:none}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
2
  import { LicenseManager as t } from "@sheetxl/sdk";
3
- import { as as n, aB as s, a4 as m, ax as r, az as u, aa as l, aD as d, ai as C, aC as B, aA as i, aE as S, ad as b, ar as k, b1 as p, ab as T, aM as c, ag as P, aN as F, a7 as W, aj as h, a8 as y, aK as g, a6 as I, at as M, a0 as f, ac as w, au as x, b6 as E, a5 as v, aL as A, N, a9 as O, am as R, ap as L, aq as V, aw as z, k as H, b5 as U, b7 as D, b4 as G, aP as X, aQ as Q, aJ as Z, aR as _, af as j, aI as q, X as J, ay as K, aO as Y, l as $, n as aa, ak as oa, a2 as ta, a3 as ea, a_ as na, aF as sa, aG as ma, aH as ra, al as ua, ah as la, a1 as da, ae as Ca, an as Ba, av as ia, aW as Sa, aU as ba, b3 as ka, aX as pa, aV as Ta, ao as ca, b2 as Pa, a$ as Fa, X as Wa, aZ as ha, aT as ya, aS as ga, b0 as Ia, aY as Ma } from "./Z_Sh-N3xHHWLCbEw.mjs";
3
+ import { E as n, Z as s, B as m, L as r, X as u, m as l, a0 as d, s as C, $ as B, Y as i, a1 as S, D as p, A as k, aq as T, n as b, a9 as c, q as P, aa as F, j as h, t as W, k as y, a7 as g, F as I, G as M, H as w, I as f, J as x, av as v, M as E, a8 as A, N as O, l as R, P as L, y as N, z as V, Q as z, R as H, au as U, aw as D, at as G, ac as j, ad as q, a6 as Q, ae as Z, p as J, a5 as K, S as X, O as Y, ab as _, T as $, a as aa, v as oa, h as ta, i as ea, an as na, a2 as sa, a3 as ma, a4 as ra, w as ua, U as la, V as da, o as Ca, x as Ba, K as ia, aj as Sa, ah as pa, as as ka, ak as Ta, ai as ba, W as ca, ar as Pa, ao as Fa, S as ha, am as Wa, ag as ya, af as ga, ap as Ia, al as Ma } from "./BLhZj1SgWlsmeviw.mjs";
4
4
  /**
5
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
5
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
6
6
  *
7
7
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
8
8
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -19,45 +19,45 @@ export {
19
19
  B as ColorPanel,
20
20
  i as ColorPanelType,
21
21
  S as ColorPopupButton,
22
- b as DeleteCellsCommandButton,
22
+ p as DeleteCellsCommandButton,
23
23
  k as DocThemeCommandButton,
24
- p as EagerStudio,
25
- T as FillCommandButton,
24
+ T as EagerStudio,
25
+ b as FillCommandButton,
26
26
  c as FilterColumnMenu,
27
27
  P as FilterCommandButton,
28
28
  F as Filters,
29
- W as FindCommandButton,
30
- h as FontFamilyCommandButton,
29
+ h as FindCommandButton,
30
+ W as FontFamilyCommandButton,
31
31
  y as FontSizeCommandButton,
32
32
  g as FormulaBar,
33
33
  I as FreezeCommandButton,
34
34
  M as HelpCommandButton,
35
- f as HorizontalAlignCommandButton,
36
- w as InsertCellsCommandButton,
35
+ w as HorizontalAlignCommandButton,
36
+ f as InsertCellsCommandButton,
37
37
  x as InsertImageCommandButton,
38
- E as InsertScriptCommandButton,
38
+ v as InsertScriptCommandButton,
39
39
  t as LicenseManager,
40
- v as MergeCommandButton,
40
+ E as MergeCommandButton,
41
41
  A as NamedCollectionEditor,
42
- N as NamedInput,
43
- O as NumberFormatCommandButton,
44
- R as PasteCommandButton,
45
- L as PresetCellStylesCommandButton,
42
+ O as NamedInput,
43
+ R as NumberFormatCommandButton,
44
+ L as PasteCommandButton,
45
+ N as PresetCellStylesCommandButton,
46
46
  V as PresetTableStylesCommandButton,
47
47
  z as QuickFormulaSumCommandPopupButton,
48
48
  H as RangeInput,
49
49
  U as RunScriptCommandButton,
50
50
  D as ScriptEditorToolbar,
51
51
  G as ScriptWorkspace,
52
- X as SheetTab,
53
- Q as SheetTabMenu,
54
- Z as SheetZoomScale,
55
- _ as SheetsAllMenu,
56
- j as SortFilterCommandButton,
57
- q as StatusBar,
58
- J as Studio,
59
- K as StyledStrokeIcon,
60
- Y as TableStyleCanvasPreview,
52
+ j as SheetTab,
53
+ q as SheetTabMenu,
54
+ Q as SheetZoomScale,
55
+ Z as SheetsAllMenu,
56
+ J as SortFilterCommandButton,
57
+ K as StatusBar,
58
+ X as Studio,
59
+ Y as StyledStrokeIcon,
60
+ _ as TableStyleCanvasPreview,
61
61
  $ as TableStyleOptionsPanel,
62
62
  aa as TableStylePreview,
63
63
  oa as TextEffectsCommandButton,
@@ -74,15 +74,15 @@ export {
74
74
  Ba as ViewHeadingsCommandButton,
75
75
  ia as WalkingCopyCommandButton,
76
76
  Sa as WorkbookContextMenu,
77
- ba as WorkbookElement,
77
+ pa as WorkbookElement,
78
78
  ka as WorkbookIO,
79
- pa as WorkbookStrip,
80
- Ta as WorkbookTitle,
79
+ Ta as WorkbookStrip,
80
+ ba as WorkbookTitle,
81
81
  ca as WorkbookViewCommandButton,
82
82
  Pa as _WorkbookIO,
83
83
  Fa as createGridStyleFromMUITheme,
84
- Wa as default,
85
- ha as defaultNewWorkbook,
84
+ ha as default,
85
+ Wa as defaultNewWorkbook,
86
86
  ya as renderWorkbookLoadingPanel,
87
87
  ga as setPrintExamplesOnLoad,
88
88
  Ia as useResolvedThemeMode,
@@ -1,52 +1,53 @@
1
1
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
2
- import { memo as G, useState as x, useCallback as O, useEffect as H, useMemo as S } from "react";
3
- import { Box as w, FormControl as P, InputLabel as K, Select as q, TextField as A, Typography as D, MenuItem as J } from "@mui/material";
2
+ import { memo as W, useState as h, useCallback as F, useEffect as G, useMemo as S } from "react";
3
+ import { alpha as l, getOverlayAlpha as p } from "@mui/material/styles";
4
+ import { Box as w, FormControl as P, InputLabel as H, Select as q, TextField as A, Typography as D, MenuItem as J } from "@mui/material";
4
5
  import { NumberFormat as n } from "@sheetxl/sdk";
5
- import { T as l, a as Q, D as U, g as p } from "./Z_Sh-N3xHHWLCbEw.mjs";
6
- import { alpha as c } from "@mui/system";
6
+ import { useCallbackRef as c, KeyCodes as Q } from "@sheetxl/utils-react";
7
+ import { OptionsDialog as U } from "@sheetxl/utils-mui";
7
8
  /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.20
9
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.22
9
10
  *
10
11
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
12
  * License: The license can be found at https://www.sheetxl.com/license.
12
13
  */
13
- const X = ["Ok", "Cancel"], te = G((I) => {
14
- const { initialValue: $, context: h, onOption: b, onValidateOption: u, onInputOption: C, onDone: m, options: T = X, defaultOption: i = T?.[0], cancelOption: d = "Cancel", sx: N, ...M } = I, [a, v] = x($), [V, j] = x(!1), g = O(async (e, o) => !0, []), f = l(async (e) => {
14
+ const X = ["Ok", "Cancel"], ne = W((I) => {
15
+ const { initialValue: $, context: x, onOption: b, onValidateOption: u, onInputOption: C, onDone: m, options: v = X, defaultOption: i = v?.[0], cancelOption: d = "Cancel", sx: N, ...M } = I, [a, T] = h($), [V, j] = h(!1), g = F(async (e, o) => !0, []), f = c(async (e) => {
15
16
  C?.(a, e), b?.(e, e === d, e === i), m?.();
16
- }, [a, C, m, b, d, i]), B = l(async (e) => {
17
+ }, [a, C, m, b, d, i]), B = c(async (e) => {
17
18
  e.keyCode === Q.Enter && await g?.(a, null) !== !1 && f(i);
18
- }, [a, f]), L = l((e) => {
19
- v(e.target.value), g?.(e.target.value, null);
20
- }, [u]), z = l(async (e) => {
19
+ }, [a, f]), L = c((e) => {
20
+ T(e.target.value), g?.(e.target.value, null);
21
+ }, [u]), R = c(async (e) => {
21
22
  let o = await Promise.resolve(u?.(e));
22
23
  try {
23
24
  o !== !1 && (o = await Promise.resolve(g?.(a, e)) ?? !0);
24
25
  } catch {
25
26
  }
26
27
  return o ?? !0;
27
- }, [u]), [k, F] = x(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
28
- H(() => {
29
- F(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
28
+ }, [u]), [k, O] = h(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
29
+ G(() => {
30
+ O(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
30
31
  }, [a]);
31
- const E = S(() => {
32
+ const z = S(() => {
32
33
  const e = n.Styles.lookupPrimary(), o = (r) => t(J, { value: r, children: r }, r), s = Object.keys(e).map((r) => o(e[r].formatType));
33
34
  return s.push(o(n.Type.Custom)), s;
34
- }, []), R = O((e) => {
35
+ }, []), E = F((e) => {
35
36
  const o = e.target.value;
36
- F(o);
37
+ O(o);
37
38
  const s = n.Styles.lookupDefault(o);
38
- s && v(s);
39
- }, []), W = S(() => {
40
- const e = h();
39
+ s && T(s);
40
+ }, []), K = S(() => {
41
+ const e = x();
41
42
  return e.createTemporaryCell({ value: e.getValue() ?? 12345, style: { numberFormat: a } });
42
- }, [k, a, h]);
43
- return t(U, { title: "Number Format", options: T, onDone: m, onOption: (e) => f(e), onValidateOption: z, defaultOption: i, cancelOption: d, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...M, children: y(w, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [y(P, { sx: { minWidth: 135 }, size: "small", children: [t(K, { children: "Category" }), t(q, { value: k, label: "Category", onChange: R, sx: { backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, children: E })] }), t(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(A, { label: "Code", onFocus: (e) => {
43
+ }, [k, a, x]);
44
+ return t(U, { title: "Number Format", options: v, onDone: m, onOption: (e) => f(e), onValidateOption: R, defaultOption: i, cancelOption: d, autoFocusSel: ".autoFocus", sx: { width: "580px", ...N }, ...M, children: y(w, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [y(P, { sx: { minWidth: 135 }, size: "small", children: [t(H, { children: "Category" }), t(q, { value: k, label: "Category", onChange: E, sx: { backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` }, children: z })] }), t(P, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(A, { label: "Code", onFocus: (e) => {
44
45
  V || e.target?.select(), j(!0);
45
- }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` } } }, value: a, onChange: L, onKeyDown: B, onContextMenu: (e) => {
46
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: a, onChange: L, onKeyDown: B, onContextMenu: (e) => {
46
47
  e.stopPropagation();
47
- } }) }), y(w, { children: [t(D, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t(D, { variant: "body2", component: "div", sx: { borderRadius: (e) => `${e.shape.borderRadius}px`, padding: (e) => e.spacing(1), border: (e) => `1px solid ${e.palette.grey[400]}` }, children: W.getNumberFormat().displayText || "(empty)" })] })] }) });
48
+ } }) }), y(w, { children: [t(D, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t(D, { variant: "body2", component: "div", sx: { borderRadius: (e) => `${e.shape.borderRadius}px`, padding: (e) => e.spacing(1), border: (e) => `1px solid ${e.palette.grey[400]}` }, children: K.getNumberFormat().displayText || "(empty)" })] })] }) });
48
49
  });
49
50
  export {
50
- te as NumberFormatDialog,
51
- te as default
51
+ ne as NumberFormatDialog,
52
+ ne as default
52
53
  };