@sheetxl/studio-mui 0.4.14 → 0.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/browser/cjs/{XGmQ2kUHM2qQkG1r.cjs → 3eFeaOE8BdZL1wxv.cjs} +1 -1
  2. package/browser/cjs/{DD8-ZSDUkRqk7l6y.cjs → B7jcDdJUMAjZpGWo.cjs} +1 -1
  3. package/browser/cjs/{BkVtS9FZxWYNmrbU.cjs → BNGY-twelLFkYYI6.cjs} +1 -1
  4. package/browser/cjs/{CRvxop0QcZL23Akb.cjs → BsjtiKh23e6v8G0f.cjs} +2 -2
  5. package/browser/cjs/{D2gy3JDrJyGAMqsl.cjs → BzMxZOWpUV_RYST5.cjs} +2 -2
  6. package/browser/cjs/{B1Eaz6PFZAmrWiyY.cjs → C5nAx9uKHMANWBcf.cjs} +2 -2
  7. package/browser/cjs/{B8ZfZXhvW4sSKKZs.cjs → CQN6CMOb4-vmBky4.cjs} +2 -2
  8. package/browser/cjs/CVQnn-QAlTwmCcqi.cjs +96 -0
  9. package/browser/cjs/{BqOg0z4HGrbNaL1k.cjs → CXs0QRWS8JCF5XHE.cjs} +2 -2
  10. package/browser/cjs/{Bmifo5y7ZMJolUTY.cjs → CXwNI8k-NCP-Xytq.cjs} +1 -1
  11. package/browser/cjs/{W7LR70ajtjR9Lmvl.cjs → CgzOmQLgtPYoapZz.cjs} +2 -2
  12. package/browser/cjs/{DNL88d5PGwk92LeD.cjs → Crjro8zyw3_OPSdv.cjs} +2 -2
  13. package/browser/cjs/{BpLu9-spCLcAFdwd.cjs → Ctj6jurjmyOjmyC_.cjs} +2 -2
  14. package/browser/cjs/{-zKDSjn55SCvCwk8.cjs → D3DP2KHrlCUvr5GM.cjs} +1 -1
  15. package/browser/cjs/{DZ8WTAzF6V2Tw1tW.cjs → D6vlAfPBLlktoBgq.cjs} +2 -2
  16. package/browser/cjs/DFqjzGGReUL-7MoI.cjs +18 -0
  17. package/browser/cjs/{BUwmvmcdC0xBQ97L.cjs → DKYqcrXsQ_6SuhnP.cjs} +1 -1
  18. package/browser/cjs/{BAfNSJo7fktzFVJd.cjs → DRXfWFboy9pbnpXC.cjs} +3 -3
  19. package/browser/cjs/{AoLA7tfyPshG_mKt.cjs → Die-N4kV2bzafWfb.cjs} +2 -2
  20. package/browser/cjs/{C6Fk0jGWAOED60yf.cjs → DoxscTb4o7M2CzO-.cjs} +1 -1
  21. package/browser/cjs/{d2jsgbPdf35xArnn.cjs → htqwuaRLOx8unJxi.cjs} +2 -2
  22. package/browser/cjs/index.cjs +2 -2
  23. package/browser/cjs/{BH0v7IIykugrFxaT.cjs → nyCcUTXcNQz4oeHS.cjs} +2 -2
  24. package/browser/cjs/{CS5USjyVh8DwPSri.cjs → omjToo5UJ4DJDaQ_.cjs} +1 -1
  25. package/browser/cjs/{BiBEmbWoJHdOB1li.cjs → ovadKV9YIel9XeoD.cjs} +1 -1
  26. package/browser/esm/{C4ORm_Up6Zxt92F_.mjs → B6X8Qvia5W098Liv.mjs} +1 -1
  27. package/browser/esm/{4fzdzYhVH9eIXv-E.mjs → BHgGHdonH-Pv6AWm.mjs} +2 -2
  28. package/browser/esm/{CS6uJp7phBvUmos6.mjs → BKiH_cfuFpIWR0Kh.mjs} +6 -6
  29. package/browser/esm/{CCwOCTrf9Bira1-Y.mjs → BPW1-Hf2PHIk0e2L.mjs} +1 -1
  30. package/browser/esm/{CBQZHZlKIiEz186r.mjs → BSJUiUM1YTsyAkO6.mjs} +89 -90
  31. package/browser/esm/{ClmlhDf-0RC5GFV3.mjs → BWsWm5Ktnddf-7sU.mjs} +6 -6
  32. package/browser/esm/{CHovQU_R4AuKULmT.mjs → Be60UaEY4-jBg5EP.mjs} +1 -1
  33. package/browser/esm/BfgjY48NUV6xeZZz.mjs +43 -0
  34. package/browser/esm/{DWy4L2usallW0WdU.mjs → Bm9oowz3XGKUJAwu.mjs} +69 -69
  35. package/browser/esm/{CmAnpd_SOxQuTQRL.mjs → C1PvMvQkRbbPczX9.mjs} +3 -3
  36. package/browser/esm/{Dc1PmtvbeqsIQHq6.mjs → CSJOA0MduTRibCPc.mjs} +20 -20
  37. package/browser/esm/{vgS9ixFRuZrPx6vq.mjs → CVxFHP2hSU8M4x8L.mjs} +1 -1
  38. package/browser/esm/{C8po4rRYJ8127Rgb.mjs → CYkAU_Fwrj5HpveQ.mjs} +10 -10
  39. package/browser/esm/CnpSLh6bctHwICAg.mjs +23 -0
  40. package/browser/esm/{CYG1vk4AMMwqsul7.mjs → DlVsPuV-HRiRBisB.mjs} +1 -1
  41. package/browser/esm/{C5OCdRxcYIZViFzN.mjs → DnqJg0A5zWCsTH6-.mjs} +1 -1
  42. package/browser/esm/{CSKgHJSTMvOEe2RH.mjs → DqaP59JHe_yjCNLN.mjs} +11804 -10969
  43. package/browser/esm/{CB7vnn7AtsGma4R6.mjs → DsE9LT7djZNC_bpr.mjs} +1 -1
  44. package/browser/esm/{Ks946bL2vmd4m743.mjs → DtYTMRjYASQHh47Z.mjs} +6 -6
  45. package/browser/esm/{_FvE2-K7MOW_qWVS.mjs → DusKklXwfexZKIz3.mjs} +1 -1
  46. package/browser/esm/{CQiALmsycGGLFj1o.mjs → RjtykFbCcbv4qS7T.mjs} +5 -5
  47. package/browser/esm/{DgKsUQMTThBdEQds.mjs → bgdZRJ8Fv13W0mzX.mjs} +12 -12
  48. package/browser/esm/{B-rZWEIXFvB2W_mP.mjs → i2tBquKvd69Lntmu.mjs} +1 -1
  49. package/browser/esm/{TlZOl3Gt-d0Nc2a8.mjs → iUN2PzjdPItUTr7H.mjs} +3 -3
  50. package/browser/esm/index.mjs +66 -64
  51. package/licenses/dependencies.txt +134 -134
  52. package/node/esm/{DWCxF-chq5dVi363.mjs → -nq4m1_-YnMSpDz2.mjs} +38 -38
  53. package/node/esm/{CZoMFCKJudiTl_Tf.mjs → -wKDYIC7nV2UawT2.mjs} +2 -2
  54. package/node/esm/{Bi5br6yrYZqhLEiY.mjs → 6L31NM1-LL-KdFrd.mjs} +4 -4
  55. package/node/esm/{BTNBRzW8ZZbJY4GL.mjs → BKhroikdnIEO-cch.mjs} +1 -1
  56. package/node/esm/{DghPySv_2Ts78czJ.mjs → BVDB8yUgU4Pe3e3J.mjs} +1 -1
  57. package/node/esm/{762kbapO408ejsVC.mjs → BmnB45A5Kcks8H37.mjs} +2 -2
  58. package/node/esm/{BR9YJuwMP9nTMBE-.mjs → C-K2oA0Q20MmV5RC.mjs} +1 -1
  59. package/node/esm/{yP0whgIwVZApluLw.mjs → CC2vphWASQ4iYaeu.mjs} +2 -2
  60. package/node/esm/{DrujinnhlNDCosqb.mjs → CKJI-uruL_zkUxDv.mjs} +1 -1
  61. package/node/esm/{VHY56h6xqQcPba6u.mjs → Cr0a6BIKIyYJjP1S.mjs} +1 -1
  62. package/node/esm/{B0gJGF9-J3L5yBEW.mjs → CtQxIh_WsWd2Iqtp.mjs} +5 -5
  63. package/node/esm/{DUqIYzvmrCd67Dpx.mjs → DLPeWl4zrLTgco5e.mjs} +2 -2
  64. package/node/esm/{CY1qC_sXGD6av4yO.mjs → DavolEdR41s-e_Fj.mjs} +2 -2
  65. package/node/esm/{DC2dPUCWVgxEKzaS.mjs → DfkGEyNA6RPSKyEP.mjs} +13 -13
  66. package/node/esm/{CCygt4zw40-jO57G.mjs → Dn5QZmzECuToX8GV.mjs} +2 -2
  67. package/node/esm/{D1GfRQ1jyFg-wmLD.mjs → DqZDYIleTnvpbErd.mjs} +1 -1
  68. package/node/esm/{yB8OTWhDomxUy_SX.mjs → KPnfLrtriahFI_c0.mjs} +2 -2
  69. package/node/esm/{DOUP6ynjlQE-UEJs.mjs → OpLz9iqEueYpbPNa.mjs} +6 -6
  70. package/node/esm/{dlEq3vDkIERtTn7Y.mjs → RM7navTE1C8IL9a9.mjs} +25 -25
  71. package/node/esm/{Bgtg4I8EL4M776SY.mjs → fYYkAOtCehA-pVps.mjs} +8 -8
  72. package/node/esm/{CzWLA_IQgFbENkMq.mjs → iZ76esdFvFKIFxbE.mjs} +1 -1
  73. package/node/esm/index.mjs +5402 -5136
  74. package/node/esm/{CTpkd2r1aBS5d0yl.mjs → xiFL_cTYqzecUPE9.mjs} +1 -1
  75. package/package.json +8 -8
  76. package/types/index.d.ts +14 -1
  77. package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +0 -90
  78. package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +0 -12
  79. package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +0 -18
  80. package/browser/esm/CIH3ADFJJmUiyA8p.mjs +0 -864
  81. package/browser/esm/Dk00kGaRJxiitO5-.mjs +0 -23
  82. package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +0 -43
  83. package/node/esm/DsD7O5j2cXyaECkB.mjs +0 -313
