How to use the @appbaseio/reactivemaps.AppbaseSensorHelper function in @appbaseio/reactivemaps

To help you get started, we’ve selected a few @appbaseio/reactivemaps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appbaseio / reactivesearch / lib / sensors / NestedMultiList.js View on Github external
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;
	}
github appbaseio / reactivesearch / lib / sensors / NestedList.js View on Github external
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;
	}
github appbaseio / reactivesearch / lib / sensors / MultiLevelMenu.js View on Github external
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: ""
				};
github appbaseio / reactivesearch / lib / sensors / DynamicRangeSlider.js View on Github external
var execQuery = function execQuery() {
				if (_this6.props.onValueChange) {
					_this6.props.onValueChange(obj.value);
				}
				_reactivemaps.AppbaseSensorHelper.selectedSensor.set(obj, true);
			};
github appbaseio / reactivesearch / lib / sensors / RatingsFilter.js View on Github external
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);
			};
github appbaseio / reactivesearch / lib / actuators / ResultCard.js View on Github external
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);
		}
	}, {
github appbaseio / reactivesearch / lib / sensors / CategorySearch.js View on Github external
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);
				}
			});
		}
	}, {
github appbaseio / reactivesearch / lib / actuators / ResultCard.js View on Github external
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);
		}
	}, {
github appbaseio / reactivesearch / lib / addons / Pagination.js View on Github external
value: function setQueryInfo() {
			var obj = {
				key: this.props.componentId,
				value: this.state.currentValue
			};
			_reactivemaps.AppbaseSensorHelper.selectedSensor.setPaginationInfo(obj);
		}
github appbaseio / reactivesearch / lib / sensors / RatingsFilter.js View on Github external
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;
	}