@sheetxl/studio-mui 0.7.4 → 0.7.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.
Files changed (47) hide show
  1. package/README.md +9 -5
  2. package/browser/cjs/{DwzNkpi_T8XJi3Cd.cjs → -u6vWH9DiYlO1rsa.cjs} +1 -1
  3. package/browser/cjs/1-LY_VyMGQ9MfeNB.cjs +20 -0
  4. package/browser/cjs/{B6o1iQp5wuulPhxo.cjs → 7MV1n9Y0yXU0hKpM.cjs} +1 -1
  5. package/browser/cjs/{BY3gQcuJkcK9yhlk.cjs → B8-dSgXI2XZKFvtp.cjs} +2 -2
  6. package/browser/cjs/BEmcHbiMOFhIa91S.cjs +6 -0
  7. package/browser/cjs/{CflDY3SthBCQg-9F.cjs → BdNRaXTgqRzPmg0L.cjs} +2 -2
  8. package/browser/cjs/{D5l5wPl8rDYzrVey.cjs → Ce6JLd3qejgMgM3r.cjs} +7 -7
  9. package/browser/cjs/{qd_yuub025U26HmN.cjs → D7AH724IJJvos02e.cjs} +1 -1
  10. package/browser/cjs/{yETr27p_AmaFufvo.cjs → DefYX_aeMZivbpEt.cjs} +2 -2
  11. package/browser/cjs/{HfdfBnRHde6LrsMc.cjs → KOj1qev47_vzzRFV.cjs} +1 -1
  12. package/browser/cjs/{BY1UZBLCxYes25sM.cjs → St8H4B5iT2fsqOb7.cjs} +1 -1
  13. package/browser/cjs/TS1uQTjkemJ22p1Y.cjs +6 -0
  14. package/browser/cjs/index.cjs +2 -2
  15. package/browser/esm/BNxVvFkY3b2mERJf.mjs +64 -0
  16. package/browser/esm/{BqypjhYAei9BoIkg.mjs → BnVbG5kg41edf8oz.mjs} +2 -2
  17. package/browser/esm/{DUTXM-jsPX1poBAb.mjs → CJsYe8TqU6tqj4UH.mjs} +55 -56
  18. package/browser/esm/{CwE4P36bJkqx4fG2.mjs → CKLhWrNo1E4r3pG7.mjs} +1 -1
  19. package/browser/esm/{DpeZ0TCk2XtCsW7D.mjs → DVSjscO7zuDsOD4v.mjs} +2 -2
  20. package/browser/esm/{CX5p76lvGB80Gn7j.mjs → DdLujAMc-Cefddif.mjs} +1 -1
  21. package/browser/esm/{BMrxZUxFZxs_TprK.mjs → Dg_NRblGOcetqhnC.mjs} +17 -18
  22. package/browser/esm/{C43cFXvNQttM0tuv.mjs → YfJJd16cfjuXpb8G.mjs} +1 -1
  23. package/browser/esm/beUKtp_qQMnuYcVk.mjs +4452 -0
  24. package/browser/esm/index.mjs +68 -71
  25. package/browser/esm/{C-TjWH0Ll_dg6TXG.mjs → miaBr4cu9WKLs8Is.mjs} +1 -1
  26. package/browser/esm/{UKbQrJIwqIMUQ4dz.mjs → nwvZlIH9rheqctQz.mjs} +1 -1
  27. package/browser/esm/{DDCO6hne0WaKAsyz.mjs → yQgfM4ehXrfnEoUK.mjs} +2 -2
  28. package/node/esm/{DmbC0_ocWCB60DUY.mjs → B9TRK2jd_Ki2RifT.mjs} +1 -1
  29. package/node/esm/{g5IsTuP_M7p1bN41.mjs → BTp8XtWh47Y1g1MM.mjs} +1 -1
  30. package/node/esm/BcB8nCbI5HW5jv5q.mjs +65 -0
  31. package/node/esm/C5WzmLTAphEQU3CU.mjs +155 -0
  32. package/node/esm/{C0x0sq_I7hdqCuBB.mjs → CN79Z_qqLiF3V5r0.mjs} +1 -1
  33. package/node/esm/{x7VDppl2hKDhIcfj.mjs → CNCYE_ff8SnJJMPN.mjs} +41 -42
  34. package/node/esm/{nZVauB5xkNLVTaod.mjs → COoX8Ir66wNuWJ_m.mjs} +1 -1
  35. package/node/esm/{VjNnErE5lO5hNix_.mjs → CxbA2L1Ap9NSJcxm.mjs} +1 -1
  36. package/node/esm/{CdEdm8ItFMvEzr0O.mjs → Dln5o1FP_HWPs0Uf.mjs} +1 -1
  37. package/node/esm/index.mjs +1405 -1452
  38. package/node/esm/{DhjwHPKOhF-WGawL.mjs → qpKmKMfv4DDofXKf.mjs} +1 -1
  39. package/package.json +21 -10
  40. package/types/index.d.ts +14 -92
  41. package/browser/cjs/BCNKSDS1DahImiBd.cjs +0 -20
  42. package/browser/cjs/BrJIDDxcCb7loSqZ.cjs +0 -6
  43. package/browser/cjs/hRcxITGib5rp_kTW.cjs +0 -6
  44. package/browser/esm/BXa5jJK06vkHLfz_.mjs +0 -64
  45. package/browser/esm/zTa4aYOOiAsmWpM1.mjs +0 -4489
  46. package/node/esm/DUoSsHJRuVxAeHW-.mjs +0 -156
  47. package/node/esm/DuFKPKejduTq6L6F.mjs +0 -65
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.4
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 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("./BCNKSDS1DahImiBd.cjs"),b=s.memo(f=>{const{title:w,onHide:S,autoFocusSel:j=".range-input input",context:C,command:g,commands:u,...T}=f,[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 y=null;o.table()||(y=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"})}));const d=l.useNotifier();return 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,{}))})]})]})]}),y]})})});exports.TableDetailsWindow=b,exports.default=b;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.4
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"),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("./BCNKSDS1DahImiBd.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,64 +0,0 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import { memo as E, useState as r, useRef as M, useReducer as O, useMemo as W } from "react";
3
- import { DialogContent as A, Box as n } from "@mui/material";
4
- import { useCommand as k, useCallbackRef as f, useNotifier as V, CommandButtonType as x } from "@sheetxl/utils-react";
5
- import { InternalWindow as q, ExhibitDivider as y, CommandButton as b, themeIcon as w, InsertTableIcon as C } from "@sheetxl/utils-mui";
6
- import { useModelListener as G } from "@sheetxl/react";
7
- import { u as J, N as K, R as Q, T as U, a as X } from "./zTa4aYOOiAsmWpM1.mjs";
8
- /**
9
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.4
10
- *
11
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
12
- * License: The license can be found at https://www.sheetxl.com/license.
13
- */
14
- const ie = E((S) => {
15
- const { title: N, onHide: R, autoFocusSel: T = ".range-input input", context: v, command: c, commands: d, ...D } = S, [I, m] = r(!1), [g, p] = r(!1), u = M(null), [Y, B] = O((e) => e + 1, 0), [F, { width: Z }] = J();
16
- k(c);
17
- const a = v ?? c.context(), t = a.table(), [H, P] = r(() => t ? a.getNames().getRanges(t.getRange()) : null), j = W(() => t?.getName() ?? "", [t]);
18
- G(a.table(), { onAnchorCoordsChange(e) {
19
- P(a.getNames().getRanges(e.getRange()));
20
- }, onProtectedChange(e) {
21
- B();
22
- } });
23
- const L = f((e) => {
24
- a?.table().setName(e);
25
- }, [a]), z = f((e) => {
26
- a?.table().resize(e.at(0));
27
- }, [a]);
28
- let h = null;
29
- a.table() || (h = o("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: o("div", { children: "No table selected" }) }));
30
- const l = V();
31
- return o(q, { ref: u, title: N ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => m(!0), onBlur: (e) => {
32
- u?.current?.contains(e.relatedTarget) || m(!1);
33
- }, PaperProps: { elevation: I ? 3 : 1 }, ...D, children: s(A, { dividers: !0, ref: F, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, children: [s(n, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: a.table() ? 1 : 0 }, children: [o(n, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: o(n, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e) => e.spacing(2), paddingRight: (e) => e.spacing(2) }, children: s(n, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [o(K, { formName: "name", defaultInput: j, value: t?.getName() ?? "No table", onChangeInput: L, onValidate: (e) => {
34
- t && t.getName().toLowerCase() === e.toLowerCase() || a?.getNames().validateName(e);
35
- }, disabled: t?.isProtected() ?? !0, onFocus: (e) => {
36
- g || e.target?.select(), p(!0);
37
- } }), o(Q, { formName: "range", value: H, onChangeInput: z, resolvedAddress: a.getNames().getRanges.bind(a.getNames()), disabled: t?.isProtected() ?? !0, onFocus: (e) => {
38
- g || e.target?.select(), p(!0);
39
- } })] }) }) }), s(n, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [o(y, { orientation: "horizontal", sx: { marginTop: (e) => e.spacing(1.5), marginBottom: (e) => e.spacing(0.75) } }), o(U, { disabled: t?.isProtected(), styleOptions: t?.getStyleOptions() ?? null, onStyleOptionsChange: (e) => {
40
- t.updateStyleOptions(e);
41
- }, showHeaderRow: t?.getShowHeaders(), onShowHeaderRowChange: (e) => {
42
- try {
43
- t.setShowHeaders(e);
44
- } catch (i) {
45
- l.showError(i);
46
- }
47
- }, showTotalRow: t?.getShowTotals(), onShowTotalRowChange: (e) => {
48
- try {
49
- t.setShowTotals(e);
50
- } catch (i) {
51
- l.showError(i);
52
- }
53
- }, showFilterButton: t?.getFilter() ? t.getShowFilterButton() : null, onShowFilterButtonChange: (e) => {
54
- try {
55
- t.setShowFilterButton(e);
56
- } catch (i) {
57
- l.showError(i);
58
- }
59
- } }), o(n, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e) => e.spacing(2), marginBottom: (e) => e.spacing(1) }, children: o(X, { table: t, styles: a.styles(), bodyStyle: a.bodyStyle(), cellHeight: 30, isLive: !0 }) }), o(y, { orientation: "horizontal" }), s(n, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [o(b, { variant: x.Menuitem, command: d.getCommand("convertTableToRange"), commandState: t, icon: w(o(C, {})) }), o(b, { variant: x.Menuitem, commandState: t, command: d.getCommand("deleteTable"), icon: w(o(C, {})) })] })] })] }), h] }) });
60
- });
61
- export {
62
- ie as TableDetailsWindow,
63
- ie as default
64
- };