-
Notifications
You must be signed in to change notification settings - Fork 0
/
API-stories.87784912.iframe.bundle.js
1 lines (1 loc) · 43.3 KB
/
API-stories.87784912.iframe.bundle.js
1
"use strict";(self.webpackChunkfortune_sheet=self.webpackChunkfortune_sheet||[]).push([[151],{"./stories/API.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ActivateSheet:()=>ActivateSheet,AddSheet:()=>AddSheet,AutoFillCell:()=>AutoFillCell,ClearCell:()=>ClearCell,DeleteRowCol:()=>DeleteRowCol,DeleteSheet:()=>DeleteSheet,Freeze:()=>Freeze,GetAllSheets:()=>GetAllSheets,GetCellValue:()=>GetCellValue,GetColumnWidth:()=>GetColumnWidth,GetRowHeight:()=>GetRowHeight,GetSelection:()=>GetSelection,InsertRowCol:()=>InsertRowCol,MergeCells:()=>MergeCells,Redo:()=>Redo,Scroll:()=>Scroll,SetCellFormat:()=>SetCellFormat,SetCellValue:()=>SetCellValue,SetColumnWidth:()=>SetColumnWidth,SetRowHeight:()=>SetRowHeight,SetSelection:()=>SetSelection,SetSheetName:()=>SetSheetName,SetSheetOrder:()=>SetSheetOrder,Undo:()=>Undo,UpdateSheet:()=>UpdateSheet,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./packages/react/src/index.ts"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js");const __WEBPACK_DEFAULT_EXPORT__={component:_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I},ApiExecContainer=_ref=>{let{children,onRun}=_ref;const[result,setResult]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100vh"},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{style:{flexShrink:0,padding:8},children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("button",{type:"button",onClick:()=>{setResult(onRun?.())},children:"Run"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span",{style:{marginLeft:16},children:result&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span",{style:{color:"#aaa"},children:"result: "})," ",result]})})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",{style:{flex:1},children})]})};ApiExecContainer.displayName="ApiExecContainer";const GetCellValue=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"fortune"}}],order:0,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>ref.current?.getCellValue(0,0),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};GetCellValue.displayName="GetCellValue";const SetCellValue=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{for(let i=0;i<5;i+=1)for(let j=0;j<5;j+=1)ref.current?.setCellValue(i,j,`${i+j}`);ref.current?.setCellValue(0,5,"=SUM(A1:E1)"),ref.current?.setCellValue(1,5,"=SUM(A2:E2)"),ref.current?.setCellValue(2,5,"=SUM(A3:E3)"),ref.current?.setCellValue(3,5,"=SUM(A4:E4)"),ref.current?.setCellValue(4,5,"=SUM(A5:E5)")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetCellValue.displayName="SetCellValue";const ClearCell=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{bg:"green",v:"fortune",m:"fortune"}}],order:0,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.clearCell(0,0)},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};ClearCell.displayName="ClearCell";const SetCellFormat=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"set bg = green"}}],order:0,row:1,column:1,config:{columnlen:{0:120}}}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setCellFormat(0,0,"bg","green")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetCellFormat.displayName="SetCellFormat";const AutoFillCell=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{m:"1",v:1,ct:{t:"n",fa:"General"}}},{r:0,c:1,v:{m:"2",v:2,ct:{t:"n",fa:"General"}}},{r:1,c:0,v:{m:"2",v:2,ct:{t:"n",fa:"General"}}},{r:1,c:1,v:{m:"4",v:4,ct:{t:"n",fa:"General"}}}],order:0,row:10,column:2}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.autoFillCell({row:[0,1],column:[0,1]},{row:[2,9],column:[0,1]},"down")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};AutoFillCell.displayName="AutoFillCell";const Freeze=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.freeze("both",{row:1,column:1})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};Freeze.displayName="Freeze";const InsertRowCol=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"original"}}],order:0,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.insertRowOrColumn("row",0,1),ref.current?.setCellValue(1,0,"inserted"),ref.current?.insertRowOrColumn("column",0,1),ref.current?.setCellValue(0,1,"inserted")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};InsertRowCol.displayName="InsertRowCol";const DeleteRowCol=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:1,c:0,v:{v:"1"}},{r:2,c:0,v:{v:"2"}},{r:3,c:0,v:{v:"3"}},{r:4,c:0,v:{v:"4"}}],order:0,row:5,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.deleteRowOrColumn("row",1,3)},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};DeleteRowCol.displayName="DeleteRowCol";const GetRowHeight=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",config:{rowlen:{2:200}},celldata:[{r:0,c:0,v:{v:"0"}},{r:1,c:0,v:{v:"1"}},{r:2,c:0,v:{v:"2"}},{r:3,c:0,v:{v:"3"}},{r:4,c:0,v:{v:"4"}}],order:0,row:5,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.getRowHeight([0,1,2,3,4])),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};GetRowHeight.displayName="GetRowHeight";const GetColumnWidth=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",config:{columnlen:{2:200}},celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}},{r:0,c:2,v:{v:"2"}},{r:0,c:3,v:{v:"3"}},{r:0,c:4,v:{v:"4"}}],order:0,row:1,column:5}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.getColumnWidth([0,1,2,3,4])),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};GetColumnWidth.displayName="GetColumnWidth";const SetRowHeight=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:1,c:0,v:{v:"1"}},{r:2,c:0,v:{v:"height = 100"}},{r:3,c:0,v:{v:"3"}},{r:4,c:0,v:{v:"4"}}],order:0,row:5,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setRowHeight({2:100})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetRowHeight.displayName="SetRowHeight";const SetColumnWidth=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}},{r:0,c:2,v:{v:"width = 200"}},{r:0,c:3,v:{v:"3"}},{r:0,c:4,v:{v:"4"}}],order:0,row:1,column:5}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setColumnWidth({2:200})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetColumnWidth.displayName="SetColumnWidth";const GetSelection=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",luckysheet_select_save:[{row:[0,1],column:[1,2]}],celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}},{r:0,c:2,v:{v:"2"}},{r:0,c:3,v:{v:"3"}},{r:0,c:4,v:{v:"4"}},{r:1,c:0,v:{v:"0"}},{r:1,c:1,v:{v:"1"}},{r:1,c:2,v:{v:"2"}},{r:1,c:3,v:{v:"3"}},{r:1,c:4,v:{v:"4"}}],order:0,row:2,column:5}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.getSelection()),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};GetSelection.displayName="GetSelection";const SetSelection=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}},{r:0,c:2,v:{v:"2"}},{r:0,c:3,v:{v:"3"}},{r:0,c:4,v:{v:"4"}},{r:1,c:0,v:{v:"0"}},{r:1,c:1,v:{v:"1"}},{r:1,c:2,v:{v:"2"}},{r:1,c:3,v:{v:"3"}},{r:1,c:4,v:{v:"4"}}],order:0,row:2,column:5}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setSelection([{row:[0,1],column:[1,2]}])},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetSelection.displayName="SetSelection";const MergeCells=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}},{r:0,c:2,v:{v:"2"}},{r:0,c:3,v:{v:"3"}},{r:0,c:4,v:{v:"4"}},{r:1,c:0,v:{v:"0"}},{r:1,c:1,v:{v:"1"}},{r:1,c:2,v:{v:"2"}},{r:1,c:3,v:{v:"3"}},{r:1,c:4,v:{v:"4"}}],order:0,row:2,column:5}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.mergeCells([{row:[0,1],column:[1,2]}],"merge-all")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};MergeCells.displayName="MergeCells";const GetAllSheets=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",celldata:[{r:0,c:0,v:{v:"0"}},{r:0,c:1,v:{v:"1"}}],order:0,row:1,column:2},{name:"Sheet2",celldata:[{r:0,c:0,v:{v:"0"}},{r:1,c:0,v:{v:"1"}}],order:1,row:2,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.getAllSheets()),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};GetAllSheets.displayName="GetAllSheets";const AddSheet=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{id:"1",name:"Sheet1",celldata:[{r:0,c:0,v:{v:"1"}}],order:0,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.addSheet()},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};AddSheet.displayName="AddSheet";const DeleteSheet=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{id:"1",name:"Sheet1",celldata:[{r:0,c:0,v:{v:"1"}}],order:0,row:1,column:1},{id:"2",name:"Sheet2",celldata:[{r:0,c:0,v:{v:"2"}}],order:1,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.deleteSheet({id:"2"})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};DeleteSheet.displayName="DeleteSheet";const UpdateSheet=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{id:"1",name:"sheet1",celldata:[{r:0,c:0,v:{v:"1"}}],order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.updateSheet([{id:"1",name:"lvjing",data:[[{v:"1"}]],order:0,row:10,column:20,luckysheet_select_save:[{row:[2,4],column:[4,6],column_focus:6,height:19,height_move:59,left:444,left_move:296,row_focus:4,top:80,top_move:40,width:73,width_move:221}]},{id:"2",name:"lvjing2",data:[[{v:"12"},{v:"lvjing"}]],order:1},{id:"3",name:"lvjing3",celldata:[{r:0,c:0,v:{v:"1",ct:{fa:"General",t:"n"},m:"1"}},{r:1,c:0,v:{mc:{r:1,c:0,rs:2,cs:2}}},{r:1,c:1,v:{mc:{r:1,c:0}}},{r:2,c:0,v:{mc:{r:1,c:0}}},{r:2,c:1,v:{mc:{r:1,c:0}}}],row:20,column:20,order:3}])},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};UpdateSheet.displayName="UpdateSheet";const ActivateSheet=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{id:"1",name:"Sheet1",celldata:[{r:0,c:0,v:{v:"1"}}],order:0,row:1,column:1},{id:"2",name:"Sheet2",celldata:[{r:0,c:0,v:{v:"2"}}],order:1,row:1,column:1}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.activateSheet({id:"2"})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};ActivateSheet.displayName="ActivateSheet";const SetSheetName=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setSheetName("Fortune")},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetSheetName.displayName="SetSheetName";const SetSheetOrder=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{id:"1",name:"Sheet1",order:0},{id:"2",name:"Sheet2",order:1},{id:"3",name:"Sheet3",order:2}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.setSheetOrder({1:3,2:1,3:2})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};SetSheetOrder.displayName="SetSheetOrder";const Scroll=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>{ref.current?.scroll({targetRow:60})},children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};Scroll.displayName="Scroll";const Undo=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.handleUndo()),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};Undo.displayName="Undo";const Redo=()=>{const ref=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null),[data,setData]=(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([{name:"Sheet1",order:0}]),onChange=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((d=>{setData(d)}),[]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(ApiExecContainer,{onRun:()=>JSON.stringify(ref.current?.handleRedo()),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_fortune_sheet_react__WEBPACK_IMPORTED_MODULE_1__.I,{ref,data,onChange})})};Redo.displayName="Redo",GetCellValue.parameters={...GetCellValue.parameters,docs:{...GetCellValue.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "fortune"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return ref.current?.getCellValue(0, 0);\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...GetCellValue.parameters?.docs?.source}}},SetCellValue.parameters={...SetCellValue.parameters,docs:{...SetCellValue.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n for (let i = 0; i < 5; i += 1) {\n for (let j = 0; j < 5; j += 1) {\n ref.current?.setCellValue(i, j, `${i + j}`);\n }\n }\n ref.current?.setCellValue(0, 5, "=SUM(A1:E1)");\n ref.current?.setCellValue(1, 5, "=SUM(A2:E2)");\n ref.current?.setCellValue(2, 5, "=SUM(A3:E3)");\n ref.current?.setCellValue(3, 5, "=SUM(A4:E4)");\n ref.current?.setCellValue(4, 5, "=SUM(A5:E5)");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetCellValue.parameters?.docs?.source}}},ClearCell.parameters={...ClearCell.parameters,docs:{...ClearCell.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n bg: "green",\n v: "fortune",\n m: "fortune"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.clearCell(0, 0);\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...ClearCell.parameters?.docs?.source}}},SetCellFormat.parameters={...SetCellFormat.parameters,docs:{...SetCellFormat.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "set bg = green"\n }\n }],\n order: 0,\n row: 1,\n column: 1,\n config: {\n columnlen: {\n "0": 120\n }\n }\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setCellFormat(0, 0, "bg", "green");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetCellFormat.parameters?.docs?.source}}},AutoFillCell.parameters={...AutoFillCell.parameters,docs:{...AutoFillCell.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n m: "1",\n v: 1,\n ct: {\n t: "n",\n fa: "General"\n }\n }\n }, {\n r: 0,\n c: 1,\n v: {\n m: "2",\n v: 2,\n ct: {\n t: "n",\n fa: "General"\n }\n }\n }, {\n r: 1,\n c: 0,\n v: {\n m: "2",\n v: 2,\n ct: {\n t: "n",\n fa: "General"\n }\n }\n }, {\n r: 1,\n c: 1,\n v: {\n m: "4",\n v: 4,\n ct: {\n t: "n",\n fa: "General"\n }\n }\n }],\n order: 0,\n row: 10,\n column: 2\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.autoFillCell({\n row: [0, 1],\n column: [0, 1]\n }, {\n row: [2, 9],\n column: [0, 1]\n }, "down");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...AutoFillCell.parameters?.docs?.source}}},Freeze.parameters={...Freeze.parameters,docs:{...Freeze.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.freeze("both", {\n row: 1,\n column: 1\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...Freeze.parameters?.docs?.source}}},InsertRowCol.parameters={...InsertRowCol.parameters,docs:{...InsertRowCol.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "original"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.insertRowOrColumn("row", 0, 1);\n ref.current?.setCellValue(1, 0, "inserted");\n ref.current?.insertRowOrColumn("column", 0, 1);\n ref.current?.setCellValue(0, 1, "inserted");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...InsertRowCol.parameters?.docs?.source}}},DeleteRowCol.parameters={...DeleteRowCol.parameters,docs:{...DeleteRowCol.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "1"\n }\n }, {\n r: 2,\n c: 0,\n v: {\n v: "2"\n }\n }, {\n r: 3,\n c: 0,\n v: {\n v: "3"\n }\n }, {\n r: 4,\n c: 0,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 5,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.deleteRowOrColumn("row", 1, 3);\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...DeleteRowCol.parameters?.docs?.source}}},GetRowHeight.parameters={...GetRowHeight.parameters,docs:{...GetRowHeight.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n config: {\n rowlen: {\n 2: 200\n }\n },\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "1"\n }\n }, {\n r: 2,\n c: 0,\n v: {\n v: "2"\n }\n }, {\n r: 3,\n c: 0,\n v: {\n v: "3"\n }\n }, {\n r: 4,\n c: 0,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 5,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.getRowHeight([0, 1, 2, 3, 4]));\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...GetRowHeight.parameters?.docs?.source}}},GetColumnWidth.parameters={...GetColumnWidth.parameters,docs:{...GetColumnWidth.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n config: {\n columnlen: {\n 2: 200\n }\n },\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 0,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 0,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 0,\n c: 4,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 1,\n column: 5\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.getColumnWidth([0, 1, 2, 3, 4]));\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...GetColumnWidth.parameters?.docs?.source}}},SetRowHeight.parameters={...SetRowHeight.parameters,docs:{...SetRowHeight.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "1"\n }\n }, {\n r: 2,\n c: 0,\n v: {\n v: "height = 100"\n }\n }, {\n r: 3,\n c: 0,\n v: {\n v: "3"\n }\n }, {\n r: 4,\n c: 0,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 5,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setRowHeight({\n "2": 100\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetRowHeight.parameters?.docs?.source}}},SetColumnWidth.parameters={...SetColumnWidth.parameters,docs:{...SetColumnWidth.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 0,\n c: 2,\n v: {\n v: "width = 200"\n }\n }, {\n r: 0,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 0,\n c: 4,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 1,\n column: 5\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setColumnWidth({\n "2": 200\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetColumnWidth.parameters?.docs?.source}}},GetSelection.parameters={...GetSelection.parameters,docs:{...GetSelection.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n luckysheet_select_save: [{\n row: [0, 1],\n column: [1, 2]\n }],\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 0,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 0,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 0,\n c: 4,\n v: {\n v: "4"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 1,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 1,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 1,\n c: 4,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 2,\n column: 5\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.getSelection());\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...GetSelection.parameters?.docs?.source}}},SetSelection.parameters={...SetSelection.parameters,docs:{...SetSelection.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 0,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 0,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 0,\n c: 4,\n v: {\n v: "4"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 1,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 1,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 1,\n c: 4,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 2,\n column: 5\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setSelection([{\n row: [0, 1],\n column: [1, 2]\n }]);\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetSelection.parameters?.docs?.source}}},MergeCells.parameters={...MergeCells.parameters,docs:{...MergeCells.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 0,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 0,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 0,\n c: 4,\n v: {\n v: "4"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 1,\n v: {\n v: "1"\n }\n }, {\n r: 1,\n c: 2,\n v: {\n v: "2"\n }\n }, {\n r: 1,\n c: 3,\n v: {\n v: "3"\n }\n }, {\n r: 1,\n c: 4,\n v: {\n v: "4"\n }\n }],\n order: 0,\n row: 2,\n column: 5\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.mergeCells([{\n row: [0, 1],\n column: [1, 2]\n }], "merge-all");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...MergeCells.parameters?.docs?.source}}},GetAllSheets.parameters={...GetAllSheets.parameters,docs:{...GetAllSheets.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 0,\n c: 1,\n v: {\n v: "1"\n }\n }],\n order: 0,\n row: 1,\n column: 2\n }, {\n name: "Sheet2",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "0"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n v: "1"\n }\n }],\n order: 1,\n row: 2,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.getAllSheets());\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...GetAllSheets.parameters?.docs?.source}}},AddSheet.parameters={...AddSheet.parameters,docs:{...AddSheet.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n id: "1",\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "1"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.addSheet();\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...AddSheet.parameters?.docs?.source}}},DeleteSheet.parameters={...DeleteSheet.parameters,docs:{...DeleteSheet.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n id: "1",\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "1"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }, {\n id: "2",\n name: "Sheet2",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "2"\n }\n }],\n order: 1,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.deleteSheet({\n id: "2"\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...DeleteSheet.parameters?.docs?.source}}},UpdateSheet.parameters={...UpdateSheet.parameters,docs:{...UpdateSheet.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n id: "1",\n name: "sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "1"\n }\n }],\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n // 更新样例\n ref.current?.updateSheet([{\n id: "1",\n name: "lvjing",\n data: [[{\n v: "1"\n }]],\n order: 0,\n row: 10,\n column: 20,\n luckysheet_select_save: [{\n row: [2, 4],\n column: [4, 6],\n column_focus: 6,\n height: 19,\n height_move: 59,\n left: 444,\n left_move: 296,\n row_focus: 4,\n top: 80,\n top_move: 40,\n width: 73,\n width_move: 221\n }]\n }, {\n id: "2",\n name: "lvjing2",\n data: [[{\n v: "12"\n }, {\n v: "lvjing"\n }]],\n order: 1\n }, {\n id: "3",\n name: "lvjing3",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "1",\n ct: {\n fa: "General",\n t: "n"\n },\n m: "1"\n }\n }, {\n r: 1,\n c: 0,\n v: {\n mc: {\n r: 1,\n c: 0,\n rs: 2,\n cs: 2\n }\n }\n }, {\n r: 1,\n c: 1,\n v: {\n mc: {\n r: 1,\n c: 0\n }\n }\n }, {\n r: 2,\n c: 0,\n v: {\n mc: {\n r: 1,\n c: 0\n }\n }\n }, {\n r: 2,\n c: 1,\n v: {\n mc: {\n r: 1,\n c: 0\n }\n }\n }],\n row: 20,\n column: 20,\n order: 3\n }]);\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...UpdateSheet.parameters?.docs?.source}}},ActivateSheet.parameters={...ActivateSheet.parameters,docs:{...ActivateSheet.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n id: "1",\n name: "Sheet1",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "1"\n }\n }],\n order: 0,\n row: 1,\n column: 1\n }, {\n id: "2",\n name: "Sheet2",\n celldata: [{\n r: 0,\n c: 0,\n v: {\n v: "2"\n }\n }],\n order: 1,\n row: 1,\n column: 1\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.activateSheet({\n id: "2"\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...ActivateSheet.parameters?.docs?.source}}},SetSheetName.parameters={...SetSheetName.parameters,docs:{...SetSheetName.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setSheetName("Fortune");\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetSheetName.parameters?.docs?.source}}},SetSheetOrder.parameters={...SetSheetOrder.parameters,docs:{...SetSheetOrder.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n id: "1",\n name: "Sheet1",\n order: 0\n }, {\n id: "2",\n name: "Sheet2",\n order: 1\n }, {\n id: "3",\n name: "Sheet3",\n order: 2\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.setSheetOrder({\n "1": 3,\n "2": 1,\n "3": 2\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...SetSheetOrder.parameters?.docs?.source}}},Scroll.parameters={...Scroll.parameters,docs:{...Scroll.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n ref.current?.scroll({\n targetRow: 60\n });\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...Scroll.parameters?.docs?.source}}},Undo.parameters={...Undo.parameters,docs:{...Undo.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.handleUndo());\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...Undo.parameters?.docs?.source}}},Redo.parameters={...Redo.parameters,docs:{...Redo.parameters?.docs,source:{originalSource:'() => {\n const ref = useRef<WorkbookInstance>(null);\n const [data, setData] = useState<Sheet[]>([{\n name: "Sheet1",\n order: 0\n }]);\n const onChange = useCallback((d: Sheet[]) => {\n setData(d);\n }, []);\n return <ApiExecContainer onRun={() => {\n return JSON.stringify(ref.current?.handleRedo());\n }}>\n <Workbook ref={ref} data={data} onChange={onChange} />\n </ApiExecContainer>;\n}',...Redo.parameters?.docs?.source}}};const __namedExportsOrder=["GetCellValue","SetCellValue","ClearCell","SetCellFormat","AutoFillCell","Freeze","InsertRowCol","DeleteRowCol","GetRowHeight","GetColumnWidth","SetRowHeight","SetColumnWidth","GetSelection","SetSelection","MergeCells","GetAllSheets","AddSheet","DeleteSheet","UpdateSheet","ActivateSheet","SetSheetName","SetSheetOrder","Scroll","Undo","Redo"]}}]);