@sheetxl/studio-mui 0.4.20 → 0.4.21

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/B1KlR2XYFpYbKjYS.cjs +20 -0
  2. package/browser/cjs/{DItuuqkIamMzp7Im.cjs → B1RMsexbz4bNlty_.cjs} +1 -1
  3. package/browser/cjs/B32faQpVaX1tkPuc.cjs +6 -0
  4. package/browser/cjs/B3XiHrRxW1LxML7F.cjs +6 -0
  5. package/browser/cjs/BGikYpeNpjwvXUdQ.cjs +18 -0
  6. package/browser/cjs/BY5l7DteiFtb2AKy.cjs +6 -0
  7. package/browser/cjs/Bb0Hd2RE7iVWVbm8.cjs +6 -0
  8. package/browser/cjs/C3EZkRIKfQURg9hX.cjs +6 -0
  9. package/browser/cjs/C7r573AdygYrVVEJ.cjs +7 -0
  10. package/browser/cjs/DEEknE8ARp0mc7fk.cjs +6 -0
  11. package/browser/cjs/DZwzUUHda3jr5jo4.cjs +6 -0
  12. package/browser/cjs/index.cjs +2 -2
  13. package/browser/cjs/veQZSq7ekc6G1FZT.cjs +42 -0
  14. package/browser/esm/B84RbTkXZiq6XIdH.mjs +49 -0
  15. package/browser/esm/{C5xUbwpUPDeNua-i.mjs → BLy-hRTZkVfaGrcr.mjs} +1 -1
  16. package/browser/esm/Bapmv0WdnDq3Jl_q.mjs +53 -0
  17. package/browser/esm/C0OuiugFYjsjbY8q.mjs +46 -0
  18. package/browser/esm/{5u-JEG1IfQBstjq0.mjs → CGVN-NJF8ZTm9apo.mjs} +11 -10
  19. package/browser/esm/CcLpUDzJOdfqQ8Kf.mjs +25 -0
  20. package/browser/esm/Csg-hJrzm9r4vJrm.mjs +2156 -0
  21. package/browser/esm/{C60ZnLCvtztDLuoT.mjs → DHf2N2UY78nZFge3.mjs} +100 -98
  22. package/browser/esm/Dlc8L0qha0mZFIkY.mjs +62 -0
  23. package/browser/esm/{BW3_mz5_8i9VLBYB.mjs → Dv-0R5pQwEnowzoO.mjs} +87 -85
  24. package/browser/esm/index.mjs +29 -29
  25. package/browser/esm/mVKwmIdSj4ua1Qce.mjs +4443 -0
  26. package/browser/esm/{CxXpPYi4eOFhBNt2.mjs → sHK4zKkWLGt2hVmW.mjs} +27 -26
  27. package/licenses/dependencies.txt +71 -342
  28. package/node/esm/{CrDbLKJh9omVo_TF.mjs → 49Eux5a_I5wZ-jfq.mjs} +29 -28
  29. package/node/esm/{Bn5TJPQAEMY-lGpF.mjs → B00pGeZ7sj6QOFgF.mjs} +4 -3
  30. package/node/esm/{D6A_o47zvz5ITIJK.mjs → BEtxwx_Ji4aFNg8V.mjs} +79 -78
  31. package/node/esm/{Ds5dinNcyNdC8ta6.mjs → BTcBIT144Lil18l-.mjs} +13 -11
  32. package/node/esm/{Bv12-Yyv0C86Iquy.mjs → Bw_f4uhXHpg1RA6Z.mjs} +7 -6
  33. package/node/esm/CGrG-gsnGd-Pn_T2.mjs +88 -0
  34. package/node/esm/CiUfb3MQCUC2McDP.mjs +46 -0
  35. package/node/esm/D1bjybdBQ28bumrW.mjs +63 -0
  36. package/node/esm/{CH6p2H0CMCoz4NgJ.mjs → Dcnd4LiYyGf2eaNl.mjs} +23 -22
  37. package/node/esm/{rlqvGCJlj4a2UcSM.mjs → DiLUM75s3D56Y6Fx.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 "./mVKwmIdSj4ua1Qce.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.21
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
  };
