@sheetxl/studio-mui 0.7.9 → 0.7.10
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.
- package/browser/cjs/{pLwzHJC2rMpMNlmN.cjs → B-dxazW1OuNBcp02.cjs} +1 -1
- package/browser/cjs/{DWCZwMHAmHr_6pOv.cjs → B-utsUoR4zuLaAhd.cjs} +2 -2
- package/browser/cjs/{Cf-kkPm1FigHKB2n.cjs → B_eAGdji8Nx5J9T4.cjs} +2 -2
- package/browser/cjs/{DA9XIw3uWopubSOm.cjs → BwTLuy_PnmJor7W8.cjs} +2 -2
- package/browser/cjs/{C_USiuvDG2dfWtXj.cjs → CcXAFa-nlR_hdzWz.cjs} +11 -11
- package/browser/cjs/{T7VT7LHcSGCG0nHe.cjs → CqZdJyYmTYFrQaQ2.cjs} +2 -2
- package/browser/cjs/{DQupeVKF6A0l_r2_.cjs → DLnPNypHwR15SmCU.cjs} +1 -1
- package/browser/cjs/{Bm-7dNP3FmSD8RKB.cjs → DZBKNuFYEUx6Effx.cjs} +1 -1
- package/browser/cjs/{1SqZN5MQ5PzAcIvC.cjs → DiR8AzQV9os4ZYk0.cjs} +7 -7
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BBYVAwo4ouiMmtKC.cjs → mMBBa38sCpWqbAas.cjs} +1 -1
- package/browser/cjs/{D1OaqRgNJbMQkAd5.cjs → pVcTsL-TasyB4b2-.cjs} +1 -1
- package/browser/esm/{DTxgrQXbG3N9lW1K.mjs → 8BoSui-509azp4_T.mjs} +2 -2
- package/browser/esm/{YpJtXAhMACxtW1Rk.mjs → BcD_hjx3QUJ3mxc9.mjs} +2 -2
- package/browser/esm/{BkLdZhD76b4clcIe.mjs → BcUbD_6hNdscDPHH.mjs} +212 -208
- package/browser/esm/{vrN0FWxqEeg1-vWU.mjs → BfjN2uCTh7d2HrDp.mjs} +1 -1
- package/browser/esm/{DV6MYPn_wgUytG9p.mjs → BobeGilMvc-Tjglo.mjs} +1 -1
- package/browser/esm/{8ySqzQ-18kdZCc_T.mjs → C6PORxVVmatRwpCK.mjs} +1 -1
- package/browser/esm/{CusJChXpaPfoicnm.mjs → CFbMYRxhxMq4XxOa.mjs} +2 -2
- package/browser/esm/{DLRGvvkeHamosHqQ.mjs → D5Y0kqk4q5sYYCML.mjs} +378 -372
- package/browser/esm/{CrxCbPC8OsPYiu18.mjs → DG5wukgrtP5snHCG.mjs} +1 -1
- package/browser/esm/{DeBXIHYAvBBDeuyl.mjs → DcO8rsG2l9PJNAV1.mjs} +1 -1
- package/browser/esm/{Bx_qMvcXcJ9rsRW0.mjs → DdvY0bLbK9TT-rIs.mjs} +2 -2
- package/browser/esm/index.mjs +43 -41
- package/licenses/dependencies.txt +139 -139
- package/node/esm/{CrfdSYnd6drqE5fB.mjs → BNBkIeEbORFqf5jQ.mjs} +1 -1
- package/node/esm/{CN31EL9Soh-9w3jF.mjs → CEDKrfqPSMDT9wZY.mjs} +1 -1
- package/node/esm/{DIXy8ZVj_kaaOwIJ.mjs → Ck5obwB4YN3EaFYQ.mjs} +1 -1
- package/node/esm/{jsycByMMbwMZibUQ.mjs → CqmV-z1wjbh8jIia.mjs} +42 -38
- package/node/esm/{BVjsplqVie80wjNf.mjs → DBwzi9m6T7hDldM4.mjs} +1 -1
- package/node/esm/{4Woq8PA_nHBBWJE_.mjs → DHpIxaLHKL41gA1f.mjs} +1 -1
- package/node/esm/{Cglez5pr5a5RTdHS.mjs → DTNMbcRmISndj_SS.mjs} +1 -1
- package/node/esm/{BxpSw5aPIr7UXKbB.mjs → DXwKau3GlIioZkFC.mjs} +1 -1
- package/node/esm/index.mjs +123 -117
- package/node/esm/{DAMa-CbdXO0XKKam.mjs → l8mcLBezFW9dkg5N.mjs} +1 -1
- package/package.json +8 -8
- package/types/index.d.ts +6 -0
|
@@ -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.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.10
|
|
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("./C_USiuvDG2dfWtXj.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("./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;
|
|
@@ -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.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.10
|
|
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.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.10
|
|
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.
|