@sheetxl/studio-mui 0.7.12 → 0.7.14
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/-SJdVflEYXFC2raH.cjs +6 -0
- package/browser/cjs/BE0n-qrL7I0lr2f8.cjs +7 -0
- package/browser/cjs/CAxeR5WYtM_OKUqg.cjs +6 -0
- package/browser/cjs/CC-q_GCvhI_uweI4.cjs +6 -0
- package/browser/cjs/{wyak0LMoe5SYbD51.cjs → CHc92OjHJrS2B3rB.cjs} +2 -2
- package/browser/cjs/CN5q08lr4Coj9gzy.cjs +6 -0
- package/browser/cjs/{CcsfLc43Qp-vN_dY.cjs → CYMqmv5IamB1x14k.cjs} +3 -3
- package/browser/cjs/CwHuP4ot4XxM1FbL.cjs +6 -0
- package/browser/cjs/{CMEmwUuGpnOyILAu.cjs → DjU4LQ7p0jFx8PsW.cjs} +1 -1
- package/browser/cjs/DqwSkMX3TSwbvSfO.cjs +20 -0
- package/browser/cjs/Ij3b1ONhNaWLtkRT.cjs +6 -0
- package/browser/cjs/NpKL7qsDwzMarfjO.cjs +6 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/BLiSCviFgWhD9SmC.mjs +53 -0
- package/browser/esm/BNF5wwVTFO0bKhDb.mjs +50 -0
- package/browser/esm/BlDN4JPF9n_TeCyQ.mjs +155 -0
- package/browser/esm/{DK1cCQD1jHxZbFAp.mjs → BzS-7g64cdTk8pFd.mjs} +1 -1
- package/browser/esm/BzkODf-EDNHsbeYC.mjs +26 -0
- package/browser/esm/{B7ChnkonDRA2zazH.mjs → Cd127EllJy0H1x8s.mjs} +3 -3
- package/browser/esm/CfkKWfDbYhDDort6.mjs +46 -0
- package/browser/esm/{CRmCo9Jr1gvSFGVp.mjs → D8YtOXZWnL-YI48g.mjs} +2121 -2108
- package/browser/esm/DezB6LbrlA_MqNpH.mjs +50 -0
- package/browser/esm/{fsGSNDVe9urk2cLB.mjs → DlZXGLXt7KBqpCgX.mjs} +2 -2
- package/browser/esm/{aeHM-2IGRQaGFohd.mjs → XGwUZoREuZ029cPM.mjs} +28 -27
- package/browser/esm/aWQ7-rGmyvVU_nRK.mjs +25 -0
- package/browser/esm/index.mjs +2 -2
- package/licenses/dependencies.txt +142 -142
- package/node/esm/4D3fLVzYqPTas9nR.mjs +25 -0
- package/node/esm/B6-CF_32FCaDZJDm.mjs +52 -0
- package/node/esm/C21w0yQGlygcFqHI.mjs +156 -0
- package/node/esm/{H012qdl97RHln5MW.mjs → C62EF6LSsPD4LAL6.mjs} +1 -1
- package/node/esm/{Df6HNjgJTgShGC-O.mjs → C8TcDhw9hCrJxqfJ.mjs} +1 -1
- package/node/esm/{CwKoYwlrp9nnVHln.mjs → CM8Jkahi0myGVt_v.mjs} +22 -22
- package/node/esm/{CGaHni9C2sipjSMn.mjs → CREPL1yvIjmYpU-r.mjs} +9 -7
- package/node/esm/CeJ5myvgfYOUSKGq.mjs +26 -0
- package/node/esm/{BEFwnAOkyd0CWlex.mjs → D9PLpUGQqMmk1V9n.mjs} +13 -13
- package/node/esm/index.mjs +531 -523
- package/node/esm/{BSTIZiKBGgwjXLtp.mjs → xCdMLxN5xcpczFUI.mjs} +18 -18
- package/package.json +17 -15
- package/browser/cjs/BYfcSe1JgcohGr-C.cjs +0 -7
- package/browser/cjs/BZPmbh6TWeAN2tiY.cjs +0 -6
- package/browser/cjs/CrkutQSHB1Buy5oQ.cjs +0 -6
- package/browser/cjs/D2KC31HOMCGQMLvD.cjs +0 -6
- package/browser/cjs/DiQXaxwfHcQfkYKX.cjs +0 -6
- package/browser/cjs/Dmw2IW35YLNmLgvP.cjs +0 -20
- package/browser/cjs/bItCE_-c88dO7Izw.cjs +0 -6
- package/browser/cjs/fa-Q2vHsld47aqrE.cjs +0 -6
- package/browser/esm/BZPlU0oT2oGTQQgK.mjs +0 -46
- package/browser/esm/BzGH26JDt4xKZfM7.mjs +0 -49
- package/browser/esm/CA-_Kya2gsMrF9Ef.mjs +0 -26
- package/browser/esm/CGBRrUgnGzuP9FGo.mjs +0 -156
- package/browser/esm/csScKLYnqrrlL197.mjs +0 -25
- package/browser/esm/lm9H6CMj_7o_ra2l.mjs +0 -53
- package/node/esm/BqLlyKyVXFNiRaJv.mjs +0 -25
- package/node/esm/Cq6TadzONqFlX07d.mjs +0 -26
- package/node/esm/D71WQjM6hP5FzBql.mjs +0 -157
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
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"),w=require("@mui/material"),d=require("@sheetxl/utils-react"),F=require("@sheetxl/utils-mui"),O=require("./DqwSkMX3TSwbvSfO.cjs"),B=["Ok","Cancel"],R=l.memo(V=>{const{initialValue:a=null,context:t,onOption:c,onValidateOption:M,onDone:p,onInput:g,options:m=B,defaultOption:x=m?.[0],cancelOption:f="Cancel",sx:b,...h}=V,N=l.useMemo(()=>t?.().getNames().findValidName("Range1"),[]),y=l.useMemo(()=>{if(!a)return!0},[]),[n,v]=l.useState({displayText:a?.getName()??N,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,[]),I=d.useCallbackRef((e,s,u)=>{if(!s){let i=null;y?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(),g(i))}c?.(e,s,u),p?.()},[t,n,o,p,c,x,f,g]),S=d.useCallbackRef(e=>{let s=null;try{t?.().getNames().validateName(e)}catch(u){s=u.message}v({displayText:e,errorText:s})},[]),j=d.useCallbackRef(e=>{a&&a.getName().toLowerCase()===e.toLowerCase()||t?.().getNames().validateName(e)},[t,a]),D=l.useCallback(e=>{k({displayValue:e??null,errorText:null})},[]);return r.jsx(F.OptionsDialog,{title:(y?"Define":"Edit")+" Range",options:m,onOption:I,onValidateOption:q,defaultOption:x,cancelOption:f,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:N,value:n.displayText,onChangeInput:S,onValidate:j,onFocus:e=>{T||e.target?.select(),C(!0)}}),r.jsx(O.RangeInput,{formName:"range",value:o.displayValue,onChangeInput:D,resolvedAddress:t?t().getNames().getRanges.bind(t().getNames()):void 0,onFocus:e=>{T||e.target?.select(),C(!0)}})]})})});exports.NamedReferenceDialog=R,exports.default=R;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
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 a=require("react/jsx-runtime"),s=require("react"),o=require("@mui/material/styles"),i=require("@mui/material"),S=require("@sheetxl/sdk"),u=require("@sheetxl/utils-react"),U=require("@sheetxl/utils-mui"),A=["Autofit","Ok","Cancel"],v=s.memo(j=>{const{initialValue:k,context:l,onOption:y,onValidateOption:p,onInput:C,onDone:d,options:b=A,defaultOption:c=b?.[1],cancelOption:g="Cancel",sx:z,...P}=j,T=s.useMemo(()=>l?.().getOrientation()===S.IRange.Orientation.Column,[l]),[n,O]=s.useState(k),[w,R]=s.useState(!1),x=s.useCallback(async(e,t)=>!0,[]),f=s.useMemo(()=>{if(!l().toUnits)return null;let e=n?.size??0,t="Px";return n.unit==="Px"?(e=l().toUnits?.(e),t=l().getUnitText()):(e=l().toPixels?.(e),t="Px"),{size:e,unit:t}},[n?.unit,n?.size]),m=u.useCallbackRef(async e=>{const t=e===g;t||C?.(n,e),y?.(e,t,e===c),d?.()},[n,C,d,y,g,c]),F=u.useCallbackRef(async e=>{e.keyCode===u.KeyCodes.Enter&&await x?.(n,null)!==!1&&m(c)},[n,m]),I=u.useCallbackRef(async e=>{let t=await Promise.resolve(p?.(e));try{t!==!1&&(t=await Promise.resolve(x?.(n,e))??!0)}catch{}return t??!0},[p]),M=u.useCallbackRef(e=>{const t={...n,size:Number(e.target.value)};O(t),x?.(t,null)},[n,p]),q=u.useCallbackRef(e=>{const t=e.target.value,r={...n,unit:t};O(r)},[n]),D=s.useMemo(()=>{const e=l().getUnitText(),t=h=>a.jsx(i.MenuItem,{value:h,children:h},h),r=[];return r.push(t("Px")),r.push(t(e)),r},[]);return a.jsx(U.OptionsDialog,{title:"Resize "+(T?"Columns":"Rows"),options:b,onDone:d,onOption:e=>m(e),onValidateOption:I,defaultOption:c,cancelOption:g,autoFocusSel:".autoFocus",sx:{width:"380px",...z},...P,children:a.jsxs(i.Box,{sx:{paddingTop:e=>e.spacing(0),paddingBottom:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[a.jsxs(i.Box,{sx:{rowGap:e=>e.spacing(1),display:"flex",flexDirection:"row",gap:e=>e.spacing(.5),alignItems:"end",justifyContent:"center"},children:[a.jsx(i.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:a.jsx(i.TextField,{label:"Size",onFocus:e=>{w||e.target?.select(),R(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},slotProps:{inputLabel:{shrink:!0},htmlInput:{className:"autoFocus",spellCheck:!1,autoComplete:"off",type:"number",inputMode:"numeric",pattern:"[0-9]*",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${o.alpha("#fff",o.getOverlayAlpha(5))}, ${o.alpha("#fff",o.getOverlayAlpha(5))})`}}},value:n.size,onChange:M,onKeyDown:F,onContextMenu:e=>{e.stopPropagation()}})}),a.jsxs(i.FormControl,{sx:{minWidth:85},size:"small",children:[a.jsx(i.InputLabel,{children:"Unit"}),a.jsx(i.Select,{value:n.unit,label:"Unit",onChange:q,sx:{backgroundImage:`linear-gradient(${o.alpha("#fff",o.getOverlayAlpha(5))}, ${o.alpha("#fff",o.getOverlayAlpha(5))})`},children:D})]})]}),f&&a.jsx(i.Box,{children:a.jsxs(i.Typography,{variant:"body2",component:"div",sx:{paddingLeft:e=>e.spacing(2)},children:[f.size," ",f.unit]})})]})})});exports.ResizeHeaderDialog=v,exports.default=v;
|
package/browser/cjs/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:block;width:auto;height:auto;margin:0;padding:0;border:none;border-collapse:inherit;border-spacing:0;border-color:inherit;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{display:grid;grid-template-columns:1fr;user-select:none}@container (width > 600px){._table-style-options_1kfn2_1{grid-template-rows:repeat(3,auto);grid-auto-flow:column;grid-auto-columns:1fr;gap:2px}}._range-row_akhf4_1{display:flex;flex-direction:column;flex:1 1 100%;width:100%;align-items:center}@container (width > 600px){._range-row_akhf4_1{flex-direction:row;gap:12px;justify-content:space-between}}._action-row_akhf4_15{display:flex;align-items:start;flex-direction:column;width:100%;gap:4px}@container (width > 600px){._action-row_akhf4_15{align-items:center;flex-direction:row;justify-content:space-evenly}}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4{fill:currentColor}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor{fill:var(--sxl-color-active)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background{fill:var(--sxl-app-color-background)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey{fill:var(--sxl-app-color-grey)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast{fill:var(--sxl-app-color-high)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info{fill:var(--sxl-app-color-info)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light{fill:var(--sxl-app-color-info-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark{fill:var(--sxl-app-color-info-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary{fill:var(--sxl-app-color-secondary)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light{fill:var(--sxl-app-color-secondary-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark{fill:var(--sxl-app-color-secondary-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success{fill:var(--sxl-app-color-success)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light{fill:var(--sxl-app-color-success-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark{fill:var(--sxl-app-color-success-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning{fill:var(--sxl-app-color-warning)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light{fill:var(--sxl-app-color-warning-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark{fill:var(--sxl-app-color-warning-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error{fill:var(--sxl-app-color-error)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light{fill:var(--sxl-app-color-error-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark{fill:var(--sxl-app-color-error-dark)}._sheetxl-workbook_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_5 .splitPane.dragging .styled-resizer{background-color:var(--sxl-app-color-primary, blue)}._card_1a398_7{width:100%}._actionRoot_1a398_11{padding:8px 8px 8px 16px;justify-content:space-between}._icons_1a398_16{margin-left:auto;display:flex;align-items:center}._expand_1a398_22{padding:8px;transform:rotate(0);color:#d32f2f;transition:all .2s ease-in-out}._expandOpen_1a398_29{transform:rotate(180deg)}._stackTraceContainer_1a398_33{padding:16px}._paper_1a398_37{background-color:#fff;padding:16px}._checkIcon_1a398_42{font-size:20px;padding-right:4px}._button_1a398_47{padding:0;text-transform:none}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
2
|
"use strict";/**
|
|
3
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
3
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
7
|
-
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@sheetxl/sdk"),t=require("@sheetxl/react"),o=require("./
|
|
7
|
+
*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@sheetxl/sdk"),t=require("@sheetxl/react"),o=require("./DqwSkMX3TSwbvSfO.cjs");Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>e.LicenseManager}),Object.defineProperty(exports,"DefaultTaskPaneRegistry",{enumerable:!0,get:()=>t.DefaultTaskPaneRegistry}),Object.defineProperty(exports,"useModelListener",{enumerable:!0,get:()=>t.useModelListener}),Object.defineProperty(exports,"useRangeListener",{enumerable:!0,get:()=>t.useRangeListener}),exports.AppearanceCommandButton=o.AppearanceCommandButton,exports.AutoColorPosition=o.AutoColorPosition,exports.BorderCommandButton=o.BorderCommandButton,exports.BorderPopupButton=o.BorderPopupButton,exports.BorderStylePopupButton=o.BorderStylePopupButton,exports.CellsDeleteCommandButton=o.CellsDeleteCommandButton,exports.CellsFormatCommandButton=o.CellsFormatCommandButton,exports.CellsInsertCommandButton=o.CellsInsertCommandButton,exports.ClearCommandButton=o.ClearCommandButton,exports.ColorButton=o.ColorButton,exports.ColorButtonList=o.ColorButtonList,exports.ColorCommandButton=o.ColorCommandButton,exports.ColorPanel=o.ColorPanel,exports.ColorPanelType=o.ColorPanelType,exports.ColorPopupButton=o.ColorPopupButton,exports.DocThemeCommandButton=o.DocThemeCommandButton,exports.EagerStudio=o.EagerStudio,exports.FillCommandButton=o.FillCommandButton,exports.FilterColumnMenu=o.FilterColumnMenu,exports.FilterCommandButton=o.FilterCommandButton,exports.Filters=o.Filters,exports.FindCommandButton=o.FindCommandButton,exports.FontFamilyCommandButton=o.FontFamilyCommandButton,exports.FontSizeCommandButton=o.FontSizeCommandButton,exports.FormulaBar=o.FormulaBar,exports.FreezeCommandButton=o.FreezeCommandButton,exports.HelpCommandButton=o.HelpCommandButton,exports.HorizontalAlignCommandButton=o.HorizontalAlignCommandButton,exports.InsertFunctionCommandPopupButton=o.InsertFunctionCommandPopupButton,exports.InsertFunctionSumCommandPopupButton=o.InsertFunctionSumCommandPopupButton,exports.InsertImageCommandButton=o.InsertImageCommandButton,exports.MergeCommandButton=o.MergeCommandButton,exports.NamedCollectionEditor=o.NamedCollectionEditor,exports.NamedInput=o.NamedInput,exports.NumberFormatCommandButton=o.NumberFormatCommandButton,exports.PasteCommandButton=o.PasteCommandButton,exports.PresetCellStylesCommandButton=o.PresetCellStylesCommandButton,exports.PresetTableStylesCommandButton=o.PresetTableStylesCommandButton,exports.RangeInput=o.RangeInput,exports.SheetTab=o.SheetTab,exports.SheetTabMenu=o.SheetTabMenu,exports.SheetZoomScale=o.SheetZoomScale,exports.SheetsAllMenu=o.SheetsAllMenu,exports.SortFilterCommandButton=o.SortFilterCommandButton,exports.StatusBar=o.StatusBar,exports.Studio=o.Studio,exports.StyledStrokeIcon=o.StyledStrokeIcon,exports.TableDetailsPanel=o.TableDetailsPanel,exports.TableDetailsTaskPane=o.TableDetailsTaskPane,exports.TablePlugin=o.TablePlugin,exports.TableStyleCanvasPreview=o.TableStyleCanvasPreview,exports.TableStyleOptionsPanel=o.TableStyleOptionsPanel,exports.TableStylePreview=o.TableStylePreview,exports.TextEffectsCommandButton=o.TextEffectsCommandButton,exports.TextOverflowCommandButton=o.TextOverflowCommandButton,exports.TextRotateCommandButton=o.TextRotateCommandButton,exports.ThemeSelectButton=o.ThemeSelectButton,exports.ThemeSelectPanel=o.ThemeSelectPanel,exports.ThemeSelectPopupButton=o.ThemeSelectPopupButton,exports.UnderlineCommandButton=o.UnderlineCommandButton,exports.UndoRedoCommandButton=o.UndoRedoCommandButton,exports.VerticalAlignCommandButton=o.VerticalAlignCommandButton,exports.ViewGridLinesCommandButton=o.ViewGridLinesCommandButton,exports.ViewHeadingsCommandButton=o.ViewHeadingsCommandButton,exports.WalkingCopyCommandButton=o.WalkingCopyCommandButton,exports.WorkbookContextMenu=o.WorkbookContextMenu,exports.WorkbookElement=o.WorkbookElement,exports.WorkbookIO=o.WorkbookIO,exports.WorkbookStrip=o.WorkbookStrip,exports.WorkbookTitle=o.WorkbookTitle,exports.WorkbookViewCommandButton=o.WorkbookViewCommandButton,exports._WorkbookIO=o._WorkbookIO,exports.createGridStyleFromMUITheme=o.createGridStyleFromMUITheme,exports.default=o.Studio,exports.defaultNewWorkbook=o.defaultNewWorkbook,exports.setPrintExamplesOnLoad=o.setPrintExamplesOnLoad,exports.useWorkbookCommands=o.useWorkbookCommands;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useMemo as M, useState as C, useCallback as A } from "react";
|
|
3
|
+
import { alpha as O, getOverlayAlpha as y } from "@mui/material/styles";
|
|
4
|
+
import { Box as S, FormControl as $, TextField as j } from "@mui/material";
|
|
5
|
+
import { useCallbackRef as u } from "@sheetxl/utils-react";
|
|
6
|
+
import { OptionsDialog as z } from "@sheetxl/utils-mui";
|
|
7
|
+
/**
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
9
|
+
*
|
|
10
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
+
*/
|
|
13
|
+
const G = ["Ok", "Cancel"], K = E((F) => {
|
|
14
|
+
const { initialValue: k = null, onInput: d, context: w, onOption: g, onValidateOption: r, onDone: p, options: f = G, defaultOption: c = f?.[0], cancelOption: m = "Cancel", sx: T, ...b } = F, x = M(() => {
|
|
15
|
+
const t = k ?? w?.()?.getComments();
|
|
16
|
+
let n = "";
|
|
17
|
+
if (t && t.content && t.content.runs) {
|
|
18
|
+
const e = t.content.runs;
|
|
19
|
+
for (let a = 0; a < e.length; a++) {
|
|
20
|
+
const s = e[a];
|
|
21
|
+
n += s?.text;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return n;
|
|
25
|
+
}, []), [o, v] = C(x), [D, I] = C(!1), h = A(async (t, n) => null, []), B = u(async (t) => {
|
|
26
|
+
const n = o === "" ? [] : o.split(`
|
|
27
|
+
`), e = t === m;
|
|
28
|
+
if (!e) {
|
|
29
|
+
const a = n.length, s = new Array(a);
|
|
30
|
+
for (let l = 0; l < a; l++) s[l] = { text: n[l] };
|
|
31
|
+
d?.({ content: { runs: s } });
|
|
32
|
+
}
|
|
33
|
+
g?.(t, e, t === c), p?.();
|
|
34
|
+
}, [o, d, p, g, c, m]), P = u((t) => {
|
|
35
|
+
v(t.target.value), h(t.target.value, null);
|
|
36
|
+
}, [r]), V = u(async (t) => {
|
|
37
|
+
let n = await Promise.resolve(r?.(t));
|
|
38
|
+
try {
|
|
39
|
+
n !== !1 && (n = await h(o, t));
|
|
40
|
+
} catch {
|
|
41
|
+
}
|
|
42
|
+
return n ?? !0;
|
|
43
|
+
}, [r, o]);
|
|
44
|
+
return i(z, { title: (x ? "Edit" : "Insert") + " Comments", options: f, onDone: p, onOption: (t) => B(t), onValidateOption: V, defaultOption: c, cancelOption: m, autoFocusSel: ".autoFocus", sx: { width: "480px", ...T }, ...b, children: i(S, { sx: { paddingTop: (t) => t.spacing(1), paddingBottom: (t) => t.spacing(0), rowGap: (t) => t.spacing(1), display: "flex", flexDirection: "column" }, children: i($, { sx: { paddingTop: (t) => t.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: i(j, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t) => {
|
|
45
|
+
D || t.target?.select(), I(!0);
|
|
46
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (t) => t.spacing(1.25), paddingBottom: (t) => t.spacing(0.75), backgroundImage: `linear-gradient(${O("#fff", y(5))}, ${O("#fff", y(5))})` } } }, value: o, onChange: P, onContextMenu: (t) => {
|
|
47
|
+
t.stopPropagation();
|
|
48
|
+
} }) }) }) });
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
K as CommentsDialog,
|
|
52
|
+
K as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as l, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { memo as A, useMemo as O, useState as f, useCallback as b } from "react";
|
|
3
|
+
import { alpha as i, getOverlayAlpha as r } from "@mui/material/styles";
|
|
4
|
+
import { Box as j, FormControl as F, TextField as D } from "@mui/material";
|
|
5
|
+
import { useCallbackRef as x } from "@sheetxl/utils-react";
|
|
6
|
+
import { OptionsDialog as E } from "@sheetxl/utils-mui";
|
|
7
|
+
/**
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
9
|
+
*
|
|
10
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
+
*/
|
|
13
|
+
const S = ["Ok", "Cancel"], K = A((v) => {
|
|
14
|
+
const { initialValue: n = null, context: s, onInput: h, onOption: T, onValidateOption: p, onDone: d, options: y = S, defaultOption: c = y?.[0], cancelOption: u = "Cancel", sx: w, ...I } = v, H = O(() => (n ?? s?.()?.getHyperlink()) !== null, []), g = O(() => {
|
|
15
|
+
let e = null, a = null;
|
|
16
|
+
n && (typeof n == "string" ? a = n : e = n);
|
|
17
|
+
const o = e ?? s?.()?.getHyperlink();
|
|
18
|
+
return { address: a ?? o?.getAddress() ?? "", textToDisplay: o?.getDisplayText() ?? "" };
|
|
19
|
+
}, [n, s]), [t, M] = f(g.address), [m, P] = f(() => {
|
|
20
|
+
const e = s?.().toTextUnformatted() ?? g.displayText;
|
|
21
|
+
return e === g.address ? "" : e;
|
|
22
|
+
}), [B, k] = f(!1), $ = b((e) => {
|
|
23
|
+
P(e.target.value);
|
|
24
|
+
}, []), C = b(async (e, a) => null, []), L = x(async (e) => {
|
|
25
|
+
const a = t === "" ? null : { address: t }, o = e === u;
|
|
26
|
+
o || h?.({ address: a?.address ?? null, displayText: m ?? null }), T?.(e, o, e === c), d?.();
|
|
27
|
+
}, [t, m, s, h, d, T, c, u]), V = x((e) => {
|
|
28
|
+
M(e.target.value), C(e.target.value, null);
|
|
29
|
+
}, [p]), W = x(async (e) => {
|
|
30
|
+
let a = await Promise.resolve(p?.(e));
|
|
31
|
+
try {
|
|
32
|
+
a !== !1 && (a = await C(t, e));
|
|
33
|
+
} catch {
|
|
34
|
+
}
|
|
35
|
+
return a ?? !0;
|
|
36
|
+
}, [p]);
|
|
37
|
+
return l(E, { title: (H ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (e) => L(e), onValidateOption: W, defaultOption: c, cancelOption: u, autoFocusSel: ".autoFocus", sx: { width: "480px", ...w }, ...I, children: z(j, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [l(F, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(D, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
|
|
38
|
+
B || e.target?.select(), k(!0);
|
|
39
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: t, onChange: V, onContextMenu: (e) => {
|
|
40
|
+
e.stopPropagation();
|
|
41
|
+
} }) }), l(F, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(D, { label: "Display Text", placeholder: t?.startsWith("#") ? t.substring(1) : t, onFocus: () => {
|
|
42
|
+
k(!0);
|
|
43
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", r(5))}, ${i("#fff", r(5))})` } } }, value: m, onChange: $, onContextMenu: (e) => {
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
} }) })] }) });
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
K as HyperlinkDialog,
|
|
49
|
+
K as default
|
|
50
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsx as i, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { memo as ae, useRef as C, useState as R, useEffect as A, useLayoutEffect as me, useMemo as ge } from "react";
|
|
3
|
+
import { alpha as w, getOverlayAlpha as T } from "@mui/material/styles";
|
|
4
|
+
import { DialogContent as xe, Box as h, TextField as ie, InputAdornment as he, Collapse as oe, MenuItem as Oe, FormControl as ye, InputLabel as Ce, Select as be } from "@mui/material";
|
|
5
|
+
import { ICell as p, IRange as k } from "@sheetxl/sdk";
|
|
6
|
+
import { CommandContext as le } from "@sheetxl/react";
|
|
7
|
+
import { useCallbackRef as j, KeyCodes as Re, DynamicIcon as m, KeyModifiers as b } from "@sheetxl/utils-react";
|
|
8
|
+
import { InternalWindow as ve, ExhibitOptionButton as g, ExhibitDivider as Fe } from "@sheetxl/utils-mui";
|
|
9
|
+
import { u as ke } from "./D8YtOXZWnL-YI48g.mjs";
|
|
10
|
+
/**
|
|
11
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
12
|
+
*
|
|
13
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
15
|
+
*/
|
|
16
|
+
const V = { width: "1.5rem", height: "1.5rem" }, z = ae((E) => {
|
|
17
|
+
const { label: a, value: x, options: l, onSelect: O, tabIndex: M = 0, ...N } = E, [B, y] = R(() => re(x, l));
|
|
18
|
+
A(() => {
|
|
19
|
+
y(re(x, l));
|
|
20
|
+
}, [x, l]);
|
|
21
|
+
const v = j((c) => {
|
|
22
|
+
y(c.target.value), O?.(l[c.target.value]);
|
|
23
|
+
}, [O, l]), F = ge(() => Object.keys(l).map((c) => i(Oe, { value: c, children: c }, c)), [l]);
|
|
24
|
+
return d(ye, { sx: { minWidth: 135 }, size: "small", children: [i(Ce, { children: a }), i(be, { inputProps: { tabIndex: M }, value: B, label: a, onChange: v, sx: { backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` }, ...N, children: F })] });
|
|
25
|
+
}), se = { enter: 140, exit: 140 }, ce = { Formulas: p.Content.Formulas, Values: p.Content.Values, Notes: p.Content.Notes, Comments: p.Content.Comments }, pe = { ...ce };
|
|
26
|
+
delete pe.Values;
|
|
27
|
+
const we = { "By Rows": !0, "By Columns": !1 }, re = (E, a) => {
|
|
28
|
+
const x = Object.keys(a);
|
|
29
|
+
for (let l = 0; l < x.length; l++) {
|
|
30
|
+
const O = x[l];
|
|
31
|
+
if (a[O] === E) return O;
|
|
32
|
+
}
|
|
33
|
+
}, Le = ae((E) => {
|
|
34
|
+
const { initialValue: a, context: x, onInput: l, title: O, onHide: M, autoFocus: N, ...B } = E, y = a?.replace ?? !1, v = a?.findOptions, F = v.text ?? null, c = a?.replaceOptions, K = a?.replaceText ?? null, L = x?.(), s = C(null), H = C(null), U = C(null), G = C(null), q = C(null), J = C(null), Q = (e, n) => {
|
|
35
|
+
n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
|
|
36
|
+
}, [X, D] = R(!1), [P, de] = R(!1), [u, W] = R(y), [Y, $] = R(!1), [Z, _] = R(!1), [o, r] = R({ replaceText: null, replace: y, replaceOptions: null, findOptions: { text: null, matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: k.Orientation.Row, fields: [p.Content.Formulas] }, scope: le.FindScopeOptions.Sheet }), I = j(async (e, n, t, S) => {
|
|
37
|
+
if (!L) return;
|
|
38
|
+
const f = { ...o };
|
|
39
|
+
f.replaceOptions = { ...f.replaceOptions }, f.findOptions = { ...f.findOptions }, f.replaceOptions.maxCount = t ? void 0 : 1, f.replace = n, n && o.findOptions.fields?.[0] === p.Content.Values && (f.findOptions.fields = [p.Content.Formulas]), f.findOptions.reverse = !e;
|
|
40
|
+
const fe = await L({ autoFocus: S, ...f });
|
|
41
|
+
$(fe === 0);
|
|
42
|
+
}, [o, L]);
|
|
43
|
+
A(() => {
|
|
44
|
+
$(!1);
|
|
45
|
+
}, [o, P, u]);
|
|
46
|
+
const ee = j((e, n) => {
|
|
47
|
+
if (e.keyCode === Re.Enter) {
|
|
48
|
+
if (!o.findOptions.text) return;
|
|
49
|
+
let t = !0, S = !1;
|
|
50
|
+
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (S = !0), Q(e, S ? J.current : q.current)) : Q(e, t ? G.current : U.current), I(t, n, S, !1);
|
|
51
|
+
}
|
|
52
|
+
}, [o]), ne = C(null);
|
|
53
|
+
me(() => {
|
|
54
|
+
r((e) => {
|
|
55
|
+
const n = { ...e };
|
|
56
|
+
n.findOptions.text = F && F.length > 0 ? F : e.findOptions.text ?? "", D(!0), K !== null && (n.replaceText = K ?? ""), v && (n.findOptions = { ...n.findOptions, ...v }), n.replaceText || (n.replaceText = ""), n.replaceOptions && (n.replaceOptions = { ...n.replaceOptions }), c && (n.replaceOptions = { ...n.replaceOptions, ...c }), o.findOptions.fields?.[0] || (o.findOptions.fields = [p.Content.Formulas]);
|
|
57
|
+
const t = !(!y && !c && K === null);
|
|
58
|
+
return t && W(t), n;
|
|
59
|
+
}), Z || ne.current?.focus();
|
|
60
|
+
}, [a, y, F, K, v, c]), A(() => {
|
|
61
|
+
u ? (o.findOptions.fields[0], p.Content.Values) : D(!0);
|
|
62
|
+
}, [u]), A(() => {
|
|
63
|
+
if (X && s.current && o.findOptions.text === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void D(!1)) : void s.current.addEventListener("focus", () => {
|
|
64
|
+
s.current?.select(), D(!1);
|
|
65
|
+
}, { once: !0 });
|
|
66
|
+
}, [X, o]);
|
|
67
|
+
const [ue, { width: te }] = ke();
|
|
68
|
+
return i(ve, { ref: ne, title: O ?? (u ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: M, onFocus: () => _(!0), onBlur: () => {
|
|
69
|
+
_(!1), $(!1);
|
|
70
|
+
}, slotProps: { paper: { elevation: Z ? 3 : 1 } }, ...B, children: d(xe, { dividers: !0, ref: ue, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
|
|
71
|
+
if (e.key === "h" && e.ctrlKey) W(!0), s.current?.contains(document.activeElement) && H.current?.focus();
|
|
72
|
+
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
73
|
+
else if (e.key === "c" && e.altKey) r((n) => {
|
|
74
|
+
const t = { ...n };
|
|
75
|
+
return t.findOptions.matchCase = !n.findOptions.matchCase, t;
|
|
76
|
+
});
|
|
77
|
+
else if (e.key === "e" && e.altKey) r((n) => {
|
|
78
|
+
const t = { ...n };
|
|
79
|
+
return t.findOptions.matchEntireCell = !n.findOptions.matchEntireCell, t;
|
|
80
|
+
});
|
|
81
|
+
else {
|
|
82
|
+
if (e.key !== "r" || !e.altKey) return;
|
|
83
|
+
r((n) => {
|
|
84
|
+
const t = { ...n };
|
|
85
|
+
return t.findOptions.useRegex = !n.findOptions.useRegex, t;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
}, children: [d(h, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(g, { selected: P, onSelectToggle: (e) => {
|
|
90
|
+
de(e);
|
|
91
|
+
}, preventFocus: !0, label: "Toggle Additional Options", icon: i(m, { iconKey: "FindOptions" }) }), i(g, { selected: u, onSelectToggle: (e) => {
|
|
92
|
+
W(e);
|
|
93
|
+
}, preventFocus: !0, label: "Toggle Replace", icon: i(m, { iconKey: "FindReplaceToggle" }), shortcut: { key: u ? "F" : "H", modifiers: [b.Ctrl] } })] }), d(h, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(ie, { label: "Find", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), minWidth: te > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` }, endAdornment: i(he, { position: "end", children: d(h, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "2px" }, children: [i(g, { style: V, selected: o.findOptions.matchCase, onBlur: () => {
|
|
94
|
+
}, onSelectToggle: (e) => {
|
|
95
|
+
r((n) => {
|
|
96
|
+
const t = { ...n };
|
|
97
|
+
return t.findOptions.matchCase = e, t;
|
|
98
|
+
});
|
|
99
|
+
}, label: "Match Case", shortcut: { key: "C", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindCaseSensitive", size: "1rem" }) }), i(g, { style: V, selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
100
|
+
r((n) => {
|
|
101
|
+
const t = { ...n };
|
|
102
|
+
return t.findOptions.matchEntireCell = e, t;
|
|
103
|
+
});
|
|
104
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindWholeWord", size: "1rem" }) }), i(g, { style: V, selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
105
|
+
r((n) => {
|
|
106
|
+
const t = { ...n };
|
|
107
|
+
return t.findOptions.useRegex = e, t;
|
|
108
|
+
});
|
|
109
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [b.Alt] }, icon: i(m, { iconKey: "FindRegEx", size: "1rem" }) })] }) }) }, inputLabel: { shrink: !0 }, htmlInput: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => Y ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => Y ? `${e.palette.error.main} !important` : void 0 } }, value: o.findOptions.text ?? "", onChange: (e) => {
|
|
110
|
+
r((n) => {
|
|
111
|
+
const t = { ...n };
|
|
112
|
+
return t.findOptions.text = e.target.value, t;
|
|
113
|
+
});
|
|
114
|
+
}, onKeyDown: (e) => ee(e, !1), onContextMenu: (e) => {
|
|
115
|
+
e.stopPropagation();
|
|
116
|
+
} }), i(g, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
117
|
+
I(!1, !1);
|
|
118
|
+
}, touchRippleRef: U, label: "", shortcut: { key: "Enter", modifiers: [b.Shift] }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowBack" : "ArrowUpward" }), disabled: !o.findOptions.text }), i(g, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
119
|
+
I(!0, !1);
|
|
120
|
+
}, touchRippleRef: G, label: "Next Match", shortcut: { key: "Enter" }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowForward" : "ArrowDownward" }), disabled: !o.findOptions.text })] }), i(oe, { in: u, timeout: se, onExit: () => {
|
|
121
|
+
s.current?.focus();
|
|
122
|
+
}, children: d(h, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(ie, { label: "Replace", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${w("#fff", T(5))}, ${w("#fff", T(5))})` } }, inputLabel: { shrink: !0 }, htmlInput: { ref: H, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
|
|
123
|
+
r((n) => {
|
|
124
|
+
const t = { ...n };
|
|
125
|
+
return t.replaceText = e.target.value, t;
|
|
126
|
+
});
|
|
127
|
+
}, onKeyDown: (e) => ee(e, !0), onContextMenu: (e) => {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
} }), i(g, { onSelectToggle: (e) => {
|
|
130
|
+
I(!0, !0);
|
|
131
|
+
}, touchRippleRef: q, label: "Replace", shortcut: { key: "Enter" }, icon: i(m, { iconKey: "FindReplace" }), disabled: !o.findOptions.text }), i(g, { onSelectToggle: (e) => {
|
|
132
|
+
I(!0, !0, !0);
|
|
133
|
+
}, touchRippleRef: J, label: "Replace All", shortcut: { key: "Enter", modifiers: [b.Ctrl, b.Alt] }, icon: i(m, { iconKey: "FindReplaceAll" }), disabled: !o.findOptions.text })] }) })] })] }), i(oe, { in: P, timeout: se, onExit: () => {
|
|
134
|
+
s.current?.focus();
|
|
135
|
+
}, children: d(h, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(1.5), marginTop: (e) => e.spacing(1) }, children: [i(Fe, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), d(h, { sx: { display: "flex", flexDirection: te >= 383 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", gap: (e) => e.spacing(1), rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i(z, { label: "Within", value: o.scope, options: le.FindScopeOptions, onSelect: (e) => {
|
|
136
|
+
r((n) => {
|
|
137
|
+
const t = { ...n };
|
|
138
|
+
return t.scope = e, t;
|
|
139
|
+
});
|
|
140
|
+
} }), i(z, { label: "Search", value: o.findOptions.orientation !== k.Orientation.Column, options: we, onSelect: (e) => {
|
|
141
|
+
r((n) => {
|
|
142
|
+
const t = { ...n };
|
|
143
|
+
return t.findOptions.orientation = e ? k.Orientation.Row : k.Orientation.Column, t;
|
|
144
|
+
});
|
|
145
|
+
} }), i(z, { label: "Look in", value: u && o.findOptions.fields?.[0] === p.Content.Values ? p.Content.Formulas : o.findOptions.fields?.[0], options: u ? pe : ce, onSelect: (e) => {
|
|
146
|
+
r((n) => {
|
|
147
|
+
const t = { ...n };
|
|
148
|
+
return t.findOptions.fields = [e], t;
|
|
149
|
+
});
|
|
150
|
+
} })] })] }) })] }) });
|
|
151
|
+
});
|
|
152
|
+
export {
|
|
153
|
+
Le as FindReplaceWindow,
|
|
154
|
+
Le as default
|
|
155
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
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.14
|
|
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,26 @@
|
|
|
1
|
+
import { jsx as n, jsxs as O } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f, useState as g } from "react";
|
|
3
|
+
import { Box as S, FormControlLabel as a, Checkbox as l } from "@mui/material";
|
|
4
|
+
import { Sort as s, IRange as r } from "@sheetxl/sdk";
|
|
5
|
+
import { useCallbackRef as H } from "@sheetxl/utils-react";
|
|
6
|
+
import { OptionsDialog as x } from "@sheetxl/utils-mui";
|
|
7
|
+
/**
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
9
|
+
*
|
|
10
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
+
*/
|
|
13
|
+
const w = f((u) => {
|
|
14
|
+
const { initialValue: c, context: d, onInput: m, onDone: p, ...h } = u, C = d?.().range, v = d?.().cell.toString(), [o, i] = g(c ?? s.DefaultRangeOptions), b = H((e) => {
|
|
15
|
+
let t = null;
|
|
16
|
+
e === "Sort" && (t = { ...c, ...o }), m?.(t), p?.(t);
|
|
17
|
+
}, [o, p, m, c]);
|
|
18
|
+
return n(x, { title: "Sort", options: ["Sort", "Cancel"], onDone: b, ...h, children: O(S, { sx: { display: "flex", flexDirection: "column" }, children: [n(a, { control: n(l, { checked: !o.reverse, onChange: () => i((e) => ({ ...e, reverse: !e.reverse })) }), label: "Is Ascending", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.hasHeader, onChange: () => i((e) => ({ ...e, hasHeader: !e.hasHeader })) }), label: "Has Header", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity, onChange: () => i((e) => ({ ...e, collatorOptions: o.collatorOptions?.sensitivity === s.CaseSensitiveOptions.sensitivity ? s.CaseInsensitiveOptions : s.CaseSensitiveOptions })) }), label: "Case Sensitive", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.orientation === r.Orientation.Row, onChange: () => i((e) => {
|
|
19
|
+
const t = e.orientation === r.Orientation.Row ? r.Orientation.Column : r.Orientation.Row;
|
|
20
|
+
return { ...C.getDefaultSortCriteria(t, v).options, includeHidden: e.includeHidden, reverse: e.reverse, orientation: t };
|
|
21
|
+
}) }), label: "Row Sort", labelPlacement: "end" }), n(a, { control: n(l, { checked: o.includeHidden, onChange: () => i((e) => ({ ...e, includeHidden: !e.includeHidden })) }), label: "Include Hidden", labelPlacement: "end" })] }) });
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
w as SortDialog,
|
|
25
|
+
w as default
|
|
26
|
+
};
|
|
@@ -4,11 +4,11 @@ import { KeyCodes as pt, DynamicIcon as mt } from "@sheetxl/utils-react";
|
|
|
4
4
|
import { toShortcutElements as to, InternalWindow as oo } from "@sheetxl/utils-mui";
|
|
5
5
|
import * as C from "react";
|
|
6
6
|
import gt, { cloneElement as no, useState as ae, useMemo as ro, useEffect as Ge } from "react";
|
|
7
|
-
import { _ as io, a as N, b as U, d as lo, e as ge } from "./
|
|
7
|
+
import { _ as io, a as N, b as U, d as lo, e as ge } from "./D8YtOXZWnL-YI48g.mjs";
|
|
8
8
|
import { alpha as ce, getOverlayAlpha as de, styled as so } from "@mui/material/styles";
|
|
9
9
|
import { CommonUtils as ao } from "@sheetxl/utils";
|
|
10
10
|
/**
|
|
11
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
11
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
12
12
|
*
|
|
13
13
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
14
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -2128,7 +2128,7 @@ function Ao(n) {
|
|
|
2128
2128
|
return v;
|
|
2129
2129
|
}, [o, e]), [s, c] = ae(null);
|
|
2130
2130
|
Ge(() => {
|
|
2131
|
-
import("./
|
|
2131
|
+
import("./BzS-7g64cdTk8pFd.mjs").then((h) => {
|
|
2132
2132
|
c(new h.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
|
|
2133
2133
|
});
|
|
2134
2134
|
}, [a]);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as r, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useMemo as V, useState as p, useCallback as R } from "react";
|
|
3
|
+
import { Box as L } from "@mui/material";
|
|
4
|
+
import { useCallbackRef as d } from "@sheetxl/utils-react";
|
|
5
|
+
import { OptionsDialog as S } from "@sheetxl/utils-mui";
|
|
6
|
+
import { N as A, R as G } from "./D8YtOXZWnL-YI48g.mjs";
|
|
7
|
+
/**
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.14
|
|
9
|
+
*
|
|
10
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
+
*/
|
|
13
|
+
const M = ["Ok", "Cancel"], Q = E((C) => {
|
|
14
|
+
const { initialValue: a = null, context: t, onOption: u, onValidateOption: $, onDone: m, onInput: c, options: g = M, defaultOption: f = g?.[0], cancelOption: x = "Cancel", sx: h, ...v } = C, N = V(() => t?.().getNames().findValidName("Range1"), []), y = V(() => {
|
|
15
|
+
if (!a) return !0;
|
|
16
|
+
}, []), [o, D] = p({ displayText: a?.getName() ?? N, errorText: null }), [n, w] = p({ displayValue: a?.getRanges() ?? t?.().selection() ?? null, errorText: null }), [T, O] = p(!1), F = R(async (e) => !o.errorText && !n.errorText, []), I = d((e, l, i) => {
|
|
17
|
+
if (!l) {
|
|
18
|
+
let s = null;
|
|
19
|
+
y ? s = t?.().getNames().addReference(o?.displayText, n?.displayValue, !1) : (a.getType() === "reference" && a.doBatch(() => {
|
|
20
|
+
a.setName(o?.displayText), a.setReference(n?.displayValue);
|
|
21
|
+
}, `Edit Named '${o?.displayText}'`), s = a), s && (s.select(), c(s));
|
|
22
|
+
}
|
|
23
|
+
u?.(e, l, i), m?.();
|
|
24
|
+
}, [t, o, n, m, u, f, x, c]), b = d((e) => {
|
|
25
|
+
let l = null;
|
|
26
|
+
try {
|
|
27
|
+
t?.().getNames().validateName(e);
|
|
28
|
+
} catch (i) {
|
|
29
|
+
l = i.message;
|
|
30
|
+
}
|
|
31
|
+
D({ displayText: e, errorText: l });
|
|
32
|
+
}, []), k = d((e) => {
|
|
33
|
+
a && a.getName().toLowerCase() === e.toLowerCase() || t?.().getNames().validateName(e);
|
|
34
|
+
}, [t, a]), B = R((e) => {
|
|
35
|
+
w({ displayValue: e ?? null, errorText: null });
|
|
36
|
+
}, []);
|
|
37
|
+
return r(S, { title: (y ? "Define" : "Edit") + " Range", options: g, onOption: I, onValidateOption: F, defaultOption: f, cancelOption: x, autoFocusSel: ".autoFocus", sx: { width: "460px", ...h }, ...v, children: j(L, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), range: "flex", flexDirection: "column" }, children: [r(A, { formName: "name", defaultInput: N, value: o.displayText, onChangeInput: b, onValidate: k, onFocus: (e) => {
|
|
38
|
+
T || e.target?.select(), O(!0);
|
|
39
|
+
} }), r(G, { formName: "range", value: n.displayValue, onChangeInput: B, resolvedAddress: t ? t().getNames().getRanges.bind(t().getNames()) : void 0, onFocus: (e) => {
|
|
40
|
+
T || e.target?.select(), O(!0);
|
|
41
|
+
} })] }) });
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
Q as NamedReferenceDialog,
|
|
45
|
+
Q as default
|
|
46
|
+
};
|