From c4e028d1026f4265dd1f4afe9ad06ee2fc453aca Mon Sep 17 00:00:00 2001 From: mgerb Date: Tue, 17 Oct 2017 23:01:08 -0500 Subject: [PATCH] coming along well - electron is pretty nice --- README.md | 4 + app/Wrapper.tsx | 32 -------- app/Wrapper/Wrapper.scss | 5 ++ app/Wrapper/Wrapper.tsx | 26 +++++++ app/app.tsx | 5 +- app/components/Content/Content.scss | 36 +++++++++ app/components/Content/Content.tsx | 86 ++++++++++++++++++++++ app/components/Header/Header.scss | 5 +- app/components/Header/Header.tsx | 24 ++++-- app/components/Header/index.ts | 1 - app/components/ServerList/ServerList.scss | 7 ++ app/components/ServerList/ServerList.tsx | 24 ++++++ app/components/SubHeader/SubHeader.scss | 22 ++++++ app/components/SubHeader/SubHeader.tsx | 45 +++++++++++ app/components/index.ts | 4 + app/pages/Home/Home.scss | 3 - app/pages/Home/Home.tsx | 68 ----------------- app/pages/NotFound/NotFound.scss | 5 -- app/pages/NotFound/NotFound.tsx | 18 ----- app/scss/style.scss | 8 +- app/scss/variables.scss | 4 +- app/state/AppState.ts | 81 ++++++++++++++++++++ docs/images/prototype1.PNG | Bin 0 -> 15703 bytes index.html | 2 +- package.json | 3 +- servers.json | 28 +++++++ tsconfig.json | 3 +- tslint.json | 3 + yarn.lock | 71 ++++-------------- 29 files changed, 424 insertions(+), 199 deletions(-) delete mode 100644 app/Wrapper.tsx create mode 100644 app/Wrapper/Wrapper.scss create mode 100644 app/Wrapper/Wrapper.tsx create mode 100644 app/components/Content/Content.scss create mode 100644 app/components/Content/Content.tsx delete mode 100644 app/components/Header/index.ts create mode 100644 app/components/ServerList/ServerList.scss create mode 100644 app/components/ServerList/ServerList.tsx create mode 100644 app/components/SubHeader/SubHeader.scss create mode 100644 app/components/SubHeader/SubHeader.tsx create mode 100644 app/components/index.ts delete mode 100644 app/pages/Home/Home.scss delete mode 100644 app/pages/Home/Home.tsx delete mode 100644 app/pages/NotFound/NotFound.scss delete mode 100644 app/pages/NotFound/NotFound.tsx create mode 100644 app/state/AppState.ts create mode 100644 docs/images/prototype1.PNG create mode 100644 servers.json diff --git a/README.md b/README.md index 7684798..feccd2b 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ # Work in progress + +## Early Prototype 10/17/2017 + +![alt text](https://github.com/mgerb/ps-launcher/blob/master/docs/images/prototype1.PNG?raw=true "Logo Title Text 1") diff --git a/app/Wrapper.tsx b/app/Wrapper.tsx deleted file mode 100644 index e3aa401..0000000 --- a/app/Wrapper.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { BrowserRouter, Route, Switch } from 'react-router-dom'; - -import { Header } from './components/Header'; -import Home from './pages/Home/Home'; - -// styling -import './scss/index.scss'; - -interface Props {} - -interface State {} - -export default class Wrapper extends React.Component { - constructor(props: Props) { - super(props); - } - - public render() { - return ( - -
-
- - {/* */} - - -
-
- ); - } -} diff --git a/app/Wrapper/Wrapper.scss b/app/Wrapper/Wrapper.scss new file mode 100644 index 0000000..e33da2f --- /dev/null +++ b/app/Wrapper/Wrapper.scss @@ -0,0 +1,5 @@ +.wrapper { + display: flex; + flex-direction: column; + height: 100%; +} diff --git a/app/Wrapper/Wrapper.tsx b/app/Wrapper/Wrapper.tsx new file mode 100644 index 0000000..0b15ccc --- /dev/null +++ b/app/Wrapper/Wrapper.tsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { Provider } from 'mobx-react'; +import AppState from '../state/AppState'; +import { Content, Header, ServerList, SubHeader } from '../components'; + +import './Wrapper.scss'; + +const stores = { AppState }; + +export class Wrapper extends React.Component { + + public render(): any { + return ( + +
+
+ +
+ + +
+
+
+ ); + } +} diff --git a/app/app.tsx b/app/app.tsx index 56edf03..80fe4ab 100644 --- a/app/app.tsx +++ b/app/app.tsx @@ -1,6 +1,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import Wrapper from './Wrapper'; +import { Wrapper } from './Wrapper/Wrapper'; import 'babel-polyfill'; +// base styling +import './scss/index.scss'; + ReactDOM.render(, document.getElementById('app')); diff --git a/app/components/Content/Content.scss b/app/components/Content/Content.scss new file mode 100644 index 0000000..782c2b2 --- /dev/null +++ b/app/components/Content/Content.scss @@ -0,0 +1,36 @@ +@import '../../scss/variables'; + +.content { + flex: 1; + + .path-container { + display: flex; + } + + .content-button { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + background: $blue; + transition: background 0.2s; + outline: none; + padding: 0 15px; + + &:hover { + background: darken($blue, 5%); + } + } + + .content-input { + flex: 1; + background: darken($dark-blue, 3%); + border: none; + color: $blue--lighter; + padding: 5px; + + &::-webkit-input-placeholder { + color: $dark-blue--2; + } + } +} diff --git a/app/components/Content/Content.tsx b/app/components/Content/Content.tsx new file mode 100644 index 0000000..f61c42d --- /dev/null +++ b/app/components/Content/Content.tsx @@ -0,0 +1,86 @@ +import React from 'react'; +// import fs from 'fs'; +// import { exec } from 'child_process'; +import { inject, observer } from 'mobx-react'; +import * as _ from 'lodash'; +import { AppState } from '../../state/AppState'; + +import './Content.scss'; + +interface Props { + AppState?: AppState; +} + +@inject('AppState') +@observer +export class Content extends React.Component { + constructor() { + super(); + this.state = { + path: '', + }; + } + + // private async startGame(): Promise { + // const { path } = this.state; + + // // set the realm list + // await this.setRealmList(); + + // // launch wow + // exec(`"${path}/WoW.exe"`, (err, output) => { + // console.log(err); + // console.log(output); + // }); + // } + + // private setRealmList(): Promise { + // const { path } = this.state; + + // return new Promise((resolve, reject) => { + // fs.writeFile(`${path}/realmlist.wtf`, 'set realmlist logon.elysium-project.org', err => { + // err ? reject(err) : resolve(); + // }); + // }); + // } + + private onFolderSelect(e: React.ChangeEvent): void { + const path: string = _.get(e, `target.files[0].path`); + + if (path) { + this.props.AppState.setDirectory(path); + } + } + + private onInputChange(e: any): void { + this.props.AppState.setDirectory(e.target.value); + } + + public render(): any { + const { selectedExpansion } = this.props.AppState; + + return ( +
+
+ + + +
+
+ ); + } +} diff --git a/app/components/Header/Header.scss b/app/components/Header/Header.scss index 06900b6..ad3b8d3 100644 --- a/app/components/Header/Header.scss +++ b/app/components/Header/Header.scss @@ -1,11 +1,12 @@ @import '../../scss/variables.scss'; .header { - background: $dark-blue--1; + background: $dark-blue--2; display: flex; align-items: center; - height: 40px; + height: 30px; padding: 0 10px; + border-bottom: 1px solid $dark-blue--3; } .header__draggable-region { diff --git a/app/components/Header/Header.tsx b/app/components/Header/Header.tsx index f119e6e..0e6cf69 100644 --- a/app/components/Header/Header.tsx +++ b/app/components/Header/Header.tsx @@ -1,14 +1,26 @@ import { remote } from 'electron'; import React from 'react'; +import { observer, inject } from 'mobx-react'; +import { AppState } from '../../state/AppState'; import './Header.scss'; -export class Header extends React.Component { +interface Props { + AppState?: AppState; +} - exit() { +@inject('AppState') +@observer +export class Header extends React.Component { + + constructor(props: Props) { + super(props); + } + + private exit(): void { window.close(); } - maximize() { + private maximize(): void { if (remote.getCurrentWindow().isMaximized()) { remote.getCurrentWindow().restore(); } else { @@ -16,14 +28,14 @@ export class Header extends React.Component { } } - minimize() { + private minimize(): void { remote.getCurrentWindow().minimize(); } - render() { + public render(): any { return (
-
+
this.exit()}/> diff --git a/app/components/Header/index.ts b/app/components/Header/index.ts deleted file mode 100644 index 266dec8..0000000 --- a/app/components/Header/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Header'; diff --git a/app/components/ServerList/ServerList.scss b/app/components/ServerList/ServerList.scss new file mode 100644 index 0000000..b7fc0b2 --- /dev/null +++ b/app/components/ServerList/ServerList.scss @@ -0,0 +1,7 @@ +@import '../../scss/variables.scss'; + +.server-list { + background: darken($dark-blue, 1%); + width: 200px; + border-right: 1px solid $dark-blue--3; +} diff --git a/app/components/ServerList/ServerList.tsx b/app/components/ServerList/ServerList.tsx new file mode 100644 index 0000000..e6ef587 --- /dev/null +++ b/app/components/ServerList/ServerList.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import { inject, observer } from 'mobx-react'; +import { AppState } from '../../state/AppState'; + +import './ServerList.scss'; + +interface Props { + AppState?: AppState; +} + +@inject('AppState') +@observer +export class ServerList extends React.Component { + + constructor(props: Props) { + super(props); + } + + public render(): any { + return ( +
Server list
+ ); + } +} diff --git a/app/components/SubHeader/SubHeader.scss b/app/components/SubHeader/SubHeader.scss new file mode 100644 index 0000000..bd09ead --- /dev/null +++ b/app/components/SubHeader/SubHeader.scss @@ -0,0 +1,22 @@ +@import '../../scss/variables.scss'; + +.sub-header { + background: $dark-blue--1; + border-bottom: 1px solid $dark-blue--3; + display: flex; + height: 100px; + overflow: auto; + + .sub-header__item { + width: 100px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + + &:hover, &.selected { + background: $dark-blue--3; + } + + } +} diff --git a/app/components/SubHeader/SubHeader.tsx b/app/components/SubHeader/SubHeader.tsx new file mode 100644 index 0000000..a6bcfb7 --- /dev/null +++ b/app/components/SubHeader/SubHeader.tsx @@ -0,0 +1,45 @@ +import React from 'react'; +import { inject, observer } from 'mobx-react'; +import * as _ from 'lodash'; +import { AppState } from '../../state/AppState'; + +import './SubHeader.scss'; + +interface Props { + AppState?: AppState; +} + +@inject('AppState') +@observer +export class SubHeader extends React.Component { + constructor(props: Props) { + super(props); + } + + public componentDidMount(): void { + this.renderItems(); + } + + private selectExpansion(exp: string): void { + this.props.AppState.setSelectedExpansion(exp); + } + + private renderItems(): any { + const { selectedExpKey } = this.props.AppState; + return _.map(this.props.AppState.expansions, (exp, key) => { + return ( +
this.selectExpansion(key)}> +
{exp.name}
+
+ ); + }); + } + + public render(): any { + return ( +
+ {this.renderItems()} +
+ ); + } +} diff --git a/app/components/index.ts b/app/components/index.ts new file mode 100644 index 0000000..0e0ffeb --- /dev/null +++ b/app/components/index.ts @@ -0,0 +1,4 @@ +export * from './Content/Content'; +export * from './Header/Header'; +export * from './ServerList/ServerList'; +export * from './SubHeader/SubHeader'; diff --git a/app/pages/Home/Home.scss b/app/pages/Home/Home.scss deleted file mode 100644 index c6e73a8..0000000 --- a/app/pages/Home/Home.scss +++ /dev/null @@ -1,3 +0,0 @@ -.Home { - padding: 10px; -} diff --git a/app/pages/Home/Home.tsx b/app/pages/Home/Home.tsx deleted file mode 100644 index 867e4ff..0000000 --- a/app/pages/Home/Home.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import * as _ from 'lodash'; -import fs from 'fs'; -import { exec } from 'child_process'; -import React from 'react'; -import { RouteComponentProps } from 'react-router-dom'; - -import './Home.scss'; - -interface Props extends RouteComponentProps {} - -interface State { - path: string; -} - -export default class Home extends React.Component { - constructor() { - super(); - this.state = { - path: '', - }; - } - - onFolderSelect(e: React.ChangeEvent) { - const path: string = _.get(e, `target.files[0].path`); - - if (path) { - this.setState({ path }); - } - } - - async startGame() { - const { path } = this.state; - - // set the realm list - await this.setRealmList(); - - // launch wow - exec(`"${path}/WoW.exe"`, (err, output) => { - console.log(err); - console.log(output); - }); - } - - setRealmList(): Promise { - const { path } = this.state; - - return new Promise((resolve, reject) => { - fs.writeFile(`${path}/realmlist.wtf`, 'set realmlist logon.elysium-project.org', err => { - err ? reject(err) : resolve(); - }); - }); - } - - render() { - const { path } = this.state; - - return ( -
-
{path}
- {/* hacky way of adding webkitdirectory to the input */} - -
- -
-
- ); - } -} diff --git a/app/pages/NotFound/NotFound.scss b/app/pages/NotFound/NotFound.scss deleted file mode 100644 index aaddd22..0000000 --- a/app/pages/NotFound/NotFound.scss +++ /dev/null @@ -1,5 +0,0 @@ -.NotFound { - font-size: 20px; - text-align: center; - padding-top: 200px; -} diff --git a/app/pages/NotFound/NotFound.tsx b/app/pages/NotFound/NotFound.tsx deleted file mode 100644 index 55f8cdc..0000000 --- a/app/pages/NotFound/NotFound.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { RouteComponentProps } from 'react-router-dom'; - -import './NotFound.scss'; - -interface Props extends RouteComponentProps {} - -interface State {} - -export default class NotFound extends React.Component { - constructor(props: Props) { - super(props); - } - - render() { - return
404 Not Found
; - } -} diff --git a/app/scss/style.scss b/app/scss/style.scss index 09a13cd..1930ec2 100644 --- a/app/scss/style.scss +++ b/app/scss/style.scss @@ -1,9 +1,15 @@ +* { + &:focus { + outline: 0; + } +} + html { font-family: 'Roboto Condensed', sans-serif; } body { - color: $light-blue; + color: $white; background-color: $dark-blue; } diff --git a/app/scss/variables.scss b/app/scss/variables.scss index 9f4f841..c6b6f9c 100644 --- a/app/scss/variables.scss +++ b/app/scss/variables.scss @@ -2,9 +2,9 @@ $dark-blue: #1d2938; $dark-blue--1: lighten(#1d2938, 5%); $dark-blue--2: lighten(#1d2938, 10%); +$dark-blue--3: lighten(#1d2938, 15%); $blue: #258de5; $blue--lighter: saturate(lighten($blue, 10%), 100%); $green: #39ce83; -$light-blue: #e9eef2; $red: #e95779; -$white: #fff; +$white: darken(#e9eef2, 10%); diff --git a/app/state/AppState.ts b/app/state/AppState.ts new file mode 100644 index 0000000..693ae72 --- /dev/null +++ b/app/state/AppState.ts @@ -0,0 +1,81 @@ +import { action, computed, observable, runInAction } from 'mobx'; +import fs from 'fs'; + +export interface ExpansionType { + name: string; + servers: ServerType[]; + directory?: string; +} + +export interface ServerType { + name: string; + realmlist: string; + website: string; +} + +export class AppState { + + constructor() { + this.bootstrap(); + } + + @action + private bootstrap(): void { + fs.readFile('./servers.json', (err, data) => { + if (!err) { + runInAction(() => { + this.expansions = JSON.parse(data.toString()) as any; + }); + } + }); + } + + @observable + public expansions: { [key: string]: ExpansionType } = { + vanilla: { + name: 'Vanilla', + servers: [], + directory: '', + }, + bc: { + name: 'Burning Crusade', + servers: [], + directory: '', + }, + wotlk: { + name: 'Wrath of the Lich King', + servers: [], + directory: '', + }, + }; + + @observable + public selectedExpKey: string = 'vanilla'; + + @computed + public get selectedExpansion(): ExpansionType { + return this.expansions[this.selectedExpKey]; + } + + @action + public setSelectedExpansion(exp: string): void { + this.selectedExpKey = exp; + } + + @action + public setDirectory(dir: string): void { + this.expansions[this.selectedExpKey].directory = dir; + this.updateFile(this.expansions); + } + + private updateFile(exp: any): Promise { + return new Promise((resolve, reject) => { + fs.writeFile('./servers.json', JSON.stringify(exp, null, 2), {}, (err) => { + err ? reject(err) : resolve(); + }); + }); + } + +} + +export default new AppState(); diff --git a/docs/images/prototype1.PNG b/docs/images/prototype1.PNG new file mode 100644 index 0000000000000000000000000000000000000000..17ef6a1ba801c5ed1dfbd38827878351b1edd9d4 GIT binary patch literal 15703 zcmeHud03L`x;G7LE>j#(n$rZS)k@8Y z(h_Gf6$eCCrC2$TlH!O3DFG@GA}RvswPEjl&OYb6_8;GMeS4p8|Do6WKEChs-p@V! z?%#bsk15C8oK`L0xEurmtvYhp;a3o72>}FJoUZmgFwz;k2lx$I6!ojqK~P2KCO&Yp z6mh`y00>lxUon5?JK+9@^M}2oKp^$!3qOlmBZ|&}Kz8Ft91fg_g-#5|Q8t~Veu!jW zljW2;ty_QW{LlC$X+N^AnC-g1Wy|s{-yb;OaPRKVKmWLL@#2iVKdn5Hxp?VfogdGr ztvRf{xXAkZO_On**{5nTJ;iPl?3#p$+?rn+?l24pMwC#2pkkGKlefkA$EQ^MVL*__ zkLHCil}U;_a7`|<8kwieECqr5+vb4Lo!~_vP~Q_MMuF#OfjTuM=VC z-GO0jRUM}2W7?{h7A<^Vd$9-ZWwEgV`20+L_Oq&9wby~My(J*~xsu4itP+dRJWaqb zARiyS1f*oZC3^PtM#ARBQ=vrs3dWBMDg}YHYGCP^!3yb-4P0K1tB-W4BKb~ueXp`3cl4P`=?VMx)+?M1XUi7_p>eQL%< z-0w-7Cr&Y8e)|L2weHqca}_4pRp;BMif5+0(p*?W@i3djUW*>#oPuLJ0VBWBPteP% zm~U4OCi4@bmzX^nAKN|!cLST0pO(p|rsina70;?n znwsYFxYqlK?uS&SL%)l42%{-lQ1>bl>{iU|`=s)==A>rj8^RI5RbM-P_Av{;0gidI z8jISN=e8ol&NR?QGgaH?<7+Pe=}88Wq4zPDJ(XHfzsLU5n^b;U3;vN@KhbicUQ`<| zsh}w??L1}ZD-8CKdeV6gG!s|A@h`qy^V#iOGknpVKGpg0_Qzj4ZB(cOwH7z$N-4YS{eb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ebd@ZSs?!Y+mpud&<>jus(rl))AdO=o>k_n%)#1lC(^7k9pTz;s`7XBe%dG(oPr} zz{5o-IJT1J(IXnPU45h~eIHbYBtpq@+nBRiUL8WMw(x<@%z$MIb@IFtC8N|+XA;3b z>Ak7sOP8wjP7LZ(d9o60bpiqEm;Aue6&sj~E)uWI%cit=f+geUqF{SAG0+;Z?iP zN}p@neTWFl8}q{CWgDOFs|~AZ|NX*5dlVBm2U!ed(B_9O9IfdrM7ozzhU13|1@`fB z(<7Cla?$W`tA~xKCYUyuQ4HZ`IaRnL2;g0Q6fva)%(^PHlqMFMjv$AD58P<18InRR-A@lE6_uLBFy>9bH4!Lf#Cp)I>Xa-v9$JaA58EX3^WSa%qG%$B^{%+N3 zSJ8~%QSd08RbxarZC|;}`0%pv*n_#+yw};PNlw4LTQk{o*&;j*3n=%@o`w(6szFEGw#(~7-B4m zR&Hr}j?yYz;YAm=GOrO`8arIuOpZ$CFcrI9A%bxxezF)=%g5lwqI%Ap+sC{o*5xmZ zZ9ga)Bn@pbEMa(6ME%`Vrd9$0Q+7AX;gp>)(-+VmVp@?!tdneA`DwHJs?!)&(UMxPKO@92i-WTzX$ZiiD7lji8h zTRk~Ea=;@0Ezw53!`k_VutaH3$qx8=b4R-Z^O0CCZc4RiDL7|ntI?+f;9n&{M-I6; JR2=lb{2#c7Ztnm9 literal 0 HcmV?d00001 diff --git a/index.html b/index.html index 91ce24c..551506e 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -
+
diff --git a/package.json b/package.json index 724f672..358c90e 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,13 @@ "font-awesome": "^4.7.0", "html-webpack-plugin": "^2.24.1", "lodash": "^4.17.4", + "mobx": "^3.3.1", + "mobx-react": "^4.3.3", "node-sass": "^4.5.3", "normalize.css": "^7.0.0", "prettier": "^1.7.4", "react": "^16.0.0", "react-dom": "^16.0.0", - "react-router-dom": "^4.2.2", "sass-loader": "^6.0.6", "style-loader": "^0.19.0", "ts-loader": "^2.0.3", diff --git a/servers.json b/servers.json new file mode 100644 index 0000000..dbe4508 --- /dev/null +++ b/servers.json @@ -0,0 +1,28 @@ +{ + "vanilla": { + "name": "Vanilla", + "servers": [ + { + "name": "Elysium", + "realmlist": "", + "website": "" + }, + { + "name": "Kronos", + "realmlist": "", + "website": "" + } + ], + "directory": "" + }, + "bc": { + "name": "Burning Crusade", + "servers": [], + "directory": "" + }, + "wotlk": { + "name": "Wrath of the Lich King", + "servers": [], + "directory": "" + } +} diff --git a/tsconfig.json b/tsconfig.json index a4c574f..22ce3e8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "experimentalDecorators": true, "target": "es6", "module": "es6", "moduleResolution": "node", @@ -7,7 +8,7 @@ "allowSyntheticDefaultImports": true, "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": true, + "strictNullChecks": false, "preserveConstEnums": true, "allowJs": false, "sourceMap": true, diff --git a/tslint.json b/tslint.json index 0e6a62d..131a362 100644 --- a/tslint.json +++ b/tslint.json @@ -1,6 +1,9 @@ { "extends": "tslint-config-airbnb", "rules": { + "member-access": true, + "typedef": [true, "call-signature", "member-variable-declaration"], + "quotemark": [true, "single", "jsx-double"], "align": false, "ter-arrow-parens": false, "import-name": false, diff --git a/yarn.lock b/yarn.lock index 9ba67ad..4d4b683 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2564,16 +2564,6 @@ he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" -history@^4.7.2: - version "4.7.2" - resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" - dependencies: - invariant "^2.2.1" - loose-envify "^1.2.0" - resolve-pathname "^2.2.0" - value-equal "^0.4.0" - warning "^3.0.0" - hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -2590,7 +2580,7 @@ hoek@4.x.x: version "4.2.0" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d" -hoist-non-react-statics@^2.3.0: +hoist-non-react-statics@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" @@ -2777,7 +2767,7 @@ interpret@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0" -invariant@^2.2.1, invariant@^2.2.2: +invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -3193,7 +3183,7 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: @@ -3372,6 +3362,16 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" +mobx-react@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/mobx-react/-/mobx-react-4.3.3.tgz#4ad76c03d1e942b431e942f9ea18df0756771655" + dependencies: + hoist-non-react-statics "^2.3.1" + +mobx@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/mobx/-/mobx-3.3.1.tgz#c38fc1a287a0dda3f5d4b85efe1137fedd9dcdf0" + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -3778,12 +3778,6 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" -path-to-regexp@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" - dependencies: - isarray "0.0.1" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -4149,7 +4143,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@^15.5.4, prop-types@^15.6.0: +prop-types@^15.6.0: version "15.6.0" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" dependencies: @@ -4269,29 +4263,6 @@ react-dom@^16.0.0: object-assign "^4.1.1" prop-types "^15.6.0" -react-router-dom@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.2.2.tgz#c8a81df3adc58bba8a76782e946cbd4eae649b8d" - dependencies: - history "^4.7.2" - invariant "^2.2.2" - loose-envify "^1.3.1" - prop-types "^15.5.4" - react-router "^4.2.0" - warning "^3.0.0" - -react-router@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986" - dependencies: - history "^4.7.2" - hoist-non-react-statics "^2.3.0" - invariant "^2.2.2" - loose-envify "^1.3.1" - path-to-regexp "^1.7.0" - prop-types "^15.5.4" - warning "^3.0.0" - react@^16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d" @@ -4541,10 +4512,6 @@ requires-port@1.0.x, requires-port@1.x.x: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" -resolve-pathname@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" - resolve@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" @@ -5295,10 +5262,6 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -value-equal@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" - vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -5327,12 +5290,6 @@ vrsource-tslint-rules@^5.1.0: dependencies: tslint "~5.1.0" -warning@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" - dependencies: - loose-envify "^1.0.0" - watchpack@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac"