mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Support React v15.5 and later where the code fails to run because React's PropTypes is no more part of React Module.
This commit is contained in:
committed by
Dave Page
parent
30e7016077
commit
026ef7b8b7
@@ -70,6 +70,7 @@
|
|||||||
"jquery-contextmenu": "^2.5.0",
|
"jquery-contextmenu": "^2.5.0",
|
||||||
"jquery-ui": "^1.12.1",
|
"jquery-ui": "^1.12.1",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
|
"prop-types": "^15.5.10",
|
||||||
"react": "file:../web/pgadmin/static/vendor/react",
|
"react": "file:../web/pgadmin/static/vendor/react",
|
||||||
"react-dom": "file:../web/pgadmin/static/vendor/react-dom",
|
"react-dom": "file:../web/pgadmin/static/vendor/react-dom",
|
||||||
"react-split-pane": "^0.1.63",
|
"react-split-pane": "^0.1.63",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import React from 'react';
|
|||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import QueryHistoryEntry from './query_history_entry';
|
import QueryHistoryEntry from './query_history_entry';
|
||||||
import QueryHistoryEntryDateGroup from './query_history_entry_date_group';
|
import QueryHistoryEntryDateGroup from './query_history_entry_date_group';
|
||||||
@@ -150,7 +151,7 @@ export default class QueryHistoryEntries extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryHistoryEntries.propTypes = {
|
QueryHistoryEntries.propTypes = {
|
||||||
historyEntries: React.PropTypes.array.isRequired,
|
historyEntries: PropTypes.array.isRequired,
|
||||||
selectedEntry: React.PropTypes.number.isRequired,
|
selectedEntry: PropTypes.number.isRequired,
|
||||||
onSelectEntry: React.PropTypes.func.isRequired,
|
onSelectEntry: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Shapes from '../react_shapes';
|
import Shapes from '../react_shapes';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class QueryHistoryEntry extends React.Component {
|
export default class QueryHistoryEntry extends React.Component {
|
||||||
formatDate(date) {
|
formatDate(date) {
|
||||||
@@ -54,5 +55,5 @@ export default class QueryHistoryEntry extends React.Component {
|
|||||||
|
|
||||||
QueryHistoryEntry.propTypes = {
|
QueryHistoryEntry.propTypes = {
|
||||||
historyEntry: Shapes.historyDetail,
|
historyEntry: Shapes.historyDetail,
|
||||||
isSelected: React.PropTypes.bool,
|
isSelected: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
export default class QueryHistoryEntryDateGroup extends React.Component {
|
export default class QueryHistoryEntryDateGroup extends React.Component {
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ export default class QueryHistoryEntryDateGroup extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QueryHistoryEntryDateGroup.propTypes = {
|
QueryHistoryEntryDateGroup.propTypes = {
|
||||||
date: React.PropTypes.instanceOf(Date).isRequired,
|
date: PropTypes.instanceOf(Date).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
QueryHistoryEntryDateGroup.formatString = 'MMM DD YYYY';
|
QueryHistoryEntryDateGroup.formatString = 'MMM DD YYYY';
|
||||||
|
|||||||
@@ -8,24 +8,25 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
let historyDetail =
|
let historyDetail =
|
||||||
React.PropTypes.shape({
|
PropTypes.shape({
|
||||||
query: React.PropTypes.string,
|
query: PropTypes.string,
|
||||||
start_time: React.PropTypes.instanceOf(Date),
|
start_time: PropTypes.instanceOf(Date),
|
||||||
status: React.PropTypes.bool,
|
status: PropTypes.bool,
|
||||||
total_time: React.PropTypes.string,
|
total_time: PropTypes.string,
|
||||||
row_affected: React.PropTypes.int,
|
row_affected: PropTypes.int,
|
||||||
message: React.PropTypes.string,
|
message: PropTypes.string,
|
||||||
});
|
});
|
||||||
|
|
||||||
let historyCollectionClass =
|
let historyCollectionClass =
|
||||||
React.PropTypes.shape({
|
PropTypes.shape({
|
||||||
historyList: React.PropTypes.array.isRequired,
|
historyList: PropTypes.array.isRequired,
|
||||||
onChange: React.PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
historyDetail,
|
historyDetail,
|
||||||
historyCollectionClass,
|
historyCollectionClass,
|
||||||
};
|
};
|
||||||
|
|||||||
1642
web/yarn.lock
1642
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user