Skip to content

Commit 016f36f

Browse files
authored
Merge pull request #249 from thingsdb/packages
update packages
2 parents ef5db34 + 2543f96 commit 016f36f

File tree

31 files changed

+4944
-3653
lines changed

31 files changed

+4944
-3653
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/thingsdb/ThingsGUI
33
go 1.16
44

55
require (
6-
github.com/gomodule/redigo v2.0.0+incompatible // indirect
6+
github.com/gomodule/redigo v1.8.9 // indirect
77
github.com/googollee/go-socket.io v1.6.2
88
github.com/joho/godotenv v1.3.0
99
github.com/thingsdb/go-thingsdb v1.0.5

go.sum

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
44
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
55
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
66
github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
7-
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
8-
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
7+
github.com/gomodule/redigo v1.8.9 h1:Sl3u+2BI/kk+VEatbj0scLdrFhjPmbxOc1myhDP41ws=
8+
github.com/gomodule/redigo v1.8.9/go.mod h1:7ArFNvsTjH8GMMzB4uy1snslv2BwmginuMs06a1uzZE=
99
github.com/googollee/go-socket.io v1.6.2 h1:olKLLHJtHz1IkL/OrTyNriZZvVQYEORNkJAqsOwPask=
1010
github.com/googollee/go-socket.io v1.6.2/go.mod h1:0vGP8/dXR9SZUMMD4+xxaGo/lohOw3YWMh2WRiWeKxg=
1111
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
@@ -19,8 +19,9 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
1919
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2020
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2121
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
22-
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
2322
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
23+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
24+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
2425
github.com/thingsdb/go-thingsdb v1.0.5 h1:NlziF5sOV2m7XlbLqO1WgbmnVPGnkK8qkp2iL+1hYMI=
2526
github.com/thingsdb/go-thingsdb v1.0.5/go.mod h1:Oht1v/Vj/SqDw+gVdTRiIDFRMqC21yh9/F7/vVMe4sE=
2627
github.com/vmihailenco/msgpack/v5 v5.3.4 h1:qMKAwOV+meBw2Y8k9cVwAy7qErtYCwBzZ2ellBfvnqc=

react/.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ module.exports = {
6969
'react/sort-comp': [0],
7070
'react/sort-prop-types': [0],
7171
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
72-
'react-hooks/exhaustive-deps': 'warn' // Checks effect dependencies
72+
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
73+
'react/jsx-no-leaked-render': [0],
7374
}
7475
};

react/package-lock.json

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

