@sheetxl/studio-mui 0.6.22 → 0.6.23
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/{ccRyWUob4IiUygXl.cjs → B-2lQa-VxUnEnMln.cjs} +2 -2
- package/browser/cjs/{c8R8mEoRSGxWpwzR.cjs → BGbh7FzT6HzUIm2q.cjs} +2 -2
- package/browser/cjs/{C6684nhyu6l3m0kn.cjs → BbI58aRrtqdNizWe.cjs} +2 -2
- package/browser/cjs/{C9wr-tWcHBgWnmsj.cjs → Blb-YsgdkLznScAb.cjs} +1 -1
- package/browser/cjs/{DZuGl4pfmowbo9Zn.cjs → BorgE8MKc7RmzoGr.cjs} +4 -4
- package/browser/cjs/{CIyX2IiFJx-RRH7s.cjs → D6VBBUEZVGAHewfl.cjs} +1 -1
- package/browser/cjs/{DtnmD3cg1jVGU8-U.cjs → DBtPcT7N5yMtJx2K.cjs} +2 -2
- package/browser/cjs/{C2tACKYnEMi13PUS.cjs → DIqiN178IjxjN6_G.cjs} +1 -1
- package/browser/cjs/{BCz1t2Vbp7iDgonm.cjs → DeBvWExDdkpiDXWL.cjs} +2 -2
- package/browser/cjs/{KR0KTsIaRYi2pPeE.cjs → DmFXWr7_hhFfYXVW.cjs} +3 -3
- package/browser/cjs/{DMF21Qbb8aQYyWHF.cjs → JBvcnvSKX4eg2KMc.cjs} +1 -1
- package/browser/cjs/{ANF9DDyVkgJ6qlz5.cjs → _J_dBZZlvt7elGMu.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{BWPpTvD_j2xBbQgA.mjs → BJUtWQ89iSiC8MCP.mjs} +2 -2
- package/browser/esm/{BFOrbgSQUoIlkx0b.mjs → BjY8w3q17skUuec_.mjs} +1 -1
- package/browser/esm/{CkNHc2Ec0XgG7kMZ.mjs → C6cRzZsKjcXv2Zze.mjs} +2 -2
- package/browser/esm/{BumDPcjj1e4GU9fZ.mjs → CNPeyns0aG4lxAZY.mjs} +2 -2
- package/browser/esm/{Bqs8EP3zPYXZDaOY.mjs → CYwvNWrnydpKNM6P.mjs} +2 -2
- package/browser/esm/{DpNXDFtCtBG0QRPQ.mjs → CxzgsljqU4TcT_IK.mjs} +1 -1
- package/browser/esm/{DVJw4-NDpKqsuHj0.mjs → DXcKIu-ldV96lomb.mjs} +2 -2
- package/browser/esm/{CFURBfBzYVTox1hN.mjs → DfIf4q4zTdKM0FI7.mjs} +1 -1
- package/browser/esm/{mE0s8-6FPDNYSOUd.mjs → Dma2bC_MRorXFavL.mjs} +4 -4
- package/browser/esm/{By9LpgiRfUIsWQvJ.mjs → Eub0QZ44UYOI59Cq.mjs} +1 -1
- package/browser/esm/{BFSwrIsbjcKYQa8z.mjs → ecztlwFWEbqYCNkt.mjs} +3 -3
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{K_qBn3b8P2vYF08X.mjs → ztX0KjjWq8Lq0nh7.mjs} +1 -1
- package/node/esm/{BnBJXWJgpUHCS5MZ.mjs → BLv5kaONGR_5ScCs.mjs} +1 -1
- package/node/esm/{BzAcJ8XUoWR5XdoH.mjs → BrwDu-18i-CTX4ho.mjs} +1 -1
- package/node/esm/{DlEV79l6PYxZpJZq.mjs → Bv3ySrhy5o4Liseu.mjs} +1 -1
- package/node/esm/{B6LDtfqKczpN2bra.mjs → BzLAC9xN9gbpsvMP.mjs} +1 -1
- package/node/esm/{Bqid9TpFmhXaU8b5.mjs → Ci7A9s5zTkQiS2iz.mjs} +1 -1
- package/node/esm/{BKsAXgpTI24e0OCP.mjs → CogzNSSyJEOhmiMr.mjs} +1 -1
- package/node/esm/{CaPokYFCHECLO7p5.mjs → DFHzZi1A0NO42O4i.mjs} +1 -1
- package/node/esm/{DuPl6F0w35ZldP8v.mjs → DN5KSVSb4Iy0qSwn.mjs} +1 -1
- package/node/esm/{CeXfJ6ImJ64xI2Re.mjs → D_uEF-v5JDCWnNDC.mjs} +1 -1
- package/node/esm/{GDBbM-pJeuxVR08F.mjs → Y3otlFlLNJCZ-IKl.mjs} +1 -1
- package/node/esm/index.mjs +4 -4
- 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.23
|
|
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("./BorgE8MKc7RmzoGr.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;
|
|
@@ -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.23
|
|
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("./
|
|
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("./BorgE8MKc7RmzoGr.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,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.23
|
|
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"),s=require("react"),a=require("@mui/material"),l=require("@sheetxl/utils-react"),i=require("@sheetxl/utils-mui"),H=require("@sheetxl/react"),c=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("react"),a=require("@mui/material"),l=require("@sheetxl/utils-react"),i=require("@sheetxl/utils-mui"),H=require("@sheetxl/react"),c=require("./BorgE8MKc7RmzoGr.cjs"),y=s.memo(b=>{const{title:w,onHide:S,autoFocusSel:j=".range-input input",context:C,notifier:d=l.DefaultNotifier,command:g,commands:u,...T}=b,[B,m]=s.useState(!1),[x,p]=s.useState(!1),h=s.useRef(null),[q,v]=s.useReducer(e=>e+1,0),[R,{width:L}]=c.useMeasure();l.useCommand(g);const o=C??g.context(),t=o.table(),[I,N]=s.useState(()=>t?o.getNames().getRanges(t.getRange()):null),D=s.useMemo(()=>t?.getName()??"",[t]);H.useModelListener(o.table(),{onAnchorCoordsChange(e){N(o.getNames().getRanges(e.getRange()))},onProtectedChange(e){v()}});const F=l.useCallbackRef(e=>{o?.table().setName(e)},[o]),P=l.useCallbackRef(e=>{o?.table().resize(e.at(0))},[o]);let f=null;return o.table()||(f=n.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:1,display:"flex",alignItems:"center",justifyItems:"center",justifyContent:"center",boxSizing:"border-box"},children:n.jsx("div",{children:"No table selected"})})),n.jsx(i.InternalWindow,{ref:h,title:w??"Table Details",initialPosition:{y:"35"},autoFocusSel:j,onHide:S,onFocus:()=>m(!0),onBlur:e=>{h?.current?.contains(e.relatedTarget)||m(!1)},PaperProps:{elevation:B?3:1},...T,children:n.jsxs(a.DialogContent,{dividers:!0,ref:R,sx:{display:"flex",flexDirection:"column",position:"relative",paddingLeft:e=>e.spacing(1.5),paddingRight:e=>e.spacing(1.5)},children:[n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",transition:"opacity 60ms",opacity:o.table()?1:0},children:[n.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",gap:e=>e.spacing(1)},children:n.jsx(a.Box,{sx:{display:"flex",flexDirection:"column",maxWidth:"100%",boxSizing:"border-box",paddingLeft:e=>e.spacing(2),paddingRight:e=>e.spacing(2)},children:n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[n.jsx(c.NamedInput,{formName:"name",defaultInput:D,value:t?.getName()??"No table",onChangeInput:F,onValidate:e=>{t&&t.getName().toLowerCase()===e.toLowerCase()||o?.getNames().validateName(e)},disabled:t?.isProtected()??!0,onFocus:e=>{x||e.target?.select(),p(!0)}}),n.jsx(c.RangeInput,{formName:"range",value:I,onChangeInput:P,resolvedAddress:o.getNames().getRanges.bind(o.getNames()),disabled:t?.isProtected()??!0,onFocus:e=>{x||e.target?.select(),p(!0)}})]})})}),n.jsxs(a.Box,{sx:{minHeight:"10px",flex:"1 1 100%",display:"flex",flexDirection:"column",gap:e=>e.spacing(.5),marginTop:e=>e.spacing(1)},children:[n.jsx(i.ExhibitDivider,{orientation:"horizontal",sx:{marginTop:e=>e.spacing(1.5),marginBottom:e=>e.spacing(.75)}}),n.jsx(c.TableStyleOptionsPanel,{disabled:t?.isProtected(),styleOptions:t?.getStyleOptions()??null,onStyleOptionsChange:e=>{t.updateStyleOptions(e)},showHeaderRow:t?.getShowHeaders(),onShowHeaderRowChange:e=>{try{t.setShowHeaders(e)}catch(r){d.showError(r)}},showTotalRow:t?.getShowTotals(),onShowTotalRowChange:e=>{try{t.setShowTotals(e)}catch(r){d.showError(r)}},showFilterButton:t?.getFilter()?t.getShowFilterButton():null,onShowFilterButtonChange:e=>{try{t.setShowFilterButton(e)}catch(r){d.showError(r)}}}),n.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",marginTop:e=>e.spacing(2),marginBottom:e=>e.spacing(1)},children:n.jsx(c.TableStylePreview,{table:t,styles:o.styles(),bodyStyle:o.bodyStyle(),cellHeight:30,isLive:!0})}),n.jsx(i.ExhibitDivider,{orientation:"horizontal"}),n.jsxs(a.Box,{sx:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[n.jsx(i.CommandButton,{variant:l.CommandButtonType.Menuitem,command:u.getCommand("convertTableToRange"),commandState:t,icon:i.themeIcon(n.jsx(i.InsertTableIcon,{}))}),n.jsx(i.CommandButton,{variant:l.CommandButtonType.Menuitem,commandState:t,command:u.getCommand("deleteTable"),icon:i.themeIcon(n.jsx(i.InsertTableIcon,{}))})]})]})]}),f]})})});exports.TableDetailsWindow=y,exports.default=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
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.23
|
|
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.
|