Skip to content

Commit

Permalink
All proptypes replaced with external lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino authored and Luke Edwards committed Sep 14, 2018
1 parent 0b49fc9 commit 770d701
Show file tree
Hide file tree
Showing 23 changed files with 33 additions and 21 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/js/vendor.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions client/src/bundles/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ require('expose-loader?modernizr!modernizr');
require('expose-loader?history!history');
require('expose-loader?moment!moment');
require('expose-loader?merge!merge');
require('expose-loader?PropTypes!prop-types');

require('../../../thirdparty/jquery-ondemand/jquery.ondemand.js');
require('../../../thirdparty/jquery-ui/jquery-ui.js');
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ActionMenu/ActionMenu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Dropdown, DropdownToggle, DropdownMenu } from 'reactstrap';
import i18n from 'i18n';
import classnames from 'classnames';
Expand Down
1 change: 0 additions & 1 deletion client/src/components/DateField/DateField.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import fieldHolder from 'components/FieldHolder/FieldHolder';
import { Component as TextField } from '../TextField/TextField';
import moment from 'moment';
Expand Down
1 change: 0 additions & 1 deletion client/src/components/DatetimeField/DatetimeField.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import fieldHolder from 'components/FieldHolder/FieldHolder';
import { Component as DateField } from '../DateField/DateField';
import moment from 'moment';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/FormBuilder/FormBuilder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import merge from 'merge';
import schemaFieldValues, { schemaMerge } from 'lib/schemaFieldValues';
import { createErrorBlock } from 'lib/createErrorBlock';
Expand Down
1 change: 0 additions & 1 deletion client/src/components/GridFieldActions/GridFieldActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import GridFieldDropdownAction from './GridFieldDropdownAction';
import ActionMenu from '../ActionMenu/ActionMenu';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import PropTypes from 'prop-types';

class GridFieldActions extends PureComponent {
constructor(props) {
Expand Down
1 change: 0 additions & 1 deletion client/src/components/TimeField/TimeField.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import fieldHolder from 'components/FieldHolder/FieldHolder';
import { Component as DateField } from '../DateField/DateField';
import moment from 'moment';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Toolbar/Toolbar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';

class Toolbar extends Component {
constructor(props) {
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/TreeDropdownField/TreeDropdownField.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import fieldHolder from 'components/FieldHolder/FieldHolder';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import i18n from 'i18n';
import classNames from 'classnames';
import TreeDropdownFieldNode from 'components/TreeDropdownField/TreeDropdownFieldNode';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';

const TreeDropdownFieldNode = () => null;

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/UsedOnTable/UsedOnTable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import i18n from 'i18n';
import provideUsedOnData from './provideUsedOnData';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/UsedOnTable/provideUsedOnData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { loadUsedOn } from 'state/usedOn/usedOnActions';

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ViewModeToggle/ViewModeToggle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import i18n from 'i18n';
import { connect } from 'react-redux';
Expand Down
3 changes: 2 additions & 1 deletion client/src/containers/FormBuilderLoader/FormBuilderLoader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import i18n from 'i18n';
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { compose, bindActionCreators } from 'redux';
import fetch from 'isomorphic-fetch';
Expand Down
3 changes: 2 additions & 1 deletion client/src/containers/InsertLinkModal/InsertLinkModal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators, compose } from 'redux';
import { connect } from 'react-redux';
import FormBuilderModal from 'components/FormBuilderModal/FormBuilderModal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import * as schemaActions from 'state/schema/SchemaActions';
import { connect } from 'react-redux';
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/dependency-injection/injectorContext.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';

export default {
injector: PropTypes.shape({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import { createStore } from 'redux';
import PropTypes from 'prop-types';

const mockStore = createStore(state => state);

Expand All @@ -17,6 +16,9 @@ const mockProvider = Item => Item;
jest.mock('../provideInjector', () => function mockInjector(Injected) {
// eslint-disable-next-line
const React = require('react');
// eslint-disable-next-line
const PropTypes = require('prop-types');

function TestRegisteredComponent() {
return <span>def</span>;
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/stories/ValueTracker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
// eslint-disable-next-line import/no-extraneous-dependencies
import { action } from '@storybook/addon-actions';

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"modernizr": "^3.5.0",
"moment": "^2.18.1",
"page.js": "^4.13.3",
"prop-types": "^15.6.2",
"qs": "^6.1.0",
"react": "15.3.1",
"react-addons-css-transition-group": "15.3.1",
Expand Down

0 comments on commit 770d701

Please sign in to comment.