From 23faad9146dadeb659dbe487275b809ff5f860f8 Mon Sep 17 00:00:00 2001
From: Vesa Luusua
Date: Mon, 29 Jan 2018 18:48:38 +0200
Subject: [PATCH] Rename: DateRangeInputField -> FieldDateRangeInput
---
.../DateRangeInput.css | 0
.../DateRangeInput.js | 10 +++++-----
.../FieldDateRangeInput.css} | 0
.../FieldDateRangeInput.example.js} | 4 ++--
.../FieldDateRangeInput.js} | 14 +++++++-------
.../FieldDateRangeInput.test.js} | 2 +-
.../NextMonthIcon.js | 0
.../PreviousMonthIcon.js | 0
.../FieldDateRangeInput.test.js.snap} | 4 ++--
src/components/index.js | 2 +-
.../BookingDatesForm/BookingDatesForm.js | 8 ++++----
.../__snapshots__/BookingDatesForm.test.js.snap | 2 +-
src/examples.js | 4 ++--
src/translations/en.json | 14 +++++++-------
14 files changed, 32 insertions(+), 32 deletions(-)
rename src/components/{DateRangeInputField => FieldDateRangeInput}/DateRangeInput.css (100%)
rename src/components/{DateRangeInputField => FieldDateRangeInput}/DateRangeInput.js (96%)
rename src/components/{DateRangeInputField/DateRangeInputField.css => FieldDateRangeInput/FieldDateRangeInput.css} (100%)
rename src/components/{DateRangeInputField/DateRangeInputField.example.js => FieldDateRangeInput/FieldDateRangeInput.example.js} (94%)
rename src/components/{DateRangeInputField/DateRangeInputField.js => FieldDateRangeInput/FieldDateRangeInput.js} (94%)
rename src/components/{DateRangeInputField/DateRangeInputField.test.js => FieldDateRangeInput/FieldDateRangeInput.test.js} (92%)
rename src/components/{DateRangeInputField => FieldDateRangeInput}/NextMonthIcon.js (100%)
rename src/components/{DateRangeInputField => FieldDateRangeInput}/PreviousMonthIcon.js (100%)
rename src/components/{DateRangeInputField/__snapshots__/DateRangeInputField.test.js.snap => FieldDateRangeInput/__snapshots__/FieldDateRangeInput.test.js.snap} (95%)
diff --git a/src/components/DateRangeInputField/DateRangeInput.css b/src/components/FieldDateRangeInput/DateRangeInput.css
similarity index 100%
rename from src/components/DateRangeInputField/DateRangeInput.css
rename to src/components/FieldDateRangeInput/DateRangeInput.css
diff --git a/src/components/DateRangeInputField/DateRangeInput.js b/src/components/FieldDateRangeInput/DateRangeInput.js
similarity index 96%
rename from src/components/DateRangeInputField/DateRangeInput.js
rename to src/components/FieldDateRangeInput/DateRangeInput.js
index c4fa1ee5..a02d5de6 100644
--- a/src/components/DateRangeInputField/DateRangeInput.js
+++ b/src/components/FieldDateRangeInput/DateRangeInput.js
@@ -227,19 +227,19 @@ class DateRangeInputComponent extends Component {
const startDatePlaceholderTxt =
startDatePlaceholderText ||
- intl.formatMessage({ id: 'DateRangeInputField.startDatePlaceholderText' });
+ intl.formatMessage({ id: 'FieldDateRangeInput.startDatePlaceholderText' });
const endDatePlaceholderTxt =
endDatePlaceholderText ||
- intl.formatMessage({ id: 'DateRangeInputField.endDatePlaceholderText' });
+ intl.formatMessage({ id: 'FieldDateRangeInput.endDatePlaceholderText' });
const screenReaderInputText =
screenReaderInputMessage ||
- intl.formatMessage({ id: 'DateRangeInputField.screenReaderInputMessage' });
+ intl.formatMessage({ id: 'FieldDateRangeInput.screenReaderInputMessage' });
const closeDatePickerText = phrases.closeDatePicker
? phrases.closeDatePicker
- : intl.formatMessage({ id: 'DateRangeInputField.closeDatePicker' });
+ : intl.formatMessage({ id: 'FieldDateRangeInput.closeDatePicker' });
const clearDateText = phrases.clearDate
? phrases.clearDate
- : intl.formatMessage({ id: 'DateRangeInputField.clearDate' });
+ : intl.formatMessage({ id: 'FieldDateRangeInput.clearDate' });
const classes = classNames(css.inputRoot, className, {
[css.withMobileMargins]: useMobileMargins,
diff --git a/src/components/DateRangeInputField/DateRangeInputField.css b/src/components/FieldDateRangeInput/FieldDateRangeInput.css
similarity index 100%
rename from src/components/DateRangeInputField/DateRangeInputField.css
rename to src/components/FieldDateRangeInput/FieldDateRangeInput.css
diff --git a/src/components/DateRangeInputField/DateRangeInputField.example.js b/src/components/FieldDateRangeInput/FieldDateRangeInput.example.js
similarity index 94%
rename from src/components/DateRangeInputField/DateRangeInputField.example.js
rename to src/components/FieldDateRangeInput/FieldDateRangeInput.example.js
index a86bb278..9a95d5c9 100644
--- a/src/components/DateRangeInputField/DateRangeInputField.example.js
+++ b/src/components/FieldDateRangeInput/FieldDateRangeInput.example.js
@@ -5,14 +5,14 @@ import moment from 'moment';
import { Button } from '../../components';
import { required, bookingDatesRequired } from '../../util/validators';
import { LINE_ITEM_NIGHT } from '../../util/types';
-import DateRangeInputField from './DateRangeInputField';
+import FieldDateRangeInput from './FieldDateRangeInput';
const FormComponent = props => {
const { form, handleSubmit, pristine, submitting, dateInputProps } = props;
const submitDisabled = pristine || submitting;
return (
- DateRangeInputField.screenReaderInputMessage
+ FieldDateRangeInput.screenReaderInputMessage
diff --git a/src/components/index.js b/src/components/index.js
index 91c3f887..6dd82329 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -11,7 +11,6 @@ export {
} from './Button/Button';
export { default as CookieConsent } from './CookieConsent/CookieConsent';
export { default as CurrencyInputField } from './CurrencyInputField/CurrencyInputField';
-export { default as DateRangeInputField } from './DateRangeInputField/DateRangeInputField';
export { default as Discussion } from './Discussion/Discussion';
export {
default as EditListingDescriptionPanel,
@@ -31,6 +30,7 @@ export { default as ExpandingTextarea } from './ExpandingTextarea/ExpandingTexta
export { default as ExternalLink } from './ExternalLink/ExternalLink';
export { default as FilterPanel } from './FilterPanel/FilterPanel';
export { default as FieldCheckbox } from './FieldCheckbox/FieldCheckbox';
+export { default as FieldDateRangeInput } from './FieldDateRangeInput/FieldDateRangeInput';
export { default as FieldGroupCheckbox } from './FieldGroupCheckbox/FieldGroupCheckbox';
export { default as FieldReviewRating } from './FieldReviewRating/FieldReviewRating';
export { default as Footer } from './Footer/Footer';
diff --git a/src/containers/BookingDatesForm/BookingDatesForm.js b/src/containers/BookingDatesForm/BookingDatesForm.js
index 451180c5..0f5e1ab6 100644
--- a/src/containers/BookingDatesForm/BookingDatesForm.js
+++ b/src/containers/BookingDatesForm/BookingDatesForm.js
@@ -19,7 +19,7 @@ import {
propTypes,
} from '../../util/types';
import config from '../../config';
-import { Form, PrimaryButton, BookingBreakdown, DateRangeInputField } from '../../components';
+import { Form, PrimaryButton, BookingBreakdown, FieldDateRangeInput } from '../../components';
import css from './BookingDatesForm.css';
@@ -175,9 +175,9 @@ export class BookingDatesFormComponent extends Component {
const bookingEndLabel = intl.formatMessage({ id: 'BookingDatesForm.bookingEndTitle' });
const requiredMessage = intl.formatMessage({ id: 'BookingDatesForm.requiredDate' });
const startDateErrorMessage = intl.formatMessage({
- id: 'DateRangeInputField.invalidStartDate',
+ id: 'FieldDateRangeInput.invalidStartDate',
});
- const endDateErrorMessage = intl.formatMessage({ id: 'DateRangeInputField.invalidEndDate' });
+ const endDateErrorMessage = intl.formatMessage({ id: 'FieldDateRangeInput.invalidEndDate' });
const hasBookingInfo = startDate && endDate;
const bookingInfo = hasBookingInfo ? (
@@ -208,7 +208,7 @@ export class BookingDatesFormComponent extends Component {
return (