@sheetxl/studio-mui 0.7.5 → 0.7.7

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 (51) hide show
  1. package/LICENSE.md +1 -1
  2. package/browser/cjs/BCf8BQb2c8ANexW4.cjs +7 -0
  3. package/browser/cjs/BJ4pZo7s81ynDlzw.cjs +6 -0
  4. package/browser/cjs/{CuHwOikK2J1MLsHN.cjs → Bf70UQlMT3b0NoOZ.cjs} +1 -1
  5. package/browser/cjs/Bpq9GrV7al7xxJ_d.cjs +6 -0
  6. package/browser/cjs/BxlQ6aLh5_jUvk9w.cjs +20 -0
  7. package/browser/cjs/{B4uj1Smd-98Hab_l.cjs → CJSNNa8ySxzuEmoy.cjs} +2 -2
  8. package/browser/cjs/{D4c72fkCJiL-S_-a.cjs → CUND2W1xMwqPOHwD.cjs} +7 -7
  9. package/browser/cjs/{CJQkIVFa7S1AZcBP.cjs → Cg95aBJ4kuUq7jrz.cjs} +1 -1
  10. package/browser/cjs/Dcoq8P2O8-40waHl.cjs +6 -0
  11. package/browser/cjs/{JURSrTjvLJ8bc4Yl.cjs → DeoOsY5TkIAydt9W.cjs} +2 -2
  12. package/browser/cjs/index.cjs +3 -3
  13. package/browser/cjs/{D6pUyWwmIliDWT8B.cjs → j0lD5RrJ86CRlUNT.cjs} +2 -2
  14. package/browser/esm/{B7CJX7fKvv1vBk8-.mjs → 7tCRjNmDM5kf3BFa.mjs} +2 -2
  15. package/browser/esm/{hWToTYtpa0PFzhRm.mjs → BWxmPJd4f8qZMxaa.mjs} +17 -18
  16. package/browser/esm/{COI8Eg7HQcdPFGcZ.mjs → BbHGWXif6ytyfyHI.mjs} +1 -1
  17. package/browser/esm/{CajWEWsYWzynjFKw.mjs → BkhHyCmy1MwVFS1b.mjs} +2 -2
  18. package/browser/esm/{BbfPde9B9b4p64_L.mjs → Bo3cXzeDcP_Q9YvX.mjs} +2 -2
  19. package/browser/esm/CRDu7VFAa8NGcoHj.mjs +49 -0
  20. package/browser/esm/{C48fXszXYqcJMQni.mjs → Cd02kMBZDsozIA98.mjs} +12 -12
  21. package/browser/esm/CzdBzjYgP1i3pkPL.mjs +4455 -0
  22. package/browser/esm/DFppS_p4spncePDm.mjs +156 -0
  23. package/browser/esm/{KULqIIHcvNriSu7F.mjs → db-2uDA7mYS4QpHj.mjs} +1 -1
  24. package/browser/esm/index.mjs +70 -72
  25. package/browser/esm/{gpytxNaiTkBoZ6aj.mjs → nzc1811Pk5-sKDu5.mjs} +7 -7
  26. package/licenses/dependencies.txt +189 -222
  27. package/node/assets/style.css +1 -1
  28. package/node/esm/BVKo3uc0IreLNkkN.mjs +157 -0
  29. package/node/esm/{CuIak_iZn0ApypmT.mjs → BfnEq4EhLf8jJ0Gp.mjs} +1 -1
  30. package/node/esm/{BHFc6-pxJ_X3esj1.mjs → BgR1PWucIb0Zucr4.mjs} +1 -1
  31. package/node/esm/{DEnAvzkXoQEvscd-.mjs → BimlBylqyslj9fNg.mjs} +1 -1
  32. package/node/esm/{DExsoaMD7hWNhceb.mjs → BnGsbrQwjcaUFAdt.mjs} +13 -13
  33. package/node/esm/{DKhoTrOwIfMtft9r.mjs → CQhaL28vV1X6Xt2N.mjs} +43 -44
  34. package/node/esm/{NYFZEGBg9dFXwfFf.mjs → DB2ryaj4_Y8Lgyy_.mjs} +1 -1
  35. package/node/esm/{DQIYBoarjlonhEEn.mjs → X3qO0PKREgY9FMZU.mjs} +8 -8
  36. package/node/esm/index.mjs +1575 -1576
  37. package/node/esm/{DH3yxwtQR5c61iv3.mjs → rOozeXREjiU8jjPd.mjs} +14 -14
  38. package/package.json +15 -17
  39. package/types/index.d.ts +25 -93
  40. package/browser/cjs/BnpPHKTC6_96pDcW.cjs +0 -6
  41. package/browser/cjs/CHyGxDKCce-XV53l.cjs +0 -7
  42. package/browser/cjs/F4v-BOmzUXzCO3uz.cjs +0 -6
  43. package/browser/cjs/QQ4l7f6lYZb7S6td.cjs +0 -20
  44. package/browser/cjs/Td2md8ruASYOp_Rr.cjs +0 -6
  45. package/browser/cjs/jHU6TwhWd2lZX-VA.cjs +0 -6
  46. package/browser/esm/BhP57_jo4NnvHBgF.mjs +0 -64
  47. package/browser/esm/CGVa4zFRRZyFzDvh.mjs +0 -4489
  48. package/browser/esm/CkXFR3hHwNp6jfJV.mjs +0 -49
  49. package/browser/esm/CwAqw5gJ2yzuXbLx.mjs +0 -155
  50. package/node/esm/8qD_FXFKXbOqF2_X.mjs +0 -156
  51. package/node/esm/DQKU8gdXpx4S0S0D.mjs +0 -65
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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.
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=require("react"),d=require("@mui/material/styles"),r=require("@mui/material"),a=require("@sheetxl/sdk"),s=require("@sheetxl/utils-react"),x=require("@sheetxl/utils-mui"),ne=require("./BxlQ6aLh5_jUvk9w.cjs"),w={width:"1.5rem",height:"1.5rem"},B=l.memo(R=>{const{label:y,value:f,options:c,onSelect:g,tabIndex:C=0,...E}=R,[k,b]=l.useState(()=>J(f,c));l.useEffect(()=>{b(J(f,c))},[f,c]);const S=s.useCallbackRef(m=>{b(m.target.value),g?.(c[m.target.value])},[g,c]),p=l.useMemo(()=>Object.keys(c).map(m=>i.jsx(r.MenuItem,{value:m,children:m},m)),[c]);return i.jsxs(r.FormControl,{sx:{minWidth:135},size:"small",children:[i.jsx(r.InputLabel,{children:y}),i.jsx(r.Select,{inputProps:{tabIndex:C},value:k,label:y,onChange:S,sx:{backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},...E,children:p})]})}),D={Workbook:"workbook",Sheet:"sheet"},G={enter:140,exit:140},X={Formulas:a.ICell.Content.Formulas,Values:a.ICell.Content.Values,Notes:a.ICell.Content.Notes,Comments:a.ICell.Content.Comments},Y={...X};delete Y.Values;const te={"By Rows":!0,"By Columns":!1},J=(R,y)=>{const f=Object.keys(y);for(let c=0;c<f.length;c++){const g=f[c];if(y[g]===R)return g}},Q=l.memo(R=>{const{replace:y=!1,findText:f,replaceText:c,findOptions:g,replaceOptions:C,title:E,onHide:k,onFindOrReplace:b,...S}=R,p=l.useRef(null),m=l.useRef(null),A=l.useRef(null),M=l.useRef(null),W=l.useRef(null),q=l.useRef(null),L=(e,n)=>{n&&(n.start(e,{center:!1}),setTimeout(()=>n.stop(e),180))},[P,v]=l.useState(!1),[F,Z]=l.useState(!1),[h,T]=l.useState(y),[$,K]=l.useState(!1),[z,V]=l.useState(!1),[o,u]=l.useState({replaceText:null,replace:y,replaceOptions:{},findOptions:{text:null,matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:a.IRange.Orientation.Row,fields:[a.ICell.Content.Formulas]},scope:D.Sheet}),j=s.useCallbackRef(async(e,n,t,I)=>{if(!b)return;const O={...o};O.replaceOptions={...O.replaceOptions},O.findOptions={...O.findOptions},O.replaceOptions.maxCount=t?void 0:1,O.replace=n,n&&o.findOptions.fields?.[0]===a.ICell.Content.Values&&(O.findOptions.fields=[a.ICell.Content.Formulas]),O.findOptions.reverse=!e;const ee=await b({autoFocus:I,...O});K(ee===0)},[o,b]);l.useEffect(()=>{K(!1)},[o,F,h]);const N=s.useCallbackRef((e,n)=>{if(e.keyCode===s.KeyCodes.Enter){if(!o.findOptions.text)return;let t=!0,I=!1;e.shiftKey&&(t=!1),n?(e.ctrlKey&&e.altKey&&(I=!0),L(e,I?q.current:W.current)):L(e,t?M.current:A.current),j(t,n,I,!1)}},[o]),H=l.useRef(null);l.useLayoutEffect(()=>{u(e=>{const n={...e};n.findOptions.text=f&&f.length>0?f:e.findOptions.text??"",v(!0),c!==void 0&&(n.replaceText=c),g&&(n.findOptions={...n.findOptions,...g}),n.replaceText||(n.replaceText=""),n.replaceOptions&&(n.replaceOptions={...n.replaceOptions}),C&&(n.replaceOptions={...n.replaceOptions,...C}),o.findOptions.fields?.[0]||(o.findOptions.fields=[a.ICell.Content.Formulas]);const t=!(!C&&c===void 0);return t&&T(t),n}),z||H.current?.focus()},[f,c,g,C]),l.useEffect(()=>{h?(o.findOptions.fields[0],a.ICell.Content.Values):v(!0)},[h]),l.useEffect(()=>{if(P&&p.current&&o.findOptions.text===p.current.value)return p.current===document.activeElement||p.current.contains(document.activeElement)?(p.current?.select(),void v(!1)):void p.current.addEventListener("focus",()=>{p.current?.select(),v(!1)},{once:!0})},[P,o]);const[_,{width:U}]=ne.useMeasure();return i.jsx(x.InternalWindow,{ref:H,title:E??(h?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:k,onFocus:()=>V(!0),onBlur:()=>{V(!1),K(!1)},slotProps:{paper:{elevation:z?3:1}},...S,children:i.jsxs(r.DialogContent,{dividers:!0,ref:_,sx:{display:"flex",flexDirection:"column",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},onKeyDown:e=>{if(e.key==="h"&&e.ctrlKey)T(!0),p.current?.contains(document.activeElement)&&m.current?.focus();else if(e.key==="f"&&e.ctrlKey)p.current?.focus();else if(e.key==="c"&&e.altKey)u(n=>{const t={...n};return t.findOptions.matchCase=!n.findOptions.matchCase,t});else if(e.key==="e"&&e.altKey)u(n=>{const t={...n};return t.findOptions.matchEntireCell=!n.findOptions.matchEntireCell,t});else{if(e.key!=="r"||!e.altKey)return;u(n=>{const t={...n};return t.findOptions.useRegex=!n.findOptions.useRegex,t})}e.preventDefault()},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[i.jsx(x.ExhibitOptionButton,{selected:F,onSelectToggle:e=>{Z(e)},preventFocus:!0,label:"Toggle Additional Options",icon:i.jsx(s.DynamicIcon,{iconKey:"FindOptions"})}),i.jsx(x.ExhibitOptionButton,{selected:h,onSelectToggle:e=>{T(e)},preventFocus:!0,label:"Toggle Replace",icon:i.jsx(s.DynamicIcon,{iconKey:"FindReplaceToggle"}),shortcut:{key:h?"F":"H",modifiers:[s.KeyModifiers.Ctrl]}})]}),i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[i.jsx(r.TextField,{label:"Find",slotProps:{input:{sx:{paddingRight:e=>e.spacing(1),minWidth:U>460?"20em":void 0,backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},endAdornment:i.jsx(r.InputAdornment,{position:"end",children:i.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"2px"},children:[i.jsx(x.ExhibitOptionButton,{style:w,selected:o.findOptions.matchCase,onBlur:()=>{console.log("blur")},onSelectToggle:e=>{u(n=>{const t={...n};return t.findOptions.matchCase=e,t})},label:"Match Case",shortcut:{key:"C",modifiers:[s.KeyModifiers.Alt]},icon:i.jsx(s.DynamicIcon,{iconKey:"FindCaseSensitive",size:"1rem"})}),i.jsx(x.ExhibitOptionButton,{style:w,selected:o.findOptions.matchEntireCell,onSelectToggle:e=>{u(n=>{const t={...n};return t.findOptions.matchEntireCell=e,t})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[s.KeyModifiers.Alt]},icon:i.jsx(s.DynamicIcon,{iconKey:"FindWholeWord",size:"1rem"})}),i.jsx(x.ExhibitOptionButton,{style:w,selected:o.findOptions.useRegex,onSelectToggle:e=>{u(n=>{const t={...n};return t.findOptions.useRegex=e,t})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[s.KeyModifiers.Alt]},icon:i.jsx(s.DynamicIcon,{iconKey:"FindRegEx",size:"1rem"})})]})})},inputLabel:{shrink:!0},htmlInput:{draggable:!1,ref:p,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>$?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>$?`${e.palette.error.main} !important`:void 0}},value:o.findOptions.text??"",onChange:e=>{u(n=>{const t={...n};return t.findOptions.text=e.target.value,t})},onKeyDown:e=>N(e,!1),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(x.ExhibitOptionButton,{selected:o.findOptions.reverse,onSelectToggle:e=>{j(!1,!1)},touchRippleRef:A,label:"",shortcut:{key:"Enter",modifiers:[s.KeyModifiers.Shift]},icon:i.jsx(s.DynamicIcon,{iconKey:o.findOptions.orientation!==a.IRange.Orientation.Column?"ArrowBack":"ArrowUpward"}),disabled:!o.findOptions.text}),i.jsx(x.ExhibitOptionButton,{selected:!o.findOptions.reverse,onSelectToggle:e=>{j(!0,!1)},touchRippleRef:M,label:"Next Match",shortcut:{key:"Enter"},icon:i.jsx(s.DynamicIcon,{iconKey:o.findOptions.orientation!==a.IRange.Orientation.Column?"ArrowForward":"ArrowDownward"}),disabled:!o.findOptions.text})]}),i.jsx(r.Collapse,{in:h,timeout:G,onExit:()=>{p.current?.focus()},children:i.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[i.jsx(r.TextField,{label:"Replace",slotProps:{input:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`}},inputLabel:{shrink:!0},htmlInput:{ref:m,className:"input",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}}},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1)},value:o.replaceText??"",onChange:e=>{u(n=>{const t={...n};return t.replaceText=e.target.value,t})},onKeyDown:e=>N(e,!0),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(x.ExhibitOptionButton,{onSelectToggle:e=>{j(!0,!0)},touchRippleRef:W,label:"Replace",shortcut:{key:"Enter"},icon:i.jsx(s.DynamicIcon,{iconKey:"FindReplace"}),disabled:!o.findOptions.text}),i.jsx(x.ExhibitOptionButton,{onSelectToggle:e=>{j(!0,!0,!0)},touchRippleRef:q,label:"Replace All",shortcut:{key:"Enter",modifiers:[s.KeyModifiers.Ctrl,s.KeyModifiers.Alt]},icon:i.jsx(s.DynamicIcon,{iconKey:"FindReplaceAll"}),disabled:!o.findOptions.text})]})})]})]}),i.jsx(r.Collapse,{in:F,timeout:G,onExit:()=>{p.current?.focus()},children:i.jsxs(r.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(1.5),marginTop:e=>e.spacing(1)},children:[i.jsx(x.ExhibitDivider,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),i.jsxs(r.Box,{sx:{display:"flex",flexDirection:U>=383?"row":"column",justifyContent:"space-evenly",alignItems:"center",gap:e=>e.spacing(1),rowGap:e=>e.spacing(2)},tabIndex:-1,children:[i.jsx(B,{label:"Within",value:o.scope,options:D,onSelect:e=>{u(n=>{const t={...n};return t.scope=e,t})}}),i.jsx(B,{label:"Search",value:o.findOptions.orientation!==a.IRange.Orientation.Column,options:te,onSelect:e=>{u(n=>{const t={...n};return t.findOptions.orientation=e?a.IRange.Orientation.Row:a.IRange.Orientation.Column,t})}}),i.jsx(B,{label:"Look in",value:h&&o.findOptions.fields?.[0]===a.ICell.Content.Values?a.ICell.Content.Formulas:o.findOptions.fields?.[0],options:h?Y:X,onSelect:e=>{u(n=>{const t={...n};return t.findOptions.fields=[e],t})}})]})]})})]})})});exports.FindReplaceWindow=Q,exports.ScopeOptions=D,exports.default=Q;
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),w=require("@mui/material"),c=require("@sheetxl/utils-react"),F=require("@sheetxl/utils-mui"),O=require("./QQ4l7f6lYZb7S6td.cjs"),B=["Ok","Cancel"],R=l.memo(V=>{const{value:a=null,context:t,onOption:p,onValidateOption:M,onDone:g,onUpdate:m,options:x=B,defaultOption:f=x?.[0],cancelOption:N="Cancel",sx:b,...h}=V,y=l.useMemo(()=>t?.getNames().findValidName("Range1"),[]),u=l.useMemo(()=>{if(!a)return!0},[]),[n,v]=l.useState({displayText:a?.getName()??y,errorText:null}),[o,k]=l.useState({displayValue:a?.getRanges()??t?.selection()??null,errorText:null}),[T,C]=l.useState(!1),q=l.useCallback(async e=>!n.errorText&&!o.errorText,[t]),S=c.useCallbackRef((e,s,d)=>{if(!s){let i=null;u?i=t?.getNames().addReference(n?.displayText,o?.displayValue,!1):(a.getType()==="reference"&&a.doBatch(()=>{a.setName(n?.displayText),a.setReference(o?.displayValue)},`Edit Named '${n?.displayText}'`),i=a),i&&(i.select(),m(i,u))}p?.(e,s,d),g?.()},[t,n,o,g,p,f,N,m]),j=c.useCallbackRef(e=>{let s=null;try{t?.getNames().validateName(e)}catch(d){s=d.message}v({displayText:e,errorText:s})},[]),D=c.useCallbackRef(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.getNames().validateName(e)},[t,a]),I=l.useCallback(e=>{k({displayValue:e??null,errorText:null})},[]);return r.jsx(F.OptionsDialog,{title:(u?"Define":"Edit")+" Range",options:x,onOption:S,onValidateOption:q,defaultOption:f,cancelOption:N,autoFocusSel:".autoFocus",sx:{width:"460px",...b},...h,children:r.jsxs(w.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[r.jsx(O.NamedInput,{formName:"name",defaultInput:y,value:n.displayText,onChangeInput:j,onValidate:D,onFocus:e=>{T||e.target?.select(),C(!0)}}),r.jsx(O.RangeInput,{formName:"range",value:o.displayValue,onChangeInput:I,resolvedAddress:t.getNames().getRanges.bind(t.getNames()),onFocus:e=>{T||e.target?.select(),C(!0)}})]})})});exports.NamedReferenceDialog=R,exports.default=R;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),w=require("@mui/material"),c=require("@sheetxl/utils-react"),F=require("@sheetxl/utils-mui"),O=require("./BxlQ6aLh5_jUvk9w.cjs"),B=["Ok","Cancel"],R=l.memo(V=>{const{value:a=null,context:t,onOption:p,onValidateOption:M,onDone:g,onUpdate:m,options:x=B,defaultOption:f=x?.[0],cancelOption:N="Cancel",sx:b,...h}=V,y=l.useMemo(()=>t?.getNames().findValidName("Range1"),[]),u=l.useMemo(()=>{if(!a)return!0},[]),[n,v]=l.useState({displayText:a?.getName()??y,errorText:null}),[o,k]=l.useState({displayValue:a?.getRanges()??t?.selection()??null,errorText:null}),[T,C]=l.useState(!1),q=l.useCallback(async e=>!n.errorText&&!o.errorText,[t]),S=c.useCallbackRef((e,s,d)=>{if(!s){let i=null;u?i=t?.getNames().addReference(n?.displayText,o?.displayValue,!1):(a.getType()==="reference"&&a.doBatch(()=>{a.setName(n?.displayText),a.setReference(o?.displayValue)},`Edit Named '${n?.displayText}'`),i=a),i&&(i.select(),m(i,u))}p?.(e,s,d),g?.()},[t,n,o,g,p,f,N,m]),j=c.useCallbackRef(e=>{let s=null;try{t?.getNames().validateName(e)}catch(d){s=d.message}v({displayText:e,errorText:s})},[]),D=c.useCallbackRef(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.getNames().validateName(e)},[t,a]),I=l.useCallback(e=>{k({displayValue:e??null,errorText:null})},[]);return r.jsx(F.OptionsDialog,{title:(u?"Define":"Edit")+" Range",options:x,onOption:S,onValidateOption:q,defaultOption:f,cancelOption:N,autoFocusSel:".autoFocus",sx:{width:"460px",...b},...h,children:r.jsxs(w.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[r.jsx(O.NamedInput,{formName:"name",defaultInput:y,value:n.displayText,onChangeInput:j,onValidate:D,onFocus:e=>{T||e.target?.select(),C(!0)}}),r.jsx(O.RangeInput,{formName:"range",value:o.displayValue,onChangeInput:I,resolvedAddress:t.getNames().getRanges.bind(t.getNames()),onFocus:e=>{T||e.target?.select(),C(!0)}})]})})});exports.NamedReferenceDialog=R,exports.default=R;
@@ -1,7 +1,7 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_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_11z3j_1 th,._sheetxl-reset_11z3j_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_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_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)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_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_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{display:grid;grid-template-columns:1fr;user-select:none}@container (width > 600px){._table-style-options_1kfn2_1{grid-template-rows:repeat(3,auto);grid-auto-flow:column;grid-auto-columns:1fr;gap:2px}}._range-row_akhf4_1{display:flex;flex-direction:column;flex:1 1 100%;width:100%;align-items:center}@container (width > 600px){._range-row_akhf4_1{flex-direction:row;gap:12px;justify-content:space-between}}._action-row_akhf4_15{display:flex;align-items:start;flex-direction:column;width:100%;gap:4px}@container (width > 600px){._action-row_akhf4_15{align-items:center;flex-direction:row;justify-content:space-evenly}}._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_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_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
  "use strict";/**
3
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
3
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
7
- */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@sheetxl/sdk"),t=require("@sheetxl/react"),o=require("./QQ4l7f6lYZb7S6td.cjs");Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>e.LicenseManager}),Object.defineProperty(exports,"useModelListener",{enumerable:!0,get:()=>t.useModelListener}),Object.defineProperty(exports,"useRangeListener",{enumerable:!0,get:()=>t.useRangeListener}),exports.AppearanceCommandButton=o.AppearanceCommandButton,exports.AutoColorPosition=o.AutoColorPosition,exports.BorderCommandButton=o.BorderCommandButton,exports.BorderPopupButton=o.BorderPopupButton,exports.BorderStyleButton=o.BorderStyleButton,exports.ClearCommandButton=o.ClearCommandButton,exports.ColorButton=o.ColorButton,exports.ColorCommandButton=o.ColorCommandButton,exports.ColorPanel=o.ColorPanel,exports.ColorPanelType=o.ColorPanelType,exports.ColorPopupButton=o.ColorPopupButton,exports.DeleteCellsCommandButton=o.DeleteCellsCommandButton,exports.DocThemeCommandButton=o.DocThemeCommandButton,exports.EagerStudio=o.EagerStudio,exports.FillCommandButton=o.FillCommandButton,exports.FilterColumnMenu=o.FilterColumnMenu,exports.FilterCommandButton=o.FilterCommandButton,exports.Filters=o.Filters,exports.FindCommandButton=o.FindCommandButton,exports.FontFamilyCommandButton=o.FontFamilyCommandButton,exports.FontSizeCommandButton=o.FontSizeCommandButton,exports.FormulaBar=o.FormulaBar,exports.FreezeCommandButton=o.FreezeCommandButton,exports.HelpCommandButton=o.HelpCommandButton,exports.HorizontalAlignCommandButton=o.HorizontalAlignCommandButton,exports.InsertCellsCommandButton=o.InsertCellsCommandButton,exports.InsertFunctionCommandPopupButton=o.InsertFunctionCommandPopupButton,exports.InsertFunctionSumCommandPopupButton=o.InsertFunctionSumCommandPopupButton,exports.InsertImageCommandButton=o.InsertImageCommandButton,exports.InsertScriptCommandButton=o.InsertScriptCommandButton,exports.MergeCommandButton=o.MergeCommandButton,exports.NamedCollectionEditor=o.NamedCollectionEditor,exports.NamedInput=o.NamedInput,exports.NumberFormatCommandButton=o.NumberFormatCommandButton,exports.PasteCommandButton=o.PasteCommandButton,exports.PresetCellStylesCommandButton=o.PresetCellStylesCommandButton,exports.PresetTableStylesCommandButton=o.PresetTableStylesCommandButton,exports.RangeInput=o.RangeInput,exports.RunScriptCommandButton=o.RunScriptCommandButton,exports.ScriptEditorToolbar=o.ScriptEditorToolbar,exports.ScriptWorkspace=o.ScriptWorkspace,exports.SheetTab=o.SheetTab,exports.SheetTabMenu=o.SheetTabMenu,exports.SheetZoomScale=o.SheetZoomScale,exports.SheetsAllMenu=o.SheetsAllMenu,exports.SortFilterCommandButton=o.SortFilterCommandButton,exports.StatusBar=o.StatusBar,exports.Studio=o.Studio,exports.StyledStrokeIcon=o.StyledStrokeIcon,exports.TableStyleCanvasPreview=o.TableStyleCanvasPreview,exports.TableStyleOptionsPanel=o.TableStyleOptionsPanel,exports.TableStylePreview=o.TableStylePreview,exports.TextEffectsCommandButton=o.TextEffectsCommandButton,exports.TextOverflowCommandButton=o.TextOverflowCommandButton,exports.TextRotateCommandButton=o.TextRotateCommandButton,exports.ThemeSelectButton=o.ThemeSelectButton,exports.ThemeSelectPanel=o.ThemeSelectPanel,exports.ThemeSelectPopupButton=o.ThemeSelectPopupButton,exports.UnderlineCommandButton=o.UnderlineCommandButton,exports.UndoRedoCommandButton=o.UndoRedoCommandButton,exports.VerticalAlignCommandButton=o.VerticalAlignCommandButton,exports.ViewGridLinesCommandButton=o.ViewGridLinesCommandButton,exports.ViewHeadingsCommandButton=o.ViewHeadingsCommandButton,exports.WalkingCopyCommandButton=o.WalkingCopyCommandButton,exports.WorkbookContextMenu=o.WorkbookContextMenu,exports.WorkbookElement=o.WorkbookElement,exports.WorkbookIO=o.WorkbookIO,exports.WorkbookStrip=o.WorkbookStrip,exports.WorkbookTitle=o.WorkbookTitle,exports.WorkbookViewCommandButton=o.WorkbookViewCommandButton,exports._WorkbookIO=o._WorkbookIO,exports.createGridStyleFromMUITheme=o.createGridStyleFromMUITheme,exports.default=o.Studio,exports.defaultNewWorkbook=o.defaultNewWorkbook,exports.setPrintExamplesOnLoad=o.setPrintExamplesOnLoad,exports.useWorkbookCommands=o.useWorkbookCommands;
7
+ */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("@sheetxl/sdk"),e=require("@sheetxl/react"),o=require("./BxlQ6aLh5_jUvk9w.cjs");Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>t.LicenseManager}),Object.defineProperty(exports,"DefaultTaskPaneRegistry",{enumerable:!0,get:()=>e.DefaultTaskPaneRegistry}),Object.defineProperty(exports,"useModelListener",{enumerable:!0,get:()=>e.useModelListener}),Object.defineProperty(exports,"useRangeListener",{enumerable:!0,get:()=>e.useRangeListener}),exports.AppearanceCommandButton=o.AppearanceCommandButton,exports.AutoColorPosition=o.AutoColorPosition,exports.BorderCommandButton=o.BorderCommandButton,exports.BorderPopupButton=o.BorderPopupButton,exports.BorderStyleButton=o.BorderStyleButton,exports.ClearCommandButton=o.ClearCommandButton,exports.ColorButton=o.ColorButton,exports.ColorCommandButton=o.ColorCommandButton,exports.ColorPanel=o.ColorPanel,exports.ColorPanelType=o.ColorPanelType,exports.ColorPopupButton=o.ColorPopupButton,exports.DeleteCellsCommandButton=o.DeleteCellsCommandButton,exports.DocThemeCommandButton=o.DocThemeCommandButton,exports.EagerStudio=o.EagerStudio,exports.FillCommandButton=o.FillCommandButton,exports.FilterColumnMenu=o.FilterColumnMenu,exports.FilterCommandButton=o.FilterCommandButton,exports.Filters=o.Filters,exports.FindCommandButton=o.FindCommandButton,exports.FontFamilyCommandButton=o.FontFamilyCommandButton,exports.FontSizeCommandButton=o.FontSizeCommandButton,exports.FormulaBar=o.FormulaBar,exports.FreezeCommandButton=o.FreezeCommandButton,exports.HelpCommandButton=o.HelpCommandButton,exports.HorizontalAlignCommandButton=o.HorizontalAlignCommandButton,exports.InsertCellsCommandButton=o.InsertCellsCommandButton,exports.InsertFunctionCommandPopupButton=o.InsertFunctionCommandPopupButton,exports.InsertFunctionSumCommandPopupButton=o.InsertFunctionSumCommandPopupButton,exports.InsertImageCommandButton=o.InsertImageCommandButton,exports.MergeCommandButton=o.MergeCommandButton,exports.NamedCollectionEditor=o.NamedCollectionEditor,exports.NamedInput=o.NamedInput,exports.NumberFormatCommandButton=o.NumberFormatCommandButton,exports.PasteCommandButton=o.PasteCommandButton,exports.PresetCellStylesCommandButton=o.PresetCellStylesCommandButton,exports.PresetTableStylesCommandButton=o.PresetTableStylesCommandButton,exports.RangeInput=o.RangeInput,exports.SheetTab=o.SheetTab,exports.SheetTabMenu=o.SheetTabMenu,exports.SheetZoomScale=o.SheetZoomScale,exports.SheetsAllMenu=o.SheetsAllMenu,exports.SortFilterCommandButton=o.SortFilterCommandButton,exports.StatusBar=o.StatusBar,exports.Studio=o.Studio,exports.StyledStrokeIcon=o.StyledStrokeIcon,exports.TableDetailsPanel=o.TableDetailsPanel,exports.TableStyleCanvasPreview=o.TableStyleCanvasPreview,exports.TableStyleOptionsPanel=o.TableStyleOptionsPanel,exports.TableStylePreview=o.TableStylePreview,exports.TextEffectsCommandButton=o.TextEffectsCommandButton,exports.TextOverflowCommandButton=o.TextOverflowCommandButton,exports.TextRotateCommandButton=o.TextRotateCommandButton,exports.ThemeSelectButton=o.ThemeSelectButton,exports.ThemeSelectPanel=o.ThemeSelectPanel,exports.ThemeSelectPopupButton=o.ThemeSelectPopupButton,exports.UnderlineCommandButton=o.UnderlineCommandButton,exports.UndoRedoCommandButton=o.UndoRedoCommandButton,exports.VerticalAlignCommandButton=o.VerticalAlignCommandButton,exports.ViewGridLinesCommandButton=o.ViewGridLinesCommandButton,exports.ViewHeadingsCommandButton=o.ViewHeadingsCommandButton,exports.WalkingCopyCommandButton=o.WalkingCopyCommandButton,exports.WorkbookContextMenu=o.WorkbookContextMenu,exports.WorkbookElement=o.WorkbookElement,exports.WorkbookIO=o.WorkbookIO,exports.WorkbookStrip=o.WorkbookStrip,exports.WorkbookTitle=o.WorkbookTitle,exports.WorkbookViewCommandButton=o.WorkbookViewCommandButton,exports._WorkbookIO=o._WorkbookIO,exports.createGridStyleFromMUITheme=o.createGridStyleFromMUITheme,exports.default=o.Studio,exports.defaultNewWorkbook=o.defaultNewWorkbook,exports.setPrintExamplesOnLoad=o.setPrintExamplesOnLoad,exports.useWorkbookCommands=o.useWorkbookCommands;
@@ -1,6 +1,6 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material"),k=require("@sheetxl/utils-react"),D=require("@sheetxl/utils-mui"),T=require("./QQ4l7f6lYZb7S6td.cjs"),y=["Ok","Cancel"],b=t.memo(x=>{const{tableOptions:a,context:c,onOption:u,onValidateOption:N,onDone:p,options:d=y,defaultOption:l=d?.[0],cancelOption:s="Cancel",sx:O,...h}=x,[m,f]=t.useState(!1),[o,C]=t.useState(()=>a?.hasHeader??!1),[i,j]=t.useState(()=>a?.ranges??null),q=k.useCallbackRef(e=>{const g={...a,hasHeader:o,ranges:i};u?.(e,e===s,e===l),p?.({option:e,tableOptions:g})},[p,u,l,s,o,i,a]),S=t.useCallback(async(e,g)=>null,[]);return n.jsx(D.OptionsDialog,{title:"Insert Table",options:d,onDone:q,onValidateOption:S,defaultOption:l,cancelOption:s,autoFocusSel:".range-input input",sx:{width:"360px",...O},...h,children:n.jsxs(r.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[n.jsx(T.RangeInput,{formName:"range",value:i,onChangeInput:e=>j(e),resolvedAddress:c.getNames().getRanges.bind(c.getNames()),onFocus:e=>{m||e.target?.select(),f(!0)}}),n.jsx(r.FormControlLabel,{control:n.jsx(r.Checkbox,{checked:o,onChange:()=>C(!o)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=b,exports.default=b;
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material"),k=require("@sheetxl/utils-react"),D=require("@sheetxl/utils-mui"),T=require("./BxlQ6aLh5_jUvk9w.cjs"),y=["Ok","Cancel"],b=t.memo(x=>{const{tableOptions:a,context:c,onOption:u,onValidateOption:N,onDone:p,options:d=y,defaultOption:l=d?.[0],cancelOption:s="Cancel",sx:O,...h}=x,[m,f]=t.useState(!1),[o,C]=t.useState(()=>a?.hasHeader??!1),[i,j]=t.useState(()=>a?.ranges??null),q=k.useCallbackRef(e=>{const g={...a,hasHeader:o,ranges:i};u?.(e,e===s,e===l),p?.({option:e,tableOptions:g})},[p,u,l,s,o,i,a]),S=t.useCallback(async(e,g)=>null,[]);return n.jsx(D.OptionsDialog,{title:"Insert Table",options:d,onDone:q,onValidateOption:S,defaultOption:l,cancelOption:s,autoFocusSel:".range-input input",sx:{width:"360px",...O},...h,children:n.jsxs(r.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[n.jsx(T.RangeInput,{formName:"range",value:i,onChangeInput:e=>j(e),resolvedAddress:c.getNames().getRanges.bind(c.getNames()),onFocus:e=>{m||e.target?.select(),f(!0)}}),n.jsx(r.FormControlLabel,{control:n.jsx(r.Checkbox,{checked:o,onChange:()=>C(!o)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=b,exports.default=b;
@@ -3,9 +3,9 @@ import { memo as N, useState as i, useCallback as T } from "react";
3
3
  import { Box as w, FormControlLabel as F, Checkbox as j } from "@mui/material";
4
4
  import { useCallbackRef as v } from "@sheetxl/utils-react";
5
5
  import { OptionsDialog as y } from "@sheetxl/utils-mui";
6
- import { R } from "./CGVa4zFRRZyFzDvh.mjs";
6
+ import { R } from "./CzdBzjYgP1i3pkPL.mjs";
7
7
  /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,15 +1,14 @@
1
1
  import { jsxs as Me, jsx as G } from "react/jsx-runtime";
2
2
  import { Box as se, TextField as qt, InputAdornment as $t, IconButton as Xt, FormControlLabel as Yt, Checkbox as Jt, Typography as Zt, TableCell as Le, DialogContent as Qt } from "@mui/material";
3
- import { KeyCodes as pt } from "@sheetxl/utils-react";
4
- import { toShortcutElements as eo, InternalWindow as to } from "@sheetxl/utils-mui";
3
+ import { KeyCodes as pt, DynamicIcon as eo } from "@sheetxl/utils-react";
4
+ import { toShortcutElements as to, InternalWindow as oo } from "@sheetxl/utils-mui";
5
5
  import * as C from "react";
6
- import mt, { cloneElement as oo, useState as ae, useMemo as no, useEffect as Ge } from "react";
7
- import { _ as ro, b as N, d as U, e as io, f as ge } from "./CGVa4zFRRZyFzDvh.mjs";
8
- import { alpha as ce, getOverlayAlpha as de, styled as lo } from "@mui/material/styles";
9
- import { Close as so } from "@mui/icons-material";
6
+ import mt, { cloneElement as no, useState as ae, useMemo as ro, useEffect as Ge } from "react";
7
+ import { _ as io, a as N, b as U, d as lo, e as ge } from "./CzdBzjYgP1i3pkPL.mjs";
8
+ import { alpha as ce, getOverlayAlpha as de, styled as so } from "@mui/material/styles";
10
9
  import { CommonUtils as ao } from "@sheetxl/utils";
11
10
  /**
12
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
11
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
13
12
  *
14
13
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
15
14
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -61,7 +60,7 @@ function T(n) {
61
60
  }
62
61
  function H(n, e) {
63
62
  if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
64
- n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && ro(n, e);
63
+ n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && io(n, e);
65
64
  }
66
65
  function p(n, e, t) {
67
66
  return (e = gt(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
@@ -344,7 +343,7 @@ var co = (function() {
344
343
  this._maybeMeasureCell();
345
344
  } }, { key: "render", value: function() {
346
345
  var e = this, t = this.props.children, o = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
347
- return o === null ? o : oo(o, { ref: function(r) {
346
+ return o === null ? o : no(o, { ref: function(r) {
348
347
  typeof o.ref == "function" ? o.ref(r) : o.ref && (o.ref.current = r), e._child.current = r;
349
348
  } });
350
349
  } }, { key: "_getCellMeasurements", value: function() {
@@ -623,7 +622,7 @@ function Ve(n) {
623
622
  }
624
623
  function ee(n, e) {
625
624
  if (n == null) return {};
626
- var t, o, r = io(n, e);
625
+ var t, o, r = lo(n, e);
627
626
  if (Object.getOwnPropertySymbols) {
628
627
  var l = Object.getOwnPropertySymbols(n);
629
628
  for (o = 0; o < l.length; o++) t = l[o], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (r[t] = n[t]);
@@ -2091,7 +2090,7 @@ class Lo extends mt.PureComponent {
2091
2090
  }, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: o, width: r }) => {
2092
2091
  const { columns: l, rowHeight: i, onRowClick: a } = this.props;
2093
2092
  let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
2094
- return t === "shortcut" ? s = eo(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), G(Le, { component: "div", className: ge(Te, oe, { [Ie]: a == null }), variant: "body", style: c, align: o != null && l[o].numeric ? "right" : "left", children: s });
2093
+ return t === "shortcut" ? s = to(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), G(Le, { component: "div", className: ge(Te, oe, { [Ie]: a == null }), variant: "body", style: c, align: o != null && l[o].numeric ? "right" : "left", children: s });
2095
2094
  }, this.headerRenderer = ({ label: e, columnIndex: t, width: o }) => {
2096
2095
  const { headerHeight: r, columns: l } = this.props, i = l[t];
2097
2096
  return G(Le, { component: "div", className: ge(Te, oe, Ie), variant: "head", sx: { width: o, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: G("span", { children: i.label }) });
@@ -2108,9 +2107,9 @@ class Lo extends mt.PureComponent {
2108
2107
  }) }) });
2109
2108
  }
2110
2109
  }
2111
- const Go = lo(Lo)(({ theme: n }) => ({ "& .ReactVirtualized__Table__headerRow": { ...n.direction === "rtl" && { paddingLeft: "0 !important" }, ...n.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${oe}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Vt}`]: { cursor: "pointer" }, [`& .${Kt}`]: { "&:hover:not([disabled])": { backgroundColor: n.palette.grey[200] } }, [`& .${Te}`]: { flex: 1 }, [`& .${Ie}`]: { cursor: "initial" } }));
2110
+ const Go = so(Lo)(({ theme: n }) => ({ "& .ReactVirtualized__Table__headerRow": { ...n.direction === "rtl" && { paddingLeft: "0 !important" }, ...n.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${oe}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Vt}`]: { cursor: "pointer" }, [`& .${Kt}`]: { "&:hover:not([disabled])": { backgroundColor: n.palette.grey[200] } }, [`& .${Te}`]: { flex: 1 }, [`& .${Ie}`]: { cursor: "initial" } }));
2112
2111
  function Ao(n) {
2113
- const { commands: e, ...t } = n, [o, r] = ae(!1), [l, i] = ae(""), a = no(() => {
2112
+ const { commands: e, ...t } = n, [o, r] = ae(!1), [l, i] = ae(""), a = ro(() => {
2114
2113
  let h = e.getAllCommands();
2115
2114
  o || (h = h.filter((_) => _.command.shortcut())), h.sort((_, S) => _.command.label().localeCompare(S.command.label()));
2116
2115
  const v = [], g = (_) => _.replace(/\n\n/g, `
@@ -2125,7 +2124,7 @@ function Ao(n) {
2125
2124
  return v;
2126
2125
  }, [o, e]), [s, c] = ae(null);
2127
2126
  Ge(() => {
2128
- import("./KULqIIHcvNriSu7F.mjs").then((h) => {
2127
+ import("./db-2uDA7mYS4QpHj.mjs").then((h) => {
2129
2128
  c(new h.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
2130
2129
  });
2131
2130
  }, [a]);
@@ -2137,7 +2136,7 @@ function Ao(n) {
2137
2136
  for (let g = 0; g < h.length; g++) v[g] = h[g].item;
2138
2137
  u(v);
2139
2138
  }, 90)();
2140
- }, [s, l]), Me(se, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Me(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [G(qt, { InputProps: { sx: { backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } }, endAdornment: G($t, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: G(Xt, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: G(so, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (h) => h.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (h) => f ? `${h.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (h) => f ? `${h.palette.error.main} !important` : void 0 } }, value: l, onChange: (h) => {
2139
+ }, [s, l]), Me(se, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Me(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [G(qt, { slotProps: { input: { sx: { backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` }, endAdornment: G($t, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: G(Xt, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: G(eo, { iconKey: "Close" }) }) }) }, htmlInput: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } } }, sx: { flex: "1 1 40%", marginRight: (h) => h.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (h) => f ? `${h.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (h) => f ? `${h.palette.error.main} !important` : void 0 } }, value: l, onChange: (h) => {
2141
2140
  i(h.target.value);
2142
2141
  }, onKeyDown: (h) => {
2143
2142
  h.which === pt.Escape && l.length > 0 && (i(""), h.stopPropagation(), h.preventDefault());
@@ -2145,12 +2144,12 @@ function Ao(n) {
2145
2144
  h.stopPropagation();
2146
2145
  } }), G(Yt, { sx: { flex: "1 1 60%" }, control: G(Jt, { checked: o, onChange: () => r(!o) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), G(se, { sx: { flex: "1 1 100%", borderRadius: (h) => `${h.shape.borderRadius}px`, border: (h) => `solid ${h.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (h) => h.palette.background.paper, backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` } }, children: G(Go, { rowCount: d.length, rowGetter: (h) => d[h.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), G(se, { sx: { display: "flex", flexShrink: "0", paddingLeft: (h) => h.spacing(1), paddingTop: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: G(Zt, { noWrap: !0, component: "div", sx: { color: (h) => f ? h.palette.error.main : h.palette.text.secondary }, children: `${d.length === 0 ? "No" : d.length} shortcut key${d.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
2147
2146
  }
2148
- const Vo = (n) => {
2147
+ const Uo = (n) => {
2149
2148
  const { title: e = "Shortcut Keys", commands: t, sx: o, ...r } = n;
2150
- return G(to, { isModal: !0, onKeyDown: (l) => {
2149
+ return G(oo, { isModal: !0, onKeyDown: (l) => {
2151
2150
  l.keyCode === pt.F1 && l.preventDefault();
2152
2151
  }, sx: { width: "780px", ...o }, title: e, autoFocusSel: ".input", ...r, children: G(Qt, { dividers: !0, children: G(Ao, { commands: t, sx: { marginBottom: "8px" } }) }) });
2153
2152
  };
2154
2153
  export {
2155
- Vo as default
2154
+ Uo as default
2156
2155
  };
@@ -5,7 +5,7 @@ import { Sort as s, IRange as r } from "@sheetxl/sdk";
5
5
  import { useCallbackRef as b } from "@sheetxl/utils-react";
6
6
  import { OptionsDialog as f } from "@sheetxl/utils-mui";
7
7
  /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -3,9 +3,9 @@ import { memo as E, useMemo as R, useState as d, useCallback as V } from "react"
3
3
  import { Box as L } from "@mui/material";
4
4
  import { useCallbackRef as m } from "@sheetxl/utils-react";
5
5
  import { OptionsDialog as S } from "@sheetxl/utils-mui";
6
- import { N as A, R as G } from "./CGVa4zFRRZyFzDvh.mjs";
6
+ import { N as A, R as G } from "./CzdBzjYgP1i3pkPL.mjs";
7
7
  /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -2,10 +2,10 @@ import { jsxs as ie, jsx as U } from "react/jsx-runtime";
2
2
  import O, { isValidElement as qu, PureComponent as pe, Component as de, memo as Ku, useState as ft, useCallback as ct, useLayoutEffect as Gu } from "react";
3
3
  import { useTheme as Ju } from "@mui/material/styles";
4
4
  import { Box as Qu } from "@mui/material";
5
- import { g as mu, r as Zu, c as ve, C as es } from "./CGVa4zFRRZyFzDvh.mjs";
5
+ import { g as mu, r as Zu, c as ve, C as es } from "./CzdBzjYgP1i3pkPL.mjs";
6
6
  import { ReactUtils as ts } from "@sheetxl/utils-react";
7
7
  /**
8
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -0,0 +1,49 @@
1
+ import { jsx as o, jsxs as E } from "react/jsx-runtime";
2
+ import { memo as j, useMemo as O, useState as m, useCallback as b } from "react";
3
+ import { alpha as i, getOverlayAlpha as r } from "@mui/material/styles";
4
+ import { Box as S, FormControl as D, TextField as F } from "@mui/material";
5
+ import { useCallbackRef as f } from "@sheetxl/utils-react";
6
+ import { OptionsDialog as U } from "@sheetxl/utils-mui";
7
+ /**
8
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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 V = ["Ok", "Cancel"], Q = j((v) => {
14
+ const { initialHyperlink: n = null, initialDisplay: H = null, onUpdateHyperlink: x, context: s, onOption: h, onValidateOption: p, onDone: d, options: y = V, defaultOption: c = y?.[0], cancelOption: l = "Cancel", sx: w, ...I } = v, M = O(() => (n ?? s?.()?.getHyperlink()) !== null, []), k = O(() => {
15
+ let e = null, t = null;
16
+ n && (typeof n == "string" ? t = n : e = n);
17
+ const g = e ?? s?.()?.getHyperlink();
18
+ return { address: t ?? g?.getAddress() ?? "", textToDisplay: g?.getDisplayText() ?? "" };
19
+ }, [n, s]), [a, P] = m(k.address), [u, B] = m(() => {
20
+ const e = s?.().toTextUnformatted() ?? H;
21
+ return e === k.address ? "" : e;
22
+ }), [$, T] = m(!1), A = b((e) => {
23
+ B(e.target.value);
24
+ }, []), C = b(async (e, t) => null, []), L = f(async (e) => {
25
+ e !== l && x?.(a === "" ? null : { address: a }, u), h?.(e, e === l, e === c), d?.();
26
+ }, [a, u, x, d, h, c, l]), W = f((e) => {
27
+ P(e.target.value), C(e.target.value, null);
28
+ }, [p]), z = f(async (e) => {
29
+ let t = await Promise.resolve(p?.(e));
30
+ try {
31
+ t !== !1 && (t = await C(a, e));
32
+ } catch {
33
+ }
34
+ return t ?? !0;
35
+ }, [p]);
36
+ return o(U, { title: (M ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (e) => L(e), onValidateOption: z, defaultOption: c, cancelOption: l, autoFocusSel: ".autoFocus", sx: { width: "480px", ...w }, ...I, children: E(S, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
37
+ $ || e.target?.select(), T(!0);
38
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: a, onChange: W, onContextMenu: (e) => {
39
+ e.stopPropagation();
40
+ } }) }), o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
41
+ T(!0);
42
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: u, onChange: A, onContextMenu: (e) => {
43
+ e.stopPropagation();
44
+ } }) })] }) });
45
+ });
46
+ export {
47
+ Q as HyperlinkDialog,
48
+ Q as default
49
+ };
@@ -1,31 +1,31 @@
1
1
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
2
2
  import { memo as W, useState as h, useCallback as F, useEffect as G, useMemo as S } from "react";
3
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
+ import { Box as w, FormControl as D, InputLabel as H, Select as q, TextField as A, Typography as I, MenuItem as J } from "@mui/material";
5
5
  import { NumberFormat as n } from "@sheetxl/sdk";
6
6
  import { useCallbackRef as c, KeyCodes as Q } from "@sheetxl/utils-react";
7
7
  import { OptionsDialog as U } from "@sheetxl/utils-mui";
8
8
  /**
9
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
9
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
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 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) => {
16
- C?.(a, e), b?.(e, e === d, e === i), m?.();
17
- }, [a, C, m, b, d, i]), B = c(async (e) => {
14
+ const X = ["Ok", "Cancel"], ne = W((P) => {
15
+ const { initialValue: $, context: x, onOption: b, onValidateOption: m, onInputOption: C, onDone: u, options: v = X, defaultOption: i = v?.[0], cancelOption: d = "Cancel", sx: N, ...M } = P, [a, T] = h($), [V, j] = h(!1), g = F(async (e, o) => !0, []), f = c(async (e) => {
16
+ C?.(a, e), b?.(e, e === d, e === i), u?.();
17
+ }, [a, C, u, b, d, i]), B = c(async (e) => {
18
18
  e.keyCode === Q.Enter && await g?.(a, null) !== !1 && f(i);
19
19
  }, [a, f]), L = c((e) => {
20
20
  T(e.target.value), g?.(e.target.value, null);
21
- }, [u]), R = c(async (e) => {
22
- let o = await Promise.resolve(u?.(e));
21
+ }, [m]), R = c(async (e) => {
22
+ let o = await Promise.resolve(m?.(e));
23
23
  try {
24
24
  o !== !1 && (o = await Promise.resolve(g?.(a, e)) ?? !0);
25
25
  } catch {
26
26
  }
27
27
  return o ?? !0;
28
- }, [u]), [k, O] = h(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
28
+ }, [m]), [k, O] = h(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
29
29
  G(() => {
30
30
  O(n.Styles.lookupStyle(a).formatType ?? n.Type.Custom);
31
31
  }, [a]);
@@ -41,11 +41,11 @@ const X = ["Ok", "Cancel"], ne = W((I) => {
41
41
  const e = x();
42
42
  return e.createTemporaryCell({ value: e.getValue() ?? 12345, style: { numberFormat: a } });
43
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
+ return t(U, { title: "Number Format", options: v, onDone: u, 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(D, { 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(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(A, { label: "Code", onFocus: (e) => {
45
45
  V || e.target?.select(), j(!0);
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
+ }, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { 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) => {
47
47
  e.stopPropagation();
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
+ } }) }), y(w, { children: [t(I, { variant: "caption", component: "div", sx: { paddingLeft: (e) => e.spacing(2) }, children: "Preview" }), t(I, { 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)" })] })] }) });
49
49
  });
50
50
  export {
51
51
  ne as NumberFormatDialog,