@sheetxl/studio-mui 0.3.5 → 0.3.6
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/{wwocjd0UfaRLBBMZ.cjs → BDA_cN9_3XH3jKu7.cjs} +2 -2
- package/browser/cjs/{D76n8Obon9BUBaN9.cjs → BIAzzlzrEzNbXZoV.cjs} +1 -1
- package/browser/cjs/{CGHGrJD1KaYGPUWt.cjs → BKbUjQboXFN4Fvja.cjs} +3 -3
- package/browser/cjs/{CauYni4UlnUOg2KD.cjs → BQj7RqEbVKHR6aAn.cjs} +2 -2
- package/browser/cjs/{BlxVofqfnSMNcuv8.cjs → BSiAyt78bK83R6ic.cjs} +1 -1
- package/browser/cjs/{zAZ0LJZMPXeu6JSh.cjs → BUVUiEuIgVkpsMM9.cjs} +37 -37
- package/browser/cjs/BfAlJMyG141X0LEw.cjs +18 -0
- package/browser/cjs/{ByVL-_c8JG4yCwyg.cjs → BhBHbnBaTn7Oxq32.cjs} +2 -2
- package/browser/cjs/{Bkl3DGri3E5UGuvv.cjs → BjqsH6cunf78rRX-.cjs} +1 -1
- package/browser/cjs/{DAIK3n9uEZA5B3jo.cjs → C-hMrloULc-MppQD.cjs} +1 -1
- package/browser/cjs/{kEe9PBONC8-oT9AU.cjs → CA9wqJ1F16VKmMvj.cjs} +2 -2
- package/browser/cjs/{Dold2uHEN8H8QsT-.cjs → CC-5vh5ASDM-RBUA.cjs} +1 -1
- package/browser/cjs/{DSumeKv5upBoatXJ.cjs → CN5yMm1RDGHoGG_D.cjs} +5 -5
- package/browser/cjs/{B13OXuZsTC4RULMo.cjs → Ce2t9ND4Ly6f3bXh.cjs} +1 -1
- package/browser/cjs/{BHJSCG4oU8pmuDwm.cjs → CnNVzL4av561Af-X.cjs} +1 -1
- package/browser/cjs/{AQ9Vi-Cv6JK-IezR.cjs → D-aXv6Oet1vU-Zr7.cjs} +1 -1
- package/browser/cjs/{DQxMsOz7p1VlzGGr.cjs → D00PUV9HhlvfXci3.cjs} +3 -3
- package/browser/cjs/{p8j2cCUulAy7yD2q.cjs → D6mzhvOcxltlNlRb.cjs} +2 -2
- package/browser/cjs/{Bav0cmsoPAA3a5yu.cjs → DTmxkCgx4M9ndSat.cjs} +2 -2
- package/browser/cjs/{CQXkduebOzsWYR7I.cjs → Dci-fJZyMxfMtFwP.cjs} +1 -1
- package/browser/cjs/{CetwWGtSVR7MPQmq.cjs → DiAWhjiWhcWJFiCC.cjs} +2 -2
- package/browser/cjs/{LLqao183uS5MMxF5.cjs → DmPGnur7i6F5FU2h.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{4qy63Boa4nvdxyjo.cjs → n_J3B8grgEc39dfW.cjs} +2 -2
- package/browser/cjs/{q9JmnJDMYsSf7UfZ.cjs → wFtUgjQz8anMZuKi.cjs} +2 -2
- package/browser/cjs/xJtbQRajXSiwvqtg.cjs +6 -0
- package/browser/esm/{Drjhq-zlZ3HTK_ZI.mjs → B23BCvCAIXPq3Qya.mjs} +2 -2
- package/browser/esm/{DHvI-gSNOpEkZS0_.mjs → BLD-dPRJywxQPmo1.mjs} +40 -40
- package/browser/esm/{Bx8dhDDGV4fnPcL4.mjs → B_LvPyMYp6M2IUYv.mjs} +2 -2
- package/browser/esm/{Dr-hrT0HVZs3fkdF.mjs → BkdDwTttxpZ9RgfX.mjs} +2 -2
- package/browser/esm/{DzW551wAkGdUKn1f.mjs → C5ThpUQCOgPu9Rm6.mjs} +2 -2
- package/browser/esm/{C2gkPo-K972JVp5g.mjs → CK80ynDGr7lD-At3.mjs} +2 -2
- package/browser/esm/{D0WM4vskQ31-MkSX.mjs → CKradP6l_bPnBeAS.mjs} +6 -6
- package/browser/esm/{DhJgaHDvhGW9Q-Jd.mjs → CVy69euBhPabqvB6.mjs} +1 -1
- package/browser/esm/{Dw7dYD6MrvZb3WPh.mjs → Cfnj49XqEri5xH95.mjs} +488 -485
- package/browser/esm/{B5O5PCrKRZ4DUAH5.mjs → CpUPw69UYhWXlUPK.mjs} +3 -3
- package/browser/esm/{DK4TrH-nckKO9Q9L.mjs → CwihiHZ985trjVME.mjs} +1 -1
- package/browser/esm/{q-qojAI33CqmRx77.mjs → CyTVtv1Mf6q5T_BK.mjs} +15 -15
- package/browser/esm/{BYUh5NiLu-E5n_2A.mjs → D0F3df-AGkw08zJ1.mjs} +3 -3
- package/browser/esm/{DQwg0nFQOuoWa9vC.mjs → D0FQXcXINAWDWroP.mjs} +1 -1
- package/browser/esm/{BRJgzXA_m_2aKWbd.mjs → DBjThyhV3j0_GN4b.mjs} +2 -2
- package/browser/esm/{D5FRlmQmwf6Y4j_G.mjs → DK-0TuTa3cQM7OvY.mjs} +1 -1
- package/browser/esm/{Cb9SB2mI9VqoMLgo.mjs → DKoUhVGreJYWgo-a.mjs} +1 -1
- package/browser/esm/{DdsrrZg_d16qXBaF.mjs → DSB7dVU1rouLdAw7.mjs} +2 -2
- package/browser/esm/{B89QkSJt5Nra70ba.mjs → DTTp49_lHVB_e1QU.mjs} +5604 -5596
- package/browser/esm/{CsT1vXKI_o6hLmzM.mjs → DZmqm6QGjN6RLkyR.mjs} +1 -1
- package/browser/esm/{DVEcYvO4EkDBk4FX.mjs → Dg7wBFseXG66YhFU.mjs} +1 -1
- package/browser/esm/{DEorp4Rd9a565r_h.mjs → Dsx8wfDZXFwa1rJa.mjs} +1 -1
- package/browser/esm/{DMOlhSnOh4hHXiw0.mjs → LPJGip2LF7AyekCM.mjs} +2 -2
- package/browser/esm/index.mjs +11 -11
- package/browser/esm/{XSaSkbiadpjvNPF-.mjs → l7LI3HRwJS0V80vj.mjs} +2 -2
- package/browser/esm/{CEvGwR40Y6Ef-WDe.mjs → sfNXDE0XCm_OOO8G.mjs} +1 -1
- package/licenses/dependencies.txt +8 -8
- package/node/esm/{CZtyxHtVSnQOWUIw.mjs → 6PhFC4BlVkimyF4m.mjs} +5 -5
- package/node/esm/{C63AwhK2bi3nQ-qh.mjs → 85kFV3rMaeB74PxG.mjs} +1 -1
- package/node/esm/{CKS2ltb4Bv_q8qad.mjs → B3T3eCOQ3mccjxul.mjs} +1 -1
- package/node/esm/{C53eiTE5QbclOU-x.mjs → BNk4gVd8gzB1_RP5.mjs} +1 -1
- package/node/esm/{DuL4Zvdz5hbTWC1z.mjs → BVX5MlEGbjxclNZa.mjs} +3 -3
- package/node/esm/{BCqh-sztmdgZm9pd.mjs → BVwjEbIgZZvhip4Z.mjs} +1 -1
- package/node/esm/{BUDeEhnsn9-yrQlE.mjs → C2aaiccbcc0Uo7FR.mjs} +1 -1
- package/node/esm/{DrgN5wWkYF1hgIK3.mjs → C6ectVvIVlbQezGU.mjs} +1 -1
- package/node/esm/{D_wrbdHZwcqLBmob.mjs → CCYza7B4OkTdTJmU.mjs} +1 -1
- package/node/esm/{BXZpU4qRYF5maAg0.mjs → CETp4Gb2sY0-5DcJ.mjs} +3 -3
- package/node/esm/{mEXgu7-CAzFc23RE.mjs → CO8rXhfLAJJp2-AQ.mjs} +1 -1
- package/node/esm/{BexDrSYf11he63De.mjs → C_WsRCOzsNE0q750.mjs} +1 -1
- package/node/esm/{DQv4OOMysHEA_ih5.mjs → Cao7714GMmcI_M-K.mjs} +1 -1
- package/node/esm/{DpB6jqJa5heTZlo1.mjs → D1Ro4H0Bx2UGc6TQ.mjs} +1 -1
- package/node/esm/{BNhJrLEKwde0o2dg.mjs → DB9nM-L3WjGeqKaf.mjs} +1 -1
- package/node/esm/{BiU1UyUrEkNS9WeH.mjs → DQKFyKNLYliPIvSE.mjs} +1 -1
- package/node/esm/{Dca0ee8jhGRibBhk.mjs → DUIXIrIf-4lp-4Wp.mjs} +1 -1
- package/node/esm/{B6na2FpIb2N8_BII.mjs → Ddc1jhDDo8ZsuiPJ.mjs} +1 -1
- package/node/esm/{BQWO9jQkGVXLYnCK.mjs → De4H_1aS9nUJnG4b.mjs} +1 -1
- package/node/esm/{CvxTDOd3lLLowV8Z.mjs → Do-kFD-cPPxFgpDC.mjs} +1 -1
- package/node/esm/{B4Eo0tFRg7GybYQq.mjs → accQvk6dp_87gwMI.mjs} +1 -1
- package/node/esm/index.mjs +8 -8
- package/node/esm/{CJzMybL2SEMDl1Nw.mjs → mZnCGAk50R-zZ66G.mjs} +1 -1
- package/node/esm/{0VUK_26rxW-1p-no.mjs → yXPtDAdOf0QxP-aI.mjs} +2 -2
- package/package.json +13 -13
- package/browser/cjs/DKTmOXPHU474-EAe.cjs +0 -6
- package/browser/cjs/K7lHFQm8oaMP4Fc7.cjs +0 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.6
|
|
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"),s=require("react"),r=require("@mui/material"),v=require("@mui/icons-material"),a=require("@sheetxl/sdk"),t=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),r=require("@mui/material"),v=require("@mui/icons-material"),a=require("@sheetxl/sdk"),t=require("./BUVUiEuIgVkpsMM9.cjs"),y=require("@mui/system"),A=s.memo(j=>{const{label:h,value:d,options:c,onSelect:f,tabIndex:O=0,...I}=j,[S,C]=s.useState(()=>U(d,c));s.useEffect(()=>{C(U(d,c))},[d,c]);const k=t.T(x=>{C(x.target.value),f?.(c[x.target.value])},[f,c]),p=s.useMemo(()=>Object.keys(c).map(x=>i.jsx(r.MenuItem,{value:x,children:x},x)),[c]);return i.jsxs(r.FormControl,{sx:{minWidth:135},size:"small",children:[i.jsx(r.InputLabel,{children:h}),i.jsx(r.Select,{inputProps:{tabIndex:O},value:S,label:h,onChange:k,sx:{backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.getOverlayAlpha(5))})`},...I,children:p})]})}),B={Workbook:"workbook",Sheet:"sheet"},z={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},J={...X};delete J.Values;const ee={"By Rows":!0,"By Columns":!1},U=(j,h)=>{const d=Object.keys(h);for(let c=0;c<d.length;c++){const f=d[c];if(h[f]===j)return f}},G=s.memo(j=>{const{replace:h=!1,findText:d,replaceText:c,findOptions:f,replaceOptions:O,title:I,onHide:S,onFindOrReplace:C,...k}=j,p=s.useRef(null),x=s.useRef(null),D=s.useRef(null),P=s.useRef(null),K=s.useRef(null),M=s.useRef(null),$=(e,n)=>{n&&(n.start(e,{center:!1}),setTimeout(()=>n.stop(e),180))},[L,b]=s.useState(!1),[w,Q]=s.useState(!1),[g,E]=s.useState(h),[W,F]=s.useState(!1),[Z,q]=s.useState(!1),[l,u]=s.useState({findText:null,replaceText:null,replace:h,replaceOptions:{},findOptions:{matchCase:!1,matchEntireCell:!1,useRegex:!1,orientation:a.IRange.Orientation.Row,fields:[a.ICell.Content.Formulas]},scope:B.Sheet}),R=t.T(async(e,n,o,T)=>{if(!C)return;const m={...l};m.replaceOptions={...m.replaceOptions},m.findOptions={...m.findOptions},m.replaceOptions.maxCount=o?void 0:1,m.replace=n,n&&l.findOptions.fields?.[0]===a.ICell.Content.Values&&(m.findOptions.fields=[a.ICell.Content.Formulas]),m.findOptions.reverse=!e;const _=await C({autoFocus:T,...m});F(_===0)},[l,C]);s.useEffect(()=>{F(!1)},[l,w,g]);const V=t.T((e,n)=>{if(e.keyCode===t.eo.Enter){if(!l.findText)return;let o=!0,T=!1;e.shiftKey&&(o=!1),n?(e.ctrlKey&&e.altKey&&(T=!0),$(e,T?M.current:K.current)):$(e,o?P.current:D.current),R(o,n,T,!1)}},[l]),N=s.useRef(null);s.useLayoutEffect(()=>{u(e=>{const n={...e};n.findText=d&&d.length>0?d:e.findText??"",b(!0),c!==void 0&&(n.replaceText=c),f&&(n.findOptions={...n.findOptions,...f}),n.replaceText||(n.replaceText=""),n.replaceOptions&&(n.replaceOptions={...n.replaceOptions}),O&&(n.replaceOptions={...n.replaceOptions,...O}),l.findOptions.fields?.[0]||(l.findOptions.fields=[a.ICell.Content.Formulas]);const o=!(!O&&c===void 0);return o&&E(o),n}),Z||N.current?.focus()},[d,c,f,O]),s.useEffect(()=>{g?(l.findOptions.fields[0],a.ICell.Content.Values):b(!0)},[g]),s.useEffect(()=>{if(L&&p.current&&l.findText===p.current.value)return p.current===document.activeElement||p.current.contains(document.activeElement)?(p.current?.select(),void b(!1)):void p.current.addEventListener("focus",()=>{p.current?.select(),b(!1)},{once:!0})},[L,l]);const[Y,{width:H}]=t.useMeasure();return i.jsx(t.Bn,{title:I??(g?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",refWindow:N,onHide:S,onFocus:()=>q(!0),onBlur:()=>{q(!1),F(!1)},PaperProps:{elevation:Z?3:1},...k,children:i.jsxs(r.DialogContent,{dividers:!0,ref:Y,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)E(!0),p.current?.contains(document.activeElement)&&x.current?.focus();else if(e.key==="f"&&e.ctrlKey)p.current?.focus();else if(e.key==="c"&&e.altKey)u(n=>{const o={...n};return o.findOptions.matchCase=!n.findOptions.matchCase,o});else if(e.key==="e"&&e.altKey)u(n=>{const o={...n};return o.findOptions.matchEntireCell=!n.findOptions.matchEntireCell,o});else{if(e.key!=="r"||!e.altKey)return;u(n=>{const o={...n};return o.findOptions.useRegex=!n.findOptions.useRegex,o})}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(t.ol,{selected:w,onSelectToggle:e=>{Q(e)},preventFocus:!0,label:"Toggle Additional Options",icon:t.x5(i.jsx(t.Fi,{}))}),i.jsx(t.ol,{selected:g,onSelectToggle:e=>{E(e)},preventFocus:!0,label:"Toggle Replace",icon:t.x5(i.jsx(t.Ii,{})),shortcut:{key:g?"F":"H",modifiers:[t.Z.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",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),minWidth:H>460?"20em":void 0,backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.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:i.jsx(r.InputAdornment,{sx:{transform:"scale(0.75) translateX(16px)"},position:"end",children:i.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row",gap:"1px"},children:[i.jsx(t.ol,{selected:l.findOptions.matchCase,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.matchCase=e,o})},label:"Match Case",shortcut:{key:"C",modifiers:[t.Z.Alt]},icon:t.x5(i.jsx(t.$i,{}))}),i.jsx(t.ol,{selected:l.findOptions.matchEntireCell,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.matchEntireCell=e,o})},label:"Match Entire Cell",shortcut:{key:"E",modifiers:[t.Z.Alt]},icon:t.x5(i.jsx(t.ji,{}))}),i.jsx(t.ol,{selected:l.findOptions.useRegex,onSelectToggle:e=>{u(n=>{const o={...n};return o.findOptions.useRegex=e,o})},label:"Use Regular Expression",shortcut:{key:"R",modifiers:[t.Z.Alt]},icon:t.x5(i.jsx(t.Ui,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>W?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>W?`${e.palette.error.main} !important`:void 0}},value:l.findText??"",onChange:e=>{u(n=>{const o={...n};return o.findText=e.target.value,o})},onKeyDown:e=>V(e,!1),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(t.ol,{selected:l.findOptions.reverse,onSelectToggle:e=>{R(!1,!1)},touchRippleRef:D,label:"",shortcut:{key:"Enter",modifiers:[t.Z.Shift]},icon:t.x5(l.findOptions.orientation!==a.IRange.Orientation.Column?i.jsx(v.ArrowBack,{}):i.jsx(v.ArrowUpward,{})),disabled:!l.findText}),i.jsx(t.ol,{selected:!l.findOptions.reverse,onSelectToggle:e=>{R(!0,!1)},touchRippleRef:P,label:"Next Match",shortcut:{key:"Enter"},icon:t.x5(l.findOptions.orientation!==a.IRange.Orientation.Column?i.jsx(v.ArrowForward,{}):i.jsx(v.ArrowDownward,{})),disabled:!l.findText})]}),i.jsx(r.Collapse,{in:g,timeout:z,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",InputLabelProps:{shrink:!0},InputProps:{sx:{paddingRight:e=>e.spacing(1),backgroundImage:`linear-gradient(${y.alpha("#fff",t.getOverlayAlpha(5))}, ${y.alpha("#fff",t.getOverlayAlpha(5))})`},inputProps:{ref:x,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:l.replaceText??"",onChange:e=>{u(n=>{const o={...n};return o.replaceText=e.target.value,o})},onKeyDown:e=>V(e,!0),onContextMenu:e=>{e.stopPropagation()}}),i.jsx(t.ol,{onSelectToggle:e=>{R(!0,!0)},touchRippleRef:K,label:"Replace",shortcut:{key:"Enter"},icon:t.x5(i.jsx(t.Bi,{})),disabled:!l.findText}),i.jsx(t.ol,{onSelectToggle:e=>{R(!0,!0,!0)},touchRippleRef:M,label:"Replace All",shortcut:{key:"Enter",modifiers:[t.Z.Ctrl,t.Z.Alt]},icon:t.x5(i.jsx(t.Wi,{})),disabled:!l.findText})]})})]})]}),i.jsx(r.Collapse,{in:w,timeout:z,onExit:()=>{p.current?.focus()},children:i.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:[i.jsx(t.Zt,{orientation:"horizontal",sx:{marginBottom:e=>e.spacing(1.5)}}),i.jsxs(r.Box,{sx:{display:"flex",flexDirection:H>=413?"row":"column",justifyContent:"space-evenly",alignItems:"center",rowGap:e=>e.spacing(2)},tabIndex:-1,children:[i.jsx(A,{label:"Within",value:l.scope,options:B,onSelect:e=>{u(n=>{const o={...n};return o.scope=e,o})}}),i.jsx(A,{label:"Search",value:l.findOptions.orientation!==a.IRange.Orientation.Column,options:ee,onSelect:e=>{u(n=>{const o={...n};return o.findOptions.orientation=e?a.IRange.Orientation.Row:a.IRange.Orientation.Column,o})}}),i.jsx(A,{label:"Look in",value:g&&l.findOptions.fields?.[0]===a.ICell.Content.Values?a.ICell.Content.Formulas:l.findOptions.fields?.[0],options:g?J:X,onSelect:e=>{u(n=>{const o={...n};return o.findOptions.fields=[e],o})}})]})]})})]})})});exports.FindReplaceWindow=G,exports.ScopeOptions=B,exports.default=G;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.6
|
|
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,7 +1,7 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.6
|
|
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 c=require("react/jsx-runtime"),l=require("react"),m=require("@mui/material"),a=require("./
|
|
7
|
-
`);if(e!==i){const o=[];for(let s=0;s<t.length;s++)o.push({text:t[s]});g?.({content:{runs:o}})}x?.(e,e===i,e===d),u?.()},[n,g,u,x,d,i]),
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),l=require("react"),m=require("@mui/material"),a=require("./BUVUiEuIgVkpsMM9.cjs"),O=require("@mui/system"),I=["Ok","Cancel"],T=l.memo(y=>{const{initialComments:v=null,onUpdateComments:g,context:F,onOption:x,onValidateOption:p,onDone:u,options:f=I,defaultOption:d=f?.[0],cancelOption:i="Cancel",sx:b,...P}=y,h=l.useMemo(()=>{const e=v??F?.()?.getComments();let t="";if(e&&e.content&&e.content.runs){const o=e.content.runs;for(let r=0;r<o.length;r++){const s=o[r];t+=s?.text}}return t},[]),[n,j]=l.useState(h),[k,q]=l.useState(!1),C=l.useCallback(async(e,t)=>null,[]),w=a.T(async e=>{const t=n===""?[]:n.split(`
|
|
7
|
+
`);if(e!==i){const o=[];for(let s=0;s<t.length;s++)o.push({text:t[s]});g?.({content:{runs:o}})}x?.(e,e===i,e===d),u?.()},[n,g,u,x,d,i]),D=a.T(e=>{j(e.target.value),C(e.target.value,null)},[p]),S=a.T(async e=>{let t=await Promise.resolve(p?.(e));try{t!==!1&&(t=await C(n,e))}catch{}return t??!0},[p,n]);return c.jsx(a.D8,{title:(h?"Edit":"Insert")+" Comments",options:f,onDone:u,onOption:e=>w(e),onValidateOption:S,defaultOption:d,cancelOption:i,autoFocusSel:".autoFocus",sx:{width:"480px",...b},...P,children:c.jsx(m.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:c.jsx(m.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:c.jsx(m.TextField,{label:"Comments",placeholder:"Enter a comment.",onFocus:e=>{k||e.target?.select(),q(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${O.alpha("#fff",a.getOverlayAlpha(5))}, ${O.alpha("#fff",a.getOverlayAlpha(5))})`}}},value:n,onChange:D,onContextMenu:e=>{e.stopPropagation()}})})})})});exports.CommentsDialog=T,exports.default=T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.6
|
|
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"),c=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),t=require("react"),r=require("@mui/material"),c=require("./BUVUiEuIgVkpsMM9.cjs"),k=["Ok","Cancel"],b=t.memo(h=>{const{tableOptions:a,context:p,onOption:u,onValidateOption:q,onDone:d,options:g=k,defaultOption:l=g?.[0],cancelOption:s="Cancel",sx:m,...O}=h,[f,C]=t.useState(!1),[o,j]=t.useState(()=>a?.hasHeader??!1),[i,S]=t.useState(()=>a?.ranges??null),T=c.T(e=>{const x={...a,hasHeader:o,ranges:i};u?.(e,e===s,e===l),d?.({option:e,tableOptions:x})},[d,u,l,s,o,i,a]),D=t.useCallback(async(e,x)=>null,[]);return n.jsx(c.D8,{title:"Insert Table",options:g,onDone:T,onValidateOption:D,defaultOption:l,cancelOption:s,autoFocusSel:".range-input input",sx:{width:"360px",...m},...O,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(c.RangeInput,{formName:"range",value:i,onChangeInput:e=>S(e),resolvedAddress:p.getNames().getRanges.bind(p.getNames()),onFocus:e=>{f||e.target?.select(),C(!0)}}),n.jsx(r.FormControlLabel,{control:n.jsx(r.Checkbox,{checked:o,onChange:()=>j(!o)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=b,exports.default=b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.3.6
|
|
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.
|