plugin rename

pull/5370/head
bunsenstraat 3 years ago
parent 5e38fe3b1e
commit 3ac62b7207
  1. 5
      apps/remix-ide/src/app/components/hidden-panel.tsx
  2. 5
      apps/remix-ide/src/app/components/plugin-manager-component.js
  3. 5
      apps/remix-ide/src/app/components/side-panel.tsx
  4. 5
      apps/remix-ide/src/app/components/vertical-icons.tsx
  5. 5
      apps/remix-ide/src/app/editor/editor.js
  6. 1
      apps/remix-ide/src/app/panels/file-panel.js
  7. 5
      apps/remix-ide/src/app/panels/tab-proxy.js
  8. 6
      apps/remix-ide/src/app/panels/terminal.js
  9. 27
      apps/remix-ide/src/app/plugins/viewReactPlugin.ts
  10. 4
      apps/remix-ide/src/app/tabs/analysis-tab.js
  11. 1
      apps/remix-ide/src/app/tabs/compile-tab.js
  12. 1
      apps/remix-ide/src/app/tabs/debugger-tab.js
  13. 10
      apps/remix-ide/src/app/tabs/settings-tab.tsx
  14. 5
      apps/remix-ide/src/app/tabs/test-tab.js
  15. 1
      apps/remix-ide/src/app/udapp/run-tab.js
  16. 6
      apps/remix-ide/src/app/ui/landing-page/landing-page.js
  17. 1
      libs/remix-ui/helper/src/index.ts
  18. 11
      libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx
  19. 14
      package.json

