Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
metagrover committed May 10, 2017
2 parents 6f96b3f + 005d64a commit a84a76a
Show file tree
Hide file tree
Showing 24 changed files with 582 additions and 537 deletions.
17 changes: 12 additions & 5 deletions app/sensors/CategorySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default class CategorySearch extends Component {
// default query
defaultSearchQuery(input) {
if (input && input.value) {
const query = [];
let query = [];
if (this.fieldType === "string") {
query.push({
match_phrase_prefix: {
Expand All @@ -149,6 +149,13 @@ export default class CategorySearch extends Component {
}
});
});

query = {
bool: {
should: query,
minimum_should_match: 1
}
}
}

if (input.category && input.category !== null) {
Expand Down Expand Up @@ -299,7 +306,7 @@ export default class CategorySearch extends Component {
if(this.props.onValueChange) {
this.props.onValueChange(obj.value);
}
helper.URLParams.update(this.props.componentId, finalVal.value, this.props.URLParam);
helper.URLParams.update(this.props.componentId, finalVal.value, this.props.URLParams);
helper.selectedSensor.set(obj, true);
this.setState({
currentValue: value
Expand Down Expand Up @@ -366,15 +373,15 @@ CategorySearch.propTypes = {
React.PropTypes.arrayOf(React.PropTypes.string)
]),
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

// Default props value
CategorySearch.defaultProps = {
placeholder: "Search",
highlight: false,
componentStyle: {},
URLParam: false
URLParams: false
};

// context type
Expand All @@ -393,5 +400,5 @@ CategorySearch.types = {
defaultSelected: TYPES.STRING,
customQuery: TYPES.FUNCTION,
highlight: TYPES.BOOLEAN,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
8 changes: 4 additions & 4 deletions app/sensors/DynamicRangeSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export default class DynamicRangeSlider extends Component {
if(this.props.onValueChange) {
this.props.onValueChange(obj.value);
}
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParam);
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParams);
helper.selectedSensor.set(obj, true);

this.setState({
Expand Down Expand Up @@ -394,15 +394,15 @@ DynamicRangeSlider.propTypes = {
onValueChange: React.PropTypes.func,
interval: React.PropTypes.number,
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

DynamicRangeSlider.defaultProps = {
title: null,
stepValue: 1,
showHistogram: true,
componentStyle: {},
URLParam: false
URLParams: false
};

// context type
Expand All @@ -422,5 +422,5 @@ DynamicRangeSlider.types = {
showHistogram: TYPES.BOOLEAN,
customQuery: TYPES.FUNCTION,
initialLoader: TYPES.OBJECT,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
8 changes: 4 additions & 4 deletions app/sensors/NestedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export default class NestedList extends Component {
if(this.props.onValueChange) {
this.props.onValueChange(obj.value);
}
helper.URLParams.update(this.props.componentId, value, this.props.URLParam);
helper.URLParams.update(this.props.componentId, value, this.props.URLParams);
helper.selectedSensor.set(obj, isExecuteQuery);
}

Expand Down Expand Up @@ -484,7 +484,7 @@ NestedList.propTypes = {
react: React.PropTypes.object,
onValueChange: React.PropTypes.func,
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

// Default props value
Expand All @@ -496,7 +496,7 @@ NestedList.defaultProps = {
title: null,
placeholder: "Search",
componentStyle: {},
URLParam: false
URLParams: false
};

// context type
Expand All @@ -518,5 +518,5 @@ NestedList.types = {
defaultSelected: TYPES.ARRAY,
customQuery: TYPES.FUNCTION,
initialLoader: TYPES.OBJECT,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
8 changes: 4 additions & 4 deletions app/sensors/RatingsFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class RatingsFilter extends Component {
}
// pass the selected sensor value with componentId as key,
const isExecuteQuery = true;
helper.URLParams.update(this.props.componentId, JSON.stringify(record), this.props.URLParam);
helper.URLParams.update(this.props.componentId, JSON.stringify(record), this.props.URLParams);
helper.selectedSensor.set(obj, isExecuteQuery);
}

Expand Down Expand Up @@ -160,14 +160,14 @@ RatingsFilter.propTypes = {
customQuery: React.PropTypes.func,
onValueChange: React.PropTypes.func,
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

// Default props value
RatingsFilter.defaultProps = {
title: null,
componentStyle: {},
URLParam: false
URLParams: false
};

// context type
Expand All @@ -183,5 +183,5 @@ RatingsFilter.types = {
data: TYPES.OBJECT,
defaultSelected: TYPES.OBJECT,
customQuery: TYPES.FUNCTION,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
12 changes: 6 additions & 6 deletions app/sensors/TagCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class TagCloud extends Component {
key: this.props.componentId,
value: this.selectedValue
};
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParam);
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParams);
helper.selectedSensor.set(obj, true);
} else if (!this.props.multiSelect && this.defaultSelected !== defaultValue) {
this.defaultSelected = defaultValue;
Expand All @@ -91,7 +91,7 @@ export default class TagCloud extends Component {
key: this.props.componentId,
value: this.selectedValue
};
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParam);
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParams);
helper.selectedSensor.set(obj, true);
}
}, 300);
Expand Down Expand Up @@ -270,7 +270,7 @@ export default class TagCloud extends Component {
key: this.props.componentId,
value: this.selectedValue
};
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParam);
helper.URLParams.update(this.props.componentId, obj.value, this.props.URLParams);
helper.selectedSensor.set(obj, true);
}

Expand Down Expand Up @@ -348,7 +348,7 @@ TagCloud.propTypes = {
react: React.PropTypes.object,
onValueChange: React.PropTypes.func,
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

TagCloud.defaultProps = {
Expand All @@ -357,7 +357,7 @@ TagCloud.defaultProps = {
size: 100,
title: null,
componentStyle: {},
URLParam: false
URLParams: false
};

TagCloud.contextTypes = {
Expand All @@ -376,5 +376,5 @@ TagCloud.types = {
initialLoader: TYPES.STRING,
defaultSelected: TYPES.STRING,
react: TYPES.OBJECT,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
12 changes: 6 additions & 6 deletions app/sensors/ToggleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class ToggleList extends Component {
key: props.componentId,
value: records
};
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParam);
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParams);
helper.selectedSensor.set(obj, true);
}
} else {
Expand All @@ -73,7 +73,7 @@ export default class ToggleList extends Component {
key: props.componentId,
value: records
};
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParam);
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParams);
helper.selectedSensor.set(obj, true);
}
} else {
Expand Down Expand Up @@ -154,7 +154,7 @@ export default class ToggleList extends Component {
}
// pass the selected sensor value with componentId as key,
const isExecuteQuery = true;
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParam);
helper.URLParams.update(this.props.componentId, this.setURLParam(obj.value), this.props.URLParams);
helper.selectedSensor.set(obj, isExecuteQuery);
}

