Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createURL(state, {absolute}) {
const currentQueryString = this.urlUtils.readUrl();
const filteredState = state.filter(this.trackedParameters);
const foreignConfig = algoliasearchHelper
.url
.getUnrecognizedParametersInQueryString(currentQueryString, {mapping: this.mapping});
// Add instantsearch version to reconciliate old url with newer versions
// eslint-disable-next-line camelcase
foreignConfig.is_v = majorVersionNumber;
const relative = this
.urlUtils
.createURL(algoliasearchHelper.url.getQueryStringFromState(filteredState, {mapping: this.mapping}));
return absolute ? getFullURL(relative) : relative;
}
createURL(state, {absolute}) {
const currentQueryString = this.urlUtils.readUrl();
const filteredState = state.filter(this.trackedParameters);
const foreignConfig = algoliasearchHelper
.url
.getUnrecognizedParametersInQueryString(currentQueryString, {mapping: this.mapping});
// Add instantsearch version to reconciliate old url with newer versions
// eslint-disable-next-line camelcase
foreignConfig.is_v = majorVersionNumber;
const relative = this
.urlUtils
.createURL(algoliasearchHelper.url.getQueryStringFromState(filteredState, {mapping: this.mapping}));
return absolute ? getFullURL(relative) : relative;
}
refinementList: require('../widgets/refinement-list/refinement-list.js'),
numericRefinementList: require('../widgets/numeric-refinement-list/numeric-refinement-list.js'),
numericSelector: require('../widgets/numeric-selector/numeric-selector.js'),
pagination: require('../widgets/pagination/pagination.js'),
priceRanges: require('../widgets/price-ranges/price-ranges.js'),
searchBox: require('../widgets/search-box/search-box.js'),
rangeSlider: require('../widgets/range-slider/range-slider.js'),
sortBySelector: require('../widgets/sort-by-selector/sort-by-selector.js'),
starRating: require('../widgets/star-rating/star-rating.js'),
stats: require('../widgets/stats/stats.js'),
toggle: require('../widgets/toggle/toggle.js')
};
instantsearch.version = require('./version.js');
instantsearch.createQueryString = algoliasearchHelper.url.getQueryStringFromState;
export default instantsearch;