Skip to content

Commit e945677

Browse files
committed
Dependencies upgrade + cleanups.
1 parent de1494c commit e945677

File tree

21 files changed

+276
-228
lines changed

21 files changed

+276
-228
lines changed

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,33 @@
1515
"npm": "6.9.0"
1616
},
1717
"dependencies": {
18-
"@nivo/bar": "^0.62.0",
19-
"@nivo/pie": "^0.62.0",
20-
"axios": "^0.20.0",
18+
"@khanacademy/react-multi-select": "^0.3.3",
19+
"@nivo/bar": "^0.65.1",
20+
"@nivo/core": "^0.65.0",
21+
"@nivo/pie": "^0.65.1",
22+
"axios": "^0.21.0",
2123
"moment": "^2.29.1",
2224
"node-sass": "^4.14.1",
2325
"numeral": "^2.0.6",
24-
"query-string": "~6.13.5",
25-
"react": "^16.13.1",
26-
"react-scripts": "^3.4.3",
27-
"react-dom": "^16.13.1",
28-
"react-datepicker": "^3.2.2",
29-
"react-dev-utils": "^10.2.1",
30-
"react-dropzone": "^11.2.0",
31-
"react-modal": "^3.11.2",
26+
"query-string": "~6.13.7",
27+
"react": "^17.0.1",
28+
"react-crud-icons": "^1.0.1",
29+
"react-datepicker": "^3.3.0",
30+
"react-dev-utils": "^11.0.1",
31+
"react-dom": "^17.0.1",
32+
"react-dropzone": "^11.2.4",
33+
"react-modal": "^3.12.1",
3234
"react-router-dom": "^5.2.0",
33-
"react-toastify": "^6.0.9",
34-
"react-crud-icons": "^0.1.3",
35-
"@khanacademy/react-multi-select": "^0.3.3",
36-
"underscore": "^1.11.0"
35+
"react-scripts": "^4.0.1",
36+
"react-toastify": "^6.1.0",
37+
"underscore": "^1.12.0"
3738
},
3839
"devDependencies": {
40+
"bootstrap-sass": "^3.4.1",
3941
"gulp": "^4.0.2",
4042
"gulp-header": "^2.0.9",
4143
"gulp-rename": "^2.0.0",
42-
"gulp-sass": "^4.1.0",
43-
"bootstrap-sass": "^3.4.1"
44+
"gulp-sass": "^4.1.0"
4445
},
4546
"scripts": {
4647
"start": "react-scripts start",

src/components/shell/GitHub.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
3+
export default class GitHub extends React.PureComponent {
4+
5+
render() {
6+
return <iframe title="GitHub" src="https://ghbtns.com/github-btn.html?user=evoluteur&amp;repo=evolutility-ui-react&amp;type=star&amp;count=true&amp;size=small" frameBorder="0" scrolling="0" width="100px" height="30px"></iframe>
7+
}
8+
}

src/components/shell/Nav.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Icon from "react-crud-icons";
44
import { i18n_nav } from '../../i18n/i18n';
55
import AppMenus from '../../AppMenus.js';
66
import url from '../../utils/url.js'
7-
7+
import GitHub from './GitHub'
88
import models from '../../models/all_models'
99

1010
import './Nav.scss';
@@ -129,6 +129,7 @@ export default class Nav extends React.Component {
129129
{footer}
130130
</div>
131131
<div id="afterNav"></div>
132+
<GitHub />
132133
</nav>
133134
);
134135
}

