From 08641a6694d14e02bac426f14e03f3029c4396e8 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 16 Jul 2019 21:41:59 -0700 Subject: [PATCH] Update redux --- .../src/Components/Error/ErrorBoundary.js | 2 +- .../src/Components/Form/AutoSuggestInput.js | 2 +- .../Components/Form/EnhancedSelectInput.js | 2 +- frontend/src/Components/Form/TagInput.js | 2 +- frontend/src/Components/Form/TagInputInput.js | 2 +- frontend/src/Components/Menu/FilterMenu.js | 4 +-- .../Page/PageContentBodyConnector.js | 2 +- .../Page/Sidebar/PageSidebarItem.js | 2 +- .../Table/Cells/RelativeDateCell.js | 2 +- frontend/src/Components/Table/Table.js | 2 +- .../Table/TableOptions/TableOptionsModal.js | 2 +- .../Series/Index/SeriesIndexItemConnector.js | 2 +- .../Series/Index/Table/SeriesStatusCell.js | 2 +- package.json | 4 +-- yarn.lock | 30 ++++++++++++------- 15 files changed, 35 insertions(+), 27 deletions(-) diff --git a/frontend/src/Components/Error/ErrorBoundary.js b/frontend/src/Components/Error/ErrorBoundary.js index 50fcf98b5..87fb2498a 100644 --- a/frontend/src/Components/Error/ErrorBoundary.js +++ b/frontend/src/Components/Error/ErrorBoundary.js @@ -56,7 +56,7 @@ class ErrorBoundary extends Component { ErrorBoundary.propTypes = { children: PropTypes.node.isRequired, - errorComponent: PropTypes.func.isRequired + errorComponent: PropTypes.elementType.isRequired }; export default ErrorBoundary; diff --git a/frontend/src/Components/Form/AutoSuggestInput.js b/frontend/src/Components/Form/AutoSuggestInput.js index 07dd9ffcd..dd5833ee0 100644 --- a/frontend/src/Components/Form/AutoSuggestInput.js +++ b/frontend/src/Components/Form/AutoSuggestInput.js @@ -234,7 +234,7 @@ AutoSuggestInput.propTypes = { minHeight: PropTypes.number.isRequired, maxHeight: PropTypes.number.isRequired, getSuggestionValue: PropTypes.func.isRequired, - renderInputComponent: PropTypes.func, + renderInputComponent: PropTypes.elementType, renderSuggestion: PropTypes.func.isRequired, onInputChange: PropTypes.func, onInputKeyDown: PropTypes.func, diff --git a/frontend/src/Components/Form/EnhancedSelectInput.js b/frontend/src/Components/Form/EnhancedSelectInput.js index 214aae25d..87b799a1b 100644 --- a/frontend/src/Components/Form/EnhancedSelectInput.js +++ b/frontend/src/Components/Form/EnhancedSelectInput.js @@ -433,7 +433,7 @@ EnhancedSelectInput.propTypes = { hasWarning: PropTypes.bool, selectedValueOptions: PropTypes.object.isRequired, selectedValueComponent: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired, - optionComponent: PropTypes.func, + optionComponent: PropTypes.elementType, onChange: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/Form/TagInput.js b/frontend/src/Components/Form/TagInput.js index 5aeefd0f5..45d972631 100644 --- a/frontend/src/Components/Form/TagInput.js +++ b/frontend/src/Components/Form/TagInput.js @@ -260,7 +260,7 @@ TagInput.propTypes = { minQueryLength: PropTypes.number.isRequired, hasError: PropTypes.bool, hasWarning: PropTypes.bool, - tagComponent: PropTypes.func.isRequired, + tagComponent: PropTypes.elementType.isRequired, onTagAdd: PropTypes.func.isRequired, onTagDelete: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/Form/TagInputInput.js b/frontend/src/Components/Form/TagInputInput.js index 5bf73921b..3e28830e9 100644 --- a/frontend/src/Components/Form/TagInputInput.js +++ b/frontend/src/Components/Form/TagInputInput.js @@ -67,7 +67,7 @@ TagInputInput.propTypes = { inputProps: PropTypes.object.isRequired, kind: PropTypes.oneOf(kinds.all).isRequired, isFocused: PropTypes.bool.isRequired, - tagComponent: PropTypes.func.isRequired, + tagComponent: PropTypes.elementType.isRequired, onTagDelete: PropTypes.func.isRequired, onInputContainerPress: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/Menu/FilterMenu.js b/frontend/src/Components/Menu/FilterMenu.js index d37876c22..d989605e5 100644 --- a/frontend/src/Components/Menu/FilterMenu.js +++ b/frontend/src/Components/Menu/FilterMenu.js @@ -95,8 +95,8 @@ FilterMenu.propTypes = { selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, customFilters: PropTypes.arrayOf(PropTypes.object).isRequired, - buttonComponent: PropTypes.func.isRequired, - filterModalConnectorComponent: PropTypes.func, + buttonComponent: PropTypes.elementType.isRequired, + filterModalConnectorComponent: PropTypes.elementType, filterModalConnectorComponentProps: PropTypes.object, onFilterSelect: PropTypes.func.isRequired }; diff --git a/frontend/src/Components/Page/PageContentBodyConnector.js b/frontend/src/Components/Page/PageContentBodyConnector.js index b5cdfbb21..e864ea7eb 100644 --- a/frontend/src/Components/Page/PageContentBodyConnector.js +++ b/frontend/src/Components/Page/PageContentBodyConnector.js @@ -14,4 +14,4 @@ function createMapStateToProps() { ); } -export default connect(createMapStateToProps)(PageContentBody); +export default connect(createMapStateToProps, null, null, { forwardRef: true })(PageContentBody); diff --git a/frontend/src/Components/Page/Sidebar/PageSidebarItem.js b/frontend/src/Components/Page/Sidebar/PageSidebarItem.js index d494150c0..0bcc28cde 100644 --- a/frontend/src/Components/Page/Sidebar/PageSidebarItem.js +++ b/frontend/src/Components/Page/Sidebar/PageSidebarItem.js @@ -94,7 +94,7 @@ PageSidebarItem.propTypes = { isActiveParent: PropTypes.bool, isParentItem: PropTypes.bool.isRequired, isChildItem: PropTypes.bool.isRequired, - statusComponent: PropTypes.func, + statusComponent: PropTypes.elementType, children: PropTypes.node, onPress: PropTypes.func }; diff --git a/frontend/src/Components/Table/Cells/RelativeDateCell.js b/frontend/src/Components/Table/Cells/RelativeDateCell.js index d17bc4905..207b97752 100644 --- a/frontend/src/Components/Table/Cells/RelativeDateCell.js +++ b/frontend/src/Components/Table/Cells/RelativeDateCell.js @@ -53,7 +53,7 @@ RelativeDateCell.propTypes = { shortDateFormat: PropTypes.string.isRequired, longDateFormat: PropTypes.string.isRequired, timeFormat: PropTypes.string.isRequired, - component: PropTypes.func, + component: PropTypes.elementType, dispatch: PropTypes.func }; diff --git a/frontend/src/Components/Table/Table.js b/frontend/src/Components/Table/Table.js index 612d95b8c..2c33efd29 100644 --- a/frontend/src/Components/Table/Table.js +++ b/frontend/src/Components/Table/Table.js @@ -113,7 +113,7 @@ Table.propTypes = { className: PropTypes.string, selectAll: PropTypes.bool.isRequired, columns: PropTypes.arrayOf(PropTypes.object).isRequired, - optionsComponent: PropTypes.func, + optionsComponent: PropTypes.elementType, pageSize: PropTypes.number, canModifyColumns: PropTypes.bool, children: PropTypes.node, diff --git a/frontend/src/Components/Table/TableOptions/TableOptionsModal.js b/frontend/src/Components/Table/TableOptions/TableOptionsModal.js index f11499187..2a36668fe 100644 --- a/frontend/src/Components/Table/TableOptions/TableOptionsModal.js +++ b/frontend/src/Components/Table/TableOptions/TableOptionsModal.js @@ -248,7 +248,7 @@ TableOptionsModal.propTypes = { columns: PropTypes.arrayOf(PropTypes.object).isRequired, pageSize: PropTypes.number, canModifyColumns: PropTypes.bool.isRequired, - optionsComponent: PropTypes.func, + optionsComponent: PropTypes.elementType, onTableOptionChange: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; diff --git a/frontend/src/Series/Index/SeriesIndexItemConnector.js b/frontend/src/Series/Index/SeriesIndexItemConnector.js index 97a7971be..18cc06414 100644 --- a/frontend/src/Series/Index/SeriesIndexItemConnector.js +++ b/frontend/src/Series/Index/SeriesIndexItemConnector.js @@ -131,7 +131,7 @@ class SeriesIndexItemConnector extends Component { SeriesIndexItemConnector.propTypes = { id: PropTypes.number, - component: PropTypes.func.isRequired, + component: PropTypes.elementType.isRequired, dispatchExecuteCommand: PropTypes.func.isRequired }; diff --git a/frontend/src/Series/Index/Table/SeriesStatusCell.js b/frontend/src/Series/Index/Table/SeriesStatusCell.js index 44cd42f0e..279fb25cf 100644 --- a/frontend/src/Series/Index/Table/SeriesStatusCell.js +++ b/frontend/src/Series/Index/Table/SeriesStatusCell.js @@ -39,7 +39,7 @@ SeriesStatusCell.propTypes = { className: PropTypes.string.isRequired, monitored: PropTypes.bool.isRequired, status: PropTypes.string.isRequired, - component: PropTypes.func + component: PropTypes.elementType }; SeriesStatusCell.defaultProps = { diff --git a/package.json b/package.json index 0c58f2e0b..90f8fb06f 100644 --- a/package.json +++ b/package.json @@ -99,14 +99,14 @@ "react-lazyload": "2.6.2", "react-measure": "1.4.7", "react-popper": "1.3.3", - "react-redux": "6.0.1", + "react-redux": "7.1.0", "react-router": "5.0.1", "react-router-dom": "5.0.1", "react-slider": "0.11.2", "react-tabs": "3.0.0", "react-text-truncate": "0.14.1", "react-virtualized": "9.21.1", - "redux": "4.0.1", + "redux": "4.0.4", "redux-actions": "2.6.5", "redux-batched-actions": "0.4.1", "redux-localstorage": "0.4.1", diff --git a/yarn.lock b/yarn.lock index 99525d7b0..5140d9bf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -857,14 +857,14 @@ "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1": +"@babel/runtime@^7.1.2": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g== dependencies: regenerator-runtime "^0.12.0" -"@babel/runtime@^7.4.0": +"@babel/runtime@^7.4.0", "@babel/runtime@^7.4.5": version "7.5.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.4.tgz#cb7d1ad7c6d65676e66b47186577930465b5271b" integrity sha512-Na84uwyImZZc3FKf4aUF1tysApzwf3p2yuFBIyBfbzT5glzKTdvYI4KVW4kcgjrzoGUjC7w3YyCHcJKaRxsr2Q== @@ -7321,12 +7321,12 @@ react-google-recaptcha@1.1.0: prop-types "^15.5.0" react-async-script "^1.0.0" -react-is@^16.6.0: +react-is@^16.6.0, react-is@^16.8.6: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== -react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.2: +react-is@^16.7.0, react-is@^16.8.1: version "16.8.3" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d" integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA== @@ -7362,17 +7362,17 @@ react-popper@1.3.3: typed-styles "^0.0.7" warning "^4.0.2" -react-redux@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-6.0.1.tgz#0d423e2c1cb10ada87293d47e7de7c329623ba4d" - integrity sha512-T52I52Kxhbqy/6TEfBv85rQSDz6+Y28V/pf52vDWs1YRXG19mcFOGfHnY2HsNFHyhP+ST34Aih98fvt6tqwVcQ== +react-redux@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.1.0.tgz#72af7cf490a74acdc516ea9c1dd80e25af9ea0b2" + integrity sha512-hyu/PoFK3vZgdLTg9ozbt7WF3GgX5+Yn3pZm5/96/o4UueXA+zj08aiSC9Mfj2WtD1bvpIb3C5yvskzZySzzaw== dependencies: - "@babel/runtime" "^7.3.1" + "@babel/runtime" "^7.4.5" hoist-non-react-statics "^3.3.0" invariant "^2.2.4" loose-envify "^1.4.0" prop-types "^15.7.2" - react-is "^16.8.2" + react-is "^16.8.6" react-router-dom@5.0.1: version "5.0.1" @@ -7618,7 +7618,15 @@ redux-thunk@2.3.0: resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" integrity sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw== -redux@4.0.1, redux@^4.0.1: +redux@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796" + integrity sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + +redux@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5" integrity sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg==