@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.
- package/LICENSE.md +1 -1
- package/browser/cjs/BCf8BQb2c8ANexW4.cjs +7 -0
- package/browser/cjs/BJ4pZo7s81ynDlzw.cjs +6 -0
- package/browser/cjs/{CuHwOikK2J1MLsHN.cjs → Bf70UQlMT3b0NoOZ.cjs} +1 -1
- package/browser/cjs/Bpq9GrV7al7xxJ_d.cjs +6 -0
- package/browser/cjs/BxlQ6aLh5_jUvk9w.cjs +20 -0
- package/browser/cjs/{B4uj1Smd-98Hab_l.cjs → CJSNNa8ySxzuEmoy.cjs} +2 -2
- package/browser/cjs/{D4c72fkCJiL-S_-a.cjs → CUND2W1xMwqPOHwD.cjs} +7 -7
- package/browser/cjs/{CJQkIVFa7S1AZcBP.cjs → Cg95aBJ4kuUq7jrz.cjs} +1 -1
- package/browser/cjs/Dcoq8P2O8-40waHl.cjs +6 -0
- package/browser/cjs/{JURSrTjvLJ8bc4Yl.cjs → DeoOsY5TkIAydt9W.cjs} +2 -2
- package/browser/cjs/index.cjs +3 -3
- package/browser/cjs/{D6pUyWwmIliDWT8B.cjs → j0lD5RrJ86CRlUNT.cjs} +2 -2
- package/browser/esm/{B7CJX7fKvv1vBk8-.mjs → 7tCRjNmDM5kf3BFa.mjs} +2 -2
- package/browser/esm/{hWToTYtpa0PFzhRm.mjs → BWxmPJd4f8qZMxaa.mjs} +17 -18
- package/browser/esm/{COI8Eg7HQcdPFGcZ.mjs → BbHGWXif6ytyfyHI.mjs} +1 -1
- package/browser/esm/{CajWEWsYWzynjFKw.mjs → BkhHyCmy1MwVFS1b.mjs} +2 -2
- package/browser/esm/{BbfPde9B9b4p64_L.mjs → Bo3cXzeDcP_Q9YvX.mjs} +2 -2
- package/browser/esm/CRDu7VFAa8NGcoHj.mjs +49 -0
- package/browser/esm/{C48fXszXYqcJMQni.mjs → Cd02kMBZDsozIA98.mjs} +12 -12
- package/browser/esm/CzdBzjYgP1i3pkPL.mjs +4455 -0
- package/browser/esm/DFppS_p4spncePDm.mjs +156 -0
- package/browser/esm/{KULqIIHcvNriSu7F.mjs → db-2uDA7mYS4QpHj.mjs} +1 -1
- package/browser/esm/index.mjs +70 -72
- package/browser/esm/{gpytxNaiTkBoZ6aj.mjs → nzc1811Pk5-sKDu5.mjs} +7 -7
- package/licenses/dependencies.txt +189 -222
- package/node/assets/style.css +1 -1
- package/node/esm/BVKo3uc0IreLNkkN.mjs +157 -0
- package/node/esm/{CuIak_iZn0ApypmT.mjs → BfnEq4EhLf8jJ0Gp.mjs} +1 -1
- package/node/esm/{BHFc6-pxJ_X3esj1.mjs → BgR1PWucIb0Zucr4.mjs} +1 -1
- package/node/esm/{DEnAvzkXoQEvscd-.mjs → BimlBylqyslj9fNg.mjs} +1 -1
- package/node/esm/{DExsoaMD7hWNhceb.mjs → BnGsbrQwjcaUFAdt.mjs} +13 -13
- package/node/esm/{DKhoTrOwIfMtft9r.mjs → CQhaL28vV1X6Xt2N.mjs} +43 -44
- package/node/esm/{NYFZEGBg9dFXwfFf.mjs → DB2ryaj4_Y8Lgyy_.mjs} +1 -1
- package/node/esm/{DQIYBoarjlonhEEn.mjs → X3qO0PKREgY9FMZU.mjs} +8 -8
- package/node/esm/index.mjs +1575 -1576
- package/node/esm/{DH3yxwtQR5c61iv3.mjs → rOozeXREjiU8jjPd.mjs} +14 -14
- package/package.json +15 -17
- package/types/index.d.ts +25 -93
- package/browser/cjs/BnpPHKTC6_96pDcW.cjs +0 -6
- package/browser/cjs/CHyGxDKCce-XV53l.cjs +0 -7
- package/browser/cjs/F4v-BOmzUXzCO3uz.cjs +0 -6
- package/browser/cjs/QQ4l7f6lYZb7S6td.cjs +0 -20
- package/browser/cjs/Td2md8ruASYOp_Rr.cjs +0 -6
- package/browser/cjs/jHU6TwhWd2lZX-VA.cjs +0 -6
- package/browser/esm/BhP57_jo4NnvHBgF.mjs +0 -64
- package/browser/esm/CGVa4zFRRZyFzDvh.mjs +0 -4489
- package/browser/esm/CkXFR3hHwNp6jfJV.mjs +0 -49
- package/browser/esm/CwAqw5gJ2yzuXbLx.mjs +0 -155
- package/node/esm/8qD_FXFKXbOqF2_X.mjs +0 -156
- package/node/esm/DQKU8gdXpx4S0S0D.mjs +0 -65
package/LICENSE.md
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
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 r=require("react/jsx-runtime"),l=require("react"),c=require("@mui/material/styles"),d=require("@mui/material"),g=require("@sheetxl/utils-react"),P=require("@sheetxl/utils-mui"),B=["Ok","Cancel"],b=l.memo(y=>{const{initialComments:k=null,onUpdateComments:f,context:v,onOption:x,onValidateOption:p,onDone:u,options:h=B,defaultOption:m=h?.[0],cancelOption:s="Cancel",sx:F,...T}=y,C=l.useMemo(()=>{const t=k??v?.()?.getComments();let e="";if(t&&t.content&&t.content.runs){const o=t.content.runs;for(let i=0;i<o.length;i++){const a=o[i];e+=a?.text}}return e},[]),[n,q]=l.useState(C),[j,w]=l.useState(!1),O=l.useCallback(async(t,e)=>null,[]),D=g.useCallbackRef(async t=>{const e=n===""?[]:n.split(`
|
|
7
|
+
`);if(t!==s){const o=[];for(let a=0;a<e.length;a++)o.push({text:e[a]});f?.({content:{runs:o}})}x?.(t,t===s,t===m),u?.()},[n,f,u,x,m,s]),S=g.useCallbackRef(t=>{q(t.target.value),O(t.target.value,null)},[p]),M=g.useCallbackRef(async t=>{let e=await Promise.resolve(p?.(t));try{e!==!1&&(e=await O(n,t))}catch{}return e??!0},[p,n]);return r.jsx(P.OptionsDialog,{title:(C?"Edit":"Insert")+" Comments",options:h,onDone:u,onOption:t=>D(t),onValidateOption:M,defaultOption:m,cancelOption:s,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...T,children:r.jsx(d.Box,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:r.jsx(d.FormControl,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:r.jsx(d.TextField,{label:"Comments",placeholder:"Enter a comment.",onFocus:t=>{j||t.target?.select(),w(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5)}},slotProps:{inputLabel:{shrink:!0},htmlInput:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${c.alpha("#fff",c.getOverlayAlpha(5))}, ${c.alpha("#fff",c.getOverlayAlpha(5))})`}}},value:n,onChange:S,onContextMenu:t=>{t.stopPropagation()}})})})})});exports.CommentsDialog=b,exports.default=b;
|
|
@@ -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 t=require("react/jsx-runtime"),r=require("react"),n=require("@mui/material/styles"),l=require("@mui/material"),s=require("@sheetxl/sdk"),u=require("@sheetxl/utils-react"),A=require("@sheetxl/utils-mui"),B=["Ok","Cancel"],O=r.memo(T=>{const{initialValue:j,context:f,onOption:h,onValidateOption:m,onInputOption:b,onDone:d,options:C=B,defaultOption:c=C?.[0],cancelOption:g="Cancel",sx:S,...N}=T,[a,v]=r.useState(j),[w,q]=r.useState(!1),y=r.useCallback(async(e,o)=>!0,[]),x=u.useCallbackRef(async e=>{b?.(a,e),h?.(e,e===g,e===c),d?.()},[a,b,d,h,g,c]),D=u.useCallbackRef(async e=>{e.keyCode===u.KeyCodes.Enter&&await y?.(a,null)!==!1&&x(c)},[a,x]),P=u.useCallbackRef(e=>{v(e.target.value),y?.(e.target.value,null)},[m]),I=u.useCallbackRef(async e=>{let o=await Promise.resolve(m?.(e));try{o!==!1&&(o=await Promise.resolve(y?.(a,e))??!0)}catch{}return o??!0},[m]),[F,k]=r.useState(s.NumberFormat.Styles.lookupStyle(a).formatType??s.NumberFormat.Type.Custom);r.useEffect(()=>{k(s.NumberFormat.Styles.lookupStyle(a).formatType??s.NumberFormat.Type.Custom)},[a]);const M=r.useMemo(()=>{const e=s.NumberFormat.Styles.lookupPrimary(),o=p=>t.jsx(l.MenuItem,{value:p,children:p},p),i=Object.keys(e).map(p=>o(e[p].formatType));return i.push(o(s.NumberFormat.Type.Custom)),i},[]),R=r.useCallback(e=>{const o=e.target.value;k(o);const i=s.NumberFormat.Styles.lookupDefault(o);i&&v(i)},[]),$=r.useMemo(()=>{const e=f();return e.createTemporaryCell({value:e.getValue()??12345,style:{numberFormat:a}})},[F,a,f]);return t.jsx(A.OptionsDialog,{title:"Number Format",options:C,onDone:d,onOption:e=>x(e),onValidateOption:I,defaultOption:c,cancelOption:g,autoFocusSel:".autoFocus",sx:{width:"580px",...S},...N,children:t.jsxs(l.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[t.jsxs(l.FormControl,{sx:{minWidth:135},size:"small",children:[t.jsx(l.InputLabel,{children:"Category"}),t.jsx(l.Select,{value:F,label:"Category",onChange:R,sx:{backgroundImage:`linear-gradient(${n.alpha("#fff",n.getOverlayAlpha(5))}, ${n.alpha("#fff",n.getOverlayAlpha(5))})`},children:M})]}),t.jsx(l.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t.jsx(l.TextField,{label:"Code",onFocus:e=>{w||e.target?.select(),q(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},slotProps:{inputLabel:{shrink:!0},htmlInput:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",n.getOverlayAlpha(5))}, ${n.alpha("#fff",n.getOverlayAlpha(5))})`}}},value:a,onChange:P,onKeyDown:D,onContextMenu:e=>{e.stopPropagation()}})}),t.jsxs(l.Box,{children:[t.jsx(l.Typography,{variant:"caption",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:"Preview"}),t.jsx(l.Typography,{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:$.getNumberFormat().displayText||"(empty)"})]})]})})});exports.NumberFormatDialog=O,exports.default=O;
|
|
@@ -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.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"),n=require("@mui/material/styles"),s=require("@mui/material"),h=require("@sheetxl/utils-react"),I=require("@sheetxl/utils-mui"),B=["Ok","Cancel"],O=l.memo(b=>{const{initialHyperlink:o=null,initialDisplay:v=null,onUpdateHyperlink:f,context:r,onOption:m,onValidateOption:u,onDone:c,options:y=B,defaultOption:d=y?.[0],cancelOption:p="Cancel",sx:F,...D}=b,j=l.useMemo(()=>(o??r?.()?.getHyperlink())!==null,[]),k=l.useMemo(()=>{let e=null,a=null;o&&(typeof o=="string"?a=o:e=o);const x=e??r?.()?.getHyperlink();return{address:a??x?.getAddress()??"",textToDisplay:x?.getDisplayText()??""}},[o,r]),[t,H]=l.useState(k.address),[g,M]=l.useState(()=>{const e=r?.().toTextUnformatted()??v;return e===k.address?"":e}),[q,C]=l.useState(!1),w=l.useCallback(e=>{M(e.target.value)},[]),T=l.useCallback(async(e,a)=>null,[]),A=h.useCallbackRef(async e=>{e!==p&&f?.(t===""?null:{address:t},g),m?.(e,e===p,e===d),c?.()},[t,g,f,c,m,d,p]),P=h.useCallbackRef(e=>{H(e.target.value),T(e.target.value,null)},[u]),S=h.useCallbackRef(async e=>{let a=await Promise.resolve(u?.(e));try{a!==!1&&(a=await T(t,e))}catch{}return a??!0},[u]);return i.jsx(I.OptionsDialog,{title:(j?"Edit":"Insert")+" Link",options:y,onDone:c,onOption:e=>A(e),onValidateOption:S,defaultOption:d,cancelOption:p,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...D,children:i.jsxs(s.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[i.jsx(s.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(s.TextField,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:e=>{q||e.target?.select(),C(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},slotProps:{inputLabel:{shrink:!0},htmlInput:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",n.getOverlayAlpha(5))}, ${n.alpha("#fff",n.getOverlayAlpha(5))})`}}},value:t,onChange:P,onContextMenu:e=>{e.stopPropagation()}})}),i.jsx(s.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:i.jsx(s.TextField,{label:"Display Text",placeholder:t?.startsWith("#")?t.substring(1):t,onFocus:()=>{C(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},slotProps:{inputLabel:{shrink:!0},htmlInput:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${n.alpha("#fff",n.getOverlayAlpha(5))}, ${n.alpha("#fff",n.getOverlayAlpha(5))})`}}},value:g,onChange:w,onContextMenu:e=>{e.stopPropagation()}})})]})})});exports.HyperlinkDialog=O,exports.default=O;
|