Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
metagrover committed May 31, 2017
2 parents 4829a34 + ed2278c commit 562f607
Show file tree
Hide file tree
Showing 15 changed files with 494 additions and 453 deletions.
88 changes: 45 additions & 43 deletions dist/airbnb_recipe.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/style.min.css

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/ecommerce_recipe.bundle.js

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/meetup_recipe.bundle.js

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/news_recipe.bundle.js

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/producthunt_recipe.bundle.js

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/simplebeds_recipe.bundle.js

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions dist/yelp_recipe.bundle.js

Large diffs are not rendered by default.

68 changes: 30 additions & 38 deletions lib/sensors/CategorySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,50 +217,42 @@ var CategorySearch = function (_Component) {
var _this3 = this;

if (input && input.value) {
var _ret = function () {
var query = [];
var appbaseField = _this3.fieldType === "string" ? [_this3.props.appbaseField] : _this3.props.appbaseField;
appbaseField.forEach(function (field, index) {
var queryObj = {
match_phrase_prefix: _defineProperty({}, field, {
query: input.value
})
};
if (_this3.props.weights && _this3.props.weights[index]) {
queryObj.match_phrase_prefix[field].boost = _this3.props.weights[index];
}
query.push(queryObj);
});

if (input.category && input.category !== null) {
query = {
bool: {
should: query,
minimum_should_match: 1
}
};
return {
v: {
bool: {
must: [query, {
term: _defineProperty({}, _this3.props.categoryField, input.category)
}]
}
}
};
var query = [];
var appbaseField = this.fieldType === "string" ? [this.props.appbaseField] : this.props.appbaseField;
appbaseField.forEach(function (field, index) {
var queryObj = {
match_phrase_prefix: _defineProperty({}, field, {
query: input.value
})
};
if (_this3.props.weights && _this3.props.weights[index]) {
queryObj.match_phrase_prefix[field].boost = _this3.props.weights[index];
}
query.push(queryObj);
});

if (input.category && input.category !== null) {
query = {
bool: {
should: query,
minimum_should_match: 1
}
};
return {
v: {
bool: {
should: query,
minimum_should_match: 1
}
bool: {
must: [query, {
term: _defineProperty({}, this.props.categoryField, input.category)
}]
}
};
}();
}

if ((typeof _ret === "undefined" ? "undefined" : _typeof(_ret)) === "object") return _ret.v;
return {
bool: {
should: query,
minimum_should_match: 1
}
};
}
return null;
}
Expand Down
20 changes: 9 additions & 11 deletions lib/sensors/DynamicRangeSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,13 @@ var DynamicRangeSlider = function (_Component) {
key: "updateValues",
value: function updateValues(defaultSelected) {
if (defaultSelected) {
var _state$range = this.state.range;
var min = _state$range.min;
var max = _state$range.max;

var _ref = this.urlParams !== null ? this.urlParams : defaultSelected(min, max);

var start = _ref.start;
var end = _ref.end;
var _state$range = this.state.range,
min = _state$range.min,
max = _state$range.max;

var _ref = this.urlParams !== null ? this.urlParams : defaultSelected(min, max),
start = _ref.start,
end = _ref.end;

if (start >= min && end <= max) {
var values = {
Expand Down Expand Up @@ -408,9 +406,9 @@ var DynamicRangeSlider = function (_Component) {
histogram = null,
marks = {};

var _state$range2 = this.state.range;
var min = _state$range2.min;
var max = _state$range2.max;
var _state$range2 = this.state.range,
min = _state$range2.min,
max = _state$range2.max;


if (this.props.title) {
Expand Down
60 changes: 29 additions & 31 deletions lib/sensors/RatingsFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,39 +174,37 @@ var RatingsFilter = function (_Component) {
var buttons = void 0;
var selectedItem = this.state.selected && this.state.selected.start ? this.state.selected.start : this.props.data.start;
if (this.props.data) {
(function () {
var maxEnd = 5;
_this4.props.data.forEach(function (item) {
maxEnd = item.end > maxEnd ? item.end : maxEnd;
});

buttons = _this4.props.data.map(function (record) {
var cx = selectedItem === record.start ? "rbc-active" : "";
return _react2.default.createElement(
"div",
{ className: "rbc-list-item row", key: record.label, onClick: function onClick() {
return _this4.handleChange(record);
} },
var maxEnd = 5;
this.props.data.forEach(function (item) {
maxEnd = item.end > maxEnd ? item.end : maxEnd;
});

buttons = this.props.data.map(function (record) {
var cx = selectedItem === record.start ? "rbc-active" : "";
return _react2.default.createElement(
"div",
{ className: "rbc-list-item row", key: record.label, onClick: function onClick() {
return _this4.handleChange(record);
} },
_react2.default.createElement(
"label",
{ className: "rbc-label " + cx },
_react2.default.createElement(_reactStars2.default, {
count: maxEnd,
value: record.start,
size: 20,
color1: "#bbb",
edit: false,
color2: "#ffd700"
}),
_react2.default.createElement(
"label",
{ className: "rbc-label " + cx },
_react2.default.createElement(_reactStars2.default, {
count: maxEnd,
value: record.start,
size: 20,
color1: "#bbb",
edit: false,
color2: "#ffd700"
}),
_react2.default.createElement(
"span",
null,
record.label
)
"span",
null,
record.label
)
);
});
})();
)
);
});
}
return buttons;
}
Expand Down
44 changes: 21 additions & 23 deletions lib/sensors/ToggleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,28 @@ var ToggleList = function (_Component) {
_reactivemaps.AppbaseSensorHelper.URLParams.update(this.props.componentId, this.setURLParam(_obj.value), this.props.URLParams);
_reactivemaps.AppbaseSensorHelper.selectedSensor.set(_obj, true);
} else {
(function () {
var records = [];
if (_this3.defaultSelected) {
_this3.defaultSelected.forEach(function (item) {
records = records.concat(_this3.props.data.filter(function (record) {
return item.indexOf(record.label) > -1;
}));
});
} else if (_this3.defaultSelected === null) {
records = null;
}
_this3.setState({
selected: records
var _records = [];
if (this.defaultSelected) {
this.defaultSelected.forEach(function (item) {
_records = _records.concat(_this3.props.data.filter(function (record) {
return item.indexOf(record.label) > -1;
}));
});
if (_this3.props.onValueChange) {
_this3.props.onValueChange(obj.value);
}
var obj = {
key: _this3.props.componentId,
value: records
};
_reactivemaps.AppbaseSensorHelper.URLParams.update(_this3.props.componentId, _this3.setURLParam(obj.value), _this3.props.URLParams);
_reactivemaps.AppbaseSensorHelper.selectedSensor.set(obj, true);
})();
} else if (this.defaultSelected === null) {
_records = null;
}
this.setState({
selected: _records
});
if (this.props.onValueChange) {
this.props.onValueChange(_obj2.value);
}
var _obj2 = {
key: this.props.componentId,
value: _records
};
_reactivemaps.AppbaseSensorHelper.URLParams.update(this.props.componentId, this.setURLParam(_obj2.value), this.props.URLParams);
_reactivemaps.AppbaseSensorHelper.selectedSensor.set(_obj2, true);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appbaseio/reactivesearch",
"version": "0.5.6",
"version": "0.5.7",
"description": "A React UI components library for building search experiences",
"main": "lib/app.js",
"scripts": {
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://github.com/appbaseio/reactivesearch#readme",
"dependencies": {
"@appbaseio/reactivemaps": "1.0.0-alpha29",
"@appbaseio/reactivemaps": "1.0.0-alpha30",
"classnames": "^2.2.5",
"jquery": "^3.1.1",
"lodash": "^4.15.0",
Expand Down
79 changes: 41 additions & 38 deletions umd/ReactiveSearch.js

Large diffs are not rendered by default.

54 changes: 46 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@appbaseio/[email protected]alpha38":
version "1.0.0-alpha38"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.0.0-alpha38.tgz#f2d20f6f8360739ca7d7d671bfbcc969aa78eb69"
"@appbaseio/[email protected]alpha39":
version "1.0.0-alpha39"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivebase/-/reactivebase-1.0.0-alpha39.tgz#27a00be10c4f8eb2d88f8d0274f4393280cff86c"
dependencies:
appbase-js "^0.11.0"
babel-preset-stage-0 "^6.5.0"
Expand All @@ -17,6 +17,7 @@
react "^15.4.2"
react-addons-shallow-compare "^15.4.2"
react-addons-test-utils "^15.4.2"
react-autosuggest "^9.0.1"
react-dates "^4.3.0"
react-dom "^15.4.2"
react-moment-proptypes "^1.3.0"
Expand All @@ -30,11 +31,11 @@
grunt "~0.4.0"
serve-static "^1.10.2"

"@appbaseio/[email protected]alpha29":
version "1.0.0-alpha29"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivemaps/-/reactivemaps-1.0.0-alpha29.tgz#9148dcc1709b8003024acfaa950bcac8587f7100"
"@appbaseio/[email protected]alpha30":
version "1.0.0-alpha30"
resolved "https://registry.yarnpkg.com/@appbaseio/reactivemaps/-/reactivemaps-1.0.0-alpha30.tgz#3f1d31aff15e96b5e4a2b1da8ee44edeb77c4db0"
dependencies:
"@appbaseio/reactivebase" "1.0.0-alpha38"
"@appbaseio/reactivebase" "1.0.0-alpha39"
"@appbaseio/reactivemaps-manual" "1.0.0-alpha"
appbase-js "^0.11.0"
axios "^0.15.2"
Expand Down Expand Up @@ -4129,7 +4130,7 @@ longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"

loose-envify@^1.0.0, loose-envify@^1.1.0:
loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
dependencies:
Expand Down Expand Up @@ -5142,6 +5143,13 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"

prop-types@^15.5.8:
version "15.5.10"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154"
dependencies:
fbjs "^0.8.9"
loose-envify "^1.3.1"

proxy-addr@~1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3"
Expand Down Expand Up @@ -5275,6 +5283,22 @@ react-addons-test-utils@^15.4.2:
fbjs "^0.8.4"
object-assign "^4.1.0"

react-autosuggest@^9.0.1:
version "9.0.1"
resolved "https://registry.yarnpkg.com/react-autosuggest/-/react-autosuggest-9.0.1.tgz#b56eaf8fc3dd46d36b92c5395b6b07174bc10912"
dependencies:
prop-types "^15.5.8"
react-autowhatever "^10.0.0"
shallow-equal "^1.0.0"

react-autowhatever@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/react-autowhatever/-/react-autowhatever-10.0.0.tgz#2d7fd54f0a330e33c06c53a83ef789da0ebb65bf"
dependencies:
prop-types "^15.5.8"
react-themeable "^1.1.0"
section-iterator "^2.0.0"

react-color@^2.4.3:
version "2.11.4"
resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.11.4.tgz#43f64630e5d47a243f6bd35300224c9c69c73921"
Expand Down Expand Up @@ -5434,6 +5458,12 @@ react-textarea-autosize@^4.0.5:
version "4.0.5"
resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-4.0.5.tgz#55379f6a6fa575fc87d1b8de2756e57e3b6c995d"

react-themeable@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/react-themeable/-/react-themeable-1.1.0.tgz#7d4466dd9b2b5fa75058727825e9f152ba379a0e"
dependencies:
object-assign "^3.0.0"

react-tooltip@^3.1.8:
version "3.2.10"
resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-3.2.10.tgz#484a5c8c0709701e89db9e0281ec32a50a0925ea"
Expand Down Expand Up @@ -5785,6 +5815,10 @@ scriptjs@^2.5.7, scriptjs@^2.5.8:
version "2.5.8"
resolved "https://registry.yarnpkg.com/scriptjs/-/scriptjs-2.5.8.tgz#d0c43955c2e6bad33b6e4edf7b53b8965aa7ca5f"

section-iterator@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/section-iterator/-/section-iterator-2.0.0.tgz#bf444d7afeeb94ad43c39ad2fb26151627ccba2a"

"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
Expand Down Expand Up @@ -5878,6 +5912,10 @@ shallow-clone@^0.1.2:
lazy-cache "^0.2.3"
mixin-object "^2.0.1"

shallow-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shallow-equal/-/shallow-equal-1.0.0.tgz#508d1838b3de590ab8757b011b25e430900945f7"

[email protected], shallowequal@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e"
Expand Down

0 comments on commit 562f607

Please sign in to comment.