diff --git a/package.json b/package.json index c13d975..c5d6f3a 100644 --- a/package.json +++ b/package.json @@ -5,29 +5,27 @@ "dependencies": { "@babel/core": "7.1.0", "@babel/plugin-proposal-class-properties": "^7.4.4", - "@blueprintjs/core": "^3.15.1", - "@blueprintjs/icons": "^3.8.0", - "@blueprintjs/select": "^3.8.0", - "@blueprintjs/table": "^3.5.0", + "@blueprintjs/core": "^3.19.1", + "@blueprintjs/icons": "^3.11.0", + "@blueprintjs/select": "^3.11.1", + "@blueprintjs/table": "^3.8.1", "@fortawesome/fontawesome-free": "^5.6.3", "@fortawesome/free-solid-svg-icons": "^5.6.3", - "@rematch/core": "^1.0.6", - "@rematch/loading": "^1.1.2", - "@rematch/persist": "^1.1.5", - "@rematch/select": "^2.0.3", + "@rematch/core": "^1.2.0", + "@rematch/loading": "^1.2.1", + "@rematch/persist": "^1.1.6", + "@rematch/select": "^2.0.5", "@svgr/webpack": "2.4.1", "@trx/core": "^0.0.12", - "@types/es6-promise": "^3.3.0", "@types/lodash": "^4.14.120", - "@types/react": "16.8.2", - "@types/react-dom": "16.8.0", + "@types/react": "16.9.9", + "@types/react-dom": "16.9.2", + "@types/react-redux": "^7.1.5", "@types/webpack-env": "^1.13.6", "@uiw/react-monacoeditor": "^1.0.6", "apollo-link-ws": "^1.0.12", - "apollo-server": "^2.3.1", - "apollo-server-express": "^2.3.1", "babel-core": "7.0.0-bridge.0", - "babel-eslint": "9.0.0", + "babel-eslint": "^10.0.3", "babel-jest": "23.6.0", "babel-loader": "8.0.4", "babel-plugin-named-asset-import": "^0.2.3", @@ -76,25 +74,25 @@ "postcss-safe-parser": "4.0.1", "prop-types": "^15.6.2", "query-string": "^6.2.0", - "react": "16.8.1", + "react": "16.11.0", "react-app-polyfill": "^0.1.3", "react-async-component": "^2.0.0", "react-dev-utils": "^6.1.1", - "react-dom": "16.8.1", + "react-dom": "16.11.0", "react-dropzone": "^10.1.4", "react-intl": "^2.7.2", "react-monaco-editor": "^0.22.0", "react-mosaic-component": "^2.0.2", "react-new-window": "^0.0.10", - "react-redux": "^6.0.0", + "react-redux": "^7.1.1", "react-router": "^4.3.1", "react-router-dom": "^4.3.1", - "redux": "^4.0.1", + "redux": "^4.0.4", "redux-persist": "^5.10.0", "redux-thunk": "^2.3.0", "reselect": "^4.0.0", "resolve": "1.8.1", - "rxjs": "^6.3.3", + "rxjs": "^6.5.3", "sass-loader": "7.1.0", "solc": "^0.5.2", "solhint": "^1.5.0", @@ -104,9 +102,10 @@ "terser-webpack-plugin": "1.1.0", "tronweb": "2.5.3", "trx-graphql-server": "^0.0.14", - "ts-node": "^7.0.1", - "ts-node-dev": "^1.0.0-pre.32", - "typescript": "^3.2.2", + "ts-node": "^8.4.1", + "ts-node-dev": "^1.0.0-pre.43", + "tslint": "^5.20.0", + "typescript": "^3.6.4", "url-loader": "1.1.1", "uuid": "^3.3.2", "webpack": "4.19.1", @@ -123,7 +122,8 @@ "start": "node --max_old_space_size=8192 scripts/start.js", "build": "PUBLIC_URL=https://arjia.city GENERATE_SOURCEMAP=false node --max_old_space_size=12288 scripts/build.js", "build:analyze": "ANALYZE=true node scripts/build.js", - "test": "node scripts/test.js" + "test": "node scripts/test.js", + "lint": "tslint -p ./" }, "browserslist": [ ">0.2%", diff --git a/public/index.html b/public/index.html index f32002a..f38348d 100644 --- a/public/index.html +++ b/public/index.html @@ -27,20 +27,5 @@ You need to enable JavaScript to run this app.
- - - - - - diff --git a/src/App.jsx b/src/App.jsx index 4b14c11..a242777 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,14 @@ -import './App.css'; -import '@blueprintjs/table/lib/css/table.css'; -import '@blueprintjs/select/lib/css/blueprint-select.css'; -import '@blueprintjs/core/lib/css/blueprint.css'; -import '@blueprintjs/icons/lib/css/blueprint-icons.css'; -import './styles/index.scss'; -import 'react-mosaic-component/react-mosaic-component.css' - -import React, {Component} from 'react'; +import "./App.css"; +import "@blueprintjs/table/lib/css/table.css"; +import "@blueprintjs/select/lib/css/blueprint-select.css"; +import "@blueprintjs/core/lib/css/blueprint.css"; +import "@blueprintjs/icons/lib/css/blueprint-icons.css"; +import "./styles/index.scss"; +import "react-mosaic-component/react-mosaic-component.css"; + +import React, {Component} from "react"; import MainWrap from "./mainWrap"; -import {IntlProvider} from 'react-intl'; +import {IntlProvider} from "react-intl"; import {Provider} from "react-redux"; import {configureStore} from "./store"; import {HashRouter as Router} from "react-router-dom"; @@ -30,13 +30,13 @@ class App extends Component { if (window.tronWeb) { if (previousAddress !== window.tronWeb.defaultAddress.base58) { previousAddress = window.tronWeb.defaultAddress.base58; - this.store.dispatch({ type: 'refresh '}); + this.store.dispatch({ type: "refresh "}); this.forceUpdate(); } if (previousNode !== window.tronWeb.fullNode.host) { previousNode = window.tronWeb.fullNode.host; - this.store.dispatch({ type: 'refresh '}); + this.store.dispatch({ type: "refresh "}); this.forceUpdate(); } } diff --git a/src/components/functions/ascii.tsx b/src/components/functions/ascii.tsx index ea673a9..5348fe1 100644 --- a/src/components/functions/ascii.tsx +++ b/src/components/functions/ascii.tsx @@ -54,7 +54,7 @@ export function AsciiFunc() { - ) + ); } diff --git a/src/components/functions/base58.tsx b/src/components/functions/base58.tsx index 5f1a6d0..8e62df6 100644 --- a/src/components/functions/base58.tsx +++ b/src/components/functions/base58.tsx @@ -59,7 +59,7 @@ export function Base58Func() { - ) + ); } diff --git a/src/components/functions/funcs.ts b/src/components/functions/funcs.ts index 1291592..6b98e6d 100644 --- a/src/components/functions/funcs.ts +++ b/src/components/functions/funcs.ts @@ -1,5 +1,4 @@ - export { Base58Func } from "./base58"; export { AsciiFunc } from "./ascii"; -export { Utf8Func } from "./utf8" +export { Utf8Func } from "./utf8"; diff --git a/src/components/functions/index.tsx b/src/components/functions/index.tsx index c7b64c5..352b3ca 100644 --- a/src/components/functions/index.tsx +++ b/src/components/functions/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import {FormGroup, InputGroup, Menu, MenuDivider, MenuItem} from "@blueprintjs/core"; +import {Menu, MenuDivider, MenuItem} from "@blueprintjs/core"; import * as Funcs from "./funcs"; import {groupBy} from "lodash"; import {Switch, Route, withRouter} from "react-router"; @@ -66,7 +66,7 @@ export default class FunctionsWidget extends React.Component { - ) + ); } } diff --git a/src/components/functions/utf8.tsx b/src/components/functions/utf8.tsx index d2af12d..628117d 100644 --- a/src/components/functions/utf8.tsx +++ b/src/components/functions/utf8.tsx @@ -54,7 +54,7 @@ export function Utf8Func() { - ) + ); } diff --git a/src/components/github/publishGist.tsx b/src/components/github/publishGist.tsx index dd57188..531ae0c 100644 --- a/src/components/github/publishGist.tsx +++ b/src/components/github/publishGist.tsx @@ -6,11 +6,12 @@ import {copyWithConfirmation} from "../../utils/clipboard"; import {connect} from "react-redux"; @withDialogs +// @ts-ignore @connect( - state => ({ + (state: any) => ({ gitHubToken: state.config.gitHubToken, }), - ({ config: { setGithubToken } }) => ({ + ({ config: { setGithubToken } }: any) => ({ setGithubToken }), ) @@ -73,12 +74,12 @@ export default class PublishGist extends React.Component { }); this.props.onSuccess(data); - }; + } setAccessToken = (token) => { this.props.setGithubToken(token); this.doPublish(); - }; + } showAccessToken = () => { @@ -113,7 +114,7 @@ export default class PublishGist extends React.Component { ) }); - }; + } render() { return ( diff --git a/src/components/omnibar/index.tsx b/src/components/omnibar/index.tsx index 63b99ed..fe0fb88 100644 --- a/src/components/omnibar/index.tsx +++ b/src/components/omnibar/index.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import {withRouter} from "react-router"; -import {Hotkey, Hotkeys, HotkeysTarget, MenuItem,} from "@blueprintjs/core"; +import {Hotkey, Hotkeys, HotkeysTarget, MenuItem, } from "@blueprintjs/core"; import {ItemRenderer, Omnibar} from "@blueprintjs/select"; import {IAction} from "./action"; import {IActionHandler} from "./actions/actionHandler"; @@ -38,11 +38,12 @@ const renderItem: ItemRenderer = (action, { handleClick, modifiers, que }; @withRouter +// @ts-ignore @connect( - state => ({ + (state: any) => ({ isOpen: state.omnibar.isOpen, }), - ({ omnibar }) => ({ + ({ omnibar }: any) => ({ toggleOmnibar: omnibar.toggleOmnibar, setOmnibar: omnibar.setOmnibar, }), @@ -97,20 +98,20 @@ export default class OmnibarWidget extends React.PureComponent) => { + private handleClick = (ev: React.MouseEvent) => { this.props.setOmnibar(true); - }; + } private handleItemSelect = (film: IAction) => { @@ -144,7 +145,7 @@ export default class OmnibarWidget extends React.PureComponent this.props.setOmnibar(false); diff --git a/src/components/pageNav.tsx b/src/components/pageNav.tsx index b52d0cb..566afe0 100644 --- a/src/components/pageNav.tsx +++ b/src/components/pageNav.tsx @@ -4,6 +4,21 @@ import {withRouter} from "react-router"; class PageNav extends React.Component { + + render() { + return ( + + ); + } + private renderOverflow = (items) => { const position = Position.BOTTOM_RIGHT; return ( @@ -14,18 +29,18 @@ class PageNav extends React.Component { ); - }; + } private renderOverflowBreadcrumb = (props, index: number) => { const isClickable = props.href != null || props.onClick != null; return ; - }; + } private renderBreadcrumbItem = ({ name, type, id, icon, url }) => { return (