diff --git a/webapp/app.ironcalc.com/frontend/biome.json b/webapp/app.ironcalc.com/frontend/biome.json index c2d4c5c..4438261 100644 --- a/webapp/app.ironcalc.com/frontend/biome.json +++ b/webapp/app.ironcalc.com/frontend/biome.json @@ -1,5 +1,4 @@ { - "organizeImports": { "enabled": true }, "linter": { "enabled": true, "rules": { diff --git a/webapp/app.ironcalc.com/frontend/package.json.patch b/webapp/app.ironcalc.com/frontend/package.json.patch index b32afdd..9008f56 100644 --- a/webapp/app.ironcalc.com/frontend/package.json.patch +++ b/webapp/app.ironcalc.com/frontend/package.json.patch @@ -1,2 +1,2 @@ "@ironcalc/ironcalc": "file:../../IronCalc", -"@ironcalc/workbook": "^0.3.1", \ No newline at end of file +"@ironcalc/workbook": "^0.6.0", \ No newline at end of file diff --git a/webapp/app.ironcalc.com/frontend/src/App.tsx b/webapp/app.ironcalc.com/frontend/src/App.tsx index 6af41e0..cc4b014 100644 --- a/webapp/app.ironcalc.com/frontend/src/App.tsx +++ b/webapp/app.ironcalc.com/frontend/src/App.tsx @@ -1,9 +1,11 @@ import "./App.css"; import styled from "@emotion/styled"; +// From IronCalc +import { IronCalc, IronCalcIcon, init, Model } from "@ironcalc/workbook"; +import { Modal } from "@mui/material"; import { useEffect, useState } from "react"; import { FileBar } from "./components/FileBar"; import LeftDrawer from "./components/LeftDrawer/LeftDrawer"; -import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog"; import { get_documentation_model, get_model, @@ -20,11 +22,8 @@ import { saveSelectedModelInStorage, selectModelFromStorage, } from "./components/storage"; - -// From IronCalc -import { IronCalc, IronCalcIcon, Model, init } from "@ironcalc/workbook"; -import { Modal } from "@mui/material"; import TemplatesDialog from "./components/WelcomeDialog/TemplatesDialog"; +import WelcomeDialog from "./components/WelcomeDialog/WelcomeDialog"; function App() { const [model, setModel] = useState(null); diff --git a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx index a9acb73..7e1ace0 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/FileBar.tsx @@ -5,11 +5,11 @@ import { PanelLeftClose, PanelLeftOpen } from "lucide-react"; import { useLayoutEffect, useRef, useState } from "react"; import { FileMenu } from "./FileMenu"; import { HelpMenu } from "./HelpMenu"; +import { downloadModel } from "./rpc"; import { ShareButton } from "./ShareButton"; import ShareWorkbookDialog from "./ShareWorkbookDialog"; -import { WorkbookTitle } from "./WorkbookTitle"; -import { downloadModel } from "./rpc"; import { updateNameSelectedWorkbook } from "./storage"; +import { WorkbookTitle } from "./WorkbookTitle"; // This hook is used to get the width of the window function useWindowWidth() { diff --git a/webapp/app.ironcalc.com/frontend/src/components/FileMenu.tsx b/webapp/app.ironcalc.com/frontend/src/components/FileMenu.tsx index d41fae9..87f5219 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/FileMenu.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/FileMenu.tsx @@ -3,9 +3,9 @@ import { Menu, MenuItem, Modal } from "@mui/material"; import { FileDown, FileUp, Plus, Table2, Trash2 } from "lucide-react"; import { useRef, useState } from "react"; import DeleteWorkbookDialog from "./DeleteWorkbookDialog"; -import UploadFileDialog from "./UploadFileDialog"; // import TemplatesDialog from "./WelcomeDialog/TemplatesDialog"; import { getModelsMetadata, getSelectedUuid } from "./storage"; +import UploadFileDialog from "./UploadFileDialog"; export function FileMenu(props: { newModel: () => void; diff --git a/webapp/app.ironcalc.com/frontend/src/components/ShareWorkbookDialog.tsx b/webapp/app.ironcalc.com/frontend/src/components/ShareWorkbookDialog.tsx index 3adbc63..98a94c7 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/ShareWorkbookDialog.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/ShareWorkbookDialog.tsx @@ -1,5 +1,5 @@ import type { Model } from "@ironcalc/workbook"; -import { Button, Dialog, TextField, styled } from "@mui/material"; +import { Button, Dialog, styled, TextField } from "@mui/material"; import { Check, Copy, GlobeLock } from "lucide-react"; import { QRCodeSVG } from "qrcode.react"; import { useEffect, useState } from "react"; diff --git a/webapp/app.ironcalc.com/frontend/src/components/WelcomeDialog/WelcomeDialog.tsx b/webapp/app.ironcalc.com/frontend/src/components/WelcomeDialog/WelcomeDialog.tsx index cbba0e3..b755d64 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/WelcomeDialog/WelcomeDialog.tsx +++ b/webapp/app.ironcalc.com/frontend/src/components/WelcomeDialog/WelcomeDialog.tsx @@ -2,8 +2,6 @@ import { IronCalcIconWhite as IronCalcIcon } from "@ironcalc/workbook"; import { styled } from "@mui/material"; import { Table, X } from "lucide-react"; import { useState } from "react"; -import TemplatesListItem from "./TemplatesListItem"; - import TemplatesList, { Cross, DialogContent, @@ -12,6 +10,7 @@ import TemplatesList, { DialogWrapper, TemplatesListWrapper, } from "./TemplatesList"; +import TemplatesListItem from "./TemplatesListItem"; function WelcomeDialog(properties: { onClose: () => void; diff --git a/webapp/app.ironcalc.com/frontend/src/components/rpc.ts b/webapp/app.ironcalc.com/frontend/src/components/rpc.ts index 1dd8cef..2426c3e 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/rpc.ts +++ b/webapp/app.ironcalc.com/frontend/src/components/rpc.ts @@ -23,7 +23,7 @@ function sanitizeFileName(name: string): string { export async function uploadFile( arrayBuffer: ArrayBuffer, - fileName: string + fileName: string, ): Promise { // Fetch request to upload the file const response = await fetch(`/api/upload/${fileName}`, { @@ -40,15 +40,15 @@ export async function uploadFile( export async function get_model(modelHash: string): Promise { return new Uint8Array( - await (await fetch(`/api/model/${modelHash}`)).arrayBuffer() + await (await fetch(`/api/model/${modelHash}`)).arrayBuffer(), ); } export async function get_documentation_model( - filename: string + filename: string, ): Promise { return new Uint8Array( - await (await fetch(`/models/${filename}.ic`)).arrayBuffer() + await (await fetch(`/models/${filename}.ic`)).arrayBuffer(), ); }