@ -1,10 +1,9 @@
// eslint-disable-next-line no-use-before-define
import React from 'react'
import ReactDOM from 'react-dom' // eslint-disable-line
import { AbstractPanel } from './panel'
import * as packageJson from '../../../../../package.json'
import { RemixPluginPanel } from '@remix-ui/panel'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const profile = {
name: 'hiddenPanel',
@ -39,7 +38,7 @@ export class HiddenPanel extends AbstractPanel {
render() {
return (
<div className='pluginsContainer'><ViewPluginUI plugin={this} /></div>
<div className='pluginsContainer'><PluginViewWrapper plugin={this} /></div>
);
}

@ -1,9 +1,8 @@
import { ViewPlugin } from '@remixproject/engine-web'
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import {RemixUiPluginManager} from '@remix-ui/plugin-manager' // eslint-disable-line
import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const _paq = window._paq = window._paq || []
const profile = {
@ -98,7 +97,7 @@ class PluginManagerComponent extends ViewPlugin {
render () {
return (
<div id='pluginManager'><ViewPluginUI plugin={this} /></div>
<div id='pluginManager'><PluginViewWrapper plugin={this} /></div>
);
}

@ -1,11 +1,10 @@
// eslint-disable-next-line no-use-before-define
import React from 'react'
import ReactDOM from 'react-dom'
import { AbstractPanel } from './panel'
import { RemixPluginPanel } from '@remix-ui/panel'
import packageJson from '../../../../../package.json'
import RemixUIPanelHeader from 'libs/remix-ui/panel/src/lib/plugins/panel-header'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
// const csjs = require('csjs-inject')
const sidePanel = {
@ -86,7 +85,7 @@ export class SidePanel extends AbstractPanel {
render() {
return (
<section className='panel plugin-manager'> <ViewPluginUI plugin={this} /></section>
<section className='panel plugin-manager'> <PluginViewWrapper plugin={this} /></section>
);
}

@ -1,12 +1,11 @@
// eslint-disable-next-line no-use-before-define
import React from 'react'
import ReactDOM from 'react-dom'
import packageJson from '../../../../../package.json'
import { Plugin } from '@remixproject/engine'
import { EventEmitter } from 'events'
import { IconRecord, RemixUiVerticalIconsPanel } from '@remix-ui/vertical-icons-panel'
import { Profile } from '@remixproject/plugin-utils'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const profile = {
name: 'menuicons',
@ -121,7 +120,7 @@ export class VerticalIcons extends Plugin {
render() {
return (
<div id='icon-panel'><ViewPluginUI plugin={this} /></div>
<div id='icon-panel'><PluginViewWrapper plugin={this} /></div>
);
}
}

@ -1,10 +1,9 @@
'use strict'
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { EditorUI } from '@remix-ui/editor' // eslint-disable-line
import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const EventManager = require('../../lib/events')
@ -111,7 +110,7 @@ class Editor extends Plugin {
this.ref.gotoLine = (line, column) => this.gotoLine(line, column || 0)
this.ref.getCursorPosition = () => this.getCursorPosition()
}} id='editorView'>
<ViewPluginUI plugin={this} />
<PluginViewWrapper plugin={this} />
</div>
}

@ -2,7 +2,6 @@ import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { FileSystemProvider } from '@remix-ui/workspace' // eslint-disable-line
import Registry from '../state/registry'
import { RemixdHandle } from '../plugins/remixd-handle'

@ -1,8 +1,7 @@
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { Plugin } from '@remixproject/engine'
import { TabsUI } from '@remix-ui/tabs'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const EventEmitter = require('events')
const helper = require('../../lib/helper')
@ -329,6 +328,6 @@ export class TabProxy extends Plugin {
}
renderTabsbar () {
return <div><ViewPluginUI plugin={this} /></div>
return <div><PluginViewWrapper plugin={this} /></div>
}
}

@ -1,15 +1,15 @@
/* global Node, requestAnimationFrame */ // eslint-disable-line
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { RemixUiTerminal } from '@remix-ui/terminal' // eslint-disable-line
import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry'
import { PluginViewWrapper } from '@remix-ui/helper'
const vm = require('vm')
const EventManager = require('../../lib/events')
import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line
import { ViewPluginUI } from '../components/ViewPluginUI'
const KONSOLES = []
@ -109,7 +109,7 @@ class Terminal extends Plugin {
}
render () {
return <div id='terminal-view' className='panel' data-id='terminalContainer-view'><ViewPluginUI plugin={this}/></div>
return <div id='terminal-view' className='panel' data-id='terminalContainer-view'><PluginViewWrapper plugin={this}/></div>
}
updateComponent(state) {

@ -1,27 +0,0 @@
import type { Profile, LocationProfile } from '@remixproject/plugin-utils'
import { Plugin } from '@remixproject/engine'
export function isView<P extends Profile>(profile: Profile): profile is (ViewProfile & P) {
return !!profile['location']
}
export type ViewProfile = Profile & LocationProfile
export abstract class ViewReactPlugin extends Plugin {
abstract render(): any
constructor(public profile: ViewProfile) {
super(profile)
}
async activate() {
await this.call(this.profile.location, 'addView', this.profile, this.render())
super.activate()
}
deactivate() {
this.call(this.profile.location, 'removeView', this.profile)
super.deactivate()
}
}

@ -4,7 +4,7 @@ import { EventEmitter } from 'events'
import {RemixUiStaticAnalyser} from '@remix-ui/static-analyser' // eslint-disable-line
import * as packageJson from '../../../../../package.json'
import Registry from '../state/registry'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
var EventManager = require('../../lib/events')
@ -61,7 +61,7 @@ class AnalysisTab extends ViewPlugin {
}
render () {
return <div id='staticAnalyserView'><ViewPluginUI plugin={this} /></div>
return <div id='staticAnalyserView'><PluginViewWrapper plugin={this} /></div>
}
updateComponent(state) {

@ -1,6 +1,5 @@
/* global */
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { SolidityCompiler } from '@remix-ui/solidity-compiler' // eslint-disable-line
import { CompileTabLogic } from '@remix-ui/solidity-compiler' // eslint-disable-line
import { CompilerApiMixin } from '@remixproject/solidity-compiler-plugin' // eslint-disable-line

@ -3,7 +3,6 @@ import { DebuggerApiMixin } from '@remixproject/debugger-plugin' // eslint-disab
import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import * as remixBleach from '../../lib/remixBleach'
import { compilationFinishedToastMsg, compilingToastMsg, localCompilationToastMsg, notFoundToastMsg, sourceVerificationNotAvailableToastMsg } from '@remix-ui/helper'
const css = require('./styles/debugger-tab-styles')

@ -1,11 +1,9 @@
import React, { useEffect, useState } from 'react' // eslint-disable-line
import React from 'react' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web'
import ReactDOM from 'react-dom'
import * as packageJson from '../../../../../package.json'
import { RemixUiSettings } from '@remix-ui/settings' //eslint-disable-line
import Registry from '../state/registry'
import { ViewReactPlugin } from '../plugins/viewReactPlugin'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
const profile = {
name: 'settings',
@ -21,7 +19,7 @@ const profile = {
permission: true
}
module.exports = class SettingsTab extends ViewReactPlugin {
module.exports = class SettingsTab extends ViewPlugin {
config: any = {}
editor: any
private _deps: {
@ -51,7 +49,7 @@ module.exports = class SettingsTab extends ViewReactPlugin {
render() {
return (
<div id='settingsTab'>
<ViewPluginUI plugin={this} />
<PluginViewWrapper plugin={this} />
</div>
);
}

@ -1,13 +1,12 @@
/* global */
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { SolidityUnitTesting } from '@remix-ui/solidity-unit-testing' // eslint-disable-line
import { TestTabLogic } from '@remix-ui/solidity-unit-testing' // eslint-disable-line
import { ViewPlugin } from '@remixproject/engine-web'
import helper from '../../lib/helper'
import { canUseWorker, urlFromVersion } from '@remix-project/remix-solidity'
import { ViewPluginUI } from '../components/ViewPluginUI'
import { PluginViewWrapper } from '@remix-ui/helper'
var { UnitTestRunner, assertLibCode } = require('@remix-project/remix-tests')
@ -137,7 +136,7 @@ module.exports = class TestTab extends ViewPlugin {
render () {
this.onActivationInternal()
return <div><ViewPluginUI plugin={this} /></div>
return <div><PluginViewWrapper plugin={this} /></div>
}
updateComponent(state) {

@ -1,5 +1,4 @@
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import { RunTabUI } from '@remix-ui/run-tab'
import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'

@ -1,10 +1,8 @@
/* global */
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import * as packageJson from '../../../../../../package.json'
import { ViewPlugin } from '@remixproject/engine-web'
import { RemixUiHomeTab } from '@remix-ui/home-tab' // eslint-disable-line
import { ViewReactPlugin } from '../../plugins/viewReactPlugin'
const profile = {
name: 'home',
@ -16,7 +14,7 @@ const profile = {
location: 'mainPanel',
version: packageJson.version
}
export class LandingPage extends ViewReactPlugin {
export class LandingPage extends ViewPlugin {
constructor (appManager, verticalIcons, fileManager, filePanel, contentImport) {
super(profile)
this.profile = profile
@ -32,7 +30,7 @@ export class LandingPage extends ViewReactPlugin {
}
render () {
return <div id='landingPageHomeContainer' className='remixui_homeContainer justify-content-between bg-light d-flex' data-id='landingPageHomeContainer'> <RemixUiHomeTab
return <div id='landingPageHomeContainer' className='remixui_homeContainer justify-content-between bg-light d-flex' data-id='landingPageHomeContainer'><RemixUiHomeTab
plugin={this}
/></div>
}

@ -1,2 +1,3 @@
export * from './lib/remix-ui-helper'
export * from './lib/helper-components'
export * from './lib/components/PluginViewWrapper'

@ -1,25 +1,20 @@
import React from "react"
import { useEffect, useState } from "react"
interface IViewPluginUI {
interface IPluginViewWrapperProps {
plugin: any
}
export const ViewPluginUI = (props: IViewPluginUI) => {
export const PluginViewWrapper = (props: IPluginViewWrapperProps) => {
const [state, setState] = useState<any>(null)
useEffect(() => {
// console.log(props.plugin)
if(props.plugin.setDispatch){
props.plugin.setDispatch(setState)
}
}, [])
useEffect(() => {
// console.log(state)
}, [state])
return (
<>{state?
<>{props.plugin.updateComponent(state)}</>

@ -147,13 +147,13 @@
"@ethereumjs/tx": "^3.3.2",
"@ethereumjs/vm": "^5.5.3",
"@monaco-editor/react": "^4.3.1",
"@remixproject/engine": "^0.3.26",
"@remixproject/engine-web": "^0.3.26",
"@remixproject/plugin": "^0.3.26",
"@remixproject/plugin-api": "^0.3.26",
"@remixproject/plugin-utils": "^0.3.26",
"@remixproject/plugin-webview": "^0.3.26",
"@remixproject/plugin-ws": "^0.3.26",
"@remixproject/engine": "^0.3.27",
"@remixproject/engine-web": "^0.3.27",
"@remixproject/plugin": "^0.3.27",
"@remixproject/plugin-api": "^0.3.27",
"@remixproject/plugin-utils": "^0.3.27",
"@remixproject/plugin-webview": "^0.3.27",
"@remixproject/plugin-ws": "^0.3.27",
"ansi-gray": "^0.1.1",
"async": "^2.6.2",
"axios": ">=0.21.1",

Loading…
Cancel
Save