@@ -0,0 +1,43 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { memo as z, forwardRef as A, useState as s } from "react";
3
+ import { s as t, Z as E, D as R, A as K, R as O } from "./DqaP59JHe_yjCNLN.mjs";
4
+ import { Box as W, FormControl as Z, TextField as q } from "@mui/material";
5
+ import { alpha as y } from "@mui/system";
6
+ /**
7
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
8
+ *
9
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
+ * License: The license can be found at https://www.sheetxl.com/license.
11
+ */
12
+ const G = ["Input"], _ = z(A((w, F) => {
13
+ const { initialValue: T = "", onOption: C, onValidateOption: r, onInputOption: l, onValidateInputOption: p, onDone: u, inputProps: c, inputLabel: I, inputType: P, inputPlaceHolder: v, options: d = G, autoFocusSel: b = ".autoFocus", cancelOption: m, defaultOption: g = d?.[0], ...k } = w, [D, V] = s(!1), [a, B] = s(T), [S, H] = s(""), [L, M] = s(!0), e = t(async (o, n) => {
14
+ if (!p) return !0;
15
+ const h = await p?.(o, n);
16
+ H(h?.message ?? "");
17
+ const x = h?.valid ?? !0;
18
+ return M(x), x;
19
+ }, [p]), f = t(async (o) => {
20
+ l?.(a, o);
21
+ }, [a, l, u, C, m, g]), N = t(async (o) => {
22
+ o.keyCode === E.Enter && await e?.(a, null);
23
+ }, [a, f]), $ = t((o) => {
24
+ B(o.target.value), e?.(o.target.value, null);
25
+ }, [r]), j = t(async (o) => {
26
+ let n = await e(a, o);
27
+ try {
28
+ n !== !1 && (n = await e(a, o));
29
+ } catch {
30
+ }
31
+ return n ?? !0;
32
+ }, [a, r]);
33
+ return i(R, { options: d, onDone: u, onOption: (o, n) => {
34
+ n || f(o);
35
+ }, onValidateOption: j, cancelOption: m, defaultOption: g, autoFocusSel: b, ref: F, ...k, children: i(W, { sx: { paddingTop: (o) => o.spacing(1), paddingBottom: (o) => o.spacing(0) }, children: i(Z, { sx: { paddingTop: (o) => o.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(q, { onFocus: (o) => {
36
+ D || o.target?.select(), V(!0);
37
+ }, type: P, label: I, helperText: S || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (o) => o.spacing(0.5), color: L ? void 0 : "error.main" } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { placeholder: v, spellCheck: !1, autoComplete: "off", ...c, className: K("autoFocus", c?.className), sx: { paddingTop: (o) => o.spacing(1.25), paddingBottom: (o) => o.spacing(0.75), backgroundImage: `linear-gradient(${y("#fff", O(5))}, ${y("#fff", O(5))})` } } }, value: a, onChange: $, onKeyDown: N, onContextMenu: (o) => {
38
+ o.stopPropagation();
39
+ } }) }) }) });
40
+ }));
41
+ export {
42
+ _ as default
43
+ };
@@ -1,153 +1,153 @@
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 { DialogContent as de, Box as O, TextField as Y, InputAdornment as ue, Collapse as _, MenuItem as fe, FormControl as ge, InputLabel as me, Select as xe } from "@mui/material";
3
+ 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
4
  import { ArrowBack as he, ArrowUpward as Oe, ArrowForward as Ce, ArrowDownward as ye } from "@mui/icons-material";