@@ -0,0 +1,62 @@
1
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { memo as E, useState as r, useRef as M, useReducer as O, useMemo as W } from "react";
3
+ import { DialogContent as A, Box as n } from "@mui/material";
4
+ import { DefaultNotifier as k, useCommand as V, useCallbackRef as f, CommandButtonType as x } from "@sheetxl/utils-react";
5
+ import { InternalWindow as q, ExhibitDivider as y, CommandButton as b, themeIcon as w, InsertTableIcon as C } from "@sheetxl/utils-mui";
6
+ import { useModelListener as G } from "@sheetxl/react";
7
+ import { u as J, N as K, R as Q, T as U, a as X } from "./mVKwmIdSj4ua1Qce.mjs";
8
+ /**
9
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.21
10
+ *
11
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
+ * License: The license can be found at https://www.sheetxl.com/license.
13
+ */
14
+ const ie = E((S) => {
15
+ const { title: N, onHide: R, autoFocusSel: T = ".range-input input", context: v, notifier: l = k, command: c, commands: d, ...D } = S, [I, m] = r(!1), [g, p] = r(!1), u = M(null), [Y, B] = O((e) => e + 1, 0), [F, { width: Z }] = J();
16
+ V(c);
17
+ const a = v ?? c.context(), t = a.table(), [H, P] = r(() => t ? a.getNames().getRanges(t.getRange()) : null), j = W(() => t?.getName() ?? "", [t]);
18
+ G(a.table(), { onAnchorCoordsChange(e) {
19
+ P(a.getNames().getRanges(e.getRange()));
20
+ }, onProtectedChange(e) {
21
+ B();
22
+ } });
23
+ const L = f((e) => {
24
+ a?.table().setName(e);
25
+ }, [a]), z = f((e) => {
26
+ a?.table().resize(e.at(0));
27
+ }, [a]);
28
+ let h = null;
29
+ return a.table() || (h = o("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: o("div", { children: "No table selected" }) })), o(q, { ref: u, title: N ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => m(!0), onBlur: (e) => {
30
+ u?.current?.contains(e.relatedTarget) || m(!1);
31
+ }, PaperProps: { elevation: I ? 3 : 1 }, ...D, children: s(A, { dividers: !0, ref: F, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, children: [s(n, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: a.table() ? 1 : 0 }, children: [o(n, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: o(n, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e) => e.spacing(2), paddingRight: (e) => e.spacing(2) }, children: s(n, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [o(K, { formName: "name", defaultInput: j, value: t?.getName() ?? "No table", onChangeInput: L, onValidate: (e) => {
32
+ t && t.getName().toLowerCase() === e.toLowerCase() || a?.getNames().validateName(e);
33
+ }, disabled: t?.isProtected() ?? !0, onFocus: (e) => {
34
+ g || e.target?.select(), p(!0);
35
+ } }), o(Q, { formName: "range", value: H, onChangeInput: z, resolvedAddress: a.getNames().getRanges.bind(a.getNames()), disabled: t?.isProtected() ?? !0, onFocus: (e) => {
36
+ g || e.target?.select(), p(!0);
37
+ } })] }) }) }), s(n, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [o(y, { orientation: "horizontal", sx: { marginTop: (e) => e.spacing(1.5), marginBottom: (e) => e.spacing(0.75) } }), o(U, { disabled: t?.isProtected(), styleOptions: t?.getStyleOptions() ?? null, onStyleOptionsChange: (e) => {
38
+ t.updateStyleOptions(e);
39
+ }, showHeaderRow: t?.getShowHeaders(), onShowHeaderRowChange: (e) => {
40
+ try {
41
+ t.setShowHeaders(e);
42
+ } catch (i) {
43
+ l.showError(i);
44
+ }
45
+ }, showTotalRow: t?.getShowTotals(), onShowTotalRowChange: (e) => {
46
+ try {
47
+ t.setShowTotals(e);
48
+ } catch (i) {
49
+ l.showError(i);
50
+ }
51
+ }, showFilterButton: t?.getFilter() ? t.getShowFilterButton() : null, onShowFilterButtonChange: (e) => {
52
+ try {
53
+ t.setShowFilterButton(e);
54
+ } catch (i) {
55
+ l.showError(i);
56
+ }
57
+ } }), o(n, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e) => e.spacing(2), marginBottom: (e) => e.spacing(1) }, children: o(X, { table: t, styles: a.styles(), bodyStyle: a.bodyStyle(), cellHeight: 30, isLive: !0 }) }), o(y, { orientation: "horizontal" }), s(n, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [o(b, { variant: x.Menuitem, command: d.getCommand("convertTableToRange"), commandState: t, icon: w(o(C, {})) }), o(b, { variant: x.Menuitem, commandState: t, command: d.getCommand("deleteTable"), icon: w(o(C, {})) })] })] })] }), h] }) });
58
+ });
59
+ export {
60
+ ie as TableDetailsWindow,
61
+ ie as default
62
+ };