aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-29 09:08:06 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-29 09:08:06 +0800
commit68af0e9eb70151704098350f99437f92639de753 (patch)
treec2ee9574e635acec39f9157e2ea7219eb9a94a3a
parenta18d0f62298de76a2c6cd503e457123221d6bf9a (diff)
downloaddexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar.gz
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar.bz2
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar.lz
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar.xz
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.tar.zst
dexon-sol-tools-68af0e9eb70151704098350f99437f92639de753.zip
Change VersionDropDown to use material-ui 3
-rw-r--r--packages/react-shared/package.json1
-rw-r--r--packages/react-shared/src/components/version_drop_down.tsx15
-rw-r--r--yarn.lock211
3 files changed, 216 insertions, 11 deletions
diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json
index f341619d2..57aa9d51d 100644
--- a/packages/react-shared/package.json
+++ b/packages/react-shared/package.json
@@ -33,6 +33,7 @@
"typescript": "3.0.1"
},
"dependencies": {
+ "@material-ui/core": "^3.0.1",
"@types/is-mobile": "0.3.0",
"@types/lodash": "4.14.104",
"@types/material-ui": "0.18.0",
diff --git a/packages/react-shared/src/components/version_drop_down.tsx b/packages/react-shared/src/components/version_drop_down.tsx
index e41590957..e4a2798ab 100644
--- a/packages/react-shared/src/components/version_drop_down.tsx
+++ b/packages/react-shared/src/components/version_drop_down.tsx
@@ -1,6 +1,6 @@
+import MenuItem from '@material-ui/core/MenuItem';
+import Select from '@material-ui/core/Select';
import * as _ from 'lodash';
-import DropDownMenu from 'material-ui/DropDownMenu';
-import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
export interface VersionDropDownProps {
@@ -15,23 +15,22 @@ export class VersionDropDown extends React.Component<VersionDropDownProps, Versi
public render(): React.ReactNode {
return (
<div className="mx-auto" style={{ width: 120 }}>
- <DropDownMenu
- maxHeight={300}
+ <Select
value={this.props.selectedVersion}
onChange={this._updateSelectedVersion.bind(this)}
>
{this._renderDropDownItems()}
- </DropDownMenu>
+ </Select>
</div>
);
}
private _renderDropDownItems(): React.ReactNode[] {
const items = _.map(this.props.versions, version => {
- return <MenuItem key={version} value={version} primaryText={`v${version}`} />;
+ return <MenuItem key={version} value={version}>v{version}</MenuItem>;
});
return items;
}
- private _updateSelectedVersion(_e: any, _index: number, semver: string): void {
- this.props.onVersionSelected(semver);
+ private _updateSelectedVersion(event: React.ChangeEvent<HTMLSelectElement>): void {
+ this.props.onVersionSelected(event.target.value);
}
}
diff --git a/yarn.lock b/yarn.lock
index 65f8bfd08..d7ed1801d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -788,6 +788,12 @@
lodash "4.17.10"
web3 "0.20.6"
+"@babel/runtime@7.0.0", "@babel/runtime@^7.0.0":
+ version "7.0.0"
+ resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c"
+ dependencies:
+ regenerator-runtime "^0.12.0"
+
"@babel/runtime@7.0.0-rc.1":
version "7.0.0-rc.1"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-rc.1.tgz#42f36fc5817911c89ea75da2b874054922967616"
@@ -852,6 +858,38 @@
"@loopback/dist-util" "^0.3.6"
openapi3-ts "^0.11.0"
+"@material-ui/core@^3.0.1":
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/@material-ui/core/-/core-3.0.1.tgz#e8476394a42d89ae404355ddbc093db4d044b225"
+ dependencies:
+ "@babel/runtime" "7.0.0"
+ "@types/jss" "^9.5.3"
+ "@types/react-transition-group" "^2.0.8"
+ brcast "^3.0.1"
+ classnames "^2.2.5"
+ csstype "^2.5.2"
+ debounce "^1.1.0"
+ deepmerge "^2.0.1"
+ dom-helpers "^3.2.1"
+ hoist-non-react-statics "^2.5.0"
+ is-plain-object "^2.0.4"
+ jss "^9.3.3"
+ jss-camel-case "^6.0.0"
+ jss-default-unit "^8.0.2"
+ jss-global "^3.0.0"
+ jss-nested "^6.0.1"
+ jss-props-sort "^6.0.0"
+ jss-vendor-prefixer "^7.0.0"
+ keycode "^2.1.9"
+ normalize-scroll-left "^0.1.2"
+ popper.js "^1.14.1"
+ prop-types "^15.6.0"
+ react-event-listener "^0.6.2"
+ react-jss "^8.1.0"
+ react-transition-group "^2.2.1"
+ recompose "^0.29.0"
+ warning "^4.0.1"
+
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -1019,6 +1057,13 @@
dependencies:
jsonschema "*"
+"@types/jss@^9.5.3":
+ version "9.5.4"
+ resolved "https://registry.npmjs.org/@types/jss/-/jss-9.5.4.tgz#89a4ee32a14a8d2937187b1a7f443750e964a74d"
+ dependencies:
+ csstype "^2.0.0"
+ indefinite-observable "^1.0.1"
+
"@types/lodash.foreach@^4.5.3":
version "4.5.3"
resolved "https://registry.yarnpkg.com/@types/lodash.foreach/-/lodash.foreach-4.5.3.tgz#87c01a0c5d9d17eec936ca3c28897af79440cdfc"
@@ -1201,6 +1246,12 @@
version "0.0.30"
resolved "https://registry.yarnpkg.com/@types/react-tap-event-plugin/-/react-tap-event-plugin-0.0.30.tgz#123f35080412f489b6770c5a65c159ff96654cb5"
+"@types/react-transition-group@^2.0.8":
+ version "2.0.13"
+ resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.0.13.tgz#7769fb61eb71d64d087a713956f086a42c3ee171"
+ dependencies:
+ "@types/react" "*"
+
"@types/react@*":
version "16.3.13"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.3.13.tgz#47d466462b774556c1174ea0eda22c0578643362"
@@ -2776,6 +2827,10 @@ braces@^2.3.0, braces@^2.3.1:
split-string "^3.0.2"
to-regex "^3.0.1"
+brcast@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz#6256a8349b20de9eed44257a9b24d71493cd48dd"
+
brorand@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
@@ -4052,6 +4107,12 @@ css-to-react-native@^2.0.3:
fbjs "^0.8.5"
postcss-value-parser "^3.3.0"
+css-vendor@^0.3.8:
+ version "0.3.8"
+ resolved "https://registry.npmjs.org/css-vendor/-/css-vendor-0.3.8.tgz#6421cfd3034ce664fe7673972fd0119fc28941fa"
+ dependencies:
+ is-in-browser "^1.0.2"
+
cssesc@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"
@@ -4100,6 +4161,10 @@ csso@~2.3.1:
clap "^1.0.9"
source-map "^0.5.3"
+csstype@^2.0.0, csstype@^2.5.2:
+ version "2.5.6"
+ resolved "https://registry.npmjs.org/csstype/-/csstype-2.5.6.tgz#2ae1db2319642d8b80a668d2d025c6196071e788"
+
csstype@^2.2.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.4.2.tgz#158e36c69566bf968da63d0ba14eda1c20e8643a"
@@ -4168,6 +4233,10 @@ dbug@~0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/dbug/-/dbug-0.4.2.tgz#32b4b3105e8861043a6f9ac755d80e542d365b31"
+debounce@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131"
+
debug-log@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
@@ -4319,6 +4388,10 @@ deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+deepmerge@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-2.1.1.tgz#e862b4e45ea0555072bf51e7fd0d9845170ae768"
+
default-require-extensions@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
@@ -4562,7 +4635,7 @@ doctrine@^2.1.0:
dependencies:
esutils "^2.0.2"
-dom-helpers@^3.2.0:
+dom-helpers@^3.2.0, dom-helpers@^3.2.1, dom-helpers@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6"
@@ -7066,6 +7139,12 @@ imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+indefinite-observable@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-1.0.1.tgz#09915423cc8d6f7eb1cb7882ad134633c9a6edc3"
+ dependencies:
+ symbol-observable "1.0.4"
+
indent-string@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
@@ -7409,6 +7488,10 @@ is-hexadecimal@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.1.tgz#6e084bbc92061fbb0971ec58b6ce6d404e24da69"
+is-in-browser@^1.0.2, is-in-browser@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz#56ff4db683a078c6082eb95dad7dc62e1d04f835"
+
is-installed-globally@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
@@ -7961,6 +8044,81 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
+jss-camel-case@^6.0.0, jss-camel-case@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-6.1.0.tgz#ccb1ff8d6c701c02a1fed6fb6fb6b7896e11ce44"
+ dependencies:
+ hyphenate-style-name "^1.0.2"
+
+jss-compose@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.npmjs.org/jss-compose/-/jss-compose-5.0.0.tgz#ce01b2e4521d65c37ea42cf49116e5f7ab596484"
+ dependencies:
+ warning "^3.0.0"
+
+jss-default-unit@^8.0.2:
+ version "8.0.2"
+ resolved "https://registry.npmjs.org/jss-default-unit/-/jss-default-unit-8.0.2.tgz#cc1e889bae4c0b9419327b314ab1c8e2826890e6"
+
+jss-expand@^5.3.0:
+ version "5.3.0"
+ resolved "https://registry.npmjs.org/jss-expand/-/jss-expand-5.3.0.tgz#02be076efe650125c842f5bb6fb68786fe441ed6"
+
+jss-extend@^6.2.0:
+ version "6.2.0"
+ resolved "https://registry.npmjs.org/jss-extend/-/jss-extend-6.2.0.tgz#4af09d0b72fb98ee229970f8ca852fec1ca2a8dc"
+ dependencies:
+ warning "^3.0.0"
+
+jss-global@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmjs.org/jss-global/-/jss-global-3.0.0.tgz#e19e5c91ab2b96353c227e30aa2cbd938cdaafa2"
+
+jss-nested@^6.0.1:
+ version "6.0.1"
+ resolved "https://registry.npmjs.org/jss-nested/-/jss-nested-6.0.1.tgz#ef992b79d6e8f63d939c4397b9d99b5cbbe824ca"
+ dependencies:
+ warning "^3.0.0"
+
+jss-preset-default@^4.3.0:
+ version "4.5.0"
+ resolved "https://registry.npmjs.org/jss-preset-default/-/jss-preset-default-4.5.0.tgz#d3a457012ccd7a551312014e394c23c4b301cadd"
+ dependencies:
+ jss-camel-case "^6.1.0"
+ jss-compose "^5.0.0"
+ jss-default-unit "^8.0.2"
+ jss-expand "^5.3.0"
+ jss-extend "^6.2.0"
+ jss-global "^3.0.0"
+ jss-nested "^6.0.1"
+ jss-props-sort "^6.0.0"
+ jss-template "^1.0.1"
+ jss-vendor-prefixer "^7.0.0"
+
+jss-props-sort@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.npmjs.org/jss-props-sort/-/jss-props-sort-6.0.0.tgz#9105101a3b5071fab61e2d85ea74cc22e9b16323"
+
+jss-template@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/jss-template/-/jss-template-1.0.1.tgz#09aed9d86cc547b07f53ef355d7e1777f7da430a"
+ dependencies:
+ warning "^3.0.0"
+
+jss-vendor-prefixer@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.npmjs.org/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz#0166729650015ef19d9f02437c73667231605c71"
+ dependencies:
+ css-vendor "^0.3.8"
+
+jss@^9.3.3, jss@^9.7.0:
+ version "9.8.7"
+ resolved "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz#ed9763fc0f2f0260fc8260dac657af61e622ce05"
+ dependencies:
+ is-in-browser "^1.1.3"
+ symbol-observable "^1.1.0"
+ warning "^3.0.0"
+
just-extend@^1.1.27:
version "1.1.27"
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.27.tgz#ec6e79410ff914e472652abfa0e603c03d60e905"
@@ -7981,7 +8139,7 @@ keccakjs@^0.2.0, keccakjs@^0.2.1:
browserify-sha3 "^0.0.1"
sha3 "^1.1.0"
-keycode@^2.1.8:
+keycode@^2.1.8, keycode@^2.1.9:
version "2.2.0"
resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
@@ -9533,6 +9691,10 @@ normalize-range@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
+normalize-scroll-left@^0.1.2:
+ version "0.1.2"
+ resolved "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz#6b79691ba79eb5fb107fa5edfbdc06b55caee2aa"
+
normalize-url@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
@@ -11214,6 +11376,16 @@ react-is@^16.3.1:
version "16.4.0"
resolved "https://registry.npmjs.org/react-is/-/react-is-16.4.0.tgz#cc9fdc855ac34d2e7d9d2eb7059bbc240d35ffcf"
+react-jss@^8.1.0:
+ version "8.6.1"
+ resolved "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz#a06e2e1d2c4d91b4d11befda865e6c07fbd75252"
+ dependencies:
+ hoist-non-react-statics "^2.5.0"
+ jss "^9.7.0"
+ jss-preset-default "^4.3.0"
+ prop-types "^15.6.0"
+ theming "^1.3.0"
+
react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:
version "3.0.4"
resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
@@ -11311,6 +11483,15 @@ react-transition-group@^1.2.1:
prop-types "^15.5.6"
warning "^3.0.0"
+react-transition-group@^2.2.1:
+ version "2.4.0"
+ resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.4.0.tgz#1d9391fabfd82e016f26fabd1eec329dbd922b5a"
+ dependencies:
+ dom-helpers "^3.3.1"
+ loose-envify "^1.3.1"
+ prop-types "^15.6.2"
+ react-lifecycles-compat "^3.0.4"
+
react@^16.3.2, react@^16.4.2:
version "16.4.2"
resolved "https://registry.npmjs.org/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f"
@@ -11494,6 +11675,17 @@ recompose@^0.26.0:
hoist-non-react-statics "^2.3.1"
symbol-observable "^1.0.4"
+recompose@^0.29.0:
+ version "0.29.0"
+ resolved "https://registry.npmjs.org/recompose/-/recompose-0.29.0.tgz#f1a4e20d5f24d6ef1440f83924e821de0b1bccef"
+ dependencies:
+ "@babel/runtime" "^7.0.0"
+ change-emitter "^0.1.2"
+ fbjs "^0.8.1"
+ hoist-non-react-statics "^2.3.1"
+ react-lifecycles-compat "^3.0.2"
+ symbol-observable "^1.0.4"
+
redent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
@@ -13188,11 +13380,15 @@ symbol-observable@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
+symbol-observable@1.0.4:
+ version "1.0.4"
+ resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
+
symbol-observable@^0.2.2:
version "0.2.4"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40"
-symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0:
+symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
@@ -13363,6 +13559,15 @@ textextensions@2:
version "2.2.0"
resolved "https://registry.yarnpkg.com/textextensions/-/textextensions-2.2.0.tgz#38ac676151285b658654581987a0ce1a4490d286"
+theming@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.npmjs.org/theming/-/theming-1.3.0.tgz#286d5bae80be890d0adc645e5ca0498723725bdc"
+ dependencies:
+ brcast "^3.0.1"
+ is-function "^1.0.1"
+ is-plain-object "^2.0.1"
+ prop-types "^15.5.8"
+
thenby@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/thenby/-/thenby-1.2.3.tgz#62465b07e3d8b9466f01026df837f738e0faaa69"