react/package.json

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "things-gui",
3-
"version": "1.2.2",
3+
"version": "1.3.0",
44
"description": "ThingsGUI",
55
"main": "index.js",
66
"repository": {
@@ -17,55 +17,55 @@
1717
},
1818
"author": "",
1919
"dependencies": {
20-
"@babel/cli": "7.17.10",
21-
"@babel/core": "7.17.12",
22-
"@babel/plugin-proposal-class-properties": "7.17.12",
20+
"@babel/cli": "7.21.0",
21+
"@babel/core": "7.21.4",
22+
"@babel/plugin-proposal-class-properties": "7.18.6",
2323
"@babel/plugin-syntax-dynamic-import": "7.8.3",
2424
"@babel/plugin-syntax-object-rest-spread": "7.8.3",
25-
"@babel/plugin-transform-object-assign": "7.16.7",
26-
"@babel/plugin-transform-runtime": "7.17.12",
25+
"@babel/plugin-transform-object-assign": "7.18.6",
26+
"@babel/plugin-transform-runtime": "7.21.4",
2727
"@babel/polyfill": "7.12.1",
28-
"@babel/preset-env": "7.17.12",
29-
"@babel/preset-react": "7.17.12",
30-
"@babel/register": "7.17.7",
31-
"@babel/runtime": "7.17.9",
32-
"@emotion/react": "11.9.0",
33-
"@emotion/styled": "11.8.1",
34-
"@mui/icons-material": "5.8.0",
35-
"@mui/lab": "5.0.0-alpha.82",
36-
"@mui/material": "5.8.0",
37-
"babel-loader": "8.2.5",
28+
"@babel/preset-env": "7.21.4",
29+
"@babel/preset-react": "7.18.6",
30+
"@babel/register": "7.21.0",
31+
"@babel/runtime": "7.21.0",
32+
"@emotion/react": "11.10.6",
33+
"@emotion/styled": "11.10.6",
34+
"@mui/icons-material": "5.11.16",
35+
"@mui/lab": "5.0.0-alpha.125",
36+
"@mui/material": "5.11.16",
37+
"babel-loader": "9.1.2",
3838
"css-loader": "5.2.7",
39-
"deep-equal": "2.0.5",
39+
"deep-equal": "2.2.0",
4040
"file-loader": "6.2.0",
4141
"moment": "2.29.4",
42-
"monaco-editor": "0.33.0",
42+
"monaco-editor": "0.37.1",
4343
"monaco-editor-webpack-plugin": "7.0.1",
44-
"npm": "8.11.0",
44+
"npm": "9.6.4",
4545
"path-browserify": "1.0.1",
4646
"prop-types": "15.8.1",
47-
"react": "17.0.2",
48-
"react-dom": "17.0.2",
47+
"react": "18.2.0",
48+
"react-dom": "18.2.0",
4949
"react-draggable": "4.4.5",
50-
"react-dropzone": "14.2.1",
50+
"react-dropzone": "14.2.3",
5151
"react-helmet": "6.1.0",
52-
"react-router-dom": "6.3.0",
52+
"react-router-dom": "6.10.0",
5353
"socket.io": "2.5.0",
5454
"socket.io-client": "2.4.0",
55-
"style-loader": "3.3.1",
56-
"terser": "5.14.2",
57-
"terser-webpack-plugin": "5.3.1",
58-
"vis-network": "^9.1.2",
59-
"vlow": "1.1.14",
60-
"webpack": "5.76.0",
61-
"webpack-bundle-analyzer": "4.5.0",
62-
"webpack-cli": "4.9.2"
55+
"style-loader": "3.3.2",
56+
"terser": "5.16.9",
57+
"terser-webpack-plugin": "5.3.7",
58+
"vis-network": "9.1.6",
59+
"vlow": "1.1.16",
60+
"webpack": "5.78.0",
61+
"webpack-bundle-analyzer": "4.8.0",
62+
"webpack-cli": "5.0.1"
6363
},
6464
"devDependencies": {
65-
"@babel/eslint-parser": "7.17.0",
66-
"eslint": "8.10.0",
67-
"eslint-plugin-react": "7.29.4",
68-
"eslint-plugin-react-hooks": "4.5.0",
65+
"@babel/eslint-parser": "7.21.3",
66+
"eslint": "8.38.0",
67+
"eslint-plugin-react": "7.32.2",
68+
"eslint-plugin-react-hooks": "4.6.0",
6969
"moment-locales-webpack-plugin": "1.2.0"
7070
}
7171
}

