Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
storedItems: [],
rawData: {
hits: {
hits: []
}
},
subItems: [],
selectedValues: {}
};
_this.nested = ["nestedParentaggs"];
_this.sortObj = {
aggSort: _this.props.sortBy
};
_this.channelId = null;
_this.channelListener = null;
_this.urlParams = props.URLParams ? _reactivemaps.AppbaseSensorHelper.URLParams.get(props.componentId) : null;
_this.urlParams = _this.urlParams ? _this.urlParams.split("/") : null;
_this.filterBySearch = _this.filterBySearch.bind(_this);
_this.onItemClick = _this.onItemClick.bind(_this);
_this.customQuery = _this.customQuery.bind(_this);
_this.handleSelect = _this.handleSelect.bind(_this);
_this.nestedAggQuery = _this.nestedAggQuery.bind(_this);
_this.type = "term";
return _this;
}
storedItems: [],
rawData: {
hits: {
hits: []
}
},
subItems: [],
selectedValues: []
};
_this.nested = ["nestedParentaggs"];
_this.sortObj = {
aggSort: _this.props.sortBy
};
_this.channelId = null;
_this.channelListener = null;
_this.urlParams = props.URLParams ? _reactivemaps.AppbaseSensorHelper.URLParams.get(props.componentId) : null;
_this.urlParams = _this.urlParams ? _this.urlParams.split("/") : null;
_this.filterBySearch = _this.filterBySearch.bind(_this);
_this.onItemSelect = _this.onItemSelect.bind(_this);
_this.onItemClick = _this.onItemClick.bind(_this);
_this.customQuery = _this.customQuery.bind(_this);
_this.handleSelect = _this.handleSelect.bind(_this);
_this.nestedAggQuery = _this.nestedAggQuery.bind(_this);
_this.type = "term";
return _this;
}
if (_this3.props.onQueryChange && JSON.stringify(_this3.previousQuery) !== JSON.stringify(currentQuery)) {
_this3.props.onQueryChange(_this3.previousQuery, currentQuery);
}
_this3.previousQuery = currentQuery;
return currentQuery;
};
var ob = {
key: this.props.componentId,
value: {
queryType: this.type,
inputData: this.props.dataField[0],
customQuery: getQuery,
defaultSelected: this.urlParams !== null ? this.urlParams : this.props.defaultSelected
}
};
_reactivemaps.AppbaseSensorHelper.selectedSensor.setSensorInfo(ob);
function setInternalQuery(key, level) {
var obj = {
key: key,
value: {
queryType: "term",
inputData: this.props.dataField[level],
customQuery: function customQuery() {
return null;
}
}
};
_reactivemaps.AppbaseSensorHelper.selectedSensor.setSensorInfo(obj);
var obj1 = {
key: key,
value: ""
};
var execQuery = function execQuery() {
if (_this6.props.onValueChange) {
_this6.props.onValueChange(obj.value);
}
_reactivemaps.AppbaseSensorHelper.selectedSensor.set(obj, true);
};
var execQuery = function execQuery() {
if (_this5.props.onValueChange) {
_this5.props.onValueChange(obj.value);
}
var isExecuteQuery = true;
if (_this5.props.URLParams) {
_reactivemaps.AppbaseSensorHelper.URLParams.update(_this5.props.componentId, record ? JSON.stringify(record) : null, _this5.props.URLParams);
}
_reactivemaps.AppbaseSensorHelper.selectedSensor.set(obj, isExecuteQuery);
};
value: function setQueryInfo() {
var valObj = {
queryType: "match",
inputData: this.props.dataField,
customQuery: this.customQuery
};
var obj = {
key: "paginationChanges",
value: valObj
};
_reactivemaps.AppbaseSensorHelper.selectedSensor.setSensorInfo(obj);
}
}, {
value: function listenFilter() {
var _this2 = this;
this.filterListener = _reactivemaps.AppbaseSensorHelper.sensorEmitter.addListener("clearFilter", function (data) {
if (data === _this2.props.componentId) {
_this2.defaultValue = "";
_this2.changeValue(_this2.defaultValue);
}
});
}
}, {
value: function setQueryForPagination() {
var valObj = {
queryType: "match",
inputData: this.props.dataField,
customQuery: function customQuery() {
return null;
}
};
var obj = {
key: "paginationChanges",
value: valObj
};
_reactivemaps.AppbaseSensorHelper.selectedSensor.setSensorInfo(obj);
}
}, {
value: function setQueryInfo() {
var obj = {
key: this.props.componentId,
value: this.state.currentValue
};
_reactivemaps.AppbaseSensorHelper.selectedSensor.setPaginationInfo(obj);
}
function RatingsFilter(props) {
_classCallCheck(this, RatingsFilter);
var _this = _possibleConstructorReturn(this, (RatingsFilter.__proto__ || Object.getPrototypeOf(RatingsFilter)).call(this, props));
_this.state = {
selected: null
};
_this.type = "range";
_this.urlParams = props.URLParams ? _reactivemaps.AppbaseSensorHelper.URLParams.get(props.componentId, false, true) : null;
_this.handleChange = _this.handleChange.bind(_this);
_this.customQuery = _this.customQuery.bind(_this);
return _this;
}