Skip to content

Commit c82e1cc

Browse files
committed
Update all the dependencies to the last version
1 parent a2fb4c3 commit c82e1cc

File tree

7 files changed

+4498
-1970
lines changed

7 files changed

+4498
-1970
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ node_modules
44
\.idea
55

66
# Ignore minimized output for now
7-
dist/app.min.js
7+
dist/app.min.js
8+
9+
# Avoid tracking generated files
10+
# In case of running `tsc` by mistake!
11+
dist/**/*.js
12+
dist/**/*.js.map

package-lock.json

Lines changed: 4210 additions & 1758 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@
1414
"build": "node ./node_modules/webpack/bin/webpack.js"
1515
},
1616
"dependencies": {
17-
"@types/chai": "^3.5.2",
18-
"@types/d3": "^4.9.0",
19-
"@types/jquery": "^2.0.41",
20-
"@types/loglevel": "^1.4.29",
21-
"@types/mocha": "^2.2.41",
22-
"@types/react": "^16.0.2",
23-
"@types/react-dom": "^15.5.2",
17+
"@types/chai": "^4.2.11",
18+
"@types/d3": "^5.7.2",
19+
"@types/jquery": "^3.3.36",
20+
"@types/loglevel": "^1.6.3",
21+
"@types/mocha": "^7.0.2",
22+
"@types/react": "^16.9.34",
23+
"@types/react-dom": "^16.9.7",
2424
"amd-loader": "^0.0.8",
25-
"chai": "^3.5.0",
26-
"immutability-helper": "^2.3.1",
27-
"loglevel": "^1.4.1",
28-
"mocha": "^5.2.0",
29-
"react": "^15.6.1",
30-
"react-dom": "^15.6.1",
31-
"ts-node": "^3.0.4",
32-
"typescript": "^2.5.2"
25+
"chai": "^4.2.0",
26+
"immutability-helper": "^3.0.2",
27+
"loglevel": "^1.6.8",
28+
"mocha": "^7.1.2",
29+
"react": "^16.13.1",
30+
"react-dom": "^16.13.1",
31+
"ts-node": "^8.9.1",
32+
"typescript": "^3.8.3"
3333
},
3434
"devDependencies": {
35-
"ts-loader": "^2.3.2",
36-
"webpack": "^3.5.1"
35+
"ts-loader": "^7.0.1",
36+
"webpack": "^4.43.0",
37+
"webpack-cli": "^3.3.11"
3738
}
3839
}

src/components/input.tsx

Lines changed: 85 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,94 @@ import * as React from "react";
33
import { NumericTextInput } from "./numeric_text_input";
44

55
export interface InputState {
6-
star_mass: number,
7-
planet_mass: number,
8-
planet_perihelion: number,
9-
planet_aphelion: number,
10-
day_duration: number,
11-
moon_mass: number,
12-
moon_perigee: number,
13-
moon_apogee: number
6+
star_mass: number;
7+
planet_mass: number;
8+
planet_perihelion: number;
9+
planet_aphelion: number;
10+
day_duration: number;
11+
moon_mass: number;
12+
moon_perigee: number;
13+
moon_apogee: number;
1414
}
1515

16-
export type GeneratorInputProps = InputState & { onClick: () => void, onChange: (id, value) => void }
16+
export type GeneratorInputProps = InputState & {
17+
onClick: () => void;
18+
onChange: (id, value) => void;
19+
};
1720

