react-instantsearch-hooks-web
Advanced tools
Comparing version 6.24.3 to 6.25.0
@@ -41,12 +41,12 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_Breadcrumb.Breadcrumb, (0, _extends2.default)({}, props, { | ||
createURL: createURL, | ||
var uiProps = { | ||
items: items, | ||
hasItems: canRefine, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
separator: separator, | ||
translations: { | ||
root: 'Home' | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_Breadcrumb.Breadcrumb, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -38,9 +38,10 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_ClearRefinements.ClearRefinements, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
onClick: refine, | ||
disabled: !canRefine, | ||
translations: { | ||
resetLabel: 'Clear refinements' | ||
}, | ||
onClick: refine, | ||
disabled: !canRefine | ||
})); | ||
} | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_ClearRefinements.ClearRefinements, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -39,7 +39,8 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_CurrentRefinements.CurrentRefinements, (0, _extends2.default)({}, props, { | ||
hasRefinements: canRefine, | ||
var uiProps = { | ||
items: items, | ||
onRemove: refine | ||
})); | ||
onRemove: refine, | ||
hasRefinements: canRefine | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_CurrentRefinements.CurrentRefinements, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -55,3 +55,3 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_HierarchicalMenu.HierarchicalMenu, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
items: items, | ||
@@ -61,7 +61,9 @@ hasItems: canRefine, | ||
onNavigate: refine, | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_HierarchicalMenu.HierarchicalMenu, (0, _extends2.default)({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
@@ -32,3 +32,3 @@ "use strict"; | ||
var parts = properties.map(function (singleValue) { | ||
return (0, _utils.getHighlightedParts)(singleValue.value || ''); | ||
return (0, _utils.getHighlightedParts)((0, _utils.unescape)(singleValue.value || '')); | ||
}); | ||
@@ -35,0 +35,0 @@ return /*#__PURE__*/_react.default.createElement(_Highlight.Highlight, (0, _extends2.default)({}, props, { |
@@ -24,5 +24,6 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_Hits.Hits, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
hits: hits | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_Hits.Hits, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -31,9 +31,10 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_HitsPerPage.HitsPerPage, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
items: items, | ||
currentValue: currentValue, | ||
onChange: function onChange(value) { | ||
refine(value); | ||
return refine(value); | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_HitsPerPage.HitsPerPage, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -36,7 +36,3 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_InfiniteHits.InfiniteHits, (0, _extends2.default)({}, props, { | ||
translations: { | ||
showPrevious: 'Show previous results', | ||
showMore: 'Show more results' | ||
}, | ||
var uiProps = { | ||
hits: hits, | ||
@@ -46,4 +42,9 @@ onShowPrevious: shouldShowPrevious ? showPrevious : undefined, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage | ||
})); | ||
isLastPage: isLastPage, | ||
translations: { | ||
showPrevious: 'Show previous results', | ||
showMore: 'Show more results' | ||
} | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_InfiniteHits.InfiniteHits, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -48,13 +48,15 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_Menu.Menu, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
items: items, | ||
createURL: createURL, | ||
onRefine: function onRefine(item) { | ||
refine(item.value); | ||
return refine(item.value); | ||
}, | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_Menu.Menu, (0, _extends2.default)({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
@@ -45,3 +45,10 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
pages: pages, | ||
currentPage: currentRefinement, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage, | ||
nbPages: nbPages, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
translations: { | ||
@@ -62,15 +69,10 @@ first: '‹‹', | ||
} | ||
}, | ||
} | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_Pagination.Pagination, (0, _extends2.default)({}, props, uiProps, { | ||
showFirst: showFirst, | ||
showPrevious: showPrevious, | ||
showNext: showNext, | ||
showLast: showLast, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage, | ||
currentPage: currentRefinement, | ||
nbPages: nbPages, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
pages: pages | ||
showLast: showLast | ||
})); | ||
} |
@@ -22,5 +22,6 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_PoweredBy.PoweredBy, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
url: url | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_PoweredBy.PoweredBy, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -43,3 +43,3 @@ "use strict"; | ||
var step = 1 / Math.pow(10, precision || 0); | ||
return /*#__PURE__*/_react.default.createElement(_RangeInput.RangeInput, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
range: range, | ||
@@ -54,3 +54,4 @@ start: start, | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_RangeInput.RangeInput, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -100,5 +100,5 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_RefinementList.RefinementList, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
items: items, | ||
canRefine: canRefine, | ||
items: items, | ||
onRefine: onRefine, | ||
@@ -120,7 +120,9 @@ query: query, | ||
noResults: searchable && isFromSearch && items.length === 0 && 'No results.', | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_RefinementList.RefinementList, (0, _extends2.default)({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
@@ -69,3 +69,3 @@ "use strict"; | ||
}, [query]); | ||
return /*#__PURE__*/_react.default.createElement(_SearchBox.SearchBox, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
inputRef: inputRef, | ||
@@ -80,3 +80,4 @@ isSearchStalled: isSearchStalled, | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_SearchBox.SearchBox, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -32,3 +32,3 @@ "use strict"; | ||
var parts = properties.map(function (singleValue) { | ||
return (0, _utils.getHighlightedParts)(singleValue.value || ''); | ||
return (0, _utils.getHighlightedParts)((0, _utils.unescape)(singleValue.value || '')); | ||
}); | ||
@@ -35,0 +35,0 @@ return /*#__PURE__*/_react.default.createElement(_Snippet.Snippet, (0, _extends2.default)({}, props, { |
@@ -37,7 +37,8 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_SortBy.SortBy, (0, _extends2.default)({}, props, { | ||
var uiProps = { | ||
items: options, | ||
value: currentRefinement, | ||
items: options, | ||
onChange: refine | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_SortBy.SortBy, (0, _extends2.default)({}, props, uiProps)); | ||
} |
@@ -38,12 +38,13 @@ "use strict"; | ||
return /*#__PURE__*/_react.default.createElement(_ToggleRefinement.ToggleRefinement, (0, _extends2.default)({ | ||
label: value.name | ||
}, props, { | ||
var uiProps = { | ||
checked: value.isRefined, | ||
onChange: function onChange(isChecked) { | ||
refine({ | ||
return refine({ | ||
isRefined: !isChecked | ||
}); | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_ToggleRefinement.ToggleRefinement, (0, _extends2.default)({ | ||
label: value.name | ||
}, props, uiProps)); | ||
} |
@@ -40,3 +40,3 @@ import React from 'react'; | ||
declare type UseBreadcrumbRenderState = ReturnType<typeof useBreadcrumb>; | ||
export declare type BreadcrumbProps = React.HTMLAttributes<HTMLDivElement> & Pick<UseBreadcrumbRenderState, 'items' | 'createURL'> & { | ||
export declare type BreadcrumbProps = React.ComponentProps<'div'> & Pick<UseBreadcrumbRenderState, 'items' | 'createURL'> & { | ||
classNames?: Partial<BreadcrumbClassNames>; | ||
@@ -43,0 +43,0 @@ hasItems: boolean; |
@@ -8,3 +8,3 @@ import React from 'react'; | ||
}; | ||
export declare type ClearRefinementsProps = React.HTMLAttributes<HTMLDivElement> & Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'onClick'> & { | ||
export declare type ClearRefinementsProps = React.ComponentProps<'div'> & Pick<React.ComponentProps<'button'>, 'disabled' | 'onClick'> & { | ||
translations: ClearRefinementsTranslations; | ||
@@ -11,0 +11,0 @@ classNames?: Partial<ClearRefinementsClassNames>; |
import React from 'react'; | ||
import type { CurrentRefinementsConnectorParamsItem, CurrentRefinementsConnectorParamsRefinement } from 'instantsearch.js/es/connectors/current-refinements/connectCurrentRefinements'; | ||
export declare type CurrentRefinementsProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type CurrentRefinementsProps = React.ComponentProps<'div'> & { | ||
classNames?: Partial<CurrentRefinementsClassNames>; | ||
@@ -5,0 +5,0 @@ items?: Array<Pick<CurrentRefinementsConnectorParamsItem, 'label' | 'refinements'> & Record<string, unknown>>; |
@@ -58,3 +58,3 @@ import React from 'react'; | ||
}; | ||
export declare type HierarchicalMenuProps = React.HTMLAttributes<HTMLDivElement> & HierarchicalListProps & { | ||
export declare type HierarchicalMenuProps = React.ComponentProps<'div'> & HierarchicalListProps & { | ||
hasItems: boolean; | ||
@@ -61,0 +61,0 @@ showMore?: boolean; |
import React from 'react'; | ||
import type { Hit } from 'instantsearch.js'; | ||
export declare type HitsProps<THit> = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type HitsProps<THit> = React.ComponentProps<'div'> & { | ||
hits: THit[]; | ||
@@ -5,0 +5,0 @@ hitComponent?: React.JSXElementConstructor<{ |
import React from 'react'; | ||
import type { HitsPerPageConnectorParamsItem as HitsPerPageItem } from 'instantsearch.js/es/connectors/hits-per-page/connectHitsPerPage'; | ||
export declare type HitsPerPageProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type HitsPerPageProps = Omit<React.ComponentProps<'div'>, 'onChange'> & { | ||
items: HitsPerPageItem[]; | ||
@@ -5,0 +5,0 @@ onChange: (value: number) => void; |
import React from 'react'; | ||
import type { CreateURL } from 'instantsearch.js'; | ||
import type { MenuItem } from 'instantsearch.js/es/connectors/menu/connectMenu'; | ||
export declare type MenuProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type MenuProps = React.ComponentProps<'div'> & { | ||
items: MenuItem[]; | ||
@@ -6,0 +6,0 @@ classNames?: Partial<MenuCSSClasses>; |
@@ -45,3 +45,3 @@ import React from 'react'; | ||
}; | ||
export declare type PaginationProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type PaginationProps = React.ComponentProps<'div'> & { | ||
classNames?: Partial<PaginationClassNames>; | ||
@@ -48,0 +48,0 @@ pages: number[]; |
@@ -24,3 +24,3 @@ import React from 'react'; | ||
}; | ||
export declare type PoweredByProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type PoweredByProps = React.ComponentProps<'div'> & { | ||
classNames?: Partial<PoweredByClassNames>; | ||
@@ -27,0 +27,0 @@ url: string; |
import React from 'react'; | ||
import type { useRange } from 'react-instantsearch-hooks'; | ||
declare type RangeRenderState = ReturnType<typeof useRange>; | ||
export declare type RangeInputProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> & Pick<RangeRenderState, 'range' | 'start'> & { | ||
export declare type RangeInputProps = Omit<React.ComponentProps<'div'>, 'onSubmit'> & Pick<RangeRenderState, 'range' | 'start'> & { | ||
classNames?: Partial<RangeInputClassNames>; | ||
@@ -6,0 +6,0 @@ disabled: boolean; |
import React from 'react'; | ||
import type { RefinementListItem } from 'instantsearch.js/es/connectors/refinement-list/connectRefinementList'; | ||
export declare type RefinementListProps = React.HTMLAttributes<HTMLDivElement> & { | ||
export declare type RefinementListProps = React.ComponentProps<'div'> & { | ||
canRefine: boolean; | ||
@@ -5,0 +5,0 @@ items: RefinementListItem[]; |
@@ -53,3 +53,3 @@ import React from 'react'; | ||
}; | ||
export declare type SearchBoxProps = React.HTMLAttributes<HTMLDivElement> & Pick<React.HTMLAttributes<HTMLFormElement>, 'onSubmit'> & Required<Pick<React.HTMLAttributes<HTMLFormElement>, 'onReset'>> & Pick<React.InputHTMLAttributes<HTMLInputElement>, 'placeholder' | 'onChange'> & { | ||
export declare type SearchBoxProps = Omit<React.ComponentProps<'div'>, 'onSubmit' | 'onReset' | 'onChange'> & Pick<React.ComponentProps<'form'>, 'onSubmit'> & Required<Pick<React.ComponentProps<'form'>, 'onReset'>> & Pick<React.ComponentProps<'input'>, 'placeholder' | 'onChange'> & { | ||
inputRef: React.RefObject<HTMLInputElement>; | ||
@@ -56,0 +56,0 @@ isSearchStalled: boolean; |
import React from 'react'; | ||
declare type ShowMoreButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & { | ||
declare type ShowMoreButtonProps = React.ComponentProps<'button'> & { | ||
isShowingMore: boolean; | ||
@@ -4,0 +4,0 @@ }; |
import React from 'react'; | ||
import type { UseSortByProps } from 'react-instantsearch-hooks'; | ||
export declare type SortByProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & Pick<UseSortByProps, 'items'> & Pick<React.SelectHTMLAttributes<HTMLSelectElement>, 'value'> & { | ||
export declare type SortByProps = Omit<React.ComponentProps<'div'>, 'onChange'> & Pick<UseSortByProps, 'items'> & Pick<React.ComponentProps<'select'>, 'value'> & { | ||
onChange?(value: string): void; | ||
@@ -5,0 +5,0 @@ classNames?: Partial<SortByClassNames>; |
@@ -20,3 +20,3 @@ import React from 'react'; | ||
}; | ||
export declare type ToggleRefinementProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> & Pick<React.InputHTMLAttributes<HTMLInputElement>, 'checked'> & { | ||
export declare type ToggleRefinementProps = Omit<React.ComponentProps<'div'>, 'onChange'> & Pick<React.ComponentProps<'input'>, 'checked'> & { | ||
classNames?: Partial<ToggleRefinementClassNames>; | ||
@@ -23,0 +23,0 @@ onChange(isChecked: boolean): void; |
import type { BreadcrumbProps as BreadcrumbUiProps } from '../ui/Breadcrumb'; | ||
import type { UseBreadcrumbProps } from 'react-instantsearch-hooks'; | ||
export declare type BreadcrumbProps = Omit<BreadcrumbUiProps, 'items' | 'hasItems' | 'createURL' | 'onNavigate' | 'translations'> & Omit<UseBreadcrumbProps, 'separator'>; | ||
declare type UiProps = Pick<BreadcrumbUiProps, 'items' | 'hasItems' | 'createURL' | 'onNavigate' | 'translations'>; | ||
export declare type BreadcrumbProps = Omit<BreadcrumbUiProps, keyof UiProps> & Omit<UseBreadcrumbProps, 'separator'>; | ||
export declare function Breadcrumb({ attributes, rootPath, separator, transformItems, ...props }: BreadcrumbProps): JSX.Element; | ||
export {}; |
@@ -26,12 +26,12 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(BreadcrumbUiComponent, _extends({}, props, { | ||
createURL: createURL, | ||
var uiProps = { | ||
items: items, | ||
hasItems: canRefine, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
separator: separator, | ||
translations: { | ||
root: 'Home' | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(BreadcrumbUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { ClearRefinementsProps as ClearRefinementsUiComponentProps } from '../ui/ClearRefinements'; | ||
import type { UseClearRefinementsProps } from 'react-instantsearch-hooks'; | ||
export declare type ClearRefinementsProps = Omit<ClearRefinementsUiComponentProps, 'disabled' | 'onClick' | 'translations'> & UseClearRefinementsProps; | ||
declare type UiProps = Pick<ClearRefinementsUiComponentProps, 'disabled' | 'onClick' | 'translations'>; | ||
export declare type ClearRefinementsProps = Omit<ClearRefinementsUiComponentProps, keyof UiProps> & UseClearRefinementsProps; | ||
export declare function ClearRefinements({ includedAttributes, excludedAttributes, transformItems, ...props }: ClearRefinementsProps): JSX.Element; | ||
export {}; |
@@ -23,9 +23,10 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(ClearRefinementsUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
onClick: refine, | ||
disabled: !canRefine, | ||
translations: { | ||
resetLabel: 'Clear refinements' | ||
}, | ||
onClick: refine, | ||
disabled: !canRefine | ||
})); | ||
} | ||
}; | ||
return /*#__PURE__*/React.createElement(ClearRefinementsUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { CurrentRefinementsProps as CurrentRefinementsUiComponentProps } from '../ui/CurrentRefinements'; | ||
import type { UseCurrentRefinementsProps } from 'react-instantsearch-hooks'; | ||
export declare type CurrentRefinementsProps = Omit<CurrentRefinementsUiComponentProps, 'disabled' | 'onClick' | 'items' | 'hasRefinements'> & UseCurrentRefinementsProps; | ||
declare type UiProps = Pick<CurrentRefinementsUiComponentProps, 'items' | 'onRemove' | 'hasRefinements'>; | ||
export declare type CurrentRefinementsProps = Omit<CurrentRefinementsUiComponentProps, keyof UiProps> & UseCurrentRefinementsProps; | ||
export declare function CurrentRefinements({ includedAttributes, excludedAttributes, transformItems, ...props }: CurrentRefinementsProps): JSX.Element; | ||
export {}; |
@@ -24,7 +24,8 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(CurrentRefinementsUiComponent, _extends({}, props, { | ||
hasRefinements: canRefine, | ||
var uiProps = { | ||
items: items, | ||
onRemove: refine | ||
})); | ||
onRemove: refine, | ||
hasRefinements: canRefine | ||
}; | ||
return /*#__PURE__*/React.createElement(CurrentRefinementsUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { HierarchicalMenuProps as HierarchicalMenuUiComponentProps } from '../ui/HierarchicalMenu'; | ||
import type { UseHierarchicalMenuProps } from 'react-instantsearch-hooks'; | ||
export declare type HierarchicalMenuProps = Omit<HierarchicalMenuUiComponentProps, 'items' | 'createURL' | 'hasItems' | 'onNavigate' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'> & UseHierarchicalMenuProps; | ||
declare type UiProps = Pick<HierarchicalMenuUiComponentProps, 'items' | 'createURL' | 'hasItems' | 'onNavigate' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'>; | ||
export declare type HierarchicalMenuProps = Omit<HierarchicalMenuUiComponentProps, keyof UiProps> & UseHierarchicalMenuProps; | ||
export declare function HierarchicalMenu({ attributes, limit, rootPath, separator, showMore, showMoreLimit, showParentLevel, sortBy, transformItems, ...props }: HierarchicalMenuProps): JSX.Element; | ||
export {}; |
@@ -40,3 +40,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(HierarchicalMenuUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
items: items, | ||
@@ -46,7 +46,9 @@ hasItems: canRefine, | ||
onNavigate: refine, | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/React.createElement(HierarchicalMenuUiComponent, _extends({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _excluded = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"]; | ||
import { getHighlightedParts, getPropertyByPath } from "instantsearch.js/es/lib/utils/index.js"; | ||
import { getHighlightedParts, getPropertyByPath, unescape } from "instantsearch.js/es/lib/utils/index.js"; | ||
import React from 'react'; | ||
@@ -18,3 +18,3 @@ import { Highlight as HighlightUiComponent } from "../ui/Highlight.js"; | ||
var parts = properties.map(function (singleValue) { | ||
return getHighlightedParts(singleValue.value || ''); | ||
return getHighlightedParts(unescape(singleValue.value || '')); | ||
}); | ||
@@ -21,0 +21,0 @@ return /*#__PURE__*/React.createElement(HighlightUiComponent, _extends({}, props, { |
import type { HitsProps as HitsUiComponentProps } from '../ui/Hits'; | ||
import type { Hit, BaseHit } from 'instantsearch.js'; | ||
import type { UseHitsProps } from 'react-instantsearch-hooks'; | ||
export declare type HitsProps<THit extends BaseHit> = Omit<HitsUiComponentProps<Hit<THit>>, 'hits'> & UseHitsProps<THit>; | ||
declare type UiProps<THit extends BaseHit> = Pick<HitsUiComponentProps<Hit<THit>>, 'hits'>; | ||
export declare type HitsProps<THit extends BaseHit> = Omit<HitsUiComponentProps<Hit<THit>>, keyof UiProps<THit>> & UseHitsProps<THit>; | ||
export declare function Hits<THit extends BaseHit = BaseHit>(props: HitsProps<THit>): JSX.Element; | ||
export {}; |
@@ -11,5 +11,6 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(HitsUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
hits: hits | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(HitsUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { HitsPerPageProps as HitsPerPageUiComponentProps } from '../ui/HitsPerPage'; | ||
import type { UseHitsPerPageProps } from 'react-instantsearch-hooks'; | ||
export declare type HitsPerPageProps = Omit<HitsPerPageUiComponentProps, 'items' | 'onChange' | 'currentValue'> & UseHitsPerPageProps; | ||
declare type UiProps = Pick<HitsPerPageUiComponentProps, 'items' | 'onChange' | 'currentValue'>; | ||
export declare type HitsPerPageProps = Omit<HitsPerPageUiComponentProps, keyof UiProps> & UseHitsPerPageProps; | ||
export declare function HitsPerPage(props: HitsPerPageProps): JSX.Element; | ||
export {}; |
@@ -18,9 +18,10 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(HitsPerPageUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
items: items, | ||
currentValue: currentValue, | ||
onChange: function onChange(value) { | ||
refine(value); | ||
return refine(value); | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(HitsPerPageUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { InfiniteHitsProps as InfiniteHitsUiComponentProps } from '../ui/InfiniteHits'; | ||
import type { BaseHit, Hit } from 'instantsearch.js'; | ||
import type { UseInfiniteHitsProps } from 'react-instantsearch-hooks'; | ||
export declare type InfiniteHitsProps<THit extends BaseHit = BaseHit> = Omit<InfiniteHitsUiComponentProps<Hit<THit>>, 'hits' | 'onShowPrevious' | 'onShowMore' | 'isFirstPage' | 'isLastPage' | 'translations'> & UseInfiniteHitsProps<THit> & { | ||
declare type UiProps<THit extends BaseHit = BaseHit> = Pick<InfiniteHitsUiComponentProps<Hit<THit>>, 'hits' | 'onShowPrevious' | 'onShowMore' | 'isFirstPage' | 'isLastPage' | 'translations'>; | ||
export declare type InfiniteHitsProps<THit extends BaseHit = BaseHit> = Omit<InfiniteHitsUiComponentProps<Hit<THit>>, keyof UiProps<THit>> & UseInfiniteHitsProps<THit> & { | ||
/** | ||
@@ -13,1 +14,2 @@ * Displays the "Show Previous" button when the UI is loaded from a page | ||
export declare function InfiniteHits<THit extends BaseHit = BaseHit>({ showPrevious: shouldShowPrevious, ...props }: InfiniteHitsProps<THit>): JSX.Element; | ||
export {}; |
@@ -21,7 +21,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(InfiniteHitsUiComponent, _extends({}, props, { | ||
translations: { | ||
showPrevious: 'Show previous results', | ||
showMore: 'Show more results' | ||
}, | ||
var uiProps = { | ||
hits: hits, | ||
@@ -31,4 +27,9 @@ onShowPrevious: shouldShowPrevious ? showPrevious : undefined, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage | ||
})); | ||
isLastPage: isLastPage, | ||
translations: { | ||
showPrevious: 'Show previous results', | ||
showMore: 'Show more results' | ||
} | ||
}; | ||
return /*#__PURE__*/React.createElement(InfiniteHitsUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { MenuProps as MenuUiComponentProps } from '../ui/Menu'; | ||
import type { UseMenuProps } from 'react-instantsearch-hooks'; | ||
export declare type MenuProps = Omit<MenuUiComponentProps, 'items' | 'onRefine' | 'createURL' | 'noResults' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'> & UseMenuProps; | ||
declare type UiProps = Pick<MenuUiComponentProps, 'items' | 'onRefine' | 'createURL' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'>; | ||
export declare type MenuProps = Omit<MenuUiComponentProps, keyof UiProps> & UseMenuProps; | ||
export declare function Menu({ attribute, limit, showMore, showMoreLimit, sortBy, transformItems, ...props }: MenuProps): JSX.Element; | ||
export {}; |
@@ -33,13 +33,15 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(MenuUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
items: items, | ||
createURL: createURL, | ||
onRefine: function onRefine(item) { | ||
refine(item.value); | ||
return refine(item.value); | ||
}, | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/React.createElement(MenuUiComponent, _extends({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
import type { PaginationProps as PaginationUiComponentProps } from '../ui/Pagination'; | ||
import type { UsePaginationProps } from 'react-instantsearch-hooks'; | ||
export declare type PaginationProps = Omit<PaginationUiComponentProps, 'pages' | 'currentPage' | 'isFirstPage' | 'isLastPage' | 'nbPages' | 'createURL' | 'onNavigate' | 'translations'> & UsePaginationProps; | ||
declare type UiProps = Pick<PaginationUiComponentProps, 'pages' | 'currentPage' | 'isFirstPage' | 'isLastPage' | 'nbPages' | 'createURL' | 'onNavigate' | 'translations'>; | ||
export declare type PaginationProps = Omit<PaginationUiComponentProps, keyof UiProps> & UsePaginationProps; | ||
export declare function Pagination({ showFirst, showPrevious, showNext, showLast, padding, totalPages, ...props }: PaginationProps): JSX.Element; | ||
export {}; |
@@ -30,3 +30,10 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(PaginationUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
pages: pages, | ||
currentPage: currentRefinement, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage, | ||
nbPages: nbPages, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
translations: { | ||
@@ -47,15 +54,10 @@ first: '‹‹', | ||
} | ||
}, | ||
} | ||
}; | ||
return /*#__PURE__*/React.createElement(PaginationUiComponent, _extends({}, props, uiProps, { | ||
showFirst: showFirst, | ||
showPrevious: showPrevious, | ||
showNext: showNext, | ||
showLast: showLast, | ||
isFirstPage: isFirstPage, | ||
isLastPage: isLastPage, | ||
currentPage: currentRefinement, | ||
nbPages: nbPages, | ||
createURL: createURL, | ||
onNavigate: refine, | ||
pages: pages | ||
showLast: showLast | ||
})); | ||
} |
import type { PoweredByProps as PoweredByUiComponentProps } from '../ui/PoweredBy'; | ||
export declare type PoweredByProps = Omit<PoweredByUiComponentProps, 'url'>; | ||
declare type UiProps = Pick<PoweredByUiComponentProps, 'url'>; | ||
export declare type PoweredByProps = Omit<PoweredByUiComponentProps, keyof UiProps>; | ||
export declare function PoweredBy(props: PoweredByProps): JSX.Element; | ||
export {}; |
@@ -9,5 +9,6 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(PoweredByUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
url: url | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(PoweredByUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { RangeInputProps as RangeInputUiProps } from '../ui/RangeInput'; | ||
import type { UseRangeProps } from 'react-instantsearch-hooks'; | ||
export declare type RangeInputProps = Omit<RangeInputUiProps, 'disabled' | 'onSubmit' | 'range' | 'start' | 'step' | 'translations'> & UseRangeProps; | ||
declare type UiProps = Pick<RangeInputUiProps, 'disabled' | 'onSubmit' | 'range' | 'start' | 'step' | 'translations'>; | ||
export declare type RangeInputProps = Omit<RangeInputUiProps, keyof UiProps> & UseRangeProps; | ||
export declare function RangeInput({ attribute, min, max, precision, ...props }: RangeInputProps): JSX.Element; | ||
export {}; |
@@ -28,3 +28,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var step = 1 / Math.pow(10, precision || 0); | ||
return /*#__PURE__*/React.createElement(RangeInputUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
range: range, | ||
@@ -39,3 +39,4 @@ start: start, | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(RangeInputUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { RefinementListProps as RefinementListUiComponentProps } from '../ui/RefinementList'; | ||
import type { RefinementListWidgetParams } from 'instantsearch.js/es/widgets/refinement-list/refinement-list'; | ||
import type { UseRefinementListProps } from 'react-instantsearch-hooks'; | ||
export declare type RefinementListProps = Omit<RefinementListUiComponentProps, 'canRefine' | 'items' | 'onRefine' | 'query' | 'searchBox' | 'noResults' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'> & UseRefinementListProps & Pick<RefinementListWidgetParams, 'searchable' | 'searchablePlaceholder'>; | ||
declare type UiProps = Pick<RefinementListUiComponentProps, 'canRefine' | 'items' | 'onRefine' | 'query' | 'searchBox' | 'noResults' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore'>; | ||
export declare type RefinementListProps = Omit<RefinementListUiComponentProps, keyof UiProps> & UseRefinementListProps & Pick<RefinementListWidgetParams, 'searchable' | 'searchablePlaceholder'>; | ||
export declare function RefinementList({ searchable, searchablePlaceholder, attribute, operator, limit, showMore, showMoreLimit, sortBy, escapeFacetValues, transformItems, ...props }: RefinementListProps): JSX.Element; | ||
export {}; |
@@ -77,5 +77,5 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(RefinementListUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
items: items, | ||
canRefine: canRefine, | ||
items: items, | ||
onRefine: onRefine, | ||
@@ -97,7 +97,9 @@ query: query, | ||
noResults: searchable && isFromSearch && items.length === 0 && 'No results.', | ||
showMore: showMore, | ||
canToggleShowMore: canToggleShowMore, | ||
onToggleShowMore: toggleShowMore, | ||
isShowingMore: isShowingMore | ||
}; | ||
return /*#__PURE__*/React.createElement(RefinementListUiComponent, _extends({}, props, uiProps, { | ||
showMore: showMore | ||
})); | ||
} |
import type { SearchBoxProps as SearchBoxUiComponentProps } from '../ui/SearchBox'; | ||
import type { UseSearchBoxProps } from 'react-instantsearch-hooks'; | ||
export declare type SearchBoxProps = Omit<SearchBoxUiComponentProps, 'inputRef' | 'isSearchStalled' | 'onChange' | 'onReset' | 'value' | 'translations'> & UseSearchBoxProps; | ||
declare type UiProps = Pick<SearchBoxUiComponentProps, 'inputRef' | 'isSearchStalled' | 'onChange' | 'onReset' | 'value' | 'translations'>; | ||
export declare type SearchBoxProps = Omit<SearchBoxUiComponentProps, keyof UiProps> & UseSearchBoxProps; | ||
export declare function SearchBox(props: SearchBoxProps): JSX.Element; | ||
export {}; |
@@ -49,3 +49,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}, [query]); | ||
return /*#__PURE__*/React.createElement(SearchBoxUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
inputRef: inputRef, | ||
@@ -60,3 +60,4 @@ isSearchStalled: isSearchStalled, | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(SearchBoxUiComponent, _extends({}, props, uiProps)); | ||
} |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _excluded = ["hit", "attribute", "highlightedTagName", "nonHighlightedTagName", "separator"]; | ||
import { getHighlightedParts, getPropertyByPath } from "instantsearch.js/es/lib/utils/index.js"; | ||
import { getHighlightedParts, getPropertyByPath, unescape } from "instantsearch.js/es/lib/utils/index.js"; | ||
import React from 'react'; | ||
@@ -18,3 +18,3 @@ import { Snippet as SnippetUiComponent } from "../ui/Snippet.js"; | ||
var parts = properties.map(function (singleValue) { | ||
return getHighlightedParts(singleValue.value || ''); | ||
return getHighlightedParts(unescape(singleValue.value || '')); | ||
}); | ||
@@ -21,0 +21,0 @@ return /*#__PURE__*/React.createElement(SnippetUiComponent, _extends({}, props, { |
import type { SortByProps as SortByUiComponentProps } from '../ui/SortBy'; | ||
import type { UseSortByProps } from 'react-instantsearch-hooks'; | ||
export declare type SortByProps = Omit<SortByUiComponentProps, 'items' | 'value' | 'onSelect'> & UseSortByProps; | ||
declare type UiProps = Pick<SortByUiComponentProps, 'items' | 'value' | 'onChange'>; | ||
export declare type SortByProps = Omit<SortByUiComponentProps, keyof UiProps> & UseSortByProps; | ||
export declare function SortBy({ items, transformItems, ...props }: SortByProps): JSX.Element; | ||
export {}; |
@@ -22,7 +22,8 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(SortByUiComponent, _extends({}, props, { | ||
var uiProps = { | ||
items: options, | ||
value: currentRefinement, | ||
items: options, | ||
onChange: refine | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(SortByUiComponent, _extends({}, props, uiProps)); | ||
} |
import type { PartialKeys } from '../types'; | ||
import type { ToggleRefinementProps as ToggleRefinementUiComponentProps } from '../ui/ToggleRefinement'; | ||
import type { UseToggleRefinementProps } from 'react-instantsearch-hooks'; | ||
export declare type ToggleRefinementProps = PartialKeys<Omit<ToggleRefinementUiComponentProps, 'onChange' | 'checked'>, 'label'> & UseToggleRefinementProps; | ||
declare type UiProps = Pick<ToggleRefinementUiComponentProps, 'onChange' | 'checked'>; | ||
export declare type ToggleRefinementProps = PartialKeys<Omit<ToggleRefinementUiComponentProps, keyof UiProps>, 'label'> & UseToggleRefinementProps; | ||
export declare function ToggleRefinement({ attribute, on, off, ...props }: ToggleRefinementProps): JSX.Element; | ||
export {}; |
@@ -23,12 +23,13 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
return /*#__PURE__*/React.createElement(ToggleRefinementUiComponent, _extends({ | ||
label: value.name | ||
}, props, { | ||
var uiProps = { | ||
checked: value.isRefined, | ||
onChange: function onChange(isChecked) { | ||
refine({ | ||
return refine({ | ||
isRefined: !isChecked | ||
}); | ||
} | ||
})); | ||
}; | ||
return /*#__PURE__*/React.createElement(ToggleRefinementUiComponent, _extends({ | ||
label: value.name | ||
}, props, uiProps)); | ||
} |
{ | ||
"name": "react-instantsearch-hooks-web", | ||
"version": "6.24.3", | ||
"version": "6.25.0", | ||
"description": "⚡ Lightning-fast search for React, by Algolia", | ||
@@ -51,3 +51,3 @@ "source": "src/index.ts", | ||
"instantsearch.js": "^4.40.1", | ||
"react-instantsearch-hooks": "6.24.3" | ||
"react-instantsearch-hooks": "6.25.0" | ||
}, | ||
@@ -54,0 +54,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3042692
18541
+ Addedreact-instantsearch-hooks@6.25.0(transitive)
- Removedreact-instantsearch-hooks@6.24.3(transitive)