@sheetxl/studio-mui 0.4.19 → 0.4.21
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/B1KlR2XYFpYbKjYS.cjs +20 -0
- package/browser/cjs/{afHzhXTMVhLQJ6uC.cjs → B1RMsexbz4bNlty_.cjs} +1 -1
- package/browser/cjs/B32faQpVaX1tkPuc.cjs +6 -0
- package/browser/cjs/B3XiHrRxW1LxML7F.cjs +6 -0
- package/browser/cjs/BGikYpeNpjwvXUdQ.cjs +18 -0
- package/browser/cjs/BY5l7DteiFtb2AKy.cjs +6 -0
- package/browser/cjs/Bb0Hd2RE7iVWVbm8.cjs +6 -0
- package/browser/cjs/C3EZkRIKfQURg9hX.cjs +6 -0
- package/browser/cjs/C7r573AdygYrVVEJ.cjs +7 -0
- package/browser/cjs/DEEknE8ARp0mc7fk.cjs +6 -0
- package/browser/cjs/DZwzUUHda3jr5jo4.cjs +6 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/veQZSq7ekc6G1FZT.cjs +42 -0
- package/browser/esm/B84RbTkXZiq6XIdH.mjs +49 -0
- package/browser/esm/{C4lgCnqxoHUTMKx0.mjs → BLy-hRTZkVfaGrcr.mjs} +1 -1
- package/browser/esm/Bapmv0WdnDq3Jl_q.mjs +53 -0
- package/browser/esm/C0OuiugFYjsjbY8q.mjs +46 -0
- package/browser/esm/{6nabbOchsfGHTDbJ.mjs → CGVN-NJF8ZTm9apo.mjs} +11 -10
- package/browser/esm/CcLpUDzJOdfqQ8Kf.mjs +25 -0
- package/browser/esm/Csg-hJrzm9r4vJrm.mjs +2156 -0
- package/browser/esm/{DwyDpojQzn8Yb0Z3.mjs → DHf2N2UY78nZFge3.mjs} +100 -98
- package/browser/esm/Dlc8L0qha0mZFIkY.mjs +62 -0
- package/browser/esm/{Duk7LVR9m02nk_H1.mjs → Dv-0R5pQwEnowzoO.mjs} +87 -85
- package/browser/esm/index.mjs +29 -29
- package/browser/esm/mVKwmIdSj4ua1Qce.mjs +4443 -0
- package/browser/esm/{aeeg2i5lmw2EnSq8.mjs → sHK4zKkWLGt2hVmW.mjs} +27 -26
- package/licenses/dependencies.txt +71 -342
- package/node/esm/{C1qlFAMFUg7JxINj.mjs → 49Eux5a_I5wZ-jfq.mjs} +29 -28
- package/node/esm/{Svd1DLPJnYKhJsxn.mjs → B00pGeZ7sj6QOFgF.mjs} +4 -3
- package/node/esm/{Cqh-VwF8iLFUBQG2.mjs → BEtxwx_Ji4aFNg8V.mjs} +79 -78
- package/node/esm/{BOlA6nKvsuwJ8-qE.mjs → BTcBIT144Lil18l-.mjs} +13 -11
- package/node/esm/{SdVxzy9D4jvK5ILt.mjs → Bw_f4uhXHpg1RA6Z.mjs} +7 -6
- package/node/esm/CGrG-gsnGd-Pn_T2.mjs +88 -0
- package/node/esm/CiUfb3MQCUC2McDP.mjs +46 -0
- package/node/esm/D1bjybdBQ28bumrW.mjs +63 -0
- package/node/esm/{wuBONOGgEy1w5A3Q.mjs → Dcnd4LiYyGf2eaNl.mjs} +23 -22
- package/node/esm/{BbLVlH-VHXBiyGbB.mjs → DiLUM75s3D56Y6Fx.mjs} +11 -10
- package/node/esm/index.mjs +2378 -18426
- package/package.json +8 -8
- package/browser/cjs/9JbHyHSHGCO4uFHn.cjs +0 -7
- package/browser/cjs/B17ClH6YVt0_UP8s.cjs +0 -6
- package/browser/cjs/B9LTfguTHj9uQv3h.cjs +0 -6
- package/browser/cjs/BYWh4kkrXJKKl2Ju.cjs +0 -145
- package/browser/cjs/BYrNOLTwEhs6LHAw.cjs +0 -6
- package/browser/cjs/Bh8xJY_qVp_q9NdJ.cjs +0 -6
- package/browser/cjs/Bl5l1B_eznDfB_7v.cjs +0 -18
- package/browser/cjs/C1LBzI2ntslIKFn5.cjs +0 -6
- package/browser/cjs/CGWf__jrNH3xfu2y.cjs +0 -161
- package/browser/cjs/CGlk1dj000Bm5cqP.cjs +0 -7
- package/browser/cjs/CX_y7y31Q5qi020q.cjs +0 -6
- package/browser/cjs/Cby5RVhO-aNkuWsV.cjs +0 -11
- package/browser/cjs/D2CoaVzteKVTLz2u.cjs +0 -42
- package/browser/cjs/D4ge-OwnSGkzaQnk.cjs +0 -15
- package/browser/cjs/D54KO7Qf1gFYpUYh.cjs +0 -11
- package/browser/cjs/D5Hr7ebLiJgvcT0k.cjs +0 -6
- package/browser/cjs/D6qxm65mk30iMCfQ.cjs +0 -6
- package/browser/cjs/DIR6Yr7FCZPYWi4-.cjs +0 -6
- package/browser/cjs/DeklxocxxZiZyZ5u.cjs +0 -6
- package/browser/cjs/Dh2Z7N-jImJZemiw.cjs +0 -6
- package/browser/cjs/Dngll9GyDqkTUUmu.cjs +0 -6
- package/browser/cjs/KmAkK4F7kLQEM3IN.cjs +0 -12
- package/browser/cjs/n8wDl6JTlhLU6ZAW.cjs +0 -16
- package/browser/cjs/zr0HW2FkaHX7brxh.cjs +0 -110
- package/browser/esm/B8eNugj_qKnbe7K9.mjs +0 -59
- package/browser/esm/BPRkMu1MFxUWK930.mjs +0 -3803
- package/browser/esm/BQtrstD4gTIutZpE.mjs +0 -1467
- package/browser/esm/BeT_3zf80WoubGnC.mjs +0 -1352
- package/browser/esm/C226zpF9x3cqGDep.mjs +0 -44
- package/browser/esm/C52hEZh6H2W5Zw5u.mjs +0 -2250
- package/browser/esm/CJi45DDPGy79h3Hk.mjs +0 -1366
- package/browser/esm/CSAsCpXnzBKwTizz.mjs +0 -23326
- package/browser/esm/ChetmIXTvR3tA23A.mjs +0 -48
- package/browser/esm/CtAFduFwOuqSdkvi.mjs +0 -23
- package/browser/esm/D1mFp2w9djJ0V4vm.mjs +0 -52
- package/browser/esm/DA83VkmtEXnqG2ye.mjs +0 -43
- package/browser/esm/Dy_zBluT96wehR25.mjs +0 -46
- package/browser/esm/NwT_h_qyOIJUd95T.mjs +0 -392
- package/browser/esm/eNfgzWFw915mA1DM.mjs +0 -84
- package/browser/esm/i07lQ5p_zaWwjifI.mjs +0 -12
- package/browser/esm/mWKbTdOrhJijxGkQ.mjs +0 -13391
- package/browser/esm/qTwpcY21ZDbsJF8q.mjs +0 -424
- package/browser/esm/rOu2mn5CpwGjRPMt.mjs +0 -1672
- package/browser/esm/xBoO8UGcKLTEtu2_.mjs +0 -1703
- package/node/esm/8IRz_tiw9gL3CiTm.mjs +0 -46
- package/node/esm/BGuyZxOceFDiCkHS.mjs +0 -553
- package/node/esm/BRc35RfDs9NeSBil.mjs +0 -78
- package/node/esm/BWNYjBRxl8-kaqWc.mjs +0 -1706
- package/node/esm/Bdk5FW-41aJV-x0f.mjs +0 -392
- package/node/esm/C2KYv5fsjkP4dceu.mjs +0 -86
- package/node/esm/C7eBwbZmMMcQeZ5y.mjs +0 -1479
- package/node/esm/CCmhTOlFNku7bidD.mjs +0 -44
- package/node/esm/COWuJnOkG4AgfLpx.mjs +0 -3776
- package/node/esm/CcxYuxLYIW_z4w-n.mjs +0 -1378
- package/node/esm/DO-FR-M-Iy43f7rk.mjs +0 -60
- package/node/esm/DOa-YBJSa8QO8ypH.mjs +0 -1246
- package/node/esm/DXgMMPZD2XcdNWPg.mjs +0 -44
- package/node/esm/DXlF9nEg2kAr3Ykp.mjs +0 -13464
- package/node/esm/FcospSz9-0aW4gFs.mjs +0 -1719
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-mui",
|
|
3
3
|
"description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.21",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
"charting"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@sheetxl/grid-react": "^0.4.
|
|
40
|
-
"@sheetxl/io": "^0.4.
|
|
41
|
-
"@sheetxl/react": "^0.4.
|
|
42
|
-
"@sheetxl/utils": "^0.4.
|
|
43
|
-
"@sheetxl/utils-mui": "^0.4.
|
|
44
|
-
"@sheetxl/utils-react": "^0.4.
|
|
39
|
+
"@sheetxl/grid-react": "^0.4.21",
|
|
40
|
+
"@sheetxl/io": "^0.4.21",
|
|
41
|
+
"@sheetxl/react": "^0.4.21",
|
|
42
|
+
"@sheetxl/utils": "^0.4.21",
|
|
43
|
+
"@sheetxl/utils-mui": "^0.4.21",
|
|
44
|
+
"@sheetxl/utils-react": "^0.4.21",
|
|
45
|
+
"@sheetxl/sdk": "^0.4.21",
|
|
45
46
|
"clsx": "^2.1.1",
|
|
46
47
|
"csstype": "^3.1.3",
|
|
47
48
|
"file-saver": "^2.0.5",
|
|
@@ -59,7 +60,6 @@
|
|
|
59
60
|
"tinycolor2": "^1.6.0"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
|
-
"@sheetxl/sdk": "^0.4.19",
|
|
63
63
|
"@emotion/cache": "^11.14.0",
|
|
64
64
|
"@emotion/react": "^11.14.0",
|
|
65
65
|
"@emotion/styled": "^11.14.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.19
|
|
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 c=require("react/jsx-runtime"),l=require("react"),m=require("@mui/material"),a=require("./zr0HW2FkaHX7brxh.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 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.19
|
|
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"),s=require("react"),r=require("@mui/material"),v=require("@mui/icons-material"),a=require("@sheetxl/sdk"),t=require("./zr0HW2FkaHX7brxh.cjs"),y=require("@mui/system"),A=s.memo(j=>{const{label:h,value:d,options:c,onSelect:f,tabIndex:O=0,...I}=j,[w,C]=s.useState(()=>U(d,c));s.useEffect(()=>{C(U(d,c))},[d,c]);const S=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:w,label:h,onChange:S,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:w,onFindOrReplace:C,...S}=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),[k,Q]=s.useState(!1),[g,E]=s.useState(h),[q,F]=s.useState(!1),[W,Z]=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,k,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}),W||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.jn,{ref:N,title:I??(g?"Find & Replace":"Find"),initialPosition:{y:"35"},autoFocusSel:".input",onHide:w,onFocus:()=>Z(!0),onBlur:()=>{Z(!1),F(!1)},PaperProps:{elevation:W?3:1},...S,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.rl,{selected:k,onSelectToggle:e=>{Q(e)},preventFocus:!0,label:"Toggle Additional Options",icon:t.w5(i.jsx(t.Ii,{}))}),i.jsx(t.rl,{selected:g,onSelectToggle:e=>{E(e)},preventFocus:!0,label:"Toggle Replace",icon:t.w5(i.jsx(t.Ri,{})),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.rl,{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.w5(i.jsx(t.Fi,{}))}),i.jsx(t.rl,{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.w5(i.jsx(t.$i,{}))}),i.jsx(t.rl,{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.w5(i.jsx(t.Wi,{}))})]})})},sx:{flex:"1 1 100%",marginRight:e=>e.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:e=>q?`${e.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:e=>q?`${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.rl,{selected:l.findOptions.reverse,onSelectToggle:e=>{R(!1,!1)},touchRippleRef:D,label:"",shortcut:{key:"Enter",modifiers:[t.Z.Shift]},icon:t.w5(l.findOptions.orientation!==a.IRange.Orientation.Column?i.jsx(v.ArrowBack,{}):i.jsx(v.ArrowUpward,{})),disabled:!l.findText}),i.jsx(t.rl,{selected:!l.findOptions.reverse,onSelectToggle:e=>{R(!0,!1)},touchRippleRef:P,label:"Next Match",shortcut:{key:"Enter"},icon:t.w5(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.rl,{onSelectToggle:e=>{R(!0,!0)},touchRippleRef:K,label:"Replace",shortcut:{key:"Enter"},icon:t.w5(i.jsx(t.ji,{})),disabled:!l.findText}),i.jsx(t.rl,{onSelectToggle:e=>{R(!0,!0,!0)},touchRippleRef:M,label:"Replace All",shortcut:{key:"Enter",modifiers:[t.Z.Ctrl,t.Z.Alt]},icon:t.w5(i.jsx(t.Bi,{})),disabled:!l.findText})]})})]})]}),i.jsx(r.Collapse,{in:k,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.Pt,{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,6 +0,0 @@
|
|
|
1
|
-
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.19
|
|
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 s=require("react/jsx-runtime"),a=require("react"),t=require("./zr0HW2FkaHX7brxh.cjs"),p=require("@mui/material"),O=require("@mui/system"),N=["Input"],$=a.memo(a.forwardRef((T,w)=>{const{initialValue:F="",onOption:S,onValidateOption:l,onInputOption:u,onValidateInputOption:r,onDone:c,inputProps:d,inputLabel:P,inputType:b,inputPlaceHolder:v,options:g=N,autoFocusSel:C=".autoFocus",cancelOption:f,defaultOption:m=g?.[0],...I}=T,[j,q]=a.useState(!1),[n,k]=a.useState(F),[D,V]=a.useState(""),[B,M]=a.useState(!0),i=t.s0(async(e,o)=>{if(!r)return!0;const x=await r?.(e,o);V(x?.message??"");const y=x?.valid??!0;return M(y),y},[r]),h=t.s0(async e=>{u?.(n,e)},[n,u,c,S,f,m]),R=t.s0(async e=>{e.keyCode===t.Z0.Enter&&await i?.(n,null)},[n,h]),H=t.s0(e=>{k(e.target.value),i?.(e.target.value,null)},[l]),L=t.s0(async e=>{let o=await i(n,e);try{o!==!1&&(o=await i(n,e))}catch{}return o??!0},[n,l]);return s.jsx(t.D8,{options:g,onDone:c,onOption:(e,o)=>{o||h(e)},onValidateOption:L,cancelOption:f,defaultOption:m,autoFocusSel:C,ref:w,...I,children:s.jsx(p.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0)},children:s.jsx(p.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:s.jsx(p.TextField,{onFocus:e=>{j||e.target?.select(),q(!0)},type:b,label:P,helperText:D||" ",sx:{width:"100%","& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5),color:B?void 0:"error.main"}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{placeholder:v,spellCheck:!1,autoComplete:"off",...d,className:t.A0("autoFocus",d?.className),sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${O.alpha("#fff",t.Re(5))}, ${O.alpha("#fff",t.Re(5))})`}}},value:n,onChange:H,onKeyDown:R,onContextMenu:e=>{e.stopPropagation()}})})})})}));exports.default=$;
|