@sheetxl/studio-mui 0.6.7 → 0.6.9
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/{CG7Z-lZAq5czFOc4.cjs → BK-SPf2iAdtY2v2r.cjs} +2 -2
- package/browser/cjs/{DmM-DjGh015RZXzh.cjs → BMUK7WDOHjdCTlnL.cjs} +2 -2
- package/browser/cjs/{CRAcvjlcqcZK3WEL.cjs → Bo0KAIoyc8wjrX0Z.cjs} +9 -9
- package/browser/cjs/{0lIBM05Oo-mPaz-z.cjs → CybaPr_tDqBYYm7l.cjs} +1 -1
- package/browser/cjs/{dW-tltmR8b4Fnr8g.cjs → D11dQP9ASVFsBy2m.cjs} +1 -1
- package/browser/cjs/{BaMk9jpFcmdBLRiR.cjs → DQUtpkYC0M_fQv5_.cjs} +1 -1
- package/browser/cjs/{BOqCECEhgUXx-4kI.cjs → DSWZ0c6YrATHKT05.cjs} +2 -2
- package/browser/cjs/{aiA3IvXgAikOrMwA.cjs → Dy8tMdAvieDNFyNN.cjs} +1 -1
- package/browser/cjs/{CCynZK017xahlNmi.cjs → LeRvKTH-iRno1m6n.cjs} +3 -3
- package/browser/cjs/{U3YgQ0fN5bvp9-Kq.cjs → NYv7o9QPsXmI71mF.cjs} +2 -2
- package/browser/cjs/{CtkBZTjdHqYp7xft.cjs → P_MTTr3k6LbqArTi.cjs} +1 -1
- package/browser/cjs/{5JvwHMk_pfEj4cZH.cjs → StodJUERc9sXjDM3.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{he9qd0KA2ONjy_rM.mjs → 5ec1MS8QFxg_wTk6.mjs} +3 -3
- package/browser/esm/{COc-f5ehGeQiPNRP.mjs → 7bB6IyFR78AK_xsc.mjs} +2 -2
- package/browser/esm/{Ck2WRaGuINSXU-Ds.mjs → BrkDPL7uUPTUnJf1.mjs} +2 -2
- package/browser/esm/{BxFzIKTovnlqjZa-.mjs → C-SjjwB782n9nBYJ.mjs} +1 -1
- package/browser/esm/{DnJZFwOGICYRq_KW.mjs → CQdHuWRKrc46Ov6t.mjs} +1 -1
- package/browser/esm/{MgTnV8wS66lhumxT.mjs → CjX3_GVACz2x1KDj.mjs} +696 -694
- package/browser/esm/{C9vgT92BfuOKSqpB.mjs → CkNOojlllvYRHHW-.mjs} +1 -1
- package/browser/esm/{C1aztXQ58ekuzis6.mjs → D0-6I_5PCSF8a7L7.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DVbgcz-P2Z8D_yei.mjs → oJGEc64Ccgag_PQZ.mjs} +2 -2
- package/browser/esm/{EmQd5txQ_ErHLAeT.mjs → q6UgUqJldJL6n2-x.mjs} +2 -2
- package/browser/esm/{Dcag5-NLJslhyfpE.mjs → q8P-1V6WnCy4m7sv.mjs} +2 -2
- package/browser/esm/{_08whbc3oA7BY_S7.mjs → qGhUWftd5xiC-hxc.mjs} +1 -1
- package/node/esm/{CHNFCXGADLFVCwYo.mjs → BTK5i03GS-FeY98T.mjs} +1 -1
- package/node/esm/{DESr6vZQNH2lHWZ9.mjs → BTkpV3euK14xAUB8.mjs} +1 -1
- package/node/esm/{BfPfvgdZrUoZvEme.mjs → BVBW-cMRTjK6KVFg.mjs} +1 -1
- package/node/esm/{BAHfO9ALnEUni4Ts.mjs → BYoYizxJTZD7MEGg.mjs} +1 -1
- package/node/esm/{IID7UVIiXTHvqYHK.mjs → BqgO5jB5pGXA3Hk4.mjs} +1 -1
- package/node/esm/{Cgxo3ZcSke1eBYVG.mjs → CLc5xV4p8QWx-rjD.mjs} +1 -1
- package/node/esm/{DhN2m_4WFHDBADx-.mjs → CNeOpyGVrqmfLHyT.mjs} +1 -1
- package/node/esm/{Ciwkv8DXp86zUjTb.mjs → D1dqpyBV7ZLrMRVk.mjs} +1 -1
- package/node/esm/{B5K3cjwd0usYef8w.mjs → DeCgfM0e20R-VV0G.mjs} +1 -1
- package/node/esm/{BqPC_rbjZN2Jy_y4.mjs → cm-ecS0S68xhC_Yj.mjs} +1 -1
- package/node/esm/index.mjs +512 -510
- 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.6.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.9
|
|
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("./
|
|
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("./Bo0KAIoyc8wjrX0Z.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.9
|
|
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 t=require("react/jsx-runtime"),s=require("react"),d=require("@mui/material/styles"),r=require("@mui/material"),T=require("@mui/icons-material"),a=require("@sheetxl/sdk"),x=require("@sheetxl/utils-react"),l=require("@sheetxl/utils-mui"),ne=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),d=require("@mui/material/styles"),r=require("@mui/material"),T=require("@mui/icons-material"),a=require("@sheetxl/sdk"),x=require("@sheetxl/utils-react"),l=require("@sheetxl/utils-mui"),ne=require("./Bo0KAIoyc8wjrX0Z.cjs"),A=s.memo(I=>{const{label:C,value:f,options:c,onSelect:g,tabIndex:y=0,...E}=I,[k,b]=s.useState(()=>X(f,c));s.useEffect(()=>{b(X(f,c))},[f,c]);const S=x.useCallbackRef(h=>{b(h.target.value),g?.(c[h.target.value])},[g,c]),p=s.useMemo(()=>Object.keys(c).map(h=>t.jsx(r.MenuItem,{value:h,children:h},h)),[c]);return t.jsxs(r.FormControl,{sx:{minWidth:135},size:"small",children:[t.jsx(r.InputLabel,{children:C}),t.jsx(r.Select,{inputProps:{tabIndex:y},value:k,label:C,onChange:S,sx:{backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},...E,children:p})]})}),K={Workbook:"workbook",Sheet:"sheet"},G={enter:140,exit:140},Q={Formulas:a.ICell.Content.Formulas,Values:a.ICell.Content.Values,Notes:a.ICell.Content.Notes,Comments:a.ICell.Content.Comments},Y={...Q};delete Y.Values;const te={"By Rows":!0,"By Columns":!1},X=(I,C)=>{const f=Object.keys(C);for(let c=0;c<f.length;c++){const g=f[c];if(C[g]===I)return g}},J=s.memo(I=>{const{replace:C=!1,findText:f,replaceText:c,findOptions:g,replaceOptions:y,title:E,onHide:k,onFindOrReplace:b,...S}=I,p=s.useRef(null),h=s.useRef(null),M=s.useRef(null),D=s.useRef(null),P=s.useRef(null),q=s.useRef(null),W=(e,n)=>{n&&(n.start(e,{center:!1}),setTimeout(()=>n.stop(e),180))},[L,v]=s.useState(!1),[F,Z]=s.useState(!1),[m,w]=s.useState(C),[$,B]=s.useState(!1),[V,N]=s.useState(!1),[o,u]=s.useState({findText:null,replaceText:null,replace:C,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:a.IRange.Orientation.Row,fields:[a.ICell.Content.Formulas]},scope:K.Sheet}),R=x.useCallbackRef(async(e,n,i,j)=>{if(!b)return;const O={...o};O.replaceOptions={...O.replaceOptions},O.findOptions={...O.findOptions},O.replaceOptions.maxCount=i?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:j,...O});B(ee===0)},[o,b]);s.useEffect(()=>{B(!1)},[o,F,m]);const H=x.useCallbackRef((e,n)=>{if(e.keyCode===x.KeyCodes.Enter){if(!o.findText)return;let i=!0,j=!1;e.shiftKey&&(i=!1),n?(e.ctrlKey&&e.altKey&&(j=!0),W(e,j?q.current:P.current)):W(e,i?D.current:M.current),R(i,n,j,!1)}},[o]),z=s.useRef(null);s.useLayoutEffect(()=>{u(e=>{const n={...e};n.findText=f&&f.length>0?f:e.findText??"",v(!0),c!==void 0&&(n.replaceText=c),g&&(n.findOptions={...n.findOptions,...g}),n.replaceText||(n.replaceText=""),n.replaceOptions&&(n.replaceOptions={...n.replaceOptions}),y&&(n.replaceOptions={...n.replaceOptions,...y}),o.findOptions.fields?.[0]||(o.findOptions.fields=[a.ICell.Content.Formulas]);const i=!(!y&&c===void 0);return i&&w(i),n}),V||z.current?.focus()},[f,c,g,y]),s.useEffect(()=>{m?(o.findOptions.fields[0],a.ICell.Content.Values):v(!0)},[m]),s.useEffect(()=>{if(L&&p.current&&o.findText===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})},[L,o]);const[_,{width:U}]=ne.useMeasure();return t.jsx(l.InternalWindow,{ref:z,title:E??(m?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:k,onFocus:()=>N(!0),onBlur:()=>{N(!1),B(!1)},PaperProps:{elevation:V?3:1},...S,children:t.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)w(!0),p.current?.contains(document.activeElement)&&h.current?.focus();else if(e.key==="f"&&e.ctrlKey)p.current?.focus();else if(e.key==="c"&&e.altKey)u(n=>{const i={...n};return i.findOptions.matchCase=!n.findOptions.matchCase,i});else if(e.key==="e"&&e.altKey)u(n=>{const i={...n};return i.findOptions.matchEntireCell=!n.findOptions.matchEntireCell,i});else{if(e.key!=="r"||!e.altKey)return;u(n=>{const i={...n};return i.findOptions.useRegex=!n.findOptions.useRegex,i})}e.preventDefault()},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"start",gap:e=>e.spacing(.25),paddingTop:"3px"},children:[t.jsx(l.ExhibitOptionButton,{selected:F,onSelectToggle:e=>{Z(e)},preventFocus:!0,label:"Toggle Additional Options",icon:l.themeIcon(t.jsx(l.FindOptionsIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:m,onSelectToggle:e=>{w(e)},preventFocus:!0,label:"Toggle Replace",icon:l.themeIcon(t.jsx(l.FindReplaceToggleIcon,{})),shortcut:{key:m?"F":"H",modifiers:[x.KeyModifiers.Ctrl]}})]}),t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box"},children:[t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t.jsx(r.TextField,{label:"Find",InputLabelProps:{shrink:!0},InputProps:{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))})`},inputProps:{draggable:!1,ref:p,className:"input",autoFocus:!0,spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75)}},endAdornment:t.jsx(r.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:t.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.matchCase,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.matchCase=e,i})},label:"Match Case",shortcut:{key:"C",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindCaseSensitiveIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.matchEntireCell,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.matchEntireCell=e,i})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindWholeWordIcon,{}))}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.useRegex,onSelectToggle:e=>{u(n=>{const i={...n};return i.findOptions.useRegex=e,i})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindRegExIcon,{}))})]})})},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.findText??"",onChange:e=>{u(n=>{const i={...n};return i.findText=e.target.value,i})},onKeyDown:e=>H(e,!1),onContextMenu:e=>{e.stopPropagation()}}),t.jsx(l.ExhibitOptionButton,{selected:o.findOptions.reverse,onSelectToggle:e=>{R(!1,!1)},touchRippleRef:M,label:"",shortcut:{key:"Enter",modifiers:[x.KeyModifiers.Shift]},icon:l.themeIcon(o.findOptions.orientation!==a.IRange.Orientation.Column?t.jsx(T.ArrowBack,{}):t.jsx(T.ArrowUpward,{})),disabled:!o.findText}),t.jsx(l.ExhibitOptionButton,{selected:!o.findOptions.reverse,onSelectToggle:e=>{R(!0,!1)},touchRippleRef:D,label:"Next Match",shortcut:{key:"Enter"},icon:l.themeIcon(o.findOptions.orientation!==a.IRange.Orientation.Column?t.jsx(T.ArrowForward,{}):t.jsx(T.ArrowDownward,{})),disabled:!o.findText})]}),t.jsx(r.Collapse,{in:m,timeout:G,onExit:()=>{p.current?.focus()},children:t.jsxs(r.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:e=>e.spacing(2)},children:[t.jsx(r.TextField,{label:"Replace",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${d.alpha("#fff",d.getOverlayAlpha(5))}, ${d.alpha("#fff",d.getOverlayAlpha(5))})`},inputProps:{ref:h,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 i={...n};return i.replaceText=e.target.value,i})},onKeyDown:e=>H(e,!0),onContextMenu:e=>{e.stopPropagation()}}),t.jsx(l.ExhibitOptionButton,{onSelectToggle:e=>{R(!0,!0)},touchRippleRef:P,label:"Replace",shortcut:{key:"Enter"},icon:l.themeIcon(t.jsx(l.FindReplaceIcon,{})),disabled:!o.findText}),t.jsx(l.ExhibitOptionButton,{onSelectToggle:e=>{R(!0,!0,!0)},touchRippleRef:q,label:"Replace All",shortcut:{key:"Enter",modifiers:[x.KeyModifiers.Ctrl,x.KeyModifiers.Alt]},icon:l.themeIcon(t.jsx(l.FindReplaceAllIcon,{})),disabled:!o.findText})]})})]})]}),t.jsx(r.Collapse,{in:F,timeout:G,onExit:()=>{p.current?.focus()},children:t.jsxs(r.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[t.jsx(l.ExhibitDivider,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),t.jsxs(r.Box,{sx:{display:"flex",flexDirection:U>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[t.jsx(A,{label:"Within",value:o.scope,options:K,onSelect:e=>{u(n=>{const i={...n};return i.scope=e,i})}}),t.jsx(A,{label:"Search",value:o.findOptions.orientation!==a.IRange.Orientation.Column,options:te,onSelect:e=>{u(n=>{const i={...n};return i.findOptions.orientation=e?a.IRange.Orientation.Row:a.IRange.Orientation.Column,i})}}),t.jsx(A,{label:"Look in",value:m&&o.findOptions.fields?.[0]===a.ICell.Content.Values?a.ICell.Content.Formulas:o.findOptions.fields?.[0],options:m?Y:Q,onSelect:e=>{u(n=>{const i={...n};return i.findOptions.fields=[e],i})}})]})]})})]})})});exports.FindReplaceWindow=J,exports.ScopeOptions=K,exports.default=J;
|