instantsearch.js 4.50.3 → 4.51.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/connectors/breadcrumb/connectBreadcrumb.js +2 -2
- package/cjs/lib/routers/history.js +31 -4
- package/cjs/lib/version.js +1 -1
- package/dist/instantsearch.development.d.ts +8 -2
- package/dist/instantsearch.development.js +35 -8
- package/dist/instantsearch.development.js.map +1 -1
- package/dist/instantsearch.production.d.ts +8 -2
- package/dist/instantsearch.production.min.d.ts +8 -2
- package/dist/instantsearch.production.min.js +2 -2
- package/dist/instantsearch.production.min.js.map +1 -1
- package/es/connectors/breadcrumb/connectBreadcrumb.js +2 -2
- package/es/lib/routers/history.d.ts +9 -3
- package/es/lib/routers/history.js +31 -4
- package/es/lib/version.d.ts +1 -1
- package/es/lib/version.js +1 -1
- package/package.json +5 -5
|
@@ -482,11 +482,14 @@ declare class BrowserHistory<TRouteState> implements Router<TRouteState> {
|
|
|
482
482
|
* and thus to prevent the `write` method from calling `pushState`.
|
|
483
483
|
*/
|
|
484
484
|
private latestAcknowledgedHistory;
|
|
485
|
+
private _start?;
|
|
486
|
+
private _dispose?;
|
|
487
|
+
private _push?;
|
|
485
488
|
/**
|
|
486
489
|
* Initializes a new storage provider that syncs the search state to the URL
|
|
487
490
|
* using web APIs (`window.location.pushState` and `onpopstate` event).
|
|
488
491
|
*/
|
|
489
|
-
constructor({ windowTitle, writeDelay, createURL, parseURL, getLocation, }: BrowserHistoryArgs<TRouteState>);
|
|
492
|
+
constructor({ windowTitle, writeDelay, createURL, parseURL, getLocation, start, dispose, push, }: BrowserHistoryArgs<TRouteState>);
|
|
490
493
|
/**
|
|
491
494
|
* Reads the URL and returns a syncable UI search state.
|
|
492
495
|
*/
|
|
@@ -521,6 +524,9 @@ declare type BrowserHistoryArgs<TRouteState> = {
|
|
|
521
524
|
createURL: CreateURL_2<TRouteState>;
|
|
522
525
|
parseURL: ParseURL<TRouteState>;
|
|
523
526
|
getLocation(): Location;
|
|
527
|
+
start?: (onUpdate: () => void) => void;
|
|
528
|
+
dispose?: () => void;
|
|
529
|
+
push?: (url: string) => void;
|
|
524
530
|
};
|
|
525
531
|
|
|
526
532
|
declare type BuiltInBindEventForHits = (eventType: string, hits: Hit | Hit[], eventName?: string) => string;
|
|
@@ -1786,7 +1792,7 @@ declare type HighlightProps_2 = Omit<HighlightProps_3, 'classNames'> & {
|
|
|
1786
1792
|
classNames?: Partial<HighlightClassNames>;
|
|
1787
1793
|
};
|
|
1788
1794
|
|
|
1789
|
-
declare function historyRouter<TRouteState = UiState>({ createURL, parseURL, writeDelay, windowTitle, getLocation, }?: Partial<BrowserHistoryArgs<TRouteState>>): BrowserHistory<TRouteState>;
|
|
1795
|
+
declare function historyRouter<TRouteState = UiState>({ createURL, parseURL, writeDelay, windowTitle, getLocation, start, dispose, push, }?: Partial<BrowserHistoryArgs<TRouteState>>): BrowserHistory<TRouteState>;
|
|
1790
1796
|
|
|
1791
1797
|
declare type Hit<THit extends BaseHit = Record<string, any>> = {
|
|
1792
1798
|
__position: number;
|
|
@@ -482,11 +482,14 @@ declare class BrowserHistory<TRouteState> implements Router<TRouteState> {
|
|
|
482
482
|
* and thus to prevent the `write` method from calling `pushState`.
|
|
483
483
|
*/
|
|
484
484
|
private latestAcknowledgedHistory;
|
|
485
|
+
private _start?;
|
|
486
|
+
private _dispose?;
|
|
487
|
+
private _push?;
|
|
485
488
|
/**
|
|
486
489
|
* Initializes a new storage provider that syncs the search state to the URL
|
|
487
490
|
* using web APIs (`window.location.pushState` and `onpopstate` event).
|
|
488
491
|
*/
|
|
489
|
-
constructor({ windowTitle, writeDelay, createURL, parseURL, getLocation, }: BrowserHistoryArgs<TRouteState>);
|
|
492
|
+
constructor({ windowTitle, writeDelay, createURL, parseURL, getLocation, start, dispose, push, }: BrowserHistoryArgs<TRouteState>);
|
|
490
493
|
/**
|
|
491
494
|
* Reads the URL and returns a syncable UI search state.
|
|
492
495
|
*/
|
|
@@ -521,6 +524,9 @@ declare type BrowserHistoryArgs<TRouteState> = {
|
|
|
521
524
|
createURL: CreateURL_2<TRouteState>;
|
|
522
525
|
parseURL: ParseURL<TRouteState>;
|
|
523
526
|
getLocation(): Location;
|
|
527
|
+
start?: (onUpdate: () => void) => void;
|
|
528
|
+
dispose?: () => void;
|
|
529
|
+
push?: (url: string) => void;
|
|
524
530
|
};
|
|
525
531
|
|
|
526
532
|
declare type BuiltInBindEventForHits = (eventType: string, hits: Hit | Hit[], eventName?: string) => string;
|
|
@@ -1786,7 +1792,7 @@ declare type HighlightProps_2 = Omit<HighlightProps_3, 'classNames'> & {
|
|
|
1786
1792
|
classNames?: Partial<HighlightClassNames>;
|
|
1787
1793
|
};
|
|
1788
1794
|
|
|
1789
|
-
declare function historyRouter<TRouteState = UiState>({ createURL, parseURL, writeDelay, windowTitle, getLocation, }?: Partial<BrowserHistoryArgs<TRouteState>>): BrowserHistory<TRouteState>;
|
|
1795
|
+
declare function historyRouter<TRouteState = UiState>({ createURL, parseURL, writeDelay, windowTitle, getLocation, start, dispose, push, }?: Partial<BrowserHistoryArgs<TRouteState>>): BrowserHistory<TRouteState>;
|
|
1790
1796
|
|
|
1791
1797
|
declare type Hit<THit extends BaseHit = Record<string, any>> = {
|
|
1792
1798
|
__position: number;
|