import { AlgoliaSearchHelper } from 'algoliasearch-helper'; import { Banner } from 'algoliasearch-helper'; import type { CarouselProps } from 'instantsearch-ui-components'; import { CompositionClient } from 'algoliasearch-helper/types/algoliasearch.js'; import EventEmitter from '@algolia/events'; import { FindAnswersOptions } from 'algoliasearch-helper/types/algoliasearch.js'; import type { FrequentlyBoughtTogetherProps } from 'instantsearch-ui-components'; import { h } from 'preact'; import type { HighlightClassNames as HighlightClassNames_2 } from 'instantsearch-ui-components'; import type { HighlightProps as HighlightProps_3 } from 'instantsearch-ui-components'; import type { HitsClassNames } from 'instantsearch-ui-components'; import type { HoganOptions } from 'hogan.js'; import { html } from 'htm/preact'; import type { InsightsClient as InsightsClient_2 } from 'search-insights'; import type { InsightsMethodMap as InsightsMethodMap_2 } from 'search-insights'; import type { LookingSimilarProps } from 'instantsearch-ui-components'; import type * as Places from 'places.js'; import { PlainSearchParameters } from 'algoliasearch-helper'; import { default as qs_2 } from 'qs'; import type { RecommendClassNames } from 'instantsearch-ui-components'; import { RecommendParameters } from 'algoliasearch-helper'; import type { RecommendParametersOptions } from 'algoliasearch-helper'; import { RecommendResponse } from 'algoliasearch-helper/types/algoliasearch.js'; import type { RecommendResults } from 'algoliasearch-helper'; import type { RelatedProductsProps } from 'instantsearch-ui-components'; import { SearchClient } from 'algoliasearch-helper/types/algoliasearch.js'; import { SearchOptions } from 'algoliasearch-helper/types/algoliasearch.js'; import { SearchParameters } from 'algoliasearch-helper'; import { SearchResults } from 'algoliasearch-helper'; import type { TrendingItemsProps } from 'instantsearch-ui-components'; import { VNode } from 'preact'; import type { VNode as VNode_2 } from 'instantsearch-ui-components'; declare type AlgoliaHit = Record> = { objectID: string; _highlightResult?: HitHighlightResult; _snippetResult?: HitSnippetResult; _rankingInfo?: { promoted: boolean; nbTypos: number; firstMatchedWord: number; proximityDistance?: number; geoDistance: number; geoPrecision?: number; nbExactWords: number; words: number; filters: number; userScore: number; matchedGeoLocation?: { lat: number; lng: number; distance: number; }; }; _distinctSeqID?: number; _geoloc?: GeoLoc; } & THit; declare const analytics: AnalyticsWidget; declare type AnalyticsWidget = WidgetFactory; declare type AnalyticsWidgetDescription = { $$type: 'ais.analytics'; $$widgetType: 'ais.analytics'; renderState: Record; indexRenderState: { analytics: WidgetRenderState, AnalyticsWidgetParams>; }; }; declare type AnalyticsWidgetParams = { /** * A function that is called every time the query or refinements changes. You * need to add the logic to push the data to your analytics platform. */ pushFunction: AnalyticsWidgetParamsPushFunction; /** * The number of milliseconds between the last search keystroke and calling `pushFunction`. * * @default 3000 */ delay?: number; /** * Triggers `pushFunction` after click on page or redirecting the page. This is useful if * you want the pushFunction to be called for the last actions before the user leaves the * current page, even if the delay wasn’t reached. * * @default false */ triggerOnUIInteraction?: boolean; /** * Triggers `pushFunction` when InstantSearch is initialized. This means * the `pushFunction` might be called even though the user didn’t perfom * any search-related action. * * @default true */ pushInitialSearch?: boolean; /** * Triggers `pushFunction` when the page changes, either through the UI or programmatically. * * @default false */ pushPagination?: boolean; }; declare type AnalyticsWidgetParamsPushFunction = ( /** * Contains the search parameters, serialized as a query string. */ formattedParameters: string, /** * Contains the whole search state. */ state: SearchParameters, /** * The last received results. */ results: SearchResults) => void; declare type AnswersConnector = Connector; declare type AnswersConnectorParams = { /** * Attributes to use for predictions. * If empty, we use all `searchableAttributes` to find answers. * All your `attributesForPrediction` must be part of your `searchableAttributes`. */ attributesForPrediction?: string[]; /** * The languages in the query. Currently only supports `en`. */ queryLanguages: ['en']; /** * Maximum number of answers to retrieve from the Answers Engine. * Cannot be greater than 1000. * @default 1 */ nbHits?: number; /** * Debounce time in milliseconds to debounce render * @default 100 */ renderDebounceTime?: number; /** * Debounce time in milliseconds to debounce search * @default 100 */ searchDebounceTime?: number; /** * Whether to escape HTML tags from hits string values. * * @default true */ escapeHTML?: boolean; /** * Extra parameters to pass to findAnswers method. * @default {} */ extraParameters?: FindAnswersOptions; }; declare type AnswersCSSClasses = Partial<{ /** * CSS class to add to the root element of the widget. */ root: string | string[]; /** * CSS class to add to the wrapping element when no results. */ emptyRoot: string | string[]; /** * CSS classes to add to the header. */ header: string | string[]; /** * CSS classes to add to the loader. */ loader: string | string[]; /** * CSS class to add to the list of results. */ list: string | string[]; /** * CSS class to add to each result. */ item: string | string[]; }>; declare type AnswersRenderState = { /** * The matched hits from Algolia API. */ hits: Hit[]; /** * Whether it's still loading the results from the Answers API. */ isLoading: boolean; }; declare type AnswersTemplates = Partial<{ /** * Template to use for the header. This template will receive an object containing `hits` and `isLoading`. */ header: Template<{ hits: Hit[]; isLoading: boolean; }>; /** * Template to use for the loader. */ loader: Template; /** * Template to use for each result. This template will receive an object containing a single record. */ item: Template; }>; declare type AnswersWidget = WidgetFactory; declare type AnswersWidgetDescription = { $$type: 'ais.answers'; renderState: AnswersRenderState; indexRenderState: { answers: WidgetRenderState; }; }; declare type AnswersWidgetParams = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * The templates to use for the widget. */ templates?: AnswersTemplates; /** * The CSS classes to override. */ cssClasses?: AnswersCSSClasses; }; declare type AnyWidgetFactory = WidgetFactory<{ $$type: string; }, Record, any>; declare type AtLeastOne; }> = Partial & TMapped[keyof TMapped]; declare type AugmentedWidget = Omit, TOverriddenKeys | 'dependsOn' | 'getWidgetParameters'> & Pick, TOverriddenKeys>; declare type AutocompleteConnector = Connector; declare type AutocompleteConnectorParams = { /** * Escapes HTML entities from hits string values. * * @default `true` */ escapeHTML?: boolean; }; declare type AutocompleteRenderState = { /** * The current value of the query. */ currentRefinement: string; /** * The indices this widget has access to. */ indices: Array<{ /** * The name of the index */ indexName: string; /** * The id of the index */ indexId: string; /** * The resolved hits from the index matching the query. */ hits: Hit[]; /** * The full results object from the Algolia API. */ results: SearchResults; /** * Send event to insights middleware */ sendEvent: SendEventForHits; }>; /** * Searches into the indices with the provided query. */ refine: (query: string) => void; }; declare type AutocompleteWidgetDescription = { $$type: 'ais.autocomplete'; renderState: AutocompleteRenderState; indexRenderState: { autocomplete: WidgetRenderState; }; indexUiState: { query: string; }; }; declare type BaseHit = Record; declare type BindEventForHits = BuiltInBindEventForHits & CustomBindEventForHits; declare type Bounds = { /** * The top right corner of the map view. */ northEast: GeoLoc; /** * The bottom left corner of the map view. */ southWest: GeoLoc; }; declare const breadcrumb: BreadcrumbWidget; declare type BreadcrumbConnector = Connector; declare type BreadcrumbConnectorParams = { /** * Attributes to use to generate the hierarchy of the breadcrumb. */ attributes: string[]; /** * Prefix path to use if the first level is not the root level. */ rootPath?: string; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; /** * The level separator used in the records. * * @default '>' */ separator?: string; }; declare type BreadcrumbConnectorParamsItem = { /** * Label of the category or subcategory. */ label: string; /** * Value of breadcrumb item. */ value: string | null; }; declare type BreadcrumbCSSClasses = Partial<{ /** * CSS class to add to the root element of the widget. */ root: string | string[]; /** * CSS class to add to the root element of the widget if there are no refinements. */ noRefinementRoot: string | string[]; /** * CSS class to add to the list element. */ list: string | string[]; /** * CSS class to add to the items of the list. The items contains the link and the separator. */ item: string | string[]; /** * CSS class to add to the selected item in the list: the last one or the home if there are no refinements. */ selectedItem: string | string[]; /** * CSS class to add to the separator. */ separator: string | string[]; /** * CSS class to add to the links in the items. */ link: string | string[]; }>; declare type BreadcrumbRenderState = { /** * Creates the URL for a single item name in the list. */ createURL: CreateURL; /** * Array of objects defining the different values and labels. */ items: BreadcrumbConnectorParamsItem[]; /** * Sets the path of the hierarchical filter and triggers a new search. */ refine: (value: BreadcrumbConnectorParamsItem['value']) => void; /** * True if refinement can be applied. */ canRefine: boolean; }; declare type BreadcrumbTemplates = Partial<{ /** * Label of the breadcrumb's first element. */ home: Template; /** * Symbol used to separate the elements of the breadcrumb. */ separator: Template; }>; declare type BreadcrumbWidget = WidgetFactory; declare type BreadcrumbWidgetDescription = { $$type: 'ais.breadcrumb'; renderState: BreadcrumbRenderState; indexRenderState: { breadcrumb: { [rootAttribute: string]: WidgetRenderState; }; }; }; declare type BreadcrumbWidgetParams = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * Templates to use for the widget. */ templates?: BreadcrumbTemplates; /** * CSS classes to add to the wrapping elements. */ cssClasses?: BreadcrumbCSSClasses; }; declare class BrowserHistory implements Router { $$type: string; /** * Transforms a UI state into a title for the page. */ private readonly windowTitle?; /** * Time in milliseconds before performing a write in the history. * It prevents from adding too many entries in the history and * makes the back button more usable. * * @default 400 */ private readonly writeDelay; /** * Creates a full URL based on the route state. * The storage adaptor maps all syncable keys to the query string of the URL. */ private readonly _createURL; /** * Parses the URL into a route state. * It should be symmetrical to `createURL`. */ private readonly parseURL; /** * Returns the location to store in the history. * @default () => window.location */ private readonly getLocation; private writeTimer?; private _onPopState?; /** * Indicates if last action was back/forward in the browser. */ private inPopState; /** * Indicates whether the history router is disposed or not. */ protected isDisposed: boolean; /** * Indicates the window.history.length before the last call to * window.history.pushState (called in `write`). * It allows to determine if a `pushState` has been triggered elsewhere, * and thus to prevent the `write` method from calling `pushState`. */ private latestAcknowledgedHistory; private _start?; private _dispose?; private _push?; private _cleanUrlOnDispose; /** * Initializes a new storage provider that syncs the search state to the URL * using web APIs (`window.location.pushState` and `onpopstate` event). */ constructor({ windowTitle, writeDelay, createURL, parseURL, getLocation, start, dispose, push, cleanUrlOnDispose, }: BrowserHistoryArgs); /** * Reads the URL and returns a syncable UI search state. */ read(): TRouteState; /** * Pushes a search state into the URL. */ write(routeState: TRouteState): void; /** * Sets a callback on the `onpopstate` event of the history API of the current page. * It enables the URL sync to keep track of the changes. */ onUpdate(callback: (routeState: TRouteState) => void): void; /** * Creates a complete URL from a given syncable UI state. * * It always generates the full URL, not a relative one. * This allows to handle cases like using a . * See: https://github.com/algolia/instantsearch/issues/790 */ createURL(routeState: TRouteState): string; /** * Removes the event listener and cleans up the URL. */ dispose(): void; start(): void; private shouldWrite; } declare type BrowserHistoryArgs = { windowTitle?: (routeState: TRouteState) => string; writeDelay: number; createURL: CreateURL_2; parseURL: ParseURL; getLocation: () => Location; start?: (onUpdate: () => void) => void; dispose?: () => void; push?: (url: string) => void; /** * Whether the URL should be cleaned up when the router is disposed. * This can be useful when closing a modal containing InstantSearch, to * remove active refinements from the URL. * @default true */ cleanUrlOnDispose?: boolean; }; declare type BuiltInBindEventForHits = (eventType: string, hits: Hit | Hit[], eventName?: string, additionalData?: Record) => string; declare type BuiltInSendEventForFacet = (eventType: string, facetValue: string, eventName?: string, additionalData?: Record) => void; declare type BuiltInSendEventForHits = (eventType: string, hits: Hit | Hit[], eventName?: string, additionalData?: Record) => void; declare type BuiltInSendEventForToggle = (eventType: string, isRefined: boolean, eventName?: string) => void; declare function carousel>({ cssClasses, templates, }?: CreateCarouselTemplateProps): ({ items, templates: widgetTemplates, cssClasses: widgetCssClasses, sendEvent, }: CarouselTemplateProps) => h.JSX.Element; declare type CarouselTemplateProps> = Pick, 'items'> & { templates: { item?: CarouselProps['itemComponent']; }; cssClasses?: Partial['classNames']>; } & { sendEvent?: CarouselProps['sendEvent']; }; declare const clearRefinements: ClearRefinementsWidget; declare type ClearRefinementsConnector = Connector; declare type ClearRefinementsConnectorParams = { /** * The attributes to include in the refinements to clear (all by default). Cannot be used with `excludedAttributes`. */ includedAttributes?: string[]; /** * The attributes to exclude from the refinements to clear. Cannot be used with `includedAttributes`. */ excludedAttributes?: string[]; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; }; declare type ClearRefinementsCSSClasses = Partial<{ /** * CSS class to add to the wrapper element. */ root: string | string[]; /** * CSS class to add to the button of the widget. */ button: string | string[]; /** * CSS class to add to the button when there are no refinements. */ disabledButton: string | string[]; }>; declare type ClearRefinementsRenderState = { /** * Triggers the clear of all the currently refined values. */ refine: () => void; /** * Indicates if search state is refined. * @deprecated prefer reading canRefine */ hasRefinements: boolean; /** * Indicates if search state can be refined. */ canRefine: boolean; /** * Creates a url for the next state when refinements are cleared. */ createURL: CreateURL; }; declare type ClearRefinementsTemplates = Partial<{ /** * Template for the content of the button */ resetLabel: Template<{ hasRefinements: boolean; }>; }>; declare type ClearRefinementsWidget = WidgetFactory; declare type ClearRefinementsWidgetDescription = { $$type: 'ais.clearRefinements'; renderState: ClearRefinementsRenderState; indexRenderState: { clearRefinements: WidgetRenderState; }; }; declare type ClearRefinementsWidgetParams = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * Templates to use for the widget. */ templates?: ClearRefinementsTemplates; /** * CSS classes to be added. */ cssClasses?: ClearRefinementsCSSClasses; }; declare type ComponentCSSClasses = Required<{ [className in keyof TCSSClasses]: string; }>; declare const configure: ConfigureWidget; declare type ConfigureConnector = Connector; declare type ConfigureConnectorParams = { /** * A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) * to enable when the widget mounts. */ searchParameters: PlainSearchParameters; }; declare type ConfigureRelatedItemsConnector = Connector; declare type ConfigureRelatedItemsConnectorParams = { /** * The reference hit to extract the filters from. */ hit: AlgoliaHit; /** * The schema to create the optional filters. * Each key represents an attribute from the hit. */ matchingPatterns: MatchingPatterns; /** * Function to transform the generated search parameters. */ transformSearchParameters?: TransformSearchParameters; }; declare type ConfigureRelatedItemsWidget = WidgetFactory; declare type ConfigureRelatedItemsWidgetDescription = { $$type: 'ais.configureRelatedItems'; } & Omit; declare type ConfigureRelatedItemsWidgetParams = PlainSearchParameters; declare type ConfigureRenderState = { /** * Refine the given search parameters. */ refine: Refine; }; declare type ConfigureWidget = (widgetParams: ConfigureWidgetParams) => Widget; declare type ConfigureWidgetDescription = { $$type: 'ais.configure'; renderState: ConfigureRenderState; indexRenderState: { configure: WidgetRenderState; }; indexUiState: { configure: PlainSearchParameters; }; }; /** * A list of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) * to enable when the widget mounts. */ declare type ConfigureWidgetParams = ConfigureConnectorParams['searchParameters']; declare const connectAutocomplete: AutocompleteConnector; declare const connectBreadcrumb: BreadcrumbConnector; declare const connectClearRefinements: ClearRefinementsConnector; declare const connectConfigure: ConfigureConnector; declare const connectCurrentRefinements: CurrentRefinementsConnector; declare const connectDynamicWidgets: DynamicWidgetsConnector; /** * **HierarchicalMenu** connector provides the logic to build a custom widget * that will give the user the ability to explore facets in a tree-like structure. * * This is commonly used for multi-level categorization of products on e-commerce * websites. From a UX point of view, we suggest not displaying more than two * levels deep. * * @type {Connector} * @param {function(HierarchicalMenuRenderingOptions, boolean)} renderFn Rendering function for the custom **HierarchicalMenu** widget. * @param {function} unmountFn Unmount function called when the widget is disposed. * @return {function(CustomHierarchicalMenuWidgetParams)} Re-usable widget factory for a custom **HierarchicalMenu** widget. */ declare const connectHierarchicalMenu: HierarchicalMenuConnector; declare const connectHitsPerPage: HitsPerPageConnector; declare const connectHitsWithInsights: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & HitsConnectorParams) => { $$type: "ais.hits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & HitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions): { hits: never[]; items: never[]; results: undefined; banner: undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: TWidgetParams & HitsConnectorParams; } | { hits: Hit[] | Hit[]; items: Hit[] | Hit[]; results: SearchResults; banner: Banner | undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: TWidgetParams & HitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetSearchParameters(state: SearchParameters, _uiState: { uiState: { query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const connectInfiniteHitsWithInsights: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & InfiniteHitsConnectorParams) => { $$type: "ais.infiniteHits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & InfiniteHitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, parent, state: existingState, instantSearchInstance, }: InitOptions | RenderOptions): { hits: Hit[]; items: Hit[]; currentPageHits: Hit[]; sendEvent: SendEventForHits; bindEvent: BindEventForHits; banner: Banner | undefined; results: SearchResults | undefined; showPrevious: () => void; showMore: () => void; isFirstPage: boolean; isLastPage: boolean; widgetParams: TWidgetParams & InfiniteHitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetUiState(uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }, { searchParameters }: { searchParameters: SearchParameters; helper: AlgoliaSearchHelper; }): { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; getWidgetSearchParameters(searchParameters: SearchParameters, { uiState }: { uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; /** * **Menu** connector provides the logic to build a widget that will give the user the ability to choose a single value for a specific facet. The typical usage of menu is for navigation in categories. * * This connector provides a `toggleShowMore()` function to display more or less items and a `refine()` * function to select an item. While selecting a new element, the `refine` will also unselect the * one that is currently selected. * * **Requirement:** the attribute passed as `attribute` must be present in "attributes for faceting" on the Algolia dashboard or configured as attributesForFaceting via a set settings call to the Algolia API. */ declare const connectMenu: MenuConnector; declare const connectNumericMenu: NumericMenuConnector; /** * The connector handles the business logic and exposes * a simplified API to the rendering function. */ declare type Connector = ( /** * The render function. */ renderFn: Renderer, /** * The called function when unmounting a widget. */ unmountFn?: Unmounter) => (widgetParams: TConnectorParams & TWidgetParams) => Widget; declare type ConnectorRenderStates = AnswersWidgetDescription['indexRenderState'] & AutocompleteWidgetDescription['indexRenderState'] & BreadcrumbWidgetDescription['indexRenderState'] & ClearRefinementsWidgetDescription['indexRenderState'] & ConfigureWidgetDescription['indexRenderState'] & CurrentRefinementsWidgetDescription['indexRenderState'] & GeoSearchWidgetDescription['indexRenderState'] & HierarchicalMenuWidgetDescription['indexRenderState'] & HitsWidgetDescription['indexRenderState'] & HitsPerPageWidgetDescription['indexRenderState'] & InfiniteHitsWidgetDescription['indexRenderState'] & MenuWidgetDescription['indexRenderState'] & NumericMenuWidgetDescription['indexRenderState'] & PaginationWidgetDescription['indexRenderState'] & PoweredByWidgetDescription['indexRenderState'] & QueryRulesWidgetDescription['indexRenderState'] & RangeWidgetDescription['indexRenderState'] & RatingMenuWidgetDescription['indexRenderState'] & RefinementListWidgetDescription['indexRenderState'] & RelevantSortWidgetDescription['indexRenderState'] & SearchBoxWidgetDescription['indexRenderState'] & SortByWidgetDescription['indexRenderState'] & StatsWidgetDescription['indexRenderState'] & ToggleRefinementWidgetDescription['indexRenderState'] & VoiceSearchWidgetDescription['indexRenderState']; declare namespace connectors { export { EXPERIMENTAL_connectAnswers, EXPERIMENTAL_connectConfigureRelatedItems, EXPERIMENTAL_connectDynamicWidgets, connectDynamicWidgets, connectClearRefinements, connectCurrentRefinements, connectHierarchicalMenu, _default as connectHits, connectHitsWithInsights, connectHitsPerPage, _default_2 as connectInfiniteHits, connectInfiniteHitsWithInsights, connectMenu, connectNumericMenu, connectPagination, connectRange, connectRefinementList, _default_3 as connectRelatedProducts, connectSearchBox, connectSortBy, connectRatingMenu, connectStats, connectToggleRefinement, _default_4 as connectTrendingItems, connectBreadcrumb, _default_5 as connectGeoSearch, connectPoweredBy, connectConfigure, connectAutocomplete, connectQueryRules, connectVoiceSearch, connectRelevantSort, _default_6 as connectFrequentlyBoughtTogether, _default_7 as connectLookingSimilar } } declare type ConnectorUiStates = AutocompleteWidgetDescription['indexUiState'] & ConfigureWidgetDescription['indexUiState'] & GeoSearchWidgetDescription['indexUiState'] & HierarchicalMenuWidgetDescription['indexUiState'] & HitsPerPageWidgetDescription['indexUiState'] & InfiniteHitsWidgetDescription['indexUiState'] & MenuWidgetDescription['indexUiState'] & NumericMenuWidgetDescription['indexUiState'] & PaginationWidgetDescription['indexUiState'] & RangeWidgetDescription['indexUiState'] & RatingMenuWidgetDescription['indexUiState'] & RefinementListWidgetDescription['indexUiState'] & RelevantSortWidgetDescription['indexUiState'] & SearchBoxWidgetDescription['indexUiState'] & SortByWidgetDescription['indexUiState'] & ToggleRefinementWidgetDescription['indexUiState'] & VoiceSearchWidgetDescription['indexUiState']; /** * **Pagination** connector provides the logic to build a widget that will let the user * choose the current page of the results. * * When using the pagination with Algolia, you should be aware that the engine won't provide you pages * beyond the 1000th hits by default. You can find more information on the [Algolia documentation](https://www.algolia.com/doc/guides/searching/pagination/#pagination-limitations). */ declare const connectPagination: PaginationConnector; /** * **PoweredBy** connector provides the logic to build a custom widget that will displays * the logo to redirect to Algolia. */ declare const connectPoweredBy: PoweredByConnector; declare const connectQueryRules: QueryRulesConnector; /** * **Range** connector provides the logic to create custom widget that will let * the user refine results using a numeric range. * * This connectors provides a `refine()` function that accepts bounds. It will also provide * information about the min and max bounds for the current result set. */ declare const connectRange: RangeConnector; /** * **StarRating** connector provides the logic to build a custom widget that will let * the user refine search results based on ratings. * * The connector provides to the rendering: `refine()` to select a value and * `items` that are the values that can be selected. `refine` should be used * with `items.value`. */ declare const connectRatingMenu: RatingMenuConnector; /** * **RefinementList** connector provides the logic to build a custom widget that * will let the user filter the results based on the values of a specific facet. * * **Requirement:** the attribute passed as `attribute` must be present in * attributesForFaceting of the searched index. * * This connector provides: * - a `refine()` function to select an item. * - a `toggleShowMore()` function to display more or less items * - a `searchForItems()` function to search within the items. */ declare const connectRefinementList: RefinementListConnector; declare const connectRelevantSort: RelevantSortConnector; /** * **SearchBox** connector provides the logic to build a widget that will let the user search for a query. * * The connector provides to the rendering: `refine()` to set the query. The behaviour of this function * may be impacted by the `queryHook` widget parameter. */ declare const connectSearchBox: SearchBoxConnector; declare const connectSortBy: SortByConnector; declare const connectStats: StatsConnector; /** * **Toggle** connector provides the logic to build a custom widget that will provide * an on/off filtering feature based on an attribute value or values. * * Two modes are implemented in the custom widget: * - with or without the value filtered * - switch between two values. */ declare const connectToggleRefinement: ToggleRefinementConnector; declare const connectVoiceSearch: VoiceSearchConnector; declare type CreateCarouselTemplateProps> = { templates?: Partial<{ previous: Exclude; next: Exclude; }>; cssClasses?: Partial['classNames']>; }; declare function createInfiniteHitsSessionStorageCache({ key, }?: { /** * If you display multiple instances of infiniteHits on the same page, * you must provide a unique key for each instance. */ key?: string; }): InfiniteHitsCache; declare type CreateInsightsMiddleware = typeof createInsightsMiddleware; declare function createInsightsMiddleware(props?: InsightsProps): InternalMiddleware; declare type CreateMarker = (args: { item: GeoHit; map: google.maps.Map; }) => google.maps.OverlayView | google.maps.Marker; /** * Exposes the metadata of mounted widgets in a custom * `` tag. The metadata per widget is: * - applied parameters * - widget name * - connector name */ declare function createMetadataMiddleware({ $$internal, }?: { $$internal?: boolean; }): InternalMiddleware; declare const createRouterMiddleware: (props?: RouterProps) => InternalMiddleware; /** * Creates the URL for the given value. */ declare type CreateURL = (value: TValue) => string; declare type CreateURL_2 = (args: { qsModule: typeof qs_2; routeState: TRouteState; location: Location; }) => string; declare type CreateVoiceSearchHelper = (params: VoiceSearchHelperParams) => VoiceSearchHelper; declare const currentRefinements: CurrentRefinementsWidget; declare type CurrentRefinementsConnector = Connector; declare type CurrentRefinementsConnectorParams = { /** * The attributes to include in the widget (all by default). * Cannot be used with `excludedAttributes`. * * @default `[]` */ includedAttributes?: string[]; /** * The attributes to exclude from the widget. * Cannot be used with `includedAttributes`. * * @default `['query']` */ excludedAttributes?: string[]; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; }; declare type CurrentRefinementsConnectorParamsItem = { /** * The index name. */ indexName: string; /** * The index id as provided to the index widget. */ indexId: string; /** * The attribute on which the refinement is applied. */ attribute: string; /** * The textual representation of this attribute. */ label: string; /** * Currently applied refinements. */ refinements: CurrentRefinementsConnectorParamsRefinement[]; /** * Removes the given refinement and triggers a new search. */ refine: (refinement: CurrentRefinementsConnectorParamsRefinement) => void; }; declare type CurrentRefinementsConnectorParamsRefinement = { /** * The attribute on which the refinement is applied. */ attribute: string; /** * The type of the refinement. */ type: 'facet' | 'exclude' | 'disjunctive' | 'hierarchical' | 'numeric' | 'query' | 'tag'; /** * The raw value of the refinement. */ value: string | number; /** * The label of the refinement to display. */ label: string; /** * The value of the operator (only if applicable). */ operator?: string; /** * The number of found items (only if applicable). */ count?: number; /** * Whether the count is exhaustive (only if applicable). */ exhaustive?: boolean; }; declare type CurrentRefinementsCSSClasses = Partial<{ /** * CSS class to add to the root element. */ root: string | string[]; /** * CSS class to add to the root element when no refinements. */ noRefinementRoot: string | string[]; /** * CSS class to add to the list element. */ list: string | string[]; /** * CSS class to add to the each item element. */ item: string | string[]; /** * CSS class to add to the label element. */ label: string | string[]; /** * CSS class to add to the category element. */ category: string | string[]; /** * CSS class to add to the categoryLabel element. */ categoryLabel: string | string[]; /** * CSS class to add to the delete element. */ delete: string | string[]; }>; declare type CurrentRefinementsRenderState = { /** * All the currently refined items, grouped by attribute. */ items: CurrentRefinementsConnectorParamsItem[]; /** * Indicates if search state can be refined. */ canRefine: boolean; /** * Removes the given refinement and triggers a new search. */ refine: (refinement: CurrentRefinementsConnectorParamsRefinement) => void; /** * Generates a URL for the next state. */ createURL: CreateURL; }; declare type CurrentRefinementsWidget = WidgetFactory; declare type CurrentRefinementsWidgetDescription = { $$type: 'ais.currentRefinements'; renderState: CurrentRefinementsRenderState; indexRenderState: { currentRefinements: WidgetRenderState; }; }; declare type CurrentRefinementsWidgetParams = { /** * The CSS Selector or `HTMLElement` to insert the widget into. */ container: string | HTMLElement; /** * The CSS classes to override. */ cssClasses?: CurrentRefinementsCSSClasses; }; declare type CustomBindEventForHits = (customPayload: any) => string; declare type CustomSendEventForFacet = (customPayload: any) => void; declare type CustomSendEventForHits = (customPayload: any) => void; declare type CustomSendEventForToggle = (customPayload: any) => void; declare const _default: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & HitsConnectorParams) => { $$type: "ais.hits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & HitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions): { hits: never[]; items: never[]; results: undefined; banner: undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: TWidgetParams & HitsConnectorParams; } | { hits: Hit[] | Hit[]; items: Hit[] | Hit[]; results: SearchResults; banner: Banner | undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: TWidgetParams & HitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetSearchParameters(state: SearchParameters, _uiState: { uiState: { query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const _default_10: = BaseHit>(widgetParams: InfiniteHitsWidgetParams & InfiniteHitsConnectorParams) => { $$widgetType: "ais.infiniteHits"; $$type: "ais.infiniteHits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & InfiniteHitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, parent, state: existingState, instantSearchInstance, }: InitOptions | RenderOptions): { hits: Hit[]; items: Hit[]; currentPageHits: Hit[]; sendEvent: SendEventForHits; bindEvent: BindEventForHits; banner: Banner | undefined; results: SearchResults | undefined; showPrevious: () => void; showMore: () => void; isFirstPage: boolean; isLastPage: boolean; widgetParams: Partial> & InfiniteHitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetUiState(uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }, { searchParameters }: { searchParameters: SearchParameters; helper: AlgoliaSearchHelper; }): { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; getWidgetSearchParameters(searchParameters: SearchParameters, { uiState }: { uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const _default_11: PlacesWidget; declare const _default_12: = BaseHit>(widgetParams: RelatedProductsWidgetParams & RelatedProductsConnectorParams) => { $$widgetType: "ais.relatedProducts"; dependsOn: "recommend"; $$type: "ais.relatedProducts"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: Partial<{ answers: WidgetRenderState; } & { autocomplete: WidgetRenderState; } & { breadcrumb: { [rootAttribute: string]: WidgetRenderState; }; } & { clearRefinements: WidgetRenderState; } & { configure: WidgetRenderState; } & { currentRefinements: WidgetRenderState; } & { geoSearch: WidgetRenderState, GeoSearchConnectorParams>; } & { hierarchicalMenu: { [rootAttribute: string]: WidgetRenderState; }; } & { hits: WidgetRenderState, HitsConnectorParams>; } & { hitsPerPage: WidgetRenderState; } & { infiniteHits: WidgetRenderState, InfiniteHitsConnectorParams>; } & { menu: { [attribute: string]: WidgetRenderState; }; } & { numericMenu: { [attribute: string]: WidgetRenderState; }; } & { pagination: WidgetRenderState; } & { poweredBy: WidgetRenderState; } & { queryRules: WidgetRenderState; } & { range: { [attribute: string]: WidgetRenderState; }; } & { ratingMenu: { [attribute: string]: WidgetRenderState; }; } & { refinementList: { [attribute: string]: WidgetRenderState; }; } & { relevantSort: WidgetRenderState; } & { searchBox: WidgetRenderState; } & { sortBy: WidgetRenderState; } & { stats: WidgetRenderState; } & { toggleRefinement: { [attribute: string]: WidgetRenderState; }; } & { voiceSearch: WidgetRenderState; } & { analytics: WidgetRenderState, AnalyticsWidgetParams>; } & { places: WidgetRenderState, PlacesWidgetParams>; }>; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[] | Hit[]; widgetParams: Partial> & RelatedProductsConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_13: = BaseHit>(widgetParams: TrendingItemsWidgetParams & TrendingItemsConnectorParams) => { $$widgetType: "ais.trendingItems"; dependsOn: "recommend"; $$type: "ais.trendingItems"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: Partial<{ answers: WidgetRenderState; } & { autocomplete: WidgetRenderState; } & { breadcrumb: { [rootAttribute: string]: WidgetRenderState; }; } & { clearRefinements: WidgetRenderState; } & { configure: WidgetRenderState; } & { currentRefinements: WidgetRenderState; } & { geoSearch: WidgetRenderState, GeoSearchConnectorParams>; } & { hierarchicalMenu: { [rootAttribute: string]: WidgetRenderState; }; } & { hits: WidgetRenderState, HitsConnectorParams>; } & { hitsPerPage: WidgetRenderState; } & { infiniteHits: WidgetRenderState, InfiniteHitsConnectorParams>; } & { menu: { [attribute: string]: WidgetRenderState; }; } & { numericMenu: { [attribute: string]: WidgetRenderState; }; } & { pagination: WidgetRenderState; } & { poweredBy: WidgetRenderState; } & { queryRules: WidgetRenderState; } & { range: { [attribute: string]: WidgetRenderState; }; } & { ratingMenu: { [attribute: string]: WidgetRenderState; }; } & { refinementList: { [attribute: string]: WidgetRenderState; }; } & { relevantSort: WidgetRenderState; } & { searchBox: WidgetRenderState; } & { sortBy: WidgetRenderState; } & { stats: WidgetRenderState; } & { toggleRefinement: { [attribute: string]: WidgetRenderState; }; } & { voiceSearch: WidgetRenderState; } & { analytics: WidgetRenderState, AnalyticsWidgetParams>; } & { places: WidgetRenderState, PlacesWidgetParams>; }>; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: Partial> & TrendingItemsConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_14: = BaseHit>(widgetParams: FrequentlyBoughtTogetherWidgetParams & FrequentlyBoughtTogetherConnectorParams) => { $$widgetType: "ais.frequentlyBoughtTogether"; dependsOn: "recommend"; $$type: "ais.frequentlyBoughtTogether"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: Partial<{ answers: WidgetRenderState; } & { autocomplete: WidgetRenderState; } & { breadcrumb: { [rootAttribute: string]: WidgetRenderState; }; } & { clearRefinements: WidgetRenderState; } & { configure: WidgetRenderState; } & { currentRefinements: WidgetRenderState; } & { geoSearch: WidgetRenderState, GeoSearchConnectorParams>; } & { hierarchicalMenu: { [rootAttribute: string]: WidgetRenderState; }; } & { hits: WidgetRenderState, HitsConnectorParams>; } & { hitsPerPage: WidgetRenderState; } & { infiniteHits: WidgetRenderState, InfiniteHitsConnectorParams>; } & { menu: { [attribute: string]: WidgetRenderState; }; } & { numericMenu: { [attribute: string]: WidgetRenderState; }; } & { pagination: WidgetRenderState; } & { poweredBy: WidgetRenderState; } & { queryRules: WidgetRenderState; } & { range: { [attribute: string]: WidgetRenderState; }; } & { ratingMenu: { [attribute: string]: WidgetRenderState; }; } & { refinementList: { [attribute: string]: WidgetRenderState; }; } & { relevantSort: WidgetRenderState; } & { searchBox: WidgetRenderState; } & { sortBy: WidgetRenderState; } & { stats: WidgetRenderState; } & { toggleRefinement: { [attribute: string]: WidgetRenderState; }; } & { voiceSearch: WidgetRenderState; } & { analytics: WidgetRenderState, AnalyticsWidgetParams>; } & { places: WidgetRenderState, PlacesWidgetParams>; }>; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: Partial> & FrequentlyBoughtTogetherConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_15: = BaseHit>(widgetParams: LookingSimilarWidgetParams & LookingSimilarConnectorParams) => { $$widgetType: "ais.lookingSimilar"; dependsOn: "recommend"; $$type: "ais.lookingSimilar"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: Partial<{ answers: WidgetRenderState; } & { autocomplete: WidgetRenderState; } & { breadcrumb: { [rootAttribute: string]: WidgetRenderState; }; } & { clearRefinements: WidgetRenderState; } & { configure: WidgetRenderState; } & { currentRefinements: WidgetRenderState; } & { geoSearch: WidgetRenderState, GeoSearchConnectorParams>; } & { hierarchicalMenu: { [rootAttribute: string]: WidgetRenderState; }; } & { hits: WidgetRenderState, HitsConnectorParams>; } & { hitsPerPage: WidgetRenderState; } & { infiniteHits: WidgetRenderState, InfiniteHitsConnectorParams>; } & { menu: { [attribute: string]: WidgetRenderState; }; } & { numericMenu: { [attribute: string]: WidgetRenderState; }; } & { pagination: WidgetRenderState; } & { poweredBy: WidgetRenderState; } & { queryRules: WidgetRenderState; } & { range: { [attribute: string]: WidgetRenderState; }; } & { ratingMenu: { [attribute: string]: WidgetRenderState; }; } & { refinementList: { [attribute: string]: WidgetRenderState; }; } & { relevantSort: WidgetRenderState; } & { searchBox: WidgetRenderState; } & { sortBy: WidgetRenderState; } & { stats: WidgetRenderState; } & { toggleRefinement: { [attribute: string]: WidgetRenderState; }; } & { voiceSearch: WidgetRenderState; } & { analytics: WidgetRenderState, AnalyticsWidgetParams>; } & { places: WidgetRenderState, PlacesWidgetParams>; }>; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: Partial> & LookingSimilarConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_2: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & InfiniteHitsConnectorParams) => { $$type: "ais.infiniteHits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & InfiniteHitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, parent, state: existingState, instantSearchInstance, }: InitOptions | RenderOptions): { hits: Hit[]; items: Hit[]; currentPageHits: Hit[]; sendEvent: SendEventForHits; bindEvent: BindEventForHits; banner: Banner | undefined; results: SearchResults | undefined; showPrevious: () => void; showMore: () => void; isFirstPage: boolean; isLastPage: boolean; widgetParams: TWidgetParams & InfiniteHitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetUiState(uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }, { searchParameters }: { searchParameters: SearchParameters; helper: AlgoliaSearchHelper; }): { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; getWidgetSearchParameters(searchParameters: SearchParameters, { uiState }: { uiState: { page?: number | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const _default_3: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & RelatedProductsConnectorParams) => { dependsOn: "recommend"; $$type: "ais.relatedProducts"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: IndexRenderState; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[] | Hit[]; widgetParams: TWidgetParams & RelatedProductsConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_4: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & TrendingItemsConnectorParams) => { dependsOn: "recommend"; $$type: "ais.trendingItems"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: IndexRenderState; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: TWidgetParams & TrendingItemsConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; /** * The **GeoSearch** connector provides the logic to build a widget that will display the results on a map. It also provides a way to search for results based on their position. The connector provides functions to manage the search experience (search on map interaction or control the interaction for example). * * @requirements * * Note that the GeoSearch connector uses the [geosearch](https://www.algolia.com/doc/guides/searching/geo-search) capabilities of Algolia. Your hits **must** have a `_geoloc` attribute in order to be passed to the rendering function. * * Currently, the feature is not compatible with multiple values in the _geoloc attribute. */ declare const _default_5: (renderFn: Renderer, unmountFn?: Unmounter) => (widgetParams: TWidgetParams & GeoSearchConnectorParams) => { $$type: "ais.geoSearch"; init(initArgs: InitOptions): void; render(renderArgs: RenderOptions): void; getWidgetRenderState(renderOptions: InitOptions | RenderOptions): { items: GeoHit[]; position: { lat: number; lng: number; } | undefined; currentRefinement: { northEast: { lat: number; lng: number; }; southWest: { lat: number; lng: number; }; } | undefined; refine: ({ northEast: ne, southWest: sw }: Bounds) => void; sendEvent: SendEventForHits; clearMapRefinement: () => void; isRefinedWithMap: () => boolean; toggleRefineOnMapMove: () => void; isRefineOnMapMove: () => boolean; setMapMoveSinceLastRefine: () => void; hasMapMoveSinceLastRefine: () => boolean; widgetParams: TWidgetParams & GeoSearchConnectorParams; }; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & GeoSearchWidgetDescription["indexRenderState"]; dispose({ state }: DisposeOptions): SearchParameters; getWidgetUiState(uiState: { geoSearch?: { /** * The rectangular area in geo coordinates. * The rectangle is defined by two diagonally opposite points, * hence by 4 floats separated by commas. * * @example '47.3165,4.9665,47.3424,5.0201' */ boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }, { searchParameters }: { searchParameters: SearchParameters; helper: AlgoliaSearchHelper; }): { geoSearch?: { /** * The rectangular area in geo coordinates. * The rectangle is defined by two diagonally opposite points, * hence by 4 floats separated by commas. * * @example '47.3165,4.9665,47.3424,5.0201' */ boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; getWidgetSearchParameters(searchParameters: SearchParameters, { uiState }: { uiState: { geoSearch?: { /** * The rectangular area in geo coordinates. * The rectangle is defined by two diagonally opposite points, * hence by 4 floats separated by commas. * * @example '47.3165,4.9665,47.3424,5.0201' */ boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const _default_6: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & FrequentlyBoughtTogetherConnectorParams) => { dependsOn: "recommend"; $$type: "ais.frequentlyBoughtTogether"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: IndexRenderState; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: TWidgetParams & FrequentlyBoughtTogetherConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; declare const _default_7: (renderFn: Renderer, unmountFn?: Unmounter) => = BaseHit>(widgetParams: TWidgetParams & LookingSimilarConnectorParams) => { dependsOn: "recommend"; $$type: "ais.lookingSimilar"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }): { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions | ({ instantSearchInstance: InstantSearch; parent: IndexWidget; templatesConfig: Record; scopedResults: ScopedResult[]; state: SearchParameters; renderState: IndexRenderState; helper: AlgoliaSearchHelper; searchMetadata: { isSearchStalled: boolean; }; status: InstantSearch["status"]; error: InstantSearch["error"]; createURL: (nextState: SearchParameters | ((state: IndexUiState) => IndexUiState)) => string; } & { results: RecommendResponse; })): { items: Hit[]; widgetParams: TWidgetParams & LookingSimilarConnectorParams; sendEvent: SendEventForHits; }; dispose({ recommendState }: DisposeOptions): RecommendParameters; getWidgetParameters(state: RecommendParameters): RecommendParameters; }; /** * The **GeoSearch** widget displays the list of results from the search on a Google Maps. It also provides a way to search for results based on their position. The widget also provide some of the common GeoSearch patterns like search on map interaction. * * @requirements * * Note that the GeoSearch widget uses the [geosearch](https://www.algolia.com/doc/guides/searching/geo-search) capabilities of Algolia. Your hits **must** have a `_geoloc` attribute in order to be displayed on the map. * * Currently, the feature is not compatible with multiple values in the _geoloc attribute. * * You are also responsible for loading the Google Maps library, it's not shipped with InstantSearch. You need to load the Google Maps library and pass a reference to the widget. You can find more information about how to install the library in [the Google Maps documentation](https://developers.google.com/maps/documentation/javascript/tutorial). * * Don't forget to explicitly set the `height` of the map container (default class `.ais-geo-search--map`), otherwise it won't be shown (it's a requirement of Google Maps). */ declare const _default_8: (widgetParams: GeoSearchWidgetParams & GeoSearchConnectorParams) => { $$widgetType: "ais.geoSearch"; $$type: "ais.geoSearch"; init(initArgs: InitOptions): void; render(renderArgs: RenderOptions): void; getWidgetRenderState(renderOptions: InitOptions | RenderOptions): { items: GeoHit[]; position: { lat: number; lng: number; } | undefined; currentRefinement: { northEast: { lat: number; lng: number; }; southWest: { lat: number; lng: number; }; } | undefined; refine: ({ northEast: ne, southWest: sw }: { northEast: GeoLoc; southWest: GeoLoc; }) => void; sendEvent: SendEventForHits; clearMapRefinement: () => void; isRefinedWithMap: () => boolean; toggleRefineOnMapMove: () => void; isRefineOnMapMove: () => boolean; setMapMoveSinceLastRefine: () => void; hasMapMoveSinceLastRefine: () => boolean; widgetParams: { renderState: { templateProps?: PreparedTemplateProps; isUserInteraction?: boolean; isPendingRefine?: boolean; markers?: any[]; }; container: HTMLElement; googleReference: GeoSearchWidgetParams["googleReference"]; initialZoom: GeoSearchWidgetParams["initialZoom"]; initialPosition: GeoSearchWidgetParams["initialPosition"]; templates: Partial<{ /** Template to use for the marker. */ HTMLMarker: Template; /** Template for the reset button. */ reset: Template; /** Template for the toggle label. */ toggle: Template; /** Template for the redo button. */ redo: Template; }>; cssClasses: ComponentCSSClasses | undefined>; createMarker: CreateMarker; markerOptions: GeoSearchMarker>; enableRefine: GeoSearchWidgetParams["enableRefine"]; enableClearMapRefinement: GeoSearchWidgetParams["enableClearMapRefinement"]; enableRefineControl: GeoSearchWidgetParams["enableRefineControl"]; } & GeoSearchConnectorParams; }; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & GeoSearchWidgetDescription["indexRenderState"]; dispose({ state }: DisposeOptions): SearchParameters; getWidgetUiState(uiState: { geoSearch?: { boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }, { searchParameters }: { searchParameters: SearchParameters; helper: AlgoliaSearchHelper; }): { geoSearch?: { boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; getWidgetSearchParameters(searchParameters: SearchParameters, { uiState }: { uiState: { geoSearch?: { boundingBox: string; } | undefined; query?: string | undefined; configure?: PlainSearchParameters | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare const _default_9: = BaseHit>(widgetParams: HitsWidgetParams & HitsConnectorParams) => { $$widgetType: "ais.hits"; $$type: "ais.hits"; init(initOptions: InitOptions): void; render(renderOptions: RenderOptions): void; getRenderState(renderState: { answers?: WidgetRenderState | undefined; autocomplete?: WidgetRenderState | undefined; breadcrumb?: { [rootAttribute: string]: WidgetRenderState; } | undefined; clearRefinements?: WidgetRenderState | undefined; configure?: WidgetRenderState | undefined; currentRefinements?: WidgetRenderState | undefined; geoSearch?: WidgetRenderState, GeoSearchConnectorParams> | undefined; hierarchicalMenu?: { [rootAttribute: string]: WidgetRenderState; } | undefined; hits?: WidgetRenderState, HitsConnectorParams> | undefined; hitsPerPage?: WidgetRenderState | undefined; infiniteHits?: WidgetRenderState, InfiniteHitsConnectorParams> | undefined; menu?: { [attribute: string]: WidgetRenderState; } | undefined; numericMenu?: { [attribute: string]: WidgetRenderState; } | undefined; pagination?: WidgetRenderState | undefined; poweredBy?: WidgetRenderState | undefined; queryRules?: WidgetRenderState | undefined; range?: { [attribute: string]: WidgetRenderState; } | undefined; ratingMenu?: { [attribute: string]: WidgetRenderState; } | undefined; refinementList?: { [attribute: string]: WidgetRenderState; } | undefined; relevantSort?: WidgetRenderState | undefined; searchBox?: WidgetRenderState | undefined; sortBy?: WidgetRenderState | undefined; stats?: WidgetRenderState | undefined; toggleRefinement?: { [attribute: string]: WidgetRenderState; } | undefined; voiceSearch?: WidgetRenderState | undefined; analytics?: WidgetRenderState, AnalyticsWidgetParams> | undefined; places?: WidgetRenderState, PlacesWidgetParams> | undefined; }, renderOptions: InitOptions | RenderOptions): IndexRenderState & HitsWidgetDescription["indexRenderState"]; getWidgetRenderState({ results, helper, instantSearchInstance }: InitOptions | RenderOptions): { hits: never[]; items: never[]; results: undefined; banner: undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: Partial> & HitsConnectorParams; } | { hits: Hit[] | Hit[]; items: Hit[] | Hit[]; results: SearchResults; banner: Banner | undefined; sendEvent: SendEventForHits; bindEvent: BindEventForHits; widgetParams: Partial> & HitsConnectorParams; }; dispose({ state }: DisposeOptions): SearchParameters; getWidgetSearchParameters(state: SearchParameters, _uiState: { uiState: { query?: string | undefined; configure?: PlainSearchParameters | undefined; geoSearch?: { boundingBox: string; } | undefined; hierarchicalMenu?: { [rootAttribute: string]: string[]; } | undefined; hitsPerPage?: number | undefined; page?: number | undefined; menu?: { [attribute: string]: string; } | undefined; numericMenu?: { [attribute: string]: string; } | undefined; range?: { [attribute: string]: string; } | undefined; ratingMenu?: { [attribute: string]: number | undefined; } | undefined; refinementList?: { [attribute: string]: string[]; } | undefined; relevantSort?: number | undefined; sortBy?: string | undefined; toggle?: { [attribute: string]: boolean; } | undefined; places?: { query: string; position: string; } | undefined; }; }): SearchParameters; }; declare type DisposeOptions = { helper: AlgoliaSearchHelper; state: SearchParameters; recommendState: RecommendParameters; parent: IndexWidget; }; declare const dynamicWidgets: DynamicWidgetsWidget; declare type DynamicWidgetsConnector = Connector; declare type DynamicWidgetsConnectorParams = { /** * An array of widgets, displayed in the order defined by `facetOrdering`. */ widgets: Widget[]; /** * Function to return a fallback widget when an attribute isn't found in * `widgets`. */ fallbackWidget?: (args: { /** The attribute name to create a widget for. */ attribute: string; }) => Widget; /** * Function to transform the items to render. * The function also exposes the full search response. */ transformItems?: TransformItems & { results: NonNullable; }>; /** * To prevent unneeded extra network requests when widgets mount or unmount, * we request all facet values by default. If you want to only request the * facet values that are needed, you can set this option to the list of * attributes you want to display. * * If `facets` is set to `['*']`, we request all facet values. * * Any facets that are requested due to the `facetOrdering` result are always * requested by the widget that mounted itself. * * Setting `facets` to a value other than `['*']` will only prevent extra * requests if all potential facets are listed. * * @default ['*'] */ facets?: ['*'] | string[]; /** * If you have more than 20 facet values pinned, you need to increase the * maxValuesPerFacet to at least that value. * * @default 20 */ maxValuesPerFacet?: number; }; declare type DynamicWidgetsRenderState = { attributesToRender: string[]; }; declare type DynamicWidgetsWidget = WidgetFactory, DynamicWidgetsWidgetParams>; declare type DynamicWidgetsWidgetDescription = { $$type: 'ais.dynamicWidgets'; renderState: DynamicWidgetsRenderState; indexRenderState: { dynamicWidgets: DynamicWidgetsRenderState; }; }; declare type DynamicWidgetsWidgetParams = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * An array of widget creator functions, displayed in the order defined by * `facetOrdering`. */ widgets: Array<(container: HTMLElement) => Widget>; /** * Function to return a fallback widget when an attribute isn't found in * `widgets`. */ fallbackWidget?: (args: { /** The attribute name to create a widget for. */ attribute: string; /** CSS Selector or HTMLElement to insert the widget */ container: HTMLElement; }) => Widget; }; declare type Expand = T extends infer O ? { [K in keyof O]: O[K]; } : never; /** @deprecated answers is no longer supported */ declare const EXPERIMENTAL_answers: AnswersWidget; /** @deprecated use relatedItems instead */ declare const EXPERIMENTAL_configureRelatedItems: ConfigureRelatedItemsWidget; /** @deprecated answers is no longer supported */ declare const EXPERIMENTAL_connectAnswers: AnswersConnector; /** @deprecated use connectRelatedItems instead */ declare const EXPERIMENTAL_connectConfigureRelatedItems: ConfigureRelatedItemsConnector; /** @deprecated use connectDynamicWidgets */ declare const EXPERIMENTAL_connectDynamicWidgets: DynamicWidgetsConnector; /** @deprecated use dynamicWidgets */ declare const EXPERIMENTAL_dynamicWidgets: DynamicWidgetsWidget; declare type FacetValue = string | boolean | number; declare type FrequentlyBoughtTogetherConnectorParams = BaseHit> = { /** * The objectIDs of the items to get the frequently bought together items for. */ objectIDs: string[]; /** * Threshold for the recommendations confidence score (between 0 and 100). Only recommendations with a greater score are returned. */ threshold?: number; /** * The maximum number of recommendations to return. */ limit?: number; /** * Parameters to pass to the request. */ queryParameters?: Omit; /** * Whether to escape HTML tags from items string values. * * @default true */ escapeHTML?: boolean; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems, { results: RecommendResponse>; }>; }; declare type FrequentlyBoughtTogetherCSSClasses = Partial; declare type FrequentlyBoughtTogetherRenderState = BaseHit> = { /** * The matched recommendations from Algolia API. */ items: Array>; /** * Sends an event to the Insights middleware. */ sendEvent: SendEventForHits; }; declare type FrequentlyBoughtTogetherTemplates = BaseHit> = Partial<{ /** * Template to use when there are no results. */ empty: Template>>; /** * Template to use for the header of the widget. */ header: Template>['headerComponent']>>[0], 'items'> & { cssClasses: RecommendClassNames; }>; /** * Template to use for each result. This template will receive an object containing a single record. */ item: TemplateWithBindEvent>; /** * Template to use to wrap all items. */ layout: Template>['layout']>>[0], 'items'> & { templates: { item: FrequentlyBoughtTogetherProps>['itemComponent']; }; cssClasses: Pick; }>; }>; declare type FrequentlyBoughtTogetherWidgetParams = BaseHit> = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * Templates to use for the widget. */ templates?: FrequentlyBoughtTogetherTemplates; /** * CSS classes to add. */ cssClasses?: FrequentlyBoughtTogetherCSSClasses; }; declare type GeoHit = BaseHit> = Hit & Required>; declare type GeoLoc = { lat: number; lng: number; }; declare type GeoSearchConnectorParams = { /** * If true, refine will be triggered as you move the map. * @default true */ enableRefineOnMapMove?: boolean; /** * Function to transform the items passed to the templates. * @default items => items */ transformItems?: TransformItems>; }; declare type GeoSearchCSSClasses = Partial<{ /** The root div of the widget. */ root: string | string[]; /** The map container of the widget. */ map: string | string[]; /** The control element of the widget. */ control: string | string[]; /** The label of the control element. */ label: string | string[]; /** The selected label of the control element. */ selectedLabel: string | string[]; /** The input of the control element. */ input: string | string[]; /** The redo search button. */ redo: string | string[]; /** The disabled redo search button. */ disabledRedo: string | string[]; /** The reset refinement button. */ reset: string | string[]; }>; declare type GeoSearchMarker = { /** * Function used to create the options passed to the Google Maps marker. * See the documentation for more information: * https://developers.google.com/maps/documentation/javascript/reference/3/#MarkerOptions */ createOptions?: (item: THit) => TOptions; /** * Object that takes an event type (ex: `click`, `mouseover`) as key and a * listener as value. The listener is provided with an object that contains: * `event`, `item`, `marker`, `map`. */ events: { [key: string]: (event: { item: any; marker: any; map: any; event: any; }) => void; }; }; declare type GeoSearchRenderState = BaseHit> = { /** * Reset the current bounding box refinement. */ clearMapRefinement: () => void; /** * The current bounding box of the search. */ currentRefinement?: Bounds; /** * Return true if the map has move since the last refinement. */ hasMapMoveSinceLastRefine: () => boolean; /** * Return true if the current refinement is set with the map bounds. */ isRefinedWithMap: () => boolean; /** * Return true if the user is able to refine on map move. */ isRefineOnMapMove: () => boolean; /** * The matched hits from Algolia API. */ items: Array>; /** * The current position of the search. */ position?: GeoLoc; /** * Sets a bounding box to filter the results from the given map bounds. */ refine: (bounds: Bounds) => void; /** * Send event to insights middleware */ sendEvent: SendEventForHits; /** * Set the fact that the map has moved since the last refinement, should be * called on each map move. The call to the function triggers a new rendering * only when the value change. */ setMapMoveSinceLastRefine: () => void; /** * Toggle the fact that the user is able to refine on map move. */ toggleRefineOnMapMove: () => void; }; declare type GeoSearchTemplates = Partial<{ /** Template to use for the marker. */ HTMLMarker: Template; /** Template for the reset button. */ reset: Template; /** Template for the toggle label. */ toggle: Template; /** Template for the redo button. */ redo: Template; }>; declare type GeoSearchWidgetDescription = { $$type: 'ais.geoSearch'; renderState: GeoSearchRenderState; indexRenderState: { geoSearch: WidgetRenderState, GeoSearchConnectorParams>; }; indexUiState: { geoSearch: { /** * The rectangular area in geo coordinates. * The rectangle is defined by two diagonally opposite points, * hence by 4 floats separated by commas. * * @example '47.3165,4.9665,47.3424,5.0201' */ boundingBox: string; }; }; }; declare type GeoSearchWidgetParams = { /** * By default the map will set the zoom accordingly to the markers displayed on it. * When we refine it may happen that the results are empty. For those situations we * need to provide a zoom to render the map. * @default 1 */ initialZoom?: number; /** * By default the map will set the position accordingly to the markers displayed on it. * When we refine it may happen that the results are empty. For those situations we need * to provide a position to render the map. This option is ignored when the `position` * is provided. * @default { lat: 0, lng: 0 } */ initialPosition?: GeoLoc; /** Templates to use for the widget. */ templates?: GeoSearchTemplates; /** CSS classes to add to the wrapping elements. */ cssClasses?: GeoSearchCSSClasses; /** * Options for customize the built-in Google Maps marker. This option is * ignored when the `customHTMLMarker` is provided. */ builtInMarker?: Partial>; /** * Options to customize the HTML marker. We provide an alternative to the * built-in Google Maps marker in order to have a full control of the marker * rendering. You can use plain HTML to build your marker. */ customHTMLMarker?: Partial>> | boolean; /** * If true, the map is used to search - otherwise it's for display purposes only. * @default true */ enableRefine?: boolean; /** * If true, a button is displayed on the map when the refinement is coming from * the map in order to remove it. * @default true */ enableClearMapRefinement?: boolean; /** * If true, the user can toggle the option `enableRefineOnMapMove` directly from the map. * @default true */ enableRefineControl?: boolean; /** * Option forwarded to the Google Maps constructor. * See the documentation for more information: * https://developers.google.com/maps/documentation/javascript/reference/3/#MapOptions */ mapOptions?: google.maps.MapOptions; /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * Reference to the global `window.google` object. * See [the documentation](https://developers.google.com/maps/documentation/javascript/tutorial) for more information. */ googleReference: typeof window['google']; }; /** * @deprecated This function will be still supported in 4.x releases, but not further. It is replaced by the `insights` middleware. For more information, visit https://www.algolia.com/doc/guides/getting-insights-and-analytics/search-analytics/click-through-and-conversions/how-to/send-click-and-conversion-events-with-instantsearch/js/ */ declare function getInsightsAnonymousUserToken(): string | undefined; declare function getInsightsAnonymousUserTokenInternal(): string | undefined; declare type GetWidgetRenderState = ReturnType['getWidgetRenderState'] extends (renderOptions: any) => infer TRenderState ? TRenderState extends Record ? TRenderState : never : Record; declare namespace helpers { export { reverseHighlight, reverseSnippet, highlight, snippet, insights, getInsightsAnonymousUserToken, getInsightsAnonymousUserTokenInternal, HighlightOptions, ReverseHighlightOptions, SnippetOptions, ReverseSnippetOptions } } declare const hierarchicalMenu: HierarchicalMenuWidget; declare type HierarchicalMenuConnector = Connector; declare type HierarchicalMenuConnectorParams = { /** * Attributes to use to generate the hierarchy of the menu. */ attributes: string[]; /** * Separator used in the attributes to separate level values. */ separator?: string; /** * Prefix path to use if the first level is not the root level. */ rootPath?: string | null; /** * Show the siblings of the selected parent levels of the current refined value. This * does not impact the root level. */ showParentLevel?: boolean; /** * Max number of values to display. */ limit?: number; /** * Whether to display the "show more" button. */ showMore?: boolean; /** * Max number of values to display when showing more. */ showMoreLimit?: number; /** * How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`. * You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax). * * If a facetOrdering is set in the index settings, it is used when sortBy isn't passed */ sortBy?: SortBy; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; }; declare type HierarchicalMenuCSSClasses = Partial<{ /** * CSS class to add to the root element. */ root: string | string[]; /** * CSS class to add to the root element when no refinements. */ noRefinementRoot: string | string[]; /** * CSS class to add to the list element. */ list: string | string[]; /** * CSS class to add to the child list element. */ childList: string | string[]; /** * CSS class to add to each item element. */ item: string | string[]; /** * CSS class to add to each selected item element. */ selectedItem: string | string[]; /** * CSS class to add to each parent item element. */ parentItem: string | string[]; /** * CSS class to add to each link (when using the default template). */ link: string | string[]; /** * CSS class to add to the link of each selected item element (when using the default template). */ selectedItemLink: string | string[]; /** * CSS class to add to each label (when using the default template). */ label: string | string[]; /** * CSS class to add to each count element (when using the default template). */ count: string | string[]; /** * CSS class to add to the show more element. */ showMore: string | string[]; /** * CSS class to add to the disabled show more element. */ disabledShowMore: string | string[]; }>; declare type HierarchicalMenuItem = { /** * Value of the menu item. */ value: string; /** * Human-readable value of the menu item. */ label: string; /** * Number of matched results after refinement is applied. */ count: number; /** * Indicates if the refinement is applied. */ isRefined: boolean; /** * n+1 level of items, same structure HierarchicalMenuItem */ data: HierarchicalMenuItem[] | null; }; declare type HierarchicalMenuRenderState = { /** * Creates an url for the next state for a clicked item. */ createURL: CreateURL; /** * Values to be rendered. */ items: HierarchicalMenuItem[]; /** * Sets the path of the hierarchical filter and triggers a new search. */ refine: (value: string) => void; /** * Indicates if search state can be refined. */ canRefine: boolean; /** * True if the menu is displaying all the menu items. */ isShowingMore: boolean; /** * Toggles the number of values displayed between `limit` and `showMoreLimit`. */ toggleShowMore: () => void; /** * `true` if the toggleShowMore button can be activated (enough items to display more or * already displaying more than `limit` items) */ canToggleShowMore: boolean; /** * Send event to insights middleware */ sendEvent: SendEventForFacet; }; declare type HierarchicalMenuTemplates = Partial<{ /** * Item template, provided with `name`, `count`, `isRefined`, `url` data properties. */ item: Template<{ name: string; count: number; isRefined: boolean; url: string; label: string; cssClasses: HierarchicalMenuCSSClasses; }>; /** * Template used for the show more text, provided with `isShowingMore` data property. */ showMoreText: Template<{ isShowingMore: boolean; }>; }>; /** * The hierarchical menu widget is used to create a navigation based on a hierarchy of facet attributes. * * It is commonly used for categories with subcategories. * * All attributes (lvl0, lvl1 here) must be declared as [attributes for faceting](https://www.algolia.com/doc/guides/searching/faceting/#declaring-attributes-for-faceting) in your * Algolia settings. * * By default, the separator we expect is ` > ` (with spaces) but you can use * a different one by using the `separator` option. * @requirements * Your objects must be formatted in a specific way to be * able to display hierarchical menus. Here's an example: * * ```javascript * { * "objectID": "123", * "name": "orange", * "categories": { * "lvl0": "fruits", * "lvl1": "fruits > citrus" * } * } * ``` * * Every level must be specified entirely. * It's also possible to have multiple values per level, for example: * * ```javascript * { * "objectID": "123", * "name": "orange", * "categories": { * "lvl0": ["fruits", "vitamins"], * "lvl1": ["fruits > citrus", "vitamins > C"] * } * } * ``` * @type {WidgetFactory} * @devNovel HierarchicalMenu * @category filter * @param {HierarchicalMenuWidgetParams} widgetParams The HierarchicalMenu widget options. * @return {Widget} A new HierarchicalMenu widget instance. * @example * search.addWidgets([ * instantsearch.widgets.hierarchicalMenu({ * container: '#hierarchical-categories', * attributes: ['hierarchicalCategories.lvl0', 'hierarchicalCategories.lvl1', 'hierarchicalCategories.lvl2'], * }) * ]); */ declare type HierarchicalMenuWidget = WidgetFactory; declare type HierarchicalMenuWidgetDescription = { $$type: 'ais.hierarchicalMenu'; renderState: HierarchicalMenuRenderState; indexRenderState: { hierarchicalMenu: { [rootAttribute: string]: WidgetRenderState; }; }; indexUiState: { hierarchicalMenu: { [rootAttribute: string]: string[]; }; }; }; declare type HierarchicalMenuWidgetParams = { /** * CSS Selector or HTMLElement to insert the widget. */ container: string | HTMLElement; /** * Array of attributes to use to generate the hierarchy of the menu. */ attributes: string[]; /** * Separator used in the attributes to separate level values. */ separator?: string; /** * Prefix path to use if the first level is not the root level. */ rootPath?: string; /** * Show the siblings of the selected parent level of the current refined value. * * With `showParentLevel` set to `true` (default): * - Parent lvl0 * - **lvl1** * - **lvl2** * - lvl2 * - lvl2 * - lvl 1 * - lvl 1 * - Parent lvl0 * - Parent lvl0 * * With `showParentLevel` set to `false`: * - Parent lvl0 * - **lvl1** * - **lvl2** * - Parent lvl0 * - Parent lvl0 */ showParentLevel?: boolean; /** * Max number of values to display. */ limit?: number; /** * Whether to display the "show more" button. */ showMore?: boolean; /** * Max number of values to display when showing more. * does not impact the root level. */ showMoreLimit?: number; /** * How to sort refinements. Possible values: `count|isRefined|name:asc|name:desc`. * You can also use a sort function that behaves like the standard Javascript [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Syntax). */ sortBy?: SortBy; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; /** * Templates to use for the widget. */ templates?: HierarchicalMenuTemplates; /** * CSS classes to add to the wrapping elements. */ cssClasses?: HierarchicalMenuCSSClasses; }; /** * @deprecated use html tagged templates and the Highlight component instead */ declare function highlight({ attribute, highlightedTagName, hit, cssClasses, }: HighlightOptions): string; declare function Highlight_2>({ hit, attribute, cssClasses, ...props }: HighlightProps): h.JSX.Element; declare type HighlightClassNames = HighlightClassNames_2; declare type HighlightOptions = { attribute: string | string[]; highlightedTagName?: string; hit: Partial; cssClasses?: Partial<{ highlighted: string; }>; }; declare type HighlightProps> = { hit: THit; attribute: keyof THit | string[]; cssClasses?: HighlightProps_2['classNames']; } & PartialKeys, 'highlightedTagName' | 'nonHighlightedTagName' | 'separator'>; declare type HighlightProps_2 = Omit & { classNames?: Partial; }; declare function historyRouter({ createURL, parseURL, writeDelay, windowTitle, getLocation, start, dispose, push, cleanUrlOnDispose, }?: Partial>): BrowserHistory; declare type Hit = Record> = { __position: number; __queryID?: string; } & AlgoliaHit; declare type HitAttributeHighlightResult = { value: string; matchLevel: 'none' | 'partial' | 'full'; matchedWords: string[]; fullyHighlighted?: boolean; }; declare type HitAttributeSnippetResult = Pick; declare type HitHighlightResult = { [attribute: string]: HitAttributeHighlightResult | HitAttributeHighlightResult[] | HitHighlightResult[] | HitHighlightResult; }; declare type HitsConnectorParams = BaseHit> = { /** * Whether to escape HTML tags from hits string values. * * @default true */ escapeHTML?: boolean; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems>; }; declare type HitsCSSClasses = Partial; declare type HitSnippetResult = { [attribute: string]: HitAttributeSnippetResult[] | HitSnippetResult[] | HitAttributeSnippetResult | HitSnippetResult; }; declare const hitsPerPage: HitsPerPageWidget; declare type HitsPerPageConnector = Connector; declare type HitsPerPageConnectorParams = { /** * Array of objects defining the different values and labels. */ items: HitsPerPageConnectorParamsItem[]; /** * Function to transform the items passed to the templates. */ transformItems?: TransformItems; }; declare type HitsPerPageConnectorParamsItem = { /** * Label to display in the option. */ label: string; /** * Number of hits to display per page. */ value: number; /** * The default hits per page on first search. * * @default false */ default?: boolean; }; declare type HitsPerPageCSSClasses = Partial<{ /** * CSS classes added to the outer `
`. */ root: string | string[]; /** * CSS classes added to the parent ``. */ select: string | string[]; /** * CSS classes added to each `