instantsearch.js 4.50.0 → 4.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/lib/templating/prepareTemplateProps.js +1 -2
- package/cjs/lib/version.js +1 -1
- package/cjs/widgets/hits/hits.js +3 -4
- package/cjs/widgets/infinite-hits/infinite-hits.js +3 -4
- package/dist/instantsearch.development.d.ts +1 -1
- package/dist/instantsearch.development.js +25 -18
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +1 -1
- package/dist/instantsearch.production.min.d.ts +1 -1
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/components/Answers/Answers.d.ts +3 -3
- package/es/components/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/es/components/ClearRefinements/ClearRefinements.d.ts +3 -3
- package/es/components/CurrentRefinements/CurrentRefinements.d.ts +2 -2
- package/es/components/GeoSearchControls/GeoSearchButton.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchControls.d.ts +1 -1
- package/es/components/GeoSearchControls/GeoSearchToggle.d.ts +1 -1
- package/es/components/Highlight/Highlight.d.ts +2 -2
- package/es/components/Hits/Hits.d.ts +3 -3
- package/es/components/InfiniteHits/InfiniteHits.d.ts +3 -3
- package/es/components/MenuSelect/MenuSelect.d.ts +4 -4
- package/es/components/Pagination/Pagination.d.ts +3 -3
- package/es/components/Panel/Panel.d.ts +3 -3
- package/es/components/PoweredBy/PoweredBy.d.ts +2 -2
- package/es/components/QueryRuleCustomData/QueryRuleCustomData.d.ts +3 -3
- package/es/components/RangeInput/RangeInput.d.ts +3 -3
- package/es/components/RefinementList/RefinementList.d.ts +7 -7
- package/es/components/RefinementList/RefinementListItem.d.ts +1 -1
- package/es/components/RelevantSort/RelevantSort.d.ts +3 -3
- package/es/components/ReverseHighlight/ReverseHighlight.d.ts +2 -2
- package/es/components/ReverseSnippet/ReverseSnippet.d.ts +2 -2
- package/es/components/SearchBox/SearchBox.d.ts +5 -5
- package/es/components/Selector/Selector.d.ts +3 -3
- package/es/components/Slider/Rheostat.d.ts +6 -6
- package/es/components/Slider/Slider.d.ts +2 -2
- package/es/components/Snippet/Snippet.d.ts +2 -2
- package/es/components/Stats/Stats.d.ts +3 -3
- package/es/components/Template/Template.d.ts +1 -1
- package/es/components/ToggleRefinement/ToggleRefinement.d.ts +3 -3
- package/es/components/VoiceSearch/VoiceSearch.d.ts +3 -3
- package/es/connectors/answers/connectAnswers.d.ts +4 -4
- package/es/connectors/autocomplete/connectAutocomplete.d.ts +4 -4
- package/es/connectors/breadcrumb/connectBreadcrumb.d.ts +5 -5
- package/es/connectors/clear-refinements/connectClearRefinements.d.ts +4 -4
- package/es/connectors/configure/connectConfigure.d.ts +5 -5
- package/es/connectors/configure-related-items/connectConfigureRelatedItems.d.ts +5 -5
- package/es/connectors/current-refinements/connectCurrentRefinements.d.ts +6 -6
- package/es/connectors/dynamic-widgets/connectDynamicWidgets.d.ts +4 -4
- package/es/connectors/geo-search/connectGeoSearch.d.ts +6 -6
- package/es/connectors/hierarchical-menu/connectHierarchicalMenu.d.ts +5 -5
- package/es/connectors/hits/connectHits.d.ts +4 -4
- package/es/connectors/hits-per-page/connectHitsPerPage.d.ts +6 -6
- package/es/connectors/infinite-hits/connectInfiniteHits.d.ts +8 -8
- package/es/connectors/menu/connectMenu.d.ts +5 -5
- package/es/connectors/numeric-menu/connectNumericMenu.d.ts +6 -6
- package/es/connectors/pagination/connectPagination.d.ts +4 -4
- package/es/connectors/powered-by/connectPoweredBy.d.ts +4 -4
- package/es/connectors/query-rules/connectQueryRules.d.ts +7 -7
- package/es/connectors/range/connectRange.d.ts +8 -8
- package/es/connectors/rating-menu/connectRatingMenu.d.ts +6 -6
- package/es/connectors/refinement-list/connectRefinementList.d.ts +5 -5
- package/es/connectors/relevant-sort/connectRelevantSort.d.ts +5 -5
- package/es/connectors/search-box/connectSearchBox.d.ts +4 -4
- package/es/connectors/sort-by/connectSortBy.d.ts +5 -5
- package/es/connectors/stats/connectStats.d.ts +4 -4
- package/es/connectors/toggle-refinement/connectToggleRefinement.d.ts +9 -9
- package/es/connectors/toggle-refinement/types.d.ts +5 -5
- package/es/connectors/voice-search/connectVoiceSearch.d.ts +4 -4
- package/es/helpers/components/Highlight.d.ts +1 -1
- package/es/helpers/components/ReverseHighlight.d.ts +1 -1
- package/es/helpers/components/ReverseSnippet.d.ts +1 -1
- package/es/helpers/components/Snippet.d.ts +1 -1
- package/es/helpers/highlight.d.ts +1 -1
- package/es/helpers/reverseHighlight.d.ts +1 -1
- package/es/helpers/reverseSnippet.d.ts +1 -1
- package/es/helpers/snippet.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/lib/InstantSearch.d.ts +3 -3
- package/es/lib/createHelpers.d.ts +1 -1
- package/es/lib/insights/listener.d.ts +1 -1
- package/es/lib/routers/history.d.ts +3 -3
- package/es/lib/suit.d.ts +2 -2
- package/es/lib/templating/prepareTemplateProps.d.ts +2 -2
- package/es/lib/templating/prepareTemplateProps.js +1 -2
- package/es/lib/utils/checkIndexUiState.d.ts +1 -1
- package/es/lib/utils/createConcurrentSafePromise.d.ts +2 -2
- package/es/lib/utils/createSendEventForFacet.d.ts +4 -4
- package/es/lib/utils/createSendEventForHits.d.ts +6 -6
- package/es/lib/utils/debounce.d.ts +2 -2
- package/es/lib/utils/defer.d.ts +2 -2
- package/es/lib/utils/documentation.d.ts +2 -2
- package/es/lib/utils/escapeFacetValue.d.ts +1 -1
- package/es/lib/utils/geo-search.d.ts +1 -1
- package/es/lib/utils/getRefinements.d.ts +6 -6
- package/es/lib/utils/logger.d.ts +2 -2
- package/es/lib/utils/range.d.ts +1 -1
- package/es/lib/utils/safelyRunOnBrowser.d.ts +2 -2
- package/es/lib/utils/toArray.d.ts +1 -1
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/es/lib/voiceSearchHelper/types.d.ts +5 -5
- package/es/middlewares/createInsightsMiddleware.d.ts +3 -3
- package/es/middlewares/createRouterMiddleware.d.ts +1 -1
- package/es/types/component.d.ts +1 -1
- package/es/types/connector.d.ts +4 -4
- package/es/types/insights.d.ts +5 -5
- package/es/types/middleware.d.ts +4 -4
- package/es/types/render-state.d.ts +5 -5
- package/es/types/results.d.ts +16 -16
- package/es/types/router.d.ts +2 -2
- package/es/types/templates.d.ts +5 -5
- package/es/types/ui-state.d.ts +4 -4
- package/es/types/utils.d.ts +6 -6
- package/es/types/widget-factory.d.ts +2 -2
- package/es/types/widget.d.ts +23 -23
- package/es/widgets/analytics/analytics.d.ts +4 -4
- package/es/widgets/answers/answers.d.ts +4 -4
- package/es/widgets/breadcrumb/breadcrumb.d.ts +4 -4
- package/es/widgets/clear-refinements/clear-refinements.d.ts +4 -4
- package/es/widgets/configure/configure.d.ts +2 -2
- package/es/widgets/configure-related-items/configure-related-items.d.ts +2 -2
- package/es/widgets/current-refinements/current-refinements.d.ts +3 -3
- package/es/widgets/dynamic-widgets/dynamic-widgets.d.ts +2 -2
- package/es/widgets/geo-search/createHTMLMarker.d.ts +1 -1
- package/es/widgets/geo-search/geo-search.d.ts +7 -7
- package/es/widgets/hierarchical-menu/hierarchical-menu.d.ts +6 -6
- package/es/widgets/hits/hits.d.ts +4 -4
- package/es/widgets/hits/hits.js +3 -4
- package/es/widgets/hits-per-page/hits-per-page.d.ts +3 -3
- package/es/widgets/index/index.d.ts +5 -5
- package/es/widgets/infinite-hits/infinite-hits.d.ts +4 -4
- package/es/widgets/infinite-hits/infinite-hits.js +3 -4
- package/es/widgets/menu/menu.d.ts +6 -6
- package/es/widgets/menu-select/menu-select.d.ts +4 -4
- package/es/widgets/numeric-menu/numeric-menu.d.ts +6 -6
- package/es/widgets/pagination/pagination.d.ts +4 -4
- package/es/widgets/panel/panel.d.ts +9 -9
- package/es/widgets/places/places.d.ts +6 -6
- package/es/widgets/powered-by/powered-by.d.ts +3 -3
- package/es/widgets/query-rule-context/query-rule-context.d.ts +2 -2
- package/es/widgets/query-rule-custom-data/query-rule-custom-data.d.ts +4 -4
- package/es/widgets/range-input/range-input.d.ts +4 -4
- package/es/widgets/range-slider/range-slider.d.ts +4 -4
- package/es/widgets/rating-menu/rating-menu.d.ts +6 -6
- package/es/widgets/refinement-list/refinement-list.d.ts +10 -10
- package/es/widgets/relevant-sort/relevant-sort.d.ts +4 -4
- package/es/widgets/search-box/search-box.d.ts +4 -4
- package/es/widgets/sort-by/sort-by.d.ts +4 -4
- package/es/widgets/stats/stats.d.ts +5 -5
- package/es/widgets/toggle-refinement/toggle-refinement.d.ts +4 -4
- package/es/widgets/voice-search/voice-search.d.ts +5 -5
- package/package.json +6 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
type BrowserCallback<TReturn> = (params: {
|
|
2
2
|
window: typeof window;
|
|
3
3
|
}) => TReturn;
|
|
4
|
-
|
|
4
|
+
type SafelyRunOnBrowserOptions<TReturn> = {
|
|
5
5
|
/**
|
|
6
6
|
* Fallback to run on server environments.
|
|
7
7
|
*/
|
package/es/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.50.
|
|
1
|
+
declare const _default: "4.50.1";
|
|
2
2
|
export default _default;
|
package/es/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.50.
|
|
1
|
+
export default '4.50.1';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Status = 'initial' | 'askingPermission' | 'waiting' | 'recognizing' | 'finished' | 'error';
|
|
2
|
+
export type VoiceListeningState = {
|
|
3
3
|
status: Status;
|
|
4
4
|
transcript: string;
|
|
5
5
|
isSpeechFinal: boolean;
|
|
6
6
|
errorCode?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type VoiceSearchHelperParams = {
|
|
9
9
|
searchAsYouSpeak: boolean;
|
|
10
10
|
language?: string;
|
|
11
11
|
onQueryChange: (query: string) => void;
|
|
12
12
|
onStateChange: () => void;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type VoiceSearchHelper = {
|
|
15
15
|
getState: () => VoiceListeningState;
|
|
16
16
|
isBrowserSupported: () => boolean;
|
|
17
17
|
isListening: () => boolean;
|
|
@@ -19,4 +19,4 @@ export declare type VoiceSearchHelper = {
|
|
|
19
19
|
stopListening: () => void;
|
|
20
20
|
dispose: () => void;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type CreateVoiceSearchHelper = (params: VoiceSearchHelperParams) => VoiceSearchHelper;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InsightsClient, InsightsClientMethod, InternalMiddleware, Hit } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type InsightsEvent = {
|
|
3
3
|
insightsMethod?: InsightsClientMethod;
|
|
4
4
|
payload: any;
|
|
5
5
|
widgetType: string;
|
|
@@ -7,7 +7,7 @@ export declare type InsightsEvent = {
|
|
|
7
7
|
hits?: Hit[];
|
|
8
8
|
attribute?: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type InsightsProps<TInsightsClient extends null | InsightsClient = InsightsClient | null> = {
|
|
11
11
|
insightsClient: TInsightsClient;
|
|
12
12
|
insightsInitParams?: {
|
|
13
13
|
userHasOptedOut?: boolean;
|
|
@@ -17,5 +17,5 @@ export declare type InsightsProps<TInsightsClient extends null | InsightsClient
|
|
|
17
17
|
};
|
|
18
18
|
onEvent?: (event: InsightsEvent, insightsClient: TInsightsClient) => void;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type CreateInsightsMiddleware = typeof createInsightsMiddleware;
|
|
21
21
|
export declare function createInsightsMiddleware<TInsightsClient extends null | InsightsClient>(props: InsightsProps<TInsightsClient>): InternalMiddleware;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Router, StateMapping, UiState, InternalMiddleware } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type RouterProps<TUiState extends UiState = UiState, TRouteState = TUiState> = {
|
|
3
3
|
router?: Router<TRouteState>;
|
|
4
4
|
stateMapping?: StateMapping<TUiState, TRouteState>;
|
|
5
5
|
};
|
package/es/types/component.d.ts
CHANGED
package/es/types/connector.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { UnknownWidgetParams, Widget, WidgetDescription } from './widget';
|
|
|
7
7
|
* The base renderer options. All render functions receive
|
|
8
8
|
* the options below plus the specific options per connector.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type RendererOptions<TWidgetParams> = {
|
|
11
11
|
/**
|
|
12
12
|
* The original widget params. Useful as you may
|
|
13
13
|
* need them while using the render function.
|
|
@@ -34,7 +34,7 @@ export declare type RendererOptions<TWidgetParams> = {
|
|
|
34
34
|
/**
|
|
35
35
|
* The render function.
|
|
36
36
|
*/
|
|
37
|
-
export
|
|
37
|
+
export type Renderer<TRenderState, TWidgetParams> = (
|
|
38
38
|
/**
|
|
39
39
|
* The base render options plus the specific options of the widget.
|
|
40
40
|
*/
|
|
@@ -46,12 +46,12 @@ isFirstRender: boolean) => void;
|
|
|
46
46
|
/**
|
|
47
47
|
* The called function when unmounting a widget.
|
|
48
48
|
*/
|
|
49
|
-
export
|
|
49
|
+
export type Unmounter = () => void;
|
|
50
50
|
/**
|
|
51
51
|
* The connector handles the business logic and exposes
|
|
52
52
|
* a simplified API to the rendering function.
|
|
53
53
|
*/
|
|
54
|
-
export
|
|
54
|
+
export type Connector<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams> = <TWidgetParams extends UnknownWidgetParams>(
|
|
55
55
|
/**
|
|
56
56
|
* The render function.
|
|
57
57
|
*/
|
package/es/types/insights.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { InsightsMethodMap, InsightsClient as _InsightsClient } from 'search-insights';
|
|
2
2
|
export type { Init as InsightsInit, AddAlgoliaAgent as InsightsAddAlgoliaAgent, SetUserToken as InsightsSetUserToken, GetUserToken as InsightsGetUserToken, OnUserTokenChange as InsightsOnUserTokenChange, } from 'search-insights';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type InsightsClientMethod = keyof InsightsMethodMap;
|
|
4
|
+
export type InsightsClientPayload = {
|
|
5
5
|
eventName: string;
|
|
6
6
|
queryID: string;
|
|
7
7
|
index: string;
|
|
8
8
|
objectIDs: string[];
|
|
9
9
|
positions?: number[];
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type QueueItemMap = {
|
|
12
12
|
[MethodName in keyof InsightsMethodMap]: [
|
|
13
13
|
methodName: MethodName,
|
|
14
14
|
...args: InsightsMethodMap[MethodName]
|
|
15
15
|
];
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
export
|
|
17
|
+
type QueueItem = QueueItemMap[keyof QueueItemMap];
|
|
18
|
+
export type InsightsClient = _InsightsClient & {
|
|
19
19
|
queue?: QueueItem[];
|
|
20
20
|
};
|
package/es/types/middleware.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type InstantSearch from '../lib/InstantSearch';
|
|
2
2
|
import type { UiState } from './ui-state';
|
|
3
3
|
import type { AtLeastOne } from './utils';
|
|
4
|
-
export
|
|
4
|
+
export type MiddlewareDefinition<TUiState extends UiState = UiState> = {
|
|
5
5
|
onStateChange(options: {
|
|
6
6
|
uiState: TUiState;
|
|
7
7
|
}): void;
|
|
@@ -9,8 +9,8 @@ export declare type MiddlewareDefinition<TUiState extends UiState = UiState> = {
|
|
|
9
9
|
started(): void;
|
|
10
10
|
unsubscribe(): void;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type MiddlewareOptions = {
|
|
13
13
|
instantSearchInstance: InstantSearch;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type InternalMiddleware<TUiState extends UiState = UiState> = (options: MiddlewareOptions) => MiddlewareDefinition<TUiState>;
|
|
16
|
+
export type Middleware = (options: MiddlewareOptions) => AtLeastOne<MiddlewareDefinition>;
|
|
@@ -25,13 +25,13 @@ import type { ToggleRefinementWidgetDescription } from '../connectors/toggle-ref
|
|
|
25
25
|
import type { VoiceSearchWidgetDescription } from '../connectors/voice-search/connectVoiceSearch';
|
|
26
26
|
import type { AnalyticsWidgetDescription } from '../widgets/analytics/analytics';
|
|
27
27
|
import type { PlacesWidgetDescription } from '../widgets/places/places';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export
|
|
31
|
-
export
|
|
28
|
+
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'];
|
|
29
|
+
type WidgetRenderStates = AnalyticsWidgetDescription['indexRenderState'] & PlacesWidgetDescription['indexRenderState'];
|
|
30
|
+
export type IndexRenderState = Partial<ConnectorRenderStates & WidgetRenderStates>;
|
|
31
|
+
export type RenderState = {
|
|
32
32
|
[indexId: string]: IndexRenderState;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type WidgetRenderState<TWidgetRenderState, TWidgetParams> = TWidgetRenderState & {
|
|
35
35
|
widgetParams: TWidgetParams;
|
|
36
36
|
};
|
|
37
37
|
export {};
|
package/es/types/results.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { PlainSearchParameters, SearchForFacetValues, SearchResults } from 'algoliasearch-helper';
|
|
2
|
-
export
|
|
2
|
+
export type HitAttributeHighlightResult = {
|
|
3
3
|
value: string;
|
|
4
4
|
matchLevel: 'none' | 'partial' | 'full';
|
|
5
5
|
matchedWords: string[];
|
|
6
6
|
fullyHighlighted?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type HitHighlightResult = {
|
|
9
9
|
[attribute: string]: HitAttributeHighlightResult | HitAttributeHighlightResult[] | HitHighlightResult[] | HitHighlightResult;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type HitAttributeSnippetResult = Pick<HitAttributeHighlightResult, 'value' | 'matchLevel'>;
|
|
12
|
+
export type HitSnippetResult = {
|
|
13
13
|
[attribute: string]: HitAttributeSnippetResult[] | HitSnippetResult[] | HitAttributeSnippetResult | HitSnippetResult;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type GeoLoc = {
|
|
16
16
|
lat: number;
|
|
17
17
|
lng: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
|
|
20
20
|
objectID: string;
|
|
21
21
|
_highlightResult?: HitHighlightResult;
|
|
22
22
|
_snippetResult?: HitSnippetResult;
|
|
@@ -40,32 +40,32 @@ export declare type AlgoliaHit<THit extends BaseHit = Record<string, any>> = {
|
|
|
40
40
|
_distinctSeqID?: number;
|
|
41
41
|
_geoloc?: GeoLoc;
|
|
42
42
|
} & THit;
|
|
43
|
-
export
|
|
44
|
-
export
|
|
43
|
+
export type BaseHit = Record<string, unknown>;
|
|
44
|
+
export type Hit<THit extends BaseHit = Record<string, any>> = {
|
|
45
45
|
__position: number;
|
|
46
46
|
__queryID?: string;
|
|
47
47
|
} & AlgoliaHit<THit>;
|
|
48
48
|
/**
|
|
49
49
|
* @deprecated use Hit[] directly instead
|
|
50
50
|
*/
|
|
51
|
-
export
|
|
52
|
-
export
|
|
51
|
+
export type Hits = Hit[];
|
|
52
|
+
export type EscapedHits<THit = Hit> = THit[] & {
|
|
53
53
|
__escaped: boolean;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
56
|
-
export
|
|
55
|
+
export type FacetHit = SearchForFacetValues.Hit;
|
|
56
|
+
export type FacetRefinement = {
|
|
57
57
|
value: string;
|
|
58
58
|
type: 'conjunctive' | 'disjunctive' | 'exclude';
|
|
59
59
|
};
|
|
60
|
-
export
|
|
60
|
+
export type NumericRefinement = {
|
|
61
61
|
value: number[];
|
|
62
62
|
type: 'numeric';
|
|
63
63
|
operator: string;
|
|
64
64
|
};
|
|
65
|
-
export
|
|
66
|
-
|
|
65
|
+
export type Refinement = FacetRefinement | NumericRefinement;
|
|
66
|
+
type InitialResult = {
|
|
67
67
|
state: PlainSearchParameters;
|
|
68
68
|
results: SearchResults['_rawResults'];
|
|
69
69
|
};
|
|
70
|
-
export
|
|
70
|
+
export type InitialResults = Record<string, InitialResult>;
|
|
71
71
|
export {};
|
package/es/types/router.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { UiState } from './ui-state';
|
|
|
3
3
|
* The router is the part that saves and reads the object from the storage.
|
|
4
4
|
* Usually this is the URL.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type Router<TRouteState = UiState> = {
|
|
7
7
|
/**
|
|
8
8
|
* onUpdate Sets an event listener that is triggered when the storage is updated.
|
|
9
9
|
* The function should accept a callback to trigger when the update happens.
|
|
@@ -37,7 +37,7 @@ export declare type Router<TRouteState = UiState> = {
|
|
|
37
37
|
* should be valid for any UiState:
|
|
38
38
|
* `UiState = routeToState(stateToRoute(UiState))`.
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
40
|
+
export type StateMapping<TUiState = UiState, TRouteState = TUiState> = {
|
|
41
41
|
/**
|
|
42
42
|
* Transforms a UI state representation into a route object.
|
|
43
43
|
* It receives an object that contains the UI state of all the widgets in the page.
|
package/es/types/templates.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { VNode } from 'preact';
|
|
|
2
2
|
import type { Highlight, ReverseHighlight, ReverseSnippet, Snippet } from '../helpers/components';
|
|
3
3
|
import type { html } from 'htm/preact';
|
|
4
4
|
import type { BuiltInBindEventForHits, CustomBindEventForHits, SendEventForHits } from '../lib/utils';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type Template<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateParams) => VNode | VNode[] | string);
|
|
6
|
+
export type TemplateParams = {
|
|
7
7
|
html: typeof html;
|
|
8
8
|
components: {
|
|
9
9
|
Highlight: typeof Highlight;
|
|
@@ -20,9 +20,9 @@ interface TemplateWithBindEventParams extends TemplateParams {
|
|
|
20
20
|
(...args: Parameters<CustomBindEventForHits>): ReturnType<CustomBindEventForHits>;
|
|
21
21
|
sendEvent: SendEventForHits;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type TemplateWithBindEvent<TTemplateData = void> = string | ((data: TTemplateData, params: TemplateWithBindEventParams) => VNode | VNode[] | string);
|
|
24
|
+
export type Templates = {
|
|
25
25
|
[key: string]: Template<any> | TemplateWithBindEvent<any> | undefined;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type HoganHelpers<TKeys extends string = string> = Record<TKeys, (text: string, render: (value: string) => string) => string>;
|
|
28
28
|
export {};
|
package/es/types/ui-state.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ import type { SortByWidgetDescription } from '../connectors/sort-by/connectSortB
|
|
|
16
16
|
import type { ToggleRefinementWidgetDescription } from '../connectors/toggle-refinement/connectToggleRefinement';
|
|
17
17
|
import type { VoiceSearchWidgetDescription } from '../connectors/voice-search/connectVoiceSearch';
|
|
18
18
|
import type { PlacesWidgetDescription } from '../widgets/places/places';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
export
|
|
19
|
+
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'];
|
|
20
|
+
type WidgetUiStates = PlacesWidgetDescription['indexUiState'];
|
|
21
|
+
export type IndexUiState = Partial<ConnectorUiStates & WidgetUiStates>;
|
|
22
|
+
export type UiState = {
|
|
23
23
|
[indexId: string]: IndexUiState;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
package/es/types/utils.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HighlightedParts = {
|
|
2
2
|
value: string;
|
|
3
3
|
isHighlighted: boolean;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type AtLeastOne<TTarget, TMapped = {
|
|
6
6
|
[Key in keyof TTarget]: Pick<TTarget, Key>;
|
|
7
7
|
}> = Partial<TTarget> & TMapped[keyof TMapped];
|
|
8
|
-
export
|
|
8
|
+
export type Expand<T> = T extends infer O ? {
|
|
9
9
|
[K in keyof O]: O[K];
|
|
10
10
|
} : never;
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type RequiredKeys<TObject, TKeys extends keyof TObject> = Expand<Required<Pick<TObject, TKeys>> & Omit<TObject, TKeys>>;
|
|
12
|
+
export type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
|
|
13
13
|
/**
|
|
14
14
|
* Make certain keys of an object optional.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type PartialKeys<TObj, TKeys extends keyof TObj> = Omit<TObj, TKeys> & Partial<Pick<TObj, TKeys>>;
|
|
@@ -2,13 +2,13 @@ import type { UnknownWidgetParams, Widget, WidgetDescription } from './widget';
|
|
|
2
2
|
/**
|
|
3
3
|
* The function that creates a new widget.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type WidgetFactory<TWidgetDescription extends WidgetDescription, TConnectorParams extends UnknownWidgetParams, TWidgetParams extends UnknownWidgetParams> = (
|
|
6
6
|
/**
|
|
7
7
|
* The params of the widget.
|
|
8
8
|
*/
|
|
9
9
|
widgetParams: TWidgetParams & TConnectorParams) => Widget<TWidgetDescription & {
|
|
10
10
|
widgetParams: TConnectorParams;
|
|
11
11
|
}>;
|
|
12
|
-
export
|
|
12
|
+
export type UnknownWidgetFactory = WidgetFactory<{
|
|
13
13
|
$$type: string;
|
|
14
14
|
}, any, any>;
|
package/es/types/widget.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ import type { InstantSearch } from './instantsearch';
|
|
|
4
4
|
import type { IndexUiState, UiState } from './ui-state';
|
|
5
5
|
import type { IndexRenderState, WidgetRenderState } from './render-state';
|
|
6
6
|
import type { Expand, RequiredKeys } from './utils';
|
|
7
|
-
export
|
|
7
|
+
export type ScopedResult = {
|
|
8
8
|
indexId: string;
|
|
9
9
|
results: SearchResults;
|
|
10
10
|
helper: Helper;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type SharedRenderOptions = {
|
|
13
13
|
instantSearchInstance: InstantSearch;
|
|
14
14
|
parent: IndexWidget;
|
|
15
15
|
templatesConfig: Record<string, unknown>;
|
|
@@ -26,32 +26,32 @@ declare type SharedRenderOptions = {
|
|
|
26
26
|
error: InstantSearch['error'];
|
|
27
27
|
createURL(state: SearchParameters): string;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type InitOptions = SharedRenderOptions & {
|
|
30
30
|
uiState: UiState;
|
|
31
31
|
results?: undefined;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type RenderOptions = SharedRenderOptions & {
|
|
34
34
|
results: SearchResults;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type DisposeOptions = {
|
|
37
37
|
helper: Helper;
|
|
38
38
|
state: SearchParameters;
|
|
39
39
|
parent: IndexWidget;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
41
|
+
export type BuiltinTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRules' | 'ais.range' | 'ais.rangeSlider' | 'ais.rangeInput' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
|
|
42
|
+
export type BuiltinWidgetTypes = 'ais.analytics' | 'ais.answers' | 'ais.autocomplete' | 'ais.breadcrumb' | 'ais.clearRefinements' | 'ais.configure' | 'ais.configureRelatedItems' | 'ais.currentRefinements' | 'ais.dynamicWidgets' | 'ais.geoSearch' | 'ais.hierarchicalMenu' | 'ais.hits' | 'ais.hitsPerPage' | 'ais.index' | 'ais.infiniteHits' | 'ais.menu' | 'ais.menuSelect' | 'ais.numericMenu' | 'ais.pagination' | 'ais.places' | 'ais.poweredBy' | 'ais.queryRuleCustomData' | 'ais.queryRuleContext' | 'ais.rangeInput' | 'ais.rangeSlider' | 'ais.ratingMenu' | 'ais.refinementList' | 'ais.searchBox' | 'ais.relevantSort' | 'ais.sortBy' | 'ais.stats' | 'ais.toggleRefinement' | 'ais.voiceSearch';
|
|
43
|
+
export type UnknownWidgetParams = NonNullable<object>;
|
|
44
|
+
export type WidgetParams = {
|
|
45
45
|
widgetParams?: UnknownWidgetParams;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
47
|
+
export type WidgetDescription = {
|
|
48
48
|
$$type: string;
|
|
49
49
|
$$widgetType?: string;
|
|
50
50
|
renderState?: Record<string, unknown>;
|
|
51
51
|
indexRenderState?: Record<string, unknown>;
|
|
52
52
|
indexUiState?: Record<string, unknown>;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
type RequiredWidgetLifeCycle<TWidgetDescription extends WidgetDescription> = {
|
|
55
55
|
/**
|
|
56
56
|
* Identifier for connectors and widgets.
|
|
57
57
|
*/
|
|
@@ -70,19 +70,19 @@ declare type RequiredWidgetLifeCycle<TWidgetDescription extends WidgetDescriptio
|
|
|
70
70
|
*/
|
|
71
71
|
dispose?: (options: DisposeOptions) => SearchParameters | void;
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
type RequiredWidgetType<TWidgetDescription extends WidgetDescription> = {
|
|
74
74
|
/**
|
|
75
75
|
* Identifier for widgets.
|
|
76
76
|
*/
|
|
77
77
|
$$widgetType: TWidgetDescription['$$widgetType'];
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
type WidgetType<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, '$$widgetType'> ? RequiredWidgetType<TWidgetDescription> : {
|
|
80
80
|
/**
|
|
81
81
|
* Identifier for widgets.
|
|
82
82
|
*/
|
|
83
83
|
$$widgetType?: string;
|
|
84
84
|
};
|
|
85
|
-
|
|
85
|
+
type RequiredUiStateLifeCycle<TWidgetDescription extends WidgetDescription> = {
|
|
86
86
|
/**
|
|
87
87
|
* This function is required for a widget to be taken in account for routing.
|
|
88
88
|
* It will derive a uiState for this widget based on the existing uiState and
|
|
@@ -117,8 +117,8 @@ declare type RequiredUiStateLifeCycle<TWidgetDescription extends WidgetDescripti
|
|
|
117
117
|
uiState: Expand<Partial<TWidgetDescription['indexUiState'] & IndexUiState>>;
|
|
118
118
|
}) => SearchParameters;
|
|
119
119
|
};
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
type UiStateLifeCycle<TWidgetDescription extends WidgetDescription> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'indexUiState'> ? RequiredUiStateLifeCycle<TWidgetDescription> : Partial<RequiredUiStateLifeCycle<TWidgetDescription>>;
|
|
121
|
+
type RequiredRenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = {
|
|
122
122
|
/**
|
|
123
123
|
* Returns the render state of the current widget to pass to the render function.
|
|
124
124
|
*/
|
|
@@ -129,24 +129,24 @@ declare type RequiredRenderStateLifeCycle<TWidgetDescription extends WidgetDescr
|
|
|
129
129
|
*/
|
|
130
130
|
getRenderState: (renderState: Expand<IndexRenderState & Partial<TWidgetDescription['indexRenderState']>>, renderOptions: InitOptions | RenderOptions) => IndexRenderState & TWidgetDescription['indexRenderState'];
|
|
131
131
|
};
|
|
132
|
-
|
|
133
|
-
export
|
|
132
|
+
type RenderStateLifeCycle<TWidgetDescription extends WidgetDescription & WidgetParams> = TWidgetDescription extends RequiredKeys<WidgetDescription, 'renderState' | 'indexRenderState'> & WidgetParams ? RequiredRenderStateLifeCycle<TWidgetDescription> : Partial<RequiredRenderStateLifeCycle<TWidgetDescription>>;
|
|
133
|
+
export type Widget<TWidgetDescription extends WidgetDescription & WidgetParams = {
|
|
134
134
|
$$type: string;
|
|
135
135
|
}> = Expand<RequiredWidgetLifeCycle<TWidgetDescription> & WidgetType<TWidgetDescription> & UiStateLifeCycle<TWidgetDescription> & RenderStateLifeCycle<TWidgetDescription>>;
|
|
136
|
-
export
|
|
136
|
+
export type TransformItemsMetadata = {
|
|
137
137
|
results?: SearchResults;
|
|
138
138
|
};
|
|
139
139
|
/**
|
|
140
140
|
* Transforms the given items.
|
|
141
141
|
*/
|
|
142
|
-
export
|
|
143
|
-
|
|
142
|
+
export type TransformItems<TItem, TMetadata = TransformItemsMetadata> = (items: TItem[], metadata: TMetadata) => TItem[];
|
|
143
|
+
type SortByDirection<TCriterion extends string> = TCriterion | `${TCriterion}:asc` | `${TCriterion}:desc`;
|
|
144
144
|
/**
|
|
145
145
|
* Transforms the given items.
|
|
146
146
|
*/
|
|
147
|
-
export
|
|
147
|
+
export type SortBy<TItem> = ((a: TItem, b: TItem) => number) | Array<SortByDirection<'count' | 'name' | 'isRefined'>>;
|
|
148
148
|
/**
|
|
149
149
|
* Creates the URL for the given value.
|
|
150
150
|
*/
|
|
151
|
-
export
|
|
151
|
+
export type CreateURL<TValue> = (value: TValue) => string;
|
|
152
152
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SearchParameters, SearchResults } from 'algoliasearch-helper';
|
|
2
2
|
import type { WidgetFactory, WidgetRenderState } from '../../types';
|
|
3
|
-
export
|
|
3
|
+
export type AnalyticsWidgetParamsPushFunction = (
|
|
4
4
|
/**
|
|
5
5
|
* Contains the search parameters, serialized as a query string.
|
|
6
6
|
*/
|
|
@@ -13,7 +13,7 @@ state: SearchParameters,
|
|
|
13
13
|
* The last received results.
|
|
14
14
|
*/
|
|
15
15
|
results: SearchResults) => void;
|
|
16
|
-
export
|
|
16
|
+
export type AnalyticsWidgetParams = {
|
|
17
17
|
/**
|
|
18
18
|
* A function that is called every time the query or refinements changes. You
|
|
19
19
|
* need to add the logic to push the data to your analytics platform.
|
|
@@ -48,7 +48,7 @@ export declare type AnalyticsWidgetParams = {
|
|
|
48
48
|
*/
|
|
49
49
|
pushPagination?: boolean;
|
|
50
50
|
};
|
|
51
|
-
export
|
|
51
|
+
export type AnalyticsWidgetDescription = {
|
|
52
52
|
$$type: 'ais.analytics';
|
|
53
53
|
$$widgetType: 'ais.analytics';
|
|
54
54
|
renderState: Record<string, unknown>;
|
|
@@ -56,6 +56,6 @@ export declare type AnalyticsWidgetDescription = {
|
|
|
56
56
|
analytics: WidgetRenderState<Record<string, unknown>, AnalyticsWidgetParams>;
|
|
57
57
|
};
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export type AnalyticsWidget = WidgetFactory<AnalyticsWidgetDescription, AnalyticsWidgetParams, AnalyticsWidgetParams>;
|
|
60
60
|
declare const analytics: AnalyticsWidget;
|
|
61
61
|
export default analytics;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { WidgetFactory, Template, Hit } from '../../types';
|
|
3
3
|
import type { AnswersConnectorParams, AnswersWidgetDescription } from '../../connectors/answers/connectAnswers';
|
|
4
|
-
export
|
|
4
|
+
export type AnswersTemplates = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* Template to use for the header. This template will receive an object containing `hits` and `isLoading`.
|
|
7
7
|
*/
|
|
@@ -18,7 +18,7 @@ export declare type AnswersTemplates = Partial<{
|
|
|
18
18
|
*/
|
|
19
19
|
item: Template<Hit>;
|
|
20
20
|
}>;
|
|
21
|
-
export
|
|
21
|
+
export type AnswersCSSClasses = Partial<{
|
|
22
22
|
/**
|
|
23
23
|
* CSS class to add to the root element of the widget.
|
|
24
24
|
*/
|
|
@@ -44,7 +44,7 @@ export declare type AnswersCSSClasses = Partial<{
|
|
|
44
44
|
*/
|
|
45
45
|
item: string | string[];
|
|
46
46
|
}>;
|
|
47
|
-
export
|
|
47
|
+
export type AnswersWidgetParams = {
|
|
48
48
|
/**
|
|
49
49
|
* CSS Selector or HTMLElement to insert the widget.
|
|
50
50
|
*/
|
|
@@ -58,7 +58,7 @@ export declare type AnswersWidgetParams = {
|
|
|
58
58
|
*/
|
|
59
59
|
cssClasses?: AnswersCSSClasses;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type AnswersWidget = WidgetFactory<AnswersWidgetDescription & {
|
|
62
62
|
$$widgetType: 'ais.answers';
|
|
63
63
|
}, AnswersConnectorParams, AnswersWidgetParams>;
|
|
64
64
|
declare const answersWidget: AnswersWidget;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import type { BreadcrumbWidgetDescription, BreadcrumbConnectorParams } from '../../connectors/breadcrumb/connectBreadcrumb';
|
|
3
3
|
import type { WidgetFactory, Template } from '../../types';
|
|
4
|
-
export
|
|
4
|
+
export type BreadcrumbCSSClasses = Partial<{
|
|
5
5
|
/**
|
|
6
6
|
* CSS class to add to the root element of the widget.
|
|
7
7
|
*/
|
|
@@ -31,7 +31,7 @@ export declare type BreadcrumbCSSClasses = Partial<{
|
|
|
31
31
|
*/
|
|
32
32
|
link: string | string[];
|
|
33
33
|
}>;
|
|
34
|
-
export
|
|
34
|
+
export type BreadcrumbTemplates = Partial<{
|
|
35
35
|
/**
|
|
36
36
|
* Label of the breadcrumb's first element.
|
|
37
37
|
*/
|
|
@@ -41,7 +41,7 @@ export declare type BreadcrumbTemplates = Partial<{
|
|
|
41
41
|
*/
|
|
42
42
|
separator: Template;
|
|
43
43
|
}>;
|
|
44
|
-
export
|
|
44
|
+
export type BreadcrumbWidgetParams = {
|
|
45
45
|
/**
|
|
46
46
|
* CSS Selector or HTMLElement to insert the widget.
|
|
47
47
|
*/
|
|
@@ -55,7 +55,7 @@ export declare type BreadcrumbWidgetParams = {
|
|
|
55
55
|
*/
|
|
56
56
|
cssClasses?: BreadcrumbCSSClasses;
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type BreadcrumbWidget = WidgetFactory<BreadcrumbWidgetDescription & {
|
|
59
59
|
$$widgetType: 'ais.breadcrumb';
|
|
60
60
|
}, BreadcrumbConnectorParams, BreadcrumbWidgetParams>;
|
|
61
61
|
declare const breadcrumb: BreadcrumbWidget;
|