Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pageScope?: number // Number of page to show before/after the current number
listComponent?: any
}
export class Pagination extends SearchkitComponent {
accessor:PaginationAccessor
static translations:any = {
"pagination.previous":"Previous",
"pagination.next":"Next"
}
translations = Pagination.translations
static propTypes = defaults({
translations:SearchkitComponent.translationsPropType(
Pagination.translations
),
showNumbers:React.PropTypes.bool,
pageScope: React.PropTypes.number,
listComponent: React.PropTypes.any,
}, SearchkitComponent.propTypes)
static defaultProps = {
listComponent: Toggle
}
defineAccessor() {
return new PaginationAccessor("p")
}
getCurrentPage():number {
include?: Array | string
exclude?: Array | string
collapsable?: boolean
showCount?: boolean
}
export class RefinementListFilter extends SearchkitComponent {
accessor: FacetAccessor
static propTypes = defaults({
field: React.PropTypes.string.isRequired,
operator: React.PropTypes.oneOf(["AND", "OR"]),
size: React.PropTypes.number,
title: React.PropTypes.string.isRequired,
id: React.PropTypes.string.isRequired,
translations: SearchkitComponent.translationsPropType(
FacetAccessor.translations
),
orderKey: React.PropTypes.string,
orderDirection: React.PropTypes.oneOf(["asc", "desc"]),
include: React.PropTypes.oneOfType([
React.PropTypes.string, React.PropTypes.array
]),
exclude: React.PropTypes.oneOfType([
React.PropTypes.string, React.PropTypes.array
]),
collapsable: React.PropTypes.bool,
showCount: React.PropTypes.bool,
}, SearchkitComponent.propTypes)
static defaultProps = {
listComponent: CheckboxItemList,
'NoHits.SearchWithoutFilters': 'Search for {query} without filters',
'NoHits.Error': "Sorry, we're having technical issues. Please check your internet connection and try again.",
'NoHits.ResetSearch': 'Reset Search'
}
translations = CRUKSearchkitNoResults.translations
static propTypes = defaults({
suggestionsField:React.PropTypes.string,
errorComponent: React.PropTypes.func,
component: React.PropTypes.func,
noResultsLabel: React.PropTypes.object,
noResultsTitle: React.PropTypes.string,
noResultsBody: React.PropTypes.object,
errorMessage: React.PropTypes.string,
translations:SearchkitComponent.translationsPropType(
CRUKSearchkitNoResults.translations
)
}, SearchkitComponent.propTypes)
static defaultProps = {
errorComponent: CRUKSearchkitNoResultsErrorDisplay,
component: CRUKSearchkitNoResultsDisplay
}
componentWillMount(){
super.componentWillMount()
this.noFiltersAccessor = this.searchkit.addAccessor(
new NoFiltersHitCountAccessor()
)
if(this.props.suggestionsField){
this.suggestionsAccessor = this.searchkit.addAccessor(
label: string
containerComponent?: ReactComponentType
listComponent?: ReactComponentType
collapsable?: boolean
showCount?: boolean
}
export class CheckboxFilter extends SearchkitComponent {
accessor: CheckboxFilterAccessor
static propTypes = defaults({
id: React.PropTypes.string.isRequired,
title: React.PropTypes.string.isRequired,
label: React.PropTypes.string.isRequired,
filter: React.PropTypes.object.isRequired,
translations: SearchkitComponent.translationsPropType(
CheckboxFilterAccessor.translations
),
collapsable: React.PropTypes.bool,
showCount: React.PropTypes.bool,
}, SearchkitComponent.propTypes)
static defaultProps = {
listComponent: CheckboxItemList,
containerComponent: Panel,
collapsable: false,
showCount: true
}
constructor(props){
super(props)
this.toggleFilter = this.toggleFilter.bind(this)