diff --git a/.circleci/config.yml b/.circleci/config.yml index acc9a0ffb8..e7580743ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,6 +72,8 @@ jobs: parallelism: 12 steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npx nx build remix-ide --with-deps - run: @@ -105,6 +107,8 @@ jobs: parallelism: 12 steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npm run downloadsolc_assets - run: npx nx build remix-ide --with-deps @@ -139,6 +143,8 @@ jobs: parallelism: 12 steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npx nx build remix-ide --with-deps - run: @@ -172,6 +178,8 @@ jobs: parallelism: 12 steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npm run downloadsolc_assets - run: npx nx build remix-ide --with-deps @@ -206,6 +214,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npx nx build remix-ide --with-deps - run: @@ -239,6 +249,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npx nx build remix-ide --with-deps - run: npx nx build remix-ide-e2e-src-local-plugin @@ -254,6 +266,7 @@ jobs: path: ./reports/tests - store_artifacts: path: ./reports/screenshots + deploy-remix-live: docker: # specify the version you desire here @@ -272,6 +285,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npm run downloadsolc_assets - run: npm run build:production @@ -300,6 +315,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - setup_remote_docker - run: npm install - run: npm run downloadsolc_assets @@ -326,6 +343,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npm run downloadsolc_assets - run: npm run build:production @@ -354,6 +373,8 @@ jobs: steps: - checkout + - run: git submodule sync --recursive + - run: git submodule update --recursive --init - run: npm install - run: npm run build:libs - run: npm run downloadsolc_assets diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..f3b7f8e547 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libs/remix-ui/tabs/react-tabs"] + path = libs/remix-ui/tabs/react-tabs + url = https://github.com/reactjs/react-tabs diff --git a/apps/remix-ide/.babelrc b/apps/remix-ide/.babelrc index 2b7bafa5fa..e60d3036a3 100644 --- a/apps/remix-ide/.babelrc +++ b/apps/remix-ide/.babelrc @@ -1,3 +1,4 @@ { - "presets": ["@babel/preset-env", "@babel/preset-react"] + "presets": ["@babel/preset-env", "@babel/preset-react"], + "plugins": ["@babel/plugin-proposal-class-properties"] } diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index f4cc6408c0..5b65254830 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -308,13 +308,8 @@ export class TabProxy extends Plugin { } renderTabsbar () { - window.React = React - const script = document.createElement('script') - script.type = 'text/javascript' - script.src = 'assets/js/react-tabs.production.min.js' - document.head.appendChild(script) - script.addEventListener('load', () => this.renderComponent()) this.el = document.createElement('div') + this.renderComponent() return this.el } } diff --git a/apps/remix-ide/src/assets/js/react-tabs.production.min.js b/apps/remix-ide/src/assets/js/react-tabs.production.min.js deleted file mode 100644 index 59f4d0590c..0000000000 --- a/apps/remix-ide/src/assets/js/react-tabs.production.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTabs={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function a(){return(a=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function i(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var d=i("Tab"),c=i("TabList"),u=i("TabPanel");function f(e,n){return t.Children.map(e,(function(e){return null===e?null:function(e){return d(e)||c(e)||u(e)}(e)?n(e):e.props&&e.props.children&&"object"==typeof e.props.children?t.cloneElement(e,a({},e.props,{children:f(e.props.children,n)})):e}))}function p(e,n){return t.Children.forEach(e,(function(e){null!==e&&(d(e)||u(e)?n(e):e.props&&e.props.children&&"object"==typeof e.props.children&&(c(e)&&n(e),p(e.props.children,n)))}))}function b(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},o.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;ne;)if(!N(this.getTab(t)))return t;return e},o.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t string } -declare var ReactTabs: any - export const TabsUI = (props: TabsUIProps) => { - const { Tab, Tabs, TabList, TabPanel } = ReactTabs const [selectedIndex, setSelectedIndex] = useState(-1) const currentIndexRef = useRef(-1) const tabsRef = useRef({}) diff --git a/package.json b/package.json index 8faaf4c999..e3fdd751bb 100644 --- a/package.json +++ b/package.json @@ -136,6 +136,7 @@ ] }, "dependencies": { + "@babel/plugin-proposal-class-properties": "^7.16.0", "@erebos/bzz-node": "^0.13.0", "@ethereumjs/block": "^3.5.1", "@ethereumjs/common": "^2.5.0",