src/components/shell/Nav.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ $nav-trans-time: .1s;
2626
}
2727
.demos{
2828
margin-left: 20px;
29-
}
29+
}
30+
iframe{
31+
margin: 0 10px;
32+
}
33+
3034
a{
3135
text-decoration: none;
3236
&.active {
@@ -157,7 +161,8 @@ $nav-trans-time: .1s;
157161
transition: margin-left $nav-trans-time ease;
158162
padding: 10px 20px;
159163
//transition: margin-left 0.5s;
160-
margin-top: 50px;
164+
margin-top: 50px;
165+
min-height: 90%;
161166
}
162167
.navButtonHolder{
163168
margin:0;

src/components/shell/TopBar.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export default class TopBar extends React.Component {
6161
<Toolbar id={id} entity={e} view={vw} />
6262
</div>
6363
) : null}
64-
<iframe title="GitHub" src="https://ghbtns.com/github-btn.html?user=evoluteur&amp;repo=evolutility-ui-react&amp;type=star&amp;count=true&amp;size=small" frameBorder="0" scrolling="0" width="100px" height="30px"></iframe>
6564
</header>
6665
)
6766
}

src/components/views/charts/Chart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default class Chart extends React.Component {
9393
this.setState({
9494
error: {
9595
title: 'Server error',
96-
message: 'Couldn\'t retrieve charts data for field "'+fid+'" at '+url+'.'
96+
message: 'Couldn\'t retrieve charts data for field "'+fid+'".'
9797
},
9898
loading: false,
9999
})

src/components/views/charts/Charts.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
.chart-actions-left,
4040
.chart-actions-right {
4141
display: block;
42-
top: -32px;
42+
top: -40px;
4343
opacity: 100%;
4444
}
4545
&:hover {

src/components/views/doc/Api.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default class ApiDoc extends React.Component {
162162
data = this.state.data || null,
163163
getJSON = this.getJSON
164164
let idx, rootep = 'N/A'
165-
if(data){
165+
if(data && data.list){
166166
idx = data.list.lastIndexOf('/')
167167
rootep = data.list.substr(0, idx+1)
168168
}
@@ -319,7 +319,6 @@ export default class ApiDoc extends React.Component {
319319

320320
</div>
321321
)
322-
323322
}
324323

325324
renderCRUD = actions => (

src/components/views/many/List.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import PropTypes from 'prop-types'
1010
import { Link } from 'react-router-dom'
1111

1212
import {pageSize} from '../../../config'
13-
1413
import Many from './many'
15-
1614
import { isFieldMany, fieldIsNumber, fieldTypes as ft } from '../../../utils/dico'
1715
import { getSearchText } from '../../../utils/url'
1816
import { fieldValue } from '../../../utils/format'
@@ -198,7 +196,6 @@ export default class List extends Many {
198196
}
199197
return map
200198
}
201-
202199
}
203200

204201
List.propTypes = {
@@ -208,4 +205,8 @@ List.propTypes = {
208205
paramsCollec: PropTypes.object,
209206
isNested: PropTypes.bool,
210207
data: PropTypes.any,
211-
}
208+
}
209+
210+
List.defaultProps = {
211+
isNested: false,
212+
}

src/components/views/many/Stats.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import React from 'react'
1212
import axios from 'axios'
1313

1414
import { apiPath, wTimestamp, wComments } from '../../../config.js'
15+
import Icon from "react-crud-icons";
1516
import models from '../../../models/all_models'
1617
import { i18n_stats, i18n_comments } from '../../../i18n/i18n'
1718
import { fieldIsDateOrTime, fieldIsNumeric, fieldInCharts } from '../../../utils/dico'
@@ -169,7 +170,7 @@ export default class Stats extends React.Component {
169170
<label className="stat-label">
170171
{k.field.label}
171172
{k.chartable ? (
172-
<i id={k.field.id} onClick={this.toggleChart} className="glyphicon glyphicon-stats"/>
173+
<Icon id={k.field.id} onClick={this.toggleChart} name="bars" theme="light" size="small" />
173174
) : null }
174175
</label>
175176
<div className="stat-values">
@@ -230,7 +231,7 @@ export default class Stats extends React.Component {
230231
) : null }
231232
</div>
232233
<div className="col-2">
233-
{ wTimestamp ? (
234+
{ wTimestamp && (data.u_date_max!=='N/A' || data.c_date_min!=='N/A')? (
234235
<div>
235236
<div className="stat-field">
236237
<span>{i18n_stats.lastUpdate}:</span>

0 commit comments

Comments
 (0)