From b7564548ce54a9b886022f62bb8de60a78ad5f42 Mon Sep 17 00:00:00 2001 From: shanejonas Date: Fri, 13 Dec 2019 16:12:46 -0800 Subject: [PATCH] fix: unpack npm modules + rename JSONRequest to JSONRequestEditor --- package-lock.json | 5 +++-- package.json | 2 +- src/containers/Inspector.tsx | 5 +++-- .../{JSONRPCRequest.tsx => JSONRPCRequestEditor.tsx} | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) rename src/containers/{JSONRPCRequest.tsx => JSONRPCRequestEditor.tsx} (96%) diff --git a/package-lock.json b/package-lock.json index ec7798d..2751972 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1150,8 +1150,9 @@ } }, "@etclabscore/react-monaco-editor": { - "version": "file:../../etclabscore-react-monaco-editor-0.0.0-development.tgz", - "integrity": "sha512-z5AGN1xYQ/QuDjp63kVwQtMtlxfVoNOTWtBPEh1UBogxvglF1LwrxRUsvsw9ld7yxh9zDXIUjLwx9ysWBEWbbw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@etclabscore/react-monaco-editor/-/react-monaco-editor-1.0.2.tgz", + "integrity": "sha512-ITgUj7P6BRjuvN/E1oaHbmcahPR8t8iPwMFxfS+c8bjBJUw+vkZZj4FmVhgGWFAclHVSfldkOxk5uvzonbPxwQ==", "requires": { "@material-ui/core": "^4.7.2", "monaco-editor": "^0.18.1", diff --git a/package.json b/package.json index 883d978..11ee68d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@etclabscore/monaco-add-json-schema-diagnostics": "^1.0.3", - "@etclabscore/react-monaco-editor": "file:../../etclabscore-react-monaco-editor-0.0.0-development.tgz", + "@etclabscore/react-monaco-editor": "^1.0.2", "@material-ui/core": "^4.7.2", "@material-ui/icons": "^4.5.1", "@monaco-editor/react": "^2.3.0", diff --git a/src/containers/Inspector.tsx b/src/containers/Inspector.tsx index 1b8ed42..ffb3140 100644 --- a/src/containers/Inspector.tsx +++ b/src/containers/Inspector.tsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, ChangeEvent, Dispatch, useRef } from "react"; import SplitPane from "react-split-pane"; -import JSONRPCRequest from "./JSONRPCRequest"; +import JSONRPCRequestEditor from "./JSONRPCRequestEditor"; import PlayCircle from "@material-ui/icons/PlayCircleFilled"; import { IconButton, AppBar, Toolbar, Typography, Button, InputBase } from "@material-ui/core"; import { Client, RequestManager, HTTPTransport, WebSocketTransport } from "@open-rpc/client-js"; @@ -127,6 +127,7 @@ const Inspector: React.FC = (props) => { } }; + return ( <> @@ -170,7 +171,7 @@ const Inspector: React.FC = (props) => { (editorRef.current as any).layout(); } }}> - { setJson(JSON.parse(val)); }} diff --git a/src/containers/JSONRPCRequest.tsx b/src/containers/JSONRPCRequestEditor.tsx similarity index 96% rename from src/containers/JSONRPCRequest.tsx rename to src/containers/JSONRPCRequestEditor.tsx index 83ec00e..c78cef5 100644 --- a/src/containers/JSONRPCRequest.tsx +++ b/src/containers/JSONRPCRequestEditor.tsx @@ -11,7 +11,7 @@ interface IProps { value: any; } -const JSONRPCRequest: React.FC = (props) => { +const JSONRPCRequestEditor: React.FC = (props) => { const editorRef = useRef(); const windowSize = useWindowSize(); @@ -95,4 +95,4 @@ const JSONRPCRequest: React.FC = (props) => { ); }; -export default JSONRPCRequest; +export default JSONRPCRequestEditor;