Expand Down Expand Up @@ -228,14 +228,14 @@ ToggleList.propTypes = {
customQuery: React.PropTypes.func,
onValueChange: React.PropTypes.func,
componentStyle: React.PropTypes.object,
URLParam: React.PropTypes.bool
URLParams: React.PropTypes.bool
};

// Default props value
ToggleList.defaultProps = {
multiSelect: true,
componentStyle: {},
URLParam: false
URLParams: false
};

// context type
Expand All @@ -252,5 +252,5 @@ ToggleList.types = {
defaultSelected: TYPES.ARRAY,
multiSelect: TYPES.BOOLEAN,
customQuery: TYPES.FUNCTION,
URLParam: TYPES.BOOLEAN
URLParams: TYPES.BOOLEAN
};
2 changes: 1 addition & 1 deletion app/stories/CategorySearch.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class CategorySearchDefault extends Component {
<div className="row">
<div className="col s6 col-xs-6">
<CategorySearch
appbaseField="name"
appbaseField={["name", "color"]}
categoryField="brand.raw"
componentId="CarSensor"
title="CategorySearch"
Expand Down
101 changes: 54 additions & 47 deletions dist/airbnb_recipe.bundle.js

Large diffs are not rendered by default.

100 changes: 53 additions & 47 deletions dist/ecommerce_recipe.bundle.js

Large diffs are not rendered by default.

100 changes: 53 additions & 47 deletions dist/meetup_recipe.bundle.js

Large diffs are not rendered by default.

100 changes: 53 additions & 47 deletions dist/news_recipe.bundle.js

Large diffs are not rendered by default.

101 changes: 54 additions & 47 deletions dist/producthunt_recipe.bundle.js

Large diffs are not rendered by default.

100 changes: 53 additions & 47 deletions dist/simplebeds_recipe.bundle.js

Large diffs are not rendered by default.

101 changes: 54 additions & 47 deletions dist/yelp_recipe.bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit a84a76a

Please sign in to comment.