5
5
  import { ICell as c, IRange as R } from "@sheetxl/sdk";
6
- import { T as j, a4 as be, j as Te, a6 as ve, a7 as m, w as x, a8 as Re, Z as y, a9 as ke, aa as we, ab as Ie, ac as Se, a5 as k, ad as Ee, ae as Fe, P as De } from "./CSKgHJSTMvOEe2RH.mjs";
6
+ import { T as W, e as be, b as Te, j as ve, d as m, w as x, I as Re, f as y, h as ke, F as we, $ as Fe, W as Ie, a as k, k as Se, B as Ee, P as De } from "./DqaP59JHe_yjCNLN.mjs";
7
7
  import { alpha as w } from "@mui/system";
8
8
  /**
9
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
9
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
10
10
  *
11
11
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
12
  * License: The license can be found at https://www.sheetxl.com/license.
13
13
  */
14
- const $ = ie((I) => {
15
- const { label: h, value: r, options: s, onSelect: d, tabIndex: T = 0, ...P } = I, [A, v] = b(() => ne(r, s));
14
+ 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));
16
16
  D(() => {
17
- v(ne(r, s));
18
- }, [r, s]);
19
- const K = j((u) => {
17
+ v(ne(a, s));
18
+ }, [a, s]);
19
+ const K = W((u) => {
20
20
  v(u.target.value), d?.(s[u.target.value]);
21
21
  }, [d, s]), l = pe(() => Object.keys(s).map((u) => i(fe, { value: u, children: u }, u)), [s]);
22
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
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
24
  delete se.Values;
25
- const Pe = { "By Rows": !0, "By Columns": !1 }, ne = (I, h) => {
26
- const r = Object.keys(h);
27
- for (let s = 0; s < r.length; s++) {
28
- const d = r[s];
29
- if (h[d] === I) return d;
25
+ const Pe = { "By Rows": !0, "By Columns": !1 }, ne = (F, h) => {
26
+ const a = Object.keys(h);
27
+ for (let s = 0; s < a.length; s++) {
28
+ const d = a[s];
29
+ if (h[d] === F) return d;
30
30
  }
31
- }, Ve = ie((I) => {
32
- const { replace: h = !1, findText: r, replaceText: s, findOptions: d, replaceOptions: T, title: P, onHide: A, onFindOrReplace: v, ...K } = I, l = C(null), u = C(null), V = C(null), W = C(null), N = C(null), H = C(null), z = (e, t) => {
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
33
  t && (t.start(e, { center: !1 }), setTimeout(() => t.stop(e), 180));
34
- }, [U, F] = b(!1), [M, le] = b(!1), [f, B] = b(h), [X, L] = b(!1), [G, Z] = b(!1), [o, a] = 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 }), S = j(async (e, t, n, E) => {
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) => {
35
35
  if (!v) return;
36
36
  const g = { ...o };
37
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 re = await v({ autoFocus: E, ...g });
39
- L(re === 0);
38
+ const ae = await v({ autoFocus: S, ...g });
39
+ $(ae === 0);
40
40
  }, [o, v]);
41
41
  D(() => {
42
- L(!1);
43
- }, [o, M, f]);
44
- const q = j((e, t) => {
42
+ $(!1);
43
+ }, [o, B, f]);
44
+ const J = W((e, t) => {
45
45
  if (e.keyCode === be.Enter) {
46
46
  if (!o.findText) return;
47
- let n = !0, E = !1;
48
- e.shiftKey && (n = !1), t ? (e.ctrlKey && e.altKey && (E = !0), z(e, E ? H.current : N.current)) : z(e, n ? W.current : V.current), S(n, t, E, !1);
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
49
  }
50
- }, [o]), J = C(null);
50
+ }, [o]), Q = C(null);
51
51
  ce(() => {
52
- a((e) => {
52
+ r((e) => {
53
53
  const t = { ...e };
54
- t.findText = r && r.length > 0 ? r : e.findText ?? "", F(!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]);
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
55
  const n = !(!T && s === void 0);
56
- return n && B(n), t;
57
- }), G || J.current?.focus();
58
- }, [r, s, d, T]), D(() => {
59
- f ? (o.findOptions.fields[0], c.Content.Values) : F(!0);
56
+ return n && M(n), t;
57
+ }), G || Q.current?.focus();
58
+ }, [a, s, d, T]), D(() => {
59
+ f ? (o.findOptions.fields[0], c.Content.Values) : E(!0);
60
60
  }, [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 F(!1)) : void l.current.addEventListener("focus", () => {
62
- l.current?.select(), F(!1);
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
63
  }, { once: !0 });
64
64
  }, [U, o]);
