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