mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
SelectMultipleFilterMobile -> SelectMultipleFilterPlain and same for SelectSingleFilterMobile
This commit is contained in:
parent
cf6ed72a0d
commit
bd4d31c2a0
11 changed files with 38 additions and 38 deletions
|
|
@ -11,8 +11,8 @@ import {
|
|||
SecondaryButton,
|
||||
ModalInMobile,
|
||||
Button,
|
||||
SelectSingleFilterMobile,
|
||||
SelectMultipleFilterMobile,
|
||||
SelectSingleFilterPlain,
|
||||
SelectMultipleFilterPlain,
|
||||
} from '../../components';
|
||||
import css from './SearchFiltersMobile.css';
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ class SearchFiltersMobileComponent extends Component {
|
|||
const initialCategory = urlQueryParams[CATEGORY_URL_PARAM];
|
||||
|
||||
const categoryFilter = categories ? (
|
||||
<SelectSingleFilterMobile
|
||||
<SelectSingleFilterPlain
|
||||
urlParam={CATEGORY_URL_PARAM}
|
||||
label={categoryLabel}
|
||||
onSelect={this.handleSelectSingle}
|
||||
|
|
@ -173,7 +173,7 @@ class SearchFiltersMobileComponent extends Component {
|
|||
: [];
|
||||
|
||||
const amenitiesFilter = amenities ? (
|
||||
<SelectMultipleFilterMobile
|
||||
<SelectMultipleFilterPlain
|
||||
name="amenities"
|
||||
urlParam={AMENITIES_URL_PARAM}
|
||||
label={amenitiesLabel}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* : splitQueryParam(this.props.urlQueryParams[MULTI_SELECT_URL_PARAM]);
|
||||
*
|
||||
* const multiSelectFilterX = multiSelectFilterXFromProps ? (
|
||||
* <SelectMultipleFilterMobile
|
||||
* <SelectMultipleFilterPlain
|
||||
* id="SearchFiltersPanel.multiSelectFilterX"
|
||||
* name="multiSelectFilterX"
|
||||
* urlParam={MULTI_SELECT_URL_PARAM}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import SelectMultipleFilterMobile from './SelectMultipleFilterMobile';
|
||||
import SelectMultipleFilterPlain from './SelectMultipleFilterPlain';
|
||||
import { stringify, parse } from '../../util/urlHelpers';
|
||||
|
||||
const URL_PARAM = 'pub_amenities';
|
||||
|
|
@ -53,7 +53,7 @@ const AmenitiesFilterComponent = props => {
|
|||
const initialValues = !!amenities ? amenities.split(',') : [];
|
||||
|
||||
return (
|
||||
<SelectMultipleFilterMobile
|
||||
<SelectMultipleFilterPlain
|
||||
name="amenities"
|
||||
urlParam={URL_PARAM}
|
||||
label="Amenities"
|
||||
|
|
@ -3,12 +3,12 @@ import { array, bool, func, string } from 'prop-types';
|
|||
import classNames from 'classnames';
|
||||
import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
|
||||
|
||||
import SelectMultipleFilterMobileForm from './SelectMultipleFilterMobileForm';
|
||||
import SelectMultipleFilterPlainForm from './SelectMultipleFilterPlainForm';
|
||||
import { arrayToFormValues, formValuesToArray } from '../../util/data';
|
||||
|
||||
import css from './SelectMultipleFilterMobile.css';
|
||||
import css from './SelectMultipleFilterPlain.css';
|
||||
|
||||
class SelectMultipleFilterMobileComponent extends Component {
|
||||
class SelectMultipleFilterPlainComponent extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { isOpen: true };
|
||||
|
|
@ -53,7 +53,7 @@ class SelectMultipleFilterMobileComponent extends Component {
|
|||
|
||||
const labelText = hasInitialValues
|
||||
? intl.formatMessage(
|
||||
{ id: 'SelectMultipleFilterMobileForm.labelSelected' },
|
||||
{ id: 'SelectMultipleFilterPlainForm.labelSelected' },
|
||||
{ labelText: label, count: initialValues.length }
|
||||
)
|
||||
: label;
|
||||
|
|
@ -74,11 +74,11 @@ class SelectMultipleFilterMobileComponent extends Component {
|
|||
<span className={labelClass}>{labelText}</span>
|
||||
</button>
|
||||
<button type="button" className={css.clearButton} onClick={this.handleClear}>
|
||||
<FormattedMessage id={'SelectMultipleFilterMobileForm.clear'} />
|
||||
<FormattedMessage id={'SelectMultipleFilterPlainForm.clear'} />
|
||||
</button>
|
||||
</div>
|
||||
<SelectMultipleFilterMobileForm
|
||||
form={`SelectMultipleFilterMobileForm.${id ? id : name}`}
|
||||
<SelectMultipleFilterPlainForm
|
||||
form={`SelectMultipleFilterPlainForm.${id ? id : name}`}
|
||||
className={optionsContainerClass}
|
||||
name={name}
|
||||
options={options}
|
||||
|
|
@ -93,7 +93,7 @@ class SelectMultipleFilterMobileComponent extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
SelectMultipleFilterMobileComponent.defaultProps = {
|
||||
SelectMultipleFilterPlainComponent.defaultProps = {
|
||||
rootClassName: null,
|
||||
className: null,
|
||||
id: undefined,
|
||||
|
|
@ -101,7 +101,7 @@ SelectMultipleFilterMobileComponent.defaultProps = {
|
|||
twoColumns: false,
|
||||
};
|
||||
|
||||
SelectMultipleFilterMobileComponent.propTypes = {
|
||||
SelectMultipleFilterPlainComponent.propTypes = {
|
||||
rootClassName: string,
|
||||
className: string,
|
||||
id: string,
|
||||
|
|
@ -117,6 +117,6 @@ SelectMultipleFilterMobileComponent.propTypes = {
|
|||
intl: intlShape.isRequired,
|
||||
};
|
||||
|
||||
const SelectMultipleFilterMobile = injectIntl(SelectMultipleFilterMobileComponent);
|
||||
const SelectMultipleFilterPlain = injectIntl(SelectMultipleFilterPlainComponent);
|
||||
|
||||
export default SelectMultipleFilterMobile;
|
||||
export default SelectMultipleFilterPlain;
|
||||
|
|
@ -4,7 +4,7 @@ import { reduxForm, propTypes as formPropTypes } from 'redux-form';
|
|||
|
||||
import { FieldGroupCheckbox, Form } from '../../components';
|
||||
|
||||
const SelectMultipleFilterMobileFormComponent = props => {
|
||||
const SelectMultipleFilterPlainFormComponent = props => {
|
||||
const { form, className, name, options, twoColumns } = props;
|
||||
|
||||
return (
|
||||
|
|
@ -19,12 +19,12 @@ const SelectMultipleFilterMobileFormComponent = props => {
|
|||
);
|
||||
};
|
||||
|
||||
SelectMultipleFilterMobileFormComponent.defaultProps = {
|
||||
SelectMultipleFilterPlainFormComponent.defaultProps = {
|
||||
className: null,
|
||||
twoColumns: false,
|
||||
};
|
||||
|
||||
SelectMultipleFilterMobileFormComponent.propTypes = {
|
||||
SelectMultipleFilterPlainFormComponent.propTypes = {
|
||||
...formPropTypes,
|
||||
className: string,
|
||||
name: string.isRequired,
|
||||
|
|
@ -37,6 +37,6 @@ SelectMultipleFilterMobileFormComponent.propTypes = {
|
|||
twoColumns: bool,
|
||||
};
|
||||
|
||||
const SelectMultipleFilterMobileForm = reduxForm({})(SelectMultipleFilterMobileFormComponent);
|
||||
const SelectMultipleFilterPlainForm = reduxForm({})(SelectMultipleFilterPlainFormComponent);
|
||||
|
||||
export default SelectMultipleFilterMobileForm;
|
||||
export default SelectMultipleFilterPlainForm;
|
||||
|
|
@ -3,9 +3,9 @@ import { arrayOf, bool, func, shape, string } from 'prop-types';
|
|||
import classNames from 'classnames';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import css from './SelectSingleFilterMobile.css';
|
||||
import css from './SelectSingleFilterPlain.css';
|
||||
|
||||
class SelectSingleFilterMobile extends Component {
|
||||
class SelectSingleFilterPlain extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { isOpen: true };
|
||||
|
|
@ -57,7 +57,7 @@ class SelectSingleFilterMobile extends Component {
|
|||
<span className={labelClass}>{label}</span>
|
||||
</button>
|
||||
<button className={css.clearButton} onClick={e => this.selectOption(null, e)}>
|
||||
<FormattedMessage id={'SelectSingleFilterMobile.clear'} />
|
||||
<FormattedMessage id={'SelectSingleFilterPlain.clear'} />
|
||||
</button>
|
||||
</div>
|
||||
<div className={optionsContainerClass}>
|
||||
|
|
@ -92,7 +92,7 @@ class SelectSingleFilterMobile extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
SelectSingleFilterMobile.defaultProps = {
|
||||
SelectSingleFilterPlain.defaultProps = {
|
||||
rootClassName: null,
|
||||
className: null,
|
||||
initialValue: null,
|
||||
|
|
@ -100,7 +100,7 @@ SelectSingleFilterMobile.defaultProps = {
|
|||
useBullets: false,
|
||||
};
|
||||
|
||||
SelectSingleFilterMobile.propTypes = {
|
||||
SelectSingleFilterPlain.propTypes = {
|
||||
rootClassName: string,
|
||||
className: string,
|
||||
urlParam: string.isRequired,
|
||||
|
|
@ -118,4 +118,4 @@ SelectSingleFilterMobile.propTypes = {
|
|||
useBullets: bool,
|
||||
};
|
||||
|
||||
export default SelectSingleFilterMobile;
|
||||
export default SelectSingleFilterPlain;
|
||||
|
|
@ -111,12 +111,12 @@ export { default as SectionThumbnailLinks } from './SectionThumbnailLinks/Sectio
|
|||
export { default as SelectField } from './SelectField/SelectField';
|
||||
export { default as SelectMultipleFilter } from './SelectMultipleFilter/SelectMultipleFilter';
|
||||
export {
|
||||
default as SelectMultipleFilterMobile,
|
||||
} from './SelectMultipleFilterMobile/SelectMultipleFilterMobile';
|
||||
default as SelectMultipleFilterPlain,
|
||||
} from './SelectMultipleFilterPlain/SelectMultipleFilterPlain';
|
||||
export { default as SelectSingleFilter } from './SelectSingleFilter/SelectSingleFilter';
|
||||
export {
|
||||
default as SelectSingleFilterMobile,
|
||||
} from './SelectSingleFilterMobile/SelectSingleFilterMobile';
|
||||
default as SelectSingleFilterPlain,
|
||||
} from './SelectSingleFilterPlain/SelectSingleFilterPlain';
|
||||
export {
|
||||
default as StripeBankAccountTokenInputField,
|
||||
} from './StripeBankAccountTokenInputField/StripeBankAccountTokenInputField';
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ import * as Reviews from './components/Reviews/Reviews.example';
|
|||
import * as SectionThumbnailLinks from './components/SectionThumbnailLinks/SectionThumbnailLinks.example';
|
||||
import * as SelectField from './components/SelectField/SelectField.example';
|
||||
import * as SelectMultipleFilter from './components/SelectMultipleFilter/SelectMultipleFilter.example';
|
||||
import * as SelectMultipleFilterMobile from './components/SelectMultipleFilterMobile/SelectMultipleFilterMobile.example';
|
||||
import * as SelectMultipleFilterPlain from './components/SelectMultipleFilterPlain/SelectMultipleFilterPlain.example';
|
||||
import * as StripeBankAccountTokenInputField from './components/StripeBankAccountTokenInputField/StripeBankAccountTokenInputField.example';
|
||||
import * as TabNav from './components/TabNav/TabNav.example';
|
||||
import * as TabNavHorizontal from './components/TabNavHorizontal/TabNavHorizontal.example';
|
||||
|
|
@ -141,7 +141,7 @@ export {
|
|||
SectionThumbnailLinks,
|
||||
SelectField,
|
||||
SelectMultipleFilter,
|
||||
SelectMultipleFilterMobile,
|
||||
SelectMultipleFilterPlain,
|
||||
SendMessageForm,
|
||||
SignupForm,
|
||||
StripeBankAccountTokenInputField,
|
||||
|
|
|
|||
|
|
@ -532,10 +532,10 @@
|
|||
"SelectMultipleFilterForm.cancel": "Cancel",
|
||||
"SelectMultipleFilterForm.clear": "Clear",
|
||||
"SelectMultipleFilterForm.submit": "Apply",
|
||||
"SelectMultipleFilterMobileForm.clear": "Clear",
|
||||
"SelectMultipleFilterMobileForm.labelSelected": "{labelText} • {count}",
|
||||
"SelectMultipleFilterPlainForm.clear": "Clear",
|
||||
"SelectMultipleFilterPlainForm.labelSelected": "{labelText} • {count}",
|
||||
"SelectSingleFilter.clear": "Clear",
|
||||
"SelectSingleFilterMobile.clear": "Clear",
|
||||
"SelectSingleFilterPlain.clear": "Clear",
|
||||
"SendMessageForm.sendFailed": "Failed to send. Please try again.",
|
||||
"SendMessageForm.sendMessage": "Send message",
|
||||
"SignupForm.emailInvalid": "A valid email address is required",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue