@sheetxl/studio-mui 0.7.10 → 0.7.11

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 (35) hide show
  1. package/browser/cjs/{CqZdJyYmTYFrQaQ2.cjs → 6CSKwJbNaX76JrHk.cjs} +2 -2
  2. package/browser/cjs/{BwTLuy_PnmJor7W8.cjs → BVcL3i-jUQBoMe45.cjs} +2 -2
  3. package/browser/cjs/{DLnPNypHwR15SmCU.cjs → BZgunhyCzDtzqWWh.cjs} +1 -1
  4. package/browser/cjs/{DZBKNuFYEUx6Effx.cjs → C8FVzCzhAJQdB_Oy.cjs} +1 -1
  5. package/browser/cjs/{CcXAFa-nlR_hdzWz.cjs → Chm8zWC8ekU1Qug_.cjs} +3 -3
  6. package/browser/cjs/{B_eAGdji8Nx5J9T4.cjs → DNznc2i6xg2iIKE9.cjs} +2 -2
  7. package/browser/cjs/{DiR8AzQV9os4ZYk0.cjs → Dk9NCZiAOD9zzs39.cjs} +3 -3
  8. package/browser/cjs/{B-dxazW1OuNBcp02.cjs → DrcPMnvJ8yZx-YWK.cjs} +1 -1
  9. package/browser/cjs/{B-utsUoR4zuLaAhd.cjs → MKXDODFXAmzmh_2S.cjs} +2 -2
  10. package/browser/cjs/{mMBBa38sCpWqbAas.cjs → WrGDj1nLC4-sMZKq.cjs} +1 -1
  11. package/browser/cjs/index.cjs +2 -2
  12. package/browser/cjs/{pVcTsL-TasyB4b2-.cjs → rxLo_Ld1Xi-KKL6y.cjs} +1 -1
  13. package/browser/esm/{BcD_hjx3QUJ3mxc9.mjs → A_B51mAtU7xxxYD-.mjs} +2 -2
  14. package/browser/esm/{D5Y0kqk4q5sYYCML.mjs → BUE0z3b78bw14bK3.mjs} +6 -6
  15. package/browser/esm/{BfjN2uCTh7d2HrDp.mjs → B_3dBo5bkIr0eZVH.mjs} +1 -1
  16. package/browser/esm/{DdvY0bLbK9TT-rIs.mjs → BcIL0e_fUxF3JbFD.mjs} +2 -2
  17. package/browser/esm/{8BoSui-509azp4_T.mjs → CFX1xSvjQ7k3GYNy.mjs} +2 -2
  18. package/browser/esm/{CFbMYRxhxMq4XxOa.mjs → D_6ik-OgPF7G8sN7.mjs} +2 -2
  19. package/browser/esm/{BobeGilMvc-Tjglo.mjs → Dfg1sHqBfYLAePQR.mjs} +1 -1
  20. package/browser/esm/{BcUbD_6hNdscDPHH.mjs → DmBripa50tKiqREL.mjs} +3 -3
  21. package/browser/esm/{C6PORxVVmatRwpCK.mjs → DneV3-mqSBq1-Ies.mjs} +1 -1
  22. package/browser/esm/{DG5wukgrtP5snHCG.mjs → IM-boc1h29ZmHdvy.mjs} +1 -1
  23. package/browser/esm/index.mjs +2 -2
  24. package/browser/esm/{DcO8rsG2l9PJNAV1.mjs → rTUe_Q7TeplDbtPZ.mjs} +1 -1
  25. package/node/esm/{CEDKrfqPSMDT9wZY.mjs → B220q5iXepGyNhkv.mjs} +1 -1
  26. package/node/esm/{l8mcLBezFW9dkg5N.mjs → BTPfATo02Qq6ojW1.mjs} +1 -1
  27. package/node/esm/{DHpIxaLHKL41gA1f.mjs → Bgm2i4z2IS2cPd09.mjs} +1 -1
  28. package/node/esm/{DTNMbcRmISndj_SS.mjs → Bqq76CFUL47Gxzv9.mjs} +1 -1
  29. package/node/esm/{BNBkIeEbORFqf5jQ.mjs → C2ndkS7Xv8G7tqsJ.mjs} +1 -1
  30. package/node/esm/{Ck5obwB4YN3EaFYQ.mjs → CDgzja3zCRKU-fkg.mjs} +1 -1
  31. package/node/esm/{CqmV-z1wjbh8jIia.mjs → DLB7yLWLF3CYoYgq.mjs} +1 -1
  32. package/node/esm/{DXwKau3GlIioZkFC.mjs → JtXI2INXnATXNbIy.mjs} +1 -1
  33. package/node/esm/index.mjs +6 -6
  34. package/node/esm/{DBwzi9m6T7hDldM4.mjs → ysEyad2ZFSLz_tlq.mjs} +1 -1
  35. package/package.json +8 -8
@@ -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.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.11
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 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("./CcXAFa-nlR_hdzWz.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;
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("./Chm8zWC8ekU1Qug_.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.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.11
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("./CcXAFa-nlR_hdzWz.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("./Chm8zWC8ekU1Qug_.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,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.11
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.10
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.11
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.