react/src/Components/Collections/Config/Export.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ const Label = styled(Typography)(({ theme }) => ({
4040
const tag = ExportCollectionTAG;
4141

4242
const Export = ({collection}) => {
43-
// to prevent update of name to undefined, after it is deleted.
44-
const [name] = React.useState(collection.name); // eslint-disable-line
4543
const [show, setShow] = React.useState(false);
4644
const [script, setScript] = React.useState('');
45+
const name = collection.name;
4746

4847
const handleClickOpen = () => {
4948
CollectionActions.query(
50-
`${COLLECTION_SCOPE}:${collection.name}`, EXPORT_QUERY, tag, setScript
49+
`${COLLECTION_SCOPE}:${name}`, EXPORT_QUERY, tag, setScript
5150
);
5251
setShow(true);
5352
};
@@ -63,7 +62,7 @@ const Export = ({collection}) => {
6362
{'View setup script'}
6463
</Button>
6564
}
66-
title={`View the setup script of ${name}.`}
65+
title={name ? `View the setup script of '${name}'.` : ''}
6766
open={show}
6867
onClose={handleClickClose}
6968
maxWidth="md"

react/src/Components/Collections/Config/Remove.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ const tag = RemoveCollectionTAG;
1313
const Remove = ({collection}) => {
1414
let navigate = useNavigate();
1515
let location = useLocation();
16-
17-
//to prevent update of name to undefined, after it is deleted.
18-
const [name] = React.useState(collection.name); // eslint-disable-line
16+
const name = collection.name;
1917

2018
const handleClickOk = () => {
2119
ThingsdbActions.removeCollection(
22-
collection.name,
20+
name,
2321
tag,
2422
() => historyNavigate(navigate, location, '/'),
2523
);
@@ -32,7 +30,7 @@ const Remove = ({collection}) => {
3230
buttonProps={{variant: 'outlined', color: 'primary'}}
3331
onSubmit={handleClickOk}
3432
tag={tag}
35-
title={`Remove '${name}'`}
33+
title={name ? `Remove '${name}'` : ''}
3634
/>
3735
);
3836
};

react/src/Components/Collections/Config/Rename.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Rename = ({collection, collections}) => {
5151
};
5252

5353
const handleClickClose = () => {
54-
setState({...state, show: false});
54+
setState(state => ({...state, show: false}));
5555
};
5656

5757
const handleOnChange = ({target}) => {
@@ -64,13 +64,16 @@ const Rename = ({collection, collections}) => {
6464

6565
const handleClickOk = () => {
6666
const err = Object.keys(validation).reduce((d, ky) => { d[ky] = validation[ky](form, collections); return d; }, {});
67-
setState({...state, errors: err});
67+
setState(state => ({...state, errors: err}));
6868
if (!Object.values(err).some(d => Boolean(d))) {
6969
ThingsdbActions.renameCollection(
7070
collection.name,
7171
form.name,
7272
tag,
73-
() => historyNavigate(navigate, location, `/${COLLECTION_ROUTE}/${form.name}`)
73+
() => {
74+
setState(state => ({...state, show: false}));
75+
historyNavigate(navigate, location, `/${COLLECTION_ROUTE}/${form.name}`);
76+
}
7477
);
7578
}
7679
};

react/src/Components/Collections/EnumsTypes/Utils/AddEditProperty/Wpo.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ const Wpo = ({onChange, input, disabled}) => {
5454
};
5555

5656
Wpo.defaultProps = {
57-
onChange: ()=>null,
58-
input: false,
5957
disabled: false,
58+
input: false,
59+
onChange: ()=>null,
6060
};
6161

6262
Wpo.propTypes = {
63-
onChange: PropTypes.func,
64-
input: PropTypes.bool,
6563
disabled: PropTypes.bool,
64+
input: PropTypes.bool,
65+
onChange: PropTypes.func,
6666
};
6767

6868
export default Wpo;

react/src/Components/Collections/EnumsTypes/Utils/EditDialog.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ const EditDialog = ({dataTypes, category, getInfo, headers, item, link, onChange
198198
setAction('');
199199
setAnchorEl(null);
200200
setOldname(null);
201+
setState(initState);
201202
};
202203

203204
const handleClickOk = () => {
@@ -386,23 +387,23 @@ const EditDialog = ({dataTypes, category, getInfo, headers, item, link, onChange
386387
};
387388

388389
EditDialog.defaultProps = {
389-
item: {},
390390
dataTypes: [],
391+
item: {},
391392
onChangeItem: ()=>null,
392393
open: false,
393394
};
394395

395396
EditDialog.propTypes = {
396-
dataTypes: PropTypes.arrayOf(PropTypes.string),
397397
category: PropTypes.string.isRequired,
398+
dataTypes: PropTypes.arrayOf(PropTypes.string),
398399
getInfo: PropTypes.func.isRequired,
399400
headers: PropTypes.object.isRequired,
400401
item: PropTypes.object,
401402
link: PropTypes.string.isRequired,
402403
onChangeItem: PropTypes.func,
403404
onClose: PropTypes.func.isRequired,
404-
open: PropTypes.bool,
405405
onRename: PropTypes.func.isRequired,
406+
open: PropTypes.bool,
406407
queries: PropTypes.object.isRequired,
407408
rows: PropTypes.object.isRequired,
408409
scope: PropTypes.string.isRequired,

0 commit comments

Comments
 (0)