1821
export class GeneratorInput extends React.Component<GeneratorInputProps, {}> {
22+
constructor(props: GeneratorInputProps) {
23+
super(props);
24+
}
1925

20-
constructor(props: GeneratorInputProps) {
21-
super(props);
22-
this.props = props;
23-
}
26+
handleOnChange(id: string, new_value: number) {
27+
console.log(`Update input value for ${id} with value ${new_value}`);
28+
this.props.onChange(id, new_value);
29+
}
2430

25-
handleOnChange(id: string, new_value: number) {
26-
console.log(`Update input value for ${id} with value ${new_value}`);
27-
this.props.onChange(id, new_value);
28-
}
29-
30-
render() {
31-
return (
32-
<div id="input">
33-
<form id="formInputs">
34-
<NumericTextInput id="star_mass" label="Star Mass (Kg)" defaultValue={this.props.star_mass} onChange={(s,n) => this.handleOnChange(s,n)}/>
35-
<NumericTextInput id="planet_mass" label="Planet Mass (Kg)" defaultValue={this.props.planet_mass} onChange={(s,n) => this.handleOnChange(s,n)} />
36-
<NumericTextInput id="planet_perihelion" label="Planet Perihelion (Km)" defaultValue={this.props.planet_perihelion} onChange={(s,n) => this.handleOnChange(s,n)} />
37-
<NumericTextInput id="planet_aphelion" label="Planet Aphelion (Km)" defaultValue={this.props.planet_aphelion} onChange={(s,n) => this.handleOnChange(s,n)} />
38-
<NumericTextInput id="day_duration" label="Planet's Day Duration in Seconds" defaultValue={this.props.day_duration} onChange={(s,n) => this.handleOnChange(s,n)}/>
39-
<NumericTextInput id="moon_mass" label="Moon Mass (Kg)" defaultValue={this.props.moon_mass} onChange={(s,n) => this.handleOnChange(s,n)}/>
40-
<NumericTextInput id="moon_perigee" label="Moon Perigee (Km)" defaultValue={this.props.moon_perigee} onChange={(s,n) => this.handleOnChange(s,n)}/>
41-
<NumericTextInput id="moon_apogee" label="Moon Apogee (Kg)" defaultValue={this.props.moon_apogee} onChange={(s,n) => this.handleOnChange(s,n)} />
42-
<p><button id="generateButton" type="button" onClick={() => this.props.onClick() }>Generate</button></p>
43-
</form>
44-
</div>
45-
);
46-
}
47-
}
31+
render() {
32+
return (
33+
<div id="input">
34+
<form id="formInputs">
35+
<NumericTextInput
36+
id="star_mass"
37+
label="Star Mass (Kg)"
38+
defaultValue={this.props.star_mass}
39+
onChange={(s, n) => this.handleOnChange(s, n)}
40+
/>
41+
<NumericTextInput
42+
id="planet_mass"
43+
label="Planet Mass (Kg)"
44+
defaultValue={this.props.planet_mass}
45+
onChange={(s, n) => this.handleOnChange(s, n)}
46+
/>
47+
<NumericTextInput
48+
id="planet_perihelion"
49+
label="Planet Perihelion (Km)"
50+
defaultValue={this.props.planet_perihelion}
51+
onChange={(s, n) => this.handleOnChange(s, n)}
52+
/>
53+
<NumericTextInput
54+
id="planet_aphelion"
55+
label="Planet Aphelion (Km)"
56+
defaultValue={this.props.planet_aphelion}
57+
onChange={(s, n) => this.handleOnChange(s, n)}
58+
/>
59+
<NumericTextInput
60+
id="day_duration"
61+
label="Planet's Day Duration in Seconds"
62+
defaultValue={this.props.day_duration}
63+
onChange={(s, n) => this.handleOnChange(s, n)}
64+
/>
65+
<NumericTextInput
66+
id="moon_mass"
67+
label="Moon Mass (Kg)"
68+
defaultValue={this.props.moon_mass}
69+
onChange={(s, n) => this.handleOnChange(s, n)}
70+
/>
71+
<NumericTextInput
72+
id="moon_perigee"
73+
label="Moon Perigee (Km)"
74+
defaultValue={this.props.moon_perigee}
75+
onChange={(s, n) => this.handleOnChange(s, n)}
76+
/>
77+
<NumericTextInput
78+
id="moon_apogee"
79+
label="Moon Apogee (Kg)"
80+
defaultValue={this.props.moon_apogee}
81+
onChange={(s, n) => this.handleOnChange(s, n)}
82+
/>
83+
<p>
84+
<button
85+
id="generateButton"
86+
type="button"
87+
onClick={() => this.props.onClick()}
88+
>
89+
Generate
90+
</button>
91+
</p>
92+
</form>
93+
</div>
94+
);
95+
}
96+
}

0 commit comments

Comments
 (0)