65
- const [ae, { width: Q }] = Te();
66
- return i(ve, { ref: J, title: P ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: A, onFocus: () => Z(!0), onBlur: () => {
67
- Z(!1), L(!1);
68
- }, PaperProps: { elevation: G ? 3 : 1 }, ...K, children: p(de, { dividers: !0, ref: ae, 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) B(!0), l.current?.contains(document.activeElement) && u.current?.focus();
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
70
  else if (e.key === "f" && e.ctrlKey) l.current?.focus();
71
- else if (e.key === "c" && e.altKey) a((t) => {
71
+ else if (e.key === "c" && e.altKey) r((t) => {
72
72
  const n = { ...t };
73
73
  return n.findOptions.matchCase = !t.findOptions.matchCase, n;
74
74
  });
75
- else if (e.key === "e" && e.altKey) a((t) => {
75
+ else if (e.key === "e" && e.altKey) r((t) => {
76
76
  const n = { ...t };
77
77
  return n.findOptions.matchEntireCell = !t.findOptions.matchEntireCell, n;
78
78
  });
79
79
  else {
80
80
  if (e.key !== "r" || !e.altKey) return;
81
- a((t) => {
81
+ r((t) => {
82
82
  const n = { ...t };
83
83
  return n.findOptions.useRegex = !t.findOptions.useRegex, n;
84
84
  });
85
85
  }
86
86
  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: M, onSelectToggle: (e) => {
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
88
  le(e);
89
89
  }, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(Re, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
90
- B(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(Y, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Q > 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
- a((t) => {
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
93
  const n = { ...t };
94
94
  return n.findOptions.matchCase = e, n;
95
95
  });
96
96
  }, label: "Match Case", shortcut: { key: "C", modifiers: [y.Alt] }, icon: x(i(we, {})) }), i(m, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
97
- a((t) => {
97
+ r((t) => {
98
98
  const n = { ...t };
99
99
  return n.findOptions.matchEntireCell = e, n;
100
100
  });
101
- }, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(Ie, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
102
- a((t) => {
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
103
  const n = { ...t };
104
104
  return n.findOptions.useRegex = e, n;
105
105
  });
106
- }, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(Se, {})) })] }) }) }, 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
- a((t) => {
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
108
  const n = { ...t };
109
109
  return n.findText = e.target.value, n;
110
110
  });
111
- }, onKeyDown: (e) => q(e, !1), onContextMenu: (e) => {
111
+ }, onKeyDown: (e) => J(e, !1), onContextMenu: (e) => {
112
112
  e.stopPropagation();
113
113
  } }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
114
- S(!1, !1);
115
- }, 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) => {
116
- S(!0, !1);
117
- }, touchRippleRef: W, 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: () => {
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
118
  l.current?.focus();
119
- }, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Y, { 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
- a((t) => {
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
121
  const n = { ...t };
122
122
  return n.replaceText = e.target.value, n;
123
123
  });
124
- }, onKeyDown: (e) => q(e, !0), onContextMenu: (e) => {
124
+ }, onKeyDown: (e) => J(e, !0), onContextMenu: (e) => {
125
125
  e.stopPropagation();
126
126
  } }), i(m, { onSelectToggle: (e) => {
127
- S(!0, !0);
128
- }, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(Ee, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
129
- S(!0, !0, !0);
130
- }, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Fe, {})), disabled: !o.findText })] }) })] })] }), i(_, { in: M, timeout: te, onExit: () => {
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
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: Q >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i($, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
133
- a((t) => {
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
134
  const n = { ...t };
135
135
  return n.scope = e, n;
136
136
  });
137
- } }), i($, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Pe, onSelect: (e) => {
138
- a((t) => {
137
+ } }), i(L, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Pe, onSelect: (e) => {
138
+ r((t) => {
139
139
  const n = { ...t };
140
140
  return n.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, n;
141
141
  });
142
- } }), i($, { 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
- a((t) => {
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
144
  const n = { ...t };
145
145
  return n.findOptions.fields = [e], n;
146
146
  });
147
147
  } })] })] }) })] }) });
148
148
  });
149
149
  export {
150
- Ve as FindReplaceWindow,
150
+ je as FindReplaceWindow,
151
151
  ee as ScopeOptions,
152
- Ve as default
152
+ je as default
153
153
  };
@@ -1,8 +1,8 @@
1
- import { Y } from "./CSKgHJSTMvOEe2RH.mjs";
2
- import { c as x, b as f, r as I, t as Z, a as A, p as D, d as tt } from "./CS6uJp7phBvUmos6.mjs";
1
+ import { Y } from "./DqaP59JHe_yjCNLN.mjs";
2
+ import { c as x, b as f, r as I, t as Z, a as A, p as D, d as tt } from "./BKiH_cfuFpIWR0Kh.mjs";
3
3
  import { IFont as k, IAutoFilter as T, Sort as G, IRange as et, AddressUtils as W, IFill as C, IStyle as rt, ITextFrame as P, FormulaError as st, IBorder as V } from "@sheetxl/sdk";
4
4
  /**
5
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
5
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
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.
@@ -1,42 +1,42 @@
1
1
  import { jsx as o, jsxs as A } from "react/jsx-runtime";
2
- import { memo as E, useMemo as F, useState as m, useCallback as O } from "react";
3
- import { Box as S, FormControl as P, TextField as b } from "@mui/material";
4
- import { T as f, a1 as U, a5 as l } from "./CSKgHJSTMvOEe2RH.mjs";
2
+ import { memo as E, useMemo as D, useState as m, useCallback as F } from "react";
3
+ import { Box as S, FormControl as O, TextField as P } from "@mui/material";
4
+ import { T as f, D as U, a as l } from "./DqaP59JHe_yjCNLN.mjs";
5
5
  import { alpha as p } from "@mui/system";
6
6
  /**
7
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
7
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
8
8
  *
9
9
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
10
10
  * License: The license can be found at https://www.sheetxl.com/license.
11
11
  */
