Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return currentQuery;
};
const obj = {
key: props.componentId,
value: {
queryType: this.type,
inputData: props.dataField,
customQuery: getQuery,
reactiveId: this.context.reactiveId,
showFilter: props.showFilter,
filterLabel: props.filterLabel ? props.filterLabel : props.componentId,
component: "TagCloud",
defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
}
};
helper.selectedSensor.setSensorInfo(obj);
}
defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
}
};
if (props.highlight) {
obj.value.externalQuery = this.highlightQuery(props);
}
helper.selectedSensor.setSensorInfo(obj);
const searchObj = {
key: this.searchInputId,
value: {
queryType: "multi_match",
inputData: props.dataField,
customQuery: this.defaultSearchQuery
}
};
helper.selectedSensor.setSensorInfo(searchObj);
}
const obj = {
key,
value: {
queryType: "term",
inputData: this.props.dataField[level],
customQuery() {
return null;
}
}
};
helper.selectedSensor.setSensorInfo(obj);
const obj1 = {
key,
value: ""
};
helper.selectedSensor.set(obj1);
}
setInternalQuery.call(this, "subCategory", 0);
this.nested.forEach((name) => {
const obj = {
key: name,
value: this.sortObj
};
helper.selectedSensor.setSortInfo(obj);
});
}
if (this.props.onQueryChange && JSON.stringify(this.previousQuery) !== JSON.stringify(currentQuery)) {
this.props.onQueryChange(this.previousQuery, currentQuery);
}
this.previousQuery = currentQuery;
return currentQuery;
};
const obj1 = {
key: `${this.props.componentId}-internal`,
value: {
queryType: "range",
inputData: this.props.dataField,
customQuery: getQuery
}
};
helper.selectedSensor.setSensorInfo(obj);
helper.selectedSensor.setSensorInfo(obj1);
this.setRangeValue();
}
setRangeValue(value = "range") {
const objValue = {
key: `${this.props.componentId}-internal`,
value
};
helper.selectedSensor.set(objValue, true);
this.updateValues(this.props.defaultSelected);
}
showFilter: this.props.showFilter,
filterLabel: this.props.filterLabel ? this.props.filterLabel : this.props.componentId,
component: "NestedList",
defaultSelected: this.urlParams !== null ? this.urlParams : this.props.defaultSelected
}
};
helper.selectedSensor.setSensorInfo(obj);
const nestedObj = {
key: `nestedSelectedValues-${this.props.componentId}`,
value: {
queryType: this.type,
inputData: this.props.dataField[0],
customQuery: () => { }
}
};
helper.selectedSensor.setSensorInfo(nestedObj);
}
setValue(value, isExecuteQuery = false, changeNestedValue = true) {
value = value && value.length ? value : null;
const obj = {
key: this.props.componentId,
value
};
const nestedObj = {
key: `nestedSelectedValues-${this.props.componentId}`,
value
};
helper.selectedSensor.set(nestedObj, changeNestedValue);
const execQuery = () => {
if (this.props.onValueChange) {
this.props.onValueChange(obj.value);
}
const paramValue = value && value.length ? value.join("/") : null;
if (this.props.URLParams) {
helper.URLParams.update(this.props.componentId, paramValue, this.props.URLParams);
}
helper.selectedSensor.set(obj, isExecuteQuery);
};
if (this.props.beforeValueChange) {
this.props.beforeValueChange(obj.value)
.then(() => {
execQuery();
key: props.componentId,
value: {
queryType: this.type,
inputData: props.dataField,
customQuery: getQuery,
reactiveId: this.context.reactiveId,
showFilter: props.showFilter,
filterLabel: props.filterLabel ? props.filterLabel : props.componentId,
component: "CategorySearch",
defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
}
};
if (props.highlight) {
obj.value.externalQuery = this.highlightQuery(props);
}
helper.selectedSensor.setSensorInfo(obj);
const searchObj = {
key: this.searchInputId,
value: {
queryType: "multi_match",
inputData: props.dataField,
customQuery: this.defaultSearchQuery
}
};
helper.selectedSensor.setSensorInfo(searchObj);
}
setTimeout(() => {
const obj = {
key: "streamChanges",
value: ""
};
helper.selectedSensor.set(obj, true);
}, 100);
}