✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
fix: types
AykutSarac0bf7279c00aa
diff --git a/package.json b/package.jsonindex 7baabf56..7d714cee 100644--- a/package.json+++ b/package.json@@ -45,12 +45,10 @@"react-linkify-it": "^1.0.7","react-simple-typewriter": "^5.0.1","react-syntax-highlighter": "^15.5.0",- "react-tweet-card": "^0.2.5","react-zoom-pan-pinch": "^3.0.8","reaflow": "5.1.2","styled-components": "^5.3.8","toml": "^3.0.0",- "typewriter-effect": "^2.20.1","universal-cookie": "^4.0.4","zustand": "^4.3.8"},@@ -63,8 +61,8 @@"@types/lodash.get": "^4.4.7","@types/lodash.set": "^4.3.7","@types/lz-string": "^1.5.0",- "@types/node": "^20.3.1",- "@types/react": "18.2.12",+ "@types/node": "^20.2.1",+ "@types/react": "18.2.6","@types/react-color": "^3.0.6","@types/react-syntax-highlighter": "^15.5.7","@types/styled-components": "^5.1.26",@@ -74,6 +72,6 @@"eslint-plugin-unused-imports": "^2.0.0","prettier": "^2.8.8","ts-node": "^10.9.1",- "typescript": "5.1.3"+ "typescript": "5.0.4"}}diff --git a/src/constants/file.ts b/src/constants/file.tsindex 702dd7aa..fbfef5ca 100644--- a/src/constants/file.ts+++ b/src/constants/file.ts@@ -1,7 +1,11 @@-export enum FileFormat {+/* eslint unused-imports/no-unused-imports: 0 */++enum FileFormat {"JSON" = "json","YAML" = "yaml","XML" = "xml","TOML" = "toml","CSV" = "csv",}++export { FileFormat };diff --git a/src/containers/Modals/CloudModal/index.tsx b/src/containers/Modals/CloudModal/index.tsxindex 969148f5..f1049728 100644--- a/src/containers/Modals/CloudModal/index.tsx+++ b/src/containers/Modals/CloudModal/index.tsx@@ -173,7 +173,7 @@ const CreateCard: React.FC<{ reachedLimit: boolean }> = ({ reachedLimit }) => {const onCreate = async () => {try {toast.loading("Saving document...", { id: "fileSave" });- const res = await saveToCloud(getContents());+ const res = await saveToCloud(null, getContents());if (res.errors && res.errors.items.length > 0) throw res.errors;diff --git a/src/services/json.ts b/src/services/json.tsindex 8de658ae..1225f947 100644--- a/src/services/json.ts+++ b/src/services/json.ts@@ -7,7 +7,7 @@ import { File } from "src/store/useFile";const saveToCloud = async (id: string | null,contents: string,- format: FileFormat+ format = FileFormat.JSON): Promise<AltogicResponse<{ _id: string }>> => {if (id) return await altogic.endpoint.put(`json/${id}`, { json: contents, format });return await altogic.endpoint.post("json", { json: contents, format });diff --git a/yarn.lock b/yarn.lockindex a518406d..eaabf61d 100644--- a/yarn.lock+++ b/yarn.lock@@ -1086,7 +1086,7 @@resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.2.tgz#8fd63447e3f99aba6c3168fd2ec4580d5b97886f"integrity sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==-"@types/node@^20.3.1":+"@types/node@^20.2.1":version "20.3.1"resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe"integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==@@ -1132,10 +1132,10 @@"@types/scheduler" "*"csstype "^3.0.2"-"@types/[email protected]":- version "18.2.12"- resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.12.tgz#95d584338610b78bb9ba0415e3180fb03debdf97"- integrity sha512-ndmBMLCgn38v3SntMeoJaIrO6tGHYKMEBohCUmw8HoLLQdRMOIGXfeYaBTLe2lsFaSB3MOK1VXscYFnmLtTSmw==+"@types/[email protected]":+ version "18.2.6"+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.6.tgz#5cd53ee0d30ffc193b159d3516c8c8ad2f19d571"+ integrity sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==dependencies:"@types/prop-types" "*""@types/scheduler" "*"@@ -3569,11 +3569,6 @@ path-type@^4.0.0:resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==-performance-now@^2.1.0:- version "2.1.0"- resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"- integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==-picocolors@^1.0.0:version "1.0.0"resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"@@ -3685,13 +3680,6 @@ queue-microtask@^1.2.2:resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==-raf@^3.4.1:- version "3.4.1"- resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"- integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==- dependencies:- performance-now "^2.1.0"-rdk@^6.1.0:version "6.5.0"resolved "https://registry.yarnpkg.com/rdk/-/rdk-6.5.0.tgz#9e79c562a2c668551c6d80338c1efcca21266450"@@ -3818,11 +3806,6 @@ [email protected]:use-composed-ref "^1.3.0"use-latest "^1.2.1"-react-tweet-card@^0.2.5:- version "0.2.5"- resolved "https://registry.yarnpkg.com/react-tweet-card/-/react-tweet-card-0.2.5.tgz#a6b6e5c8fc06d76bf309a588c9d3268c507b4394"- integrity sha512-feXJ8sptl1surtw5JM2rwxN00MLiIFljmHfPoKXVQu+VJBaIuevy5DHX8GRY9cwrpYgSc6Vsk7Ki2RkYPWRbng==-react-use-gesture@^8.0.1:version "8.0.1"resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-8.0.1.tgz#4360c0f7c9e26baf9fbe58f63fc9de7ef699c17f"@@ -4424,18 +4407,10 @@ typed-array-length@^1.0.4:for-each "^0.3.3"is-typed-array "^1.1.9"- version "5.1.3"- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826"- integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==--typewriter-effect@^2.20.1:- version "2.20.1"- resolved "https://registry.yarnpkg.com/typewriter-effect/-/typewriter-effect-2.20.1.tgz#e8f8a653f27ba83504177f1b5d6d8da5667d8f31"- integrity sha512-3yQW4fUzCuIEgGHA5k+2Y2RzdsHUC9pPJpRahDREfloDpoPiMLj4GjMcuobdKD4CQ0pRBW4DD3pdNz7ZhfR96g==- dependencies:- prop-types "^15.8.1"- raf "^3.4.1"+ version "5.0.4"+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"+ integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==unbox-primitive@^1.0.2:version "1.0.2"