12
- const V = ["Ok", "Cancel"], Q = E((D) => {
13
- const { initialHyperlink: t = null, initialDisplay: H = null, onUpdateHyperlink: x, context: s, onOption: h, onValidateOption: r, onDone: d, options: y = V, defaultOption: c = y?.[0], cancelOption: i = "Cancel", sx: I, ...v } = D, w = F(() => (t ?? s?.()?.getHyperlink()) !== null, []), T = F(() => {
14
- let n = null, e = null;
15
- t && (typeof t == "string" ? e = t : n = t);
12
+ const V = ["Ok", "Cancel"], Q = E((b) => {
13
+ const { initialHyperlink: t = null, initialDisplay: H = null, onUpdateHyperlink: x, context: s, onOption: h, onValidateOption: r, onDone: d, options: y = V, defaultOption: c = y?.[0], cancelOption: i = "Cancel", sx: I, ...v } = b, w = D(() => (t ?? s?.()?.getHyperlink()) !== null, []), T = D(() => {
14
+ let n = null, a = null;
15
+ t && (typeof t == "string" ? a = t : n = t);
16
16
  const g = n ?? s?.()?.getHyperlink();
17
- return { address: e ?? g?.getAddress() ?? "", textToDisplay: g?.getDisplayText() ?? "" };
18
- }, [t, s]), [a, M] = m(T.address), [u, B] = m(() => {
17
+ return { address: a ?? g?.getAddress() ?? "", textToDisplay: g?.getDisplayText() ?? "" };
18
+ }, [t, s]), [e, M] = m(T.address), [u, B] = m(() => {
19
19
  const n = s?.().toTextUnformatted() ?? H;
20
20
  return n === T.address ? "" : n;
21
- }), [$, k] = m(!1), L = O((n) => {
21
+ }), [$, k] = m(!1), L = F((n) => {
22
22
  B(n.target.value);
23
- }, []), C = O(async (n, e) => null, []), W = f(async (n) => {
24
- n !== i && x?.(a === "" ? null : { address: a }, u), h?.(n, n === i, n === c), d?.();
25
- }, [a, u, x, d, h, c, i]), j = f((n) => {
23
+ }, []), C = F(async (n, a) => null, []), W = f(async (n) => {
24
+ n !== i && x?.(e === "" ? null : { address: e }, u), h?.(n, n === i, n === c), d?.();
25
+ }, [e, u, x, d, h, c, i]), j = f((n) => {
26
26
  M(n.target.value), C(n.target.value, null);
27
27
  }, [r]), z = f(async (n) => {
28
- let e = await Promise.resolve(r?.(n));
28
+ let a = await Promise.resolve(r?.(n));
29
29
  try {
30
- e !== !1 && (e = await C(a, n));
30
+ a !== !1 && (a = await C(e, n));
31
31
  } catch {
32
32
  }
33
- return e ?? !0;
33
+ return a ?? !0;
34
34
  }, [r]);
35
- return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (n) => W(n), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...I }, ...v, children: A(S, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: [o(P, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(b, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (n) => {
35
+ return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (n) => W(n), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...I }, ...v, children: A(S, { sx: { paddingTop: (n) => n.spacing(1), paddingBottom: (n) => n.spacing(0), rowGap: (n) => n.spacing(1), display: "flex", flexDirection: "column" }, children: [o(O, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(P, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (n) => {
36
36
  $ || n.target?.select(), k(!0);
37
- }, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: a, onChange: j, onContextMenu: (n) => {
37
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: e, onChange: j, onContextMenu: (n) => {
38
38
  n.stopPropagation();
39
- } }) }), o(P, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(b, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
39
+ } }) }), o(O, { sx: { paddingTop: (n) => n.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(P, { label: "Display Text", placeholder: e?.startsWith("#") ? e.substring(1) : e, onFocus: () => {
40
40
  k(!0);
41
41
  }, sx: { "& .MuiFormHelperText-root": { marginTop: (n) => n.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (n) => n.spacing(1.25), paddingBottom: (n) => n.spacing(0.75), backgroundImage: `linear-gradient(${p("#fff", l(5))}, ${p("#fff", l(5))})` } } }, value: u, onChange: L, onContextMenu: (n) => {
42
42
  n.stopPropagation();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
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,9 +1,9 @@
1
1
  import { jsx as d, jsxs as k } from "react/jsx-runtime";
2
2
  import { memo as E, useMemo as V, useState as p, useCallback as h } from "react";
3
3
  import { Box as L } from "@mui/material";
4
- import { T as u, a1 as S, ai as A, aj as G } from "./CSKgHJSTMvOEe2RH.mjs";
4
+ import { T as u, D as S, N as A, o as G } from "./DqaP59JHe_yjCNLN.mjs";
5
5
  /**
6
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
6
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
7
7
  *
8
8
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
9
9
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -11,7 +11,7 @@ import { T as u, a1 as S, ai as A, aj as G } from "./CSKgHJSTMvOEe2RH.mjs";
11
11
  const M = ["Ok", "Cancel"], J = E((C) => {
12
12
  const { value: a = null, context: t, onOption: c, onValidateOption: U, onDone: m, onUpdate: g, options: x = M, defaultOption: f = x?.[0], cancelOption: N = "Cancel", sx: R, ...v } = C, T = V(() => t?.getNames().findValidName("Range1"), []), i = V(() => {
13
13
  if (!a) return !0;
14
- }, []), [n, w] = p({ displayText: a?.getName() ?? T, errorText: null }), [o, D] = p({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [y, O] = p(!1), F = h(async (e) => !n.errorText && !o.errorText, [t]), j = u((e, l, r) => {
14
+ }, []), [n, D] = p({ displayText: a?.getName() ?? T, errorText: null }), [o, w] = p({ displayValue: a?.getRanges() ?? t?.selection() ?? null, errorText: null }), [y, O] = p(!1), F = h(async (e) => !n.errorText && !o.errorText, [t]), B = u((e, l, r) => {
15
15
  if (!l) {
16
16
  let s = null;
17
17
  i ? s = t?.getNames().addReference(n?.displayText, o?.displayValue, !1) : (a.getType() === "reference" && a.doBatch(() => {
@@ -19,22 +19,22 @@ const M = ["Ok", "Cancel"], J = E((C) => {
19
19
  }, `Edit Named '${n?.displayText}'`), s = a), s && (s.select(), g(s, i));
20
20
  }
21
21
  c?.(e, l, r), m?.();
22
- }, [t, n, o, m, c, f, N, g]), B = u((e) => {
22
+ }, [t, n, o, m, c, f, N, g]), I = u((e) => {
23
23
  let l = null;
24
24
  try {
25
25
  t?.getNames().validateName(e);
26
26
  } catch (r) {
27
27
  l = r.message;
28
28
  }
29
- w({ displayText: e, errorText: l });
30
- }, []), I = u((e) => {
29
+ D({ displayText: e, errorText: l });
30
+ }, []), b = u((e) => {
31
31
  a && a.getName().toLowerCase() === e.toLowerCase() || t?.getNames().validateName(e);
32
- }, [t, a]), b = h((e) => {
33
- D({ displayValue: e ?? null, errorText: null });
32
+ }, [t, a]), j = h((e) => {
33
+ w({ displayValue: e ?? null, errorText: null });
34
34
  }, []);
35
- return d(S, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption: j, onValidateOption: F, defaultOption: f, cancelOption: N, autoFocusSel: ".autoFocus", sx: { width: "460px", ...R }, ...v, children: k(L, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), range: "flex", flexDirection: "column" }, children: [d(A, { formName: "name", defaultInput: T, value: n.displayText, onChangeInput: B, onValidate: I, onFocus: (e) => {
35
+ return d(S, { title: (i ? "Define" : "Edit") + " Range", options: x, onOption: B, onValidateOption: F, defaultOption: f, cancelOption: N, autoFocusSel: ".autoFocus", sx: { width: "460px", ...R }, ...v, children: k(L, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), range: "flex", flexDirection: "column" }, children: [d(A, { formName: "name", defaultInput: T, value: n.displayText, onChangeInput: I, onValidate: b, onFocus: (e) => {
36
36
  y || e.target?.select(), O(!0);
37
- } }), d(G, { formName: "range", value: o.displayValue, onChangeInput: b, resolvedAddress: t.getNames().getRanges.bind(t.getNames()), onFocus: (e) => {
37
+ } }), d(G, { formName: "range", value: o.displayValue, onChangeInput: j, resolvedAddress: t.getNames().getRanges.bind(t.getNames()), onFocus: (e) => {
38
38
  y || e.target?.select(), O(!0);
39
39
  } })] }) });
40
40
  });
@@ -0,0 +1,23 @@
1
+ import { jsx as o, jsxs as T } from "react/jsx-runtime";
2
+ import { memo as k, useState as i, useCallback as N } from "react";
3
+ import { Box as w, FormControlLabel as F, Checkbox as j } from "@mui/material";
4
+ import { T as v, D as y, o as B } from "./DqaP59JHe_yjCNLN.mjs";
5
+ /**
6
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
7
+ *
8
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
9
+ * License: The license can be found at https://www.sheetxl.com/license.
10
+ */
11
+ const H = ["Ok", "Cancel"], L = k((g) => {
12
+ const { tableOptions: a, context: r, onOption: p, onValidateOption: I, onDone: c, options: d = H, defaultOption: t = d?.[0], cancelOption: s = "Cancel", sx: u, ...x } = g, [b, h] = i(!1), [n, f] = i(() => a?.hasHeader ?? !1), [l, O] = i(() => a?.ranges ?? null), C = v((e) => {
13
+ const m = { ...a, hasHeader: n, ranges: l };
14
+ p?.(e, e === s, e === t), c?.({ option: e, tableOptions: m });
15
+ }, [c, p, t, s, n, l, a]), D = N(async (e, m) => null, []);
16
+ return o(y, { title: "Insert Table", options: d, onDone: C, onValidateOption: D, defaultOption: t, cancelOption: s, autoFocusSel: ".range-input input", sx: { width: "360px", ...u }, ...x, children: T(w, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(B, { formName: "range", value: l, onChangeInput: (e) => O(e), resolvedAddress: r.getNames().getRanges.bind(r.getNames()), onFocus: (e) => {
17
+ b || e.target?.select(), h(!0);
18
+ } }), o(F, { control: o(j, { checked: n, onChange: () => f(!n) }), label: "Table has headers", labelPlacement: "end" })] }) });
19
+ });
20
+ export {
21
+ L as TableNewDialog,
22
+ L as default
23
+ };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
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,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
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.