Swap React.PropTypes to using standalone prop-types package
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const KeyValueTable = props => (
|
const KeyValueTable = props => (
|
||||||
@@ -13,13 +14,13 @@ const KeyValueTable = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
KeyValueTable.propTypes = {
|
KeyValueTable.propTypes = {
|
||||||
max_width: React.PropTypes.string,
|
max_width: PropTypes.string,
|
||||||
rows: React.PropTypes.arrayOf(React.PropTypes.shape({
|
rows: PropTypes.arrayOf(PropTypes.shape({
|
||||||
key: React.PropTypes.string.isRequired,
|
key: PropTypes.string.isRequired,
|
||||||
value: React.PropTypes.oneOfType([
|
value: PropTypes.oneOfType([
|
||||||
React.PropTypes.string,
|
PropTypes.string,
|
||||||
React.PropTypes.number,
|
PropTypes.number,
|
||||||
React.PropTypes.element,
|
PropTypes.element,
|
||||||
]).isRequired,
|
]).isRequired,
|
||||||
})).isRequired,
|
})).isRequired,
|
||||||
};
|
};
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
@@ -10,10 +11,10 @@ const PrintBoolean = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
PrintBoolean.propTypes = {
|
PrintBoolean.propTypes = {
|
||||||
truthy: React.PropTypes.string,
|
truthy: PropTypes.string,
|
||||||
falsy: React.PropTypes.string,
|
falsy: PropTypes.string,
|
||||||
unknown: React.PropTypes.string,
|
unknown: PropTypes.string,
|
||||||
children: React.PropTypes.bool,
|
children: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
PrintBoolean.defaultProps = {
|
PrintBoolean.defaultProps = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const SteppedProgressBar = (props) => {
|
const SteppedProgressBar = (props) => {
|
||||||
@@ -20,8 +21,8 @@ const SteppedProgressBar = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SteppedProgressBar.propTypes = {
|
SteppedProgressBar.propTypes = {
|
||||||
steps_count: React.PropTypes.number.isRequired,
|
steps_count: PropTypes.number.isRequired,
|
||||||
step: React.PropTypes.number.isRequired,
|
step: PropTypes.number.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = SteppedProgressBar;
|
module.exports = SteppedProgressBar;
|
||||||
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|||||||
|
|
||||||
class Form extends React.Component {
|
class Form extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactTooltip from 'react-tooltip';
|
import ReactTooltip from 'react-tooltip';
|
||||||
import ReactHtmlParser from 'react-html-parser';
|
import ReactHtmlParser from 'react-html-parser';
|
||||||
@@ -47,10 +48,10 @@ function Tooltip(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tooltip.propTypes = {
|
Tooltip.propTypes = {
|
||||||
tooltipId: React.PropTypes.string,
|
tooltipId: PropTypes.string,
|
||||||
tooltip: React.PropTypes.node.isRequired,
|
tooltip: PropTypes.node.isRequired,
|
||||||
place: React.PropTypes.string,
|
place: PropTypes.string,
|
||||||
className: React.PropTypes.string,
|
className: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
Tooltip.defaultProps = {
|
Tooltip.defaultProps = {
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import KeyValueTable from 'common/key_value_table.jsx';
|
import KeyValueTable from 'common/key_value_table.jsx';
|
||||||
import PrintBoolean from 'common/print_boolean.jsx';
|
import PrintBoolean from 'common/print_boolean.jsx';
|
||||||
@@ -46,12 +47,12 @@ const CronStatus = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
CronStatus.propTypes = {
|
CronStatus.propTypes = {
|
||||||
status_data: React.PropTypes.shape({
|
status_data: PropTypes.shape({
|
||||||
accessible: React.PropTypes.bool,
|
accessible: PropTypes.bool,
|
||||||
status: React.PropTypes.string,
|
status: PropTypes.string,
|
||||||
updated_at: React.PropTypes.number,
|
updated_at: PropTypes.number,
|
||||||
run_accessed_at: React.PropTypes.number,
|
run_accessed_at: PropTypes.number,
|
||||||
run_completed_at: React.PropTypes.number,
|
run_completed_at: PropTypes.number,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import KeyValueTable from 'common/key_value_table.jsx';
|
import KeyValueTable from 'common/key_value_table.jsx';
|
||||||
import TasksList from './tasks_list/tasks_list.jsx';
|
import TasksList from './tasks_list/tasks_list.jsx';
|
||||||
@@ -58,23 +59,23 @@ const QueueStatus = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
QueueStatus.propTypes = {
|
QueueStatus.propTypes = {
|
||||||
status_data: React.PropTypes.shape({
|
status_data: PropTypes.shape({
|
||||||
status: React.PropTypes.string,
|
status: PropTypes.string,
|
||||||
started: React.PropTypes.number,
|
started: PropTypes.number,
|
||||||
sent: React.PropTypes.number,
|
sent: PropTypes.number,
|
||||||
retry_attempt: React.PropTypes.number,
|
retry_attempt: PropTypes.number,
|
||||||
retry_at: React.PropTypes.number,
|
retry_at: PropTypes.number,
|
||||||
error: React.PropTypes.shape({
|
error: PropTypes.shape({
|
||||||
operation: React.PropTypes.string,
|
operation: PropTypes.string,
|
||||||
error_message: React.PropTypes.string,
|
error_message: PropTypes.string,
|
||||||
}),
|
}),
|
||||||
tasksStatusCounts: React.PropTypes.shape({
|
tasksStatusCounts: PropTypes.shape({
|
||||||
completed: React.PropTypes.number.isRequired,
|
completed: PropTypes.number.isRequired,
|
||||||
running: React.PropTypes.number.isRequired,
|
running: PropTypes.number.isRequired,
|
||||||
paused: React.PropTypes.number.isRequired,
|
paused: PropTypes.number.isRequired,
|
||||||
scheduled: React.PropTypes.number.isRequired,
|
scheduled: PropTypes.number.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
latestTasks: React.PropTypes.arrayOf(TasksListDataRow.propTypes.task).isRequired,
|
latestTasks: PropTypes.arrayOf(TasksListDataRow.propTypes.task).isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
@@ -44,7 +45,7 @@ function Tabs(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tabs.propTypes = { tab: React.PropTypes.string };
|
Tabs.propTypes = { tab: PropTypes.string };
|
||||||
Tabs.defaultProps = { tab: 'knowledgeBase' };
|
Tabs.defaultProps = { tab: 'knowledgeBase' };
|
||||||
|
|
||||||
module.exports = Tabs;
|
module.exports = Tabs;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import TaskListDataRow from './tasks_list_data_row.jsx';
|
import TaskListDataRow from './tasks_list_data_row.jsx';
|
||||||
@@ -30,8 +31,8 @@ const TasksList = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TasksList.propTypes = {
|
TasksList.propTypes = {
|
||||||
show_scheduled_at: React.PropTypes.bool,
|
show_scheduled_at: PropTypes.bool,
|
||||||
tasks: React.PropTypes.arrayOf(TaskListDataRow.propTypes.task).isRequired,
|
tasks: PropTypes.arrayOf(TaskListDataRow.propTypes.task).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
TasksList.defaultProps = {
|
TasksList.defaultProps = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
@@ -36,19 +37,19 @@ const TasksListDataRow = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
TasksListDataRow.propTypes = {
|
TasksListDataRow.propTypes = {
|
||||||
show_scheduled_at: React.PropTypes.bool,
|
show_scheduled_at: PropTypes.bool,
|
||||||
task: React.PropTypes.shape({
|
task: PropTypes.shape({
|
||||||
id: React.PropTypes.number.isRequired,
|
id: PropTypes.number.isRequired,
|
||||||
type: React.PropTypes.string.isRequired,
|
type: PropTypes.string.isRequired,
|
||||||
priority: React.PropTypes.number.isRequired,
|
priority: PropTypes.number.isRequired,
|
||||||
updated_at: React.PropTypes.number.isRequired,
|
updated_at: PropTypes.number.isRequired,
|
||||||
scheduled_at: React.PropTypes.number,
|
scheduled_at: PropTypes.number,
|
||||||
status: React.PropTypes.string,
|
status: PropTypes.string,
|
||||||
newsletter: React.PropTypes.shape({
|
newsletter: PropTypes.shape({
|
||||||
newsletter_id: React.PropTypes.number.isRequired,
|
newsletter_id: PropTypes.number.isRequired,
|
||||||
queue_id: React.PropTypes.number.isRequired,
|
queue_id: PropTypes.number.isRequired,
|
||||||
preview_url: React.PropTypes.string.isRequired,
|
preview_url: PropTypes.string.isRequired,
|
||||||
subject: React.PropTypes.string,
|
subject: PropTypes.string,
|
||||||
}),
|
}),
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
};
|
};
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ const TasksListLabelsRow = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
TasksListLabelsRow.propTypes = {
|
TasksListLabelsRow.propTypes = {
|
||||||
show_scheduled_at: React.PropTypes.bool,
|
show_scheduled_at: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
TasksListLabelsRow.defaultProps = {
|
TasksListLabelsRow.defaultProps = {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import InAppAnnouncementDot from './in_app_announcement_dot.jsx';
|
import InAppAnnouncementDot from './in_app_announcement_dot.jsx';
|
||||||
@@ -78,11 +79,11 @@ const validateBooleanWithWindowDependency = (props, propName, componentName, win
|
|||||||
};
|
};
|
||||||
|
|
||||||
InAppAnnouncement.propTypes = {
|
InAppAnnouncement.propTypes = {
|
||||||
width: React.PropTypes.string,
|
width: PropTypes.string,
|
||||||
height: React.PropTypes.string,
|
height: PropTypes.string,
|
||||||
className: React.PropTypes.string,
|
className: PropTypes.string,
|
||||||
children: React.PropTypes.element.isRequired,
|
children: PropTypes.element.isRequired,
|
||||||
validUntil: React.PropTypes.instanceOf(Date),
|
validUntil: PropTypes.instanceOf(Date),
|
||||||
showToNewUser: (props, propName, componentName) => (
|
showToNewUser: (props, propName, componentName) => (
|
||||||
validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_is_new_user')
|
validateBooleanWithWindowDependency(props, propName, componentName, 'mailpoet_is_new_user')
|
||||||
),
|
),
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOMServer from 'react-dom/server';
|
import ReactDOMServer from 'react-dom/server';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
@@ -20,11 +21,11 @@ const InAppAnnouncementDot = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
InAppAnnouncementDot.propTypes = {
|
InAppAnnouncementDot.propTypes = {
|
||||||
children: React.PropTypes.element.isRequired,
|
children: PropTypes.element.isRequired,
|
||||||
width: React.PropTypes.string,
|
width: PropTypes.string,
|
||||||
height: React.PropTypes.string,
|
height: PropTypes.string,
|
||||||
className: React.PropTypes.string,
|
className: PropTypes.string,
|
||||||
onUserTrigger: React.PropTypes.func,
|
onUserTrigger: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
InAppAnnouncementDot.defaultProps = {
|
InAppAnnouncementDot.defaultProps = {
|
||||||
|
@@ -48,7 +48,7 @@ const Listing = createReactClass({ // eslint-disable-line react/prefer-es6-class
|
|||||||
/* eslint-enable react/require-default-props */
|
/* eslint-enable react/require-default-props */
|
||||||
|
|
||||||
contextTypes: {
|
contextTypes: {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps: () => ({
|
getDefaultProps: () => ({
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import InAppAnnouncement from 'in_app_announcements/in_app_announcement.jsx';
|
import InAppAnnouncement from 'in_app_announcements/in_app_announcement.jsx';
|
||||||
@@ -19,8 +20,8 @@ const BackgroundImageAnnouncement = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
BackgroundImageAnnouncement.propTypes = {
|
BackgroundImageAnnouncement.propTypes = {
|
||||||
username: React.PropTypes.string.isRequired,
|
username: PropTypes.string.isRequired,
|
||||||
videoUrl: React.PropTypes.string.isRequired,
|
videoUrl: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = BackgroundImageAnnouncement;
|
module.exports = BackgroundImageAnnouncement;
|
||||||
|
@@ -23,7 +23,7 @@ const NewsletterSend = createReactClass({ // eslint-disable-line react/prefer-es
|
|||||||
},
|
},
|
||||||
|
|
||||||
contextTypes: {
|
contextTypes: {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function getInitialState() {
|
getInitialState: function getInitialState() {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||||
@@ -7,7 +8,7 @@ import 'react-router';
|
|||||||
|
|
||||||
class NewsletterTypes extends React.Component {
|
class NewsletterTypes extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
setupNewsletter = (type) => {
|
setupNewsletter = (type) => {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||||
@@ -12,7 +13,7 @@ const field = {
|
|||||||
|
|
||||||
class NewsletterNotification extends React.Component {
|
class NewsletterNotification extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
state = {
|
state = {
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||||
|
|
||||||
class NewsletterStandard extends React.Component {
|
class NewsletterStandard extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
@@ -50,7 +50,7 @@ const afterTimeTypeField = {
|
|||||||
|
|
||||||
class WelcomeScheduling extends React.Component {
|
class WelcomeScheduling extends React.Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
router: React.PropTypes.object.isRequired,
|
router: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
getCurrentValue = () => this.props.item[this.props.field.name] || {};
|
getCurrentValue = () => this.props.item[this.props.field.name] || {};
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import SteppedProgressBar from '../common/stepped_progess_bar.jsx';
|
import SteppedProgressBar from '../common/stepped_progess_bar.jsx';
|
||||||
|
|
||||||
@@ -13,9 +14,9 @@ const WelcomeWizardHeader = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
WelcomeWizardHeader.propTypes = {
|
WelcomeWizardHeader.propTypes = {
|
||||||
current_step: React.PropTypes.number.isRequired,
|
current_step: PropTypes.number.isRequired,
|
||||||
steps_count: React.PropTypes.number.isRequired,
|
steps_count: PropTypes.number.isRequired,
|
||||||
logo_src: React.PropTypes.string.isRequired,
|
logo_src: PropTypes.string.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = WelcomeWizardHeader;
|
module.exports = WelcomeWizardHeader;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import ReactStringReplace from 'react-string-replace';
|
import ReactStringReplace from 'react-string-replace';
|
||||||
@@ -62,7 +63,7 @@ const WelcomeWizardHelpInfoStep = props => (
|
|||||||
module.exports = WelcomeWizardHelpInfoStep;
|
module.exports = WelcomeWizardHelpInfoStep;
|
||||||
|
|
||||||
WelcomeWizardHelpInfoStep.propTypes = {
|
WelcomeWizardHelpInfoStep.propTypes = {
|
||||||
next: React.PropTypes.func.isRequired,
|
next: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = WelcomeWizardHelpInfoStep;
|
module.exports = WelcomeWizardHelpInfoStep;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ const WelcomeWizardMigratedUserStep = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
WelcomeWizardMigratedUserStep.propTypes = {
|
WelcomeWizardMigratedUserStep.propTypes = {
|
||||||
next: React.PropTypes.func.isRequired,
|
next: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = WelcomeWizardMigratedUserStep;
|
module.exports = WelcomeWizardMigratedUserStep;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
@@ -47,13 +48,13 @@ const WelcomeWizardSenderStep = props => (
|
|||||||
);
|
);
|
||||||
|
|
||||||
WelcomeWizardSenderStep.propTypes = {
|
WelcomeWizardSenderStep.propTypes = {
|
||||||
finish: React.PropTypes.func.isRequired,
|
finish: PropTypes.func.isRequired,
|
||||||
loading: React.PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
update_sender: React.PropTypes.func.isRequired,
|
update_sender: PropTypes.func.isRequired,
|
||||||
submit_sender: React.PropTypes.func.isRequired,
|
submit_sender: PropTypes.func.isRequired,
|
||||||
sender: React.PropTypes.shape({
|
sender: PropTypes.shape({
|
||||||
name: React.PropTypes.string,
|
name: PropTypes.string,
|
||||||
address: React.PropTypes.string,
|
address: PropTypes.string,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import ReactStringReplace from 'react-string-replace';
|
import ReactStringReplace from 'react-string-replace';
|
||||||
@@ -48,8 +49,8 @@ const WelcomeWizardUsageTrackingStep = props => (
|
|||||||
module.exports = WelcomeWizardUsageTrackingStep;
|
module.exports = WelcomeWizardUsageTrackingStep;
|
||||||
|
|
||||||
WelcomeWizardUsageTrackingStep.propTypes = {
|
WelcomeWizardUsageTrackingStep.propTypes = {
|
||||||
allow_action: React.PropTypes.func.isRequired,
|
allow_action: PropTypes.func.isRequired,
|
||||||
allow_text: React.PropTypes.string.isRequired,
|
allow_text: PropTypes.string.isRequired,
|
||||||
skip_action: React.PropTypes.func.isRequired,
|
skip_action: PropTypes.func.isRequired,
|
||||||
loading: React.PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
};
|
};
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ const WelcomeWizardWooCommerceStep = props => (
|
|||||||
module.exports = WelcomeWizardWooCommerceStep;
|
module.exports = WelcomeWizardWooCommerceStep;
|
||||||
|
|
||||||
WelcomeWizardWooCommerceStep.propTypes = {
|
WelcomeWizardWooCommerceStep.propTypes = {
|
||||||
next: React.PropTypes.func.isRequired,
|
next: PropTypes.func.isRequired,
|
||||||
screenshot_src: React.PropTypes.string.isRequired,
|
screenshot_src: PropTypes.string.isRequired,
|
||||||
loading: React.PropTypes.bool.isRequired,
|
loading: PropTypes.bool.isRequired,
|
||||||
};
|
};
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import MailPoet from 'mailpoet';
|
import MailPoet from 'mailpoet';
|
||||||
import WelcomeWizardHeader from './header.jsx';
|
import WelcomeWizardHeader from './header.jsx';
|
||||||
@@ -136,11 +137,11 @@ class WelcomeWizardStepsController extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WelcomeWizardStepsController.propTypes = {
|
WelcomeWizardStepsController.propTypes = {
|
||||||
params: React.PropTypes.shape({
|
params: PropTypes.shape({
|
||||||
step: React.PropTypes.string.isRequired,
|
step: PropTypes.string.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
router: React.PropTypes.shape({
|
router: PropTypes.shape({
|
||||||
push: React.PropTypes.func.isRequired,
|
push: PropTypes.func.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user