instantsearch.js 4.57.0 → 4.58.0

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.
@@ -2363,6 +2363,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
2363
2363
  indexName: string;
2364
2364
  insightsClient: InsightsClient | null;
2365
2365
  onStateChange: InstantSearchOptions<TUiState>['onStateChange'] | null;
2366
+ future: NonNullable<InstantSearchOptions<TUiState>['future']>;
2366
2367
  helper: AlgoliaSearchHelper | null;
2367
2368
  mainHelper: AlgoliaSearchHelper | null;
2368
2369
  mainIndex: IndexWidget;
@@ -2604,6 +2605,18 @@ declare type InstantSearchOptions<TUiState extends UiState = UiState, TRouteStat
2604
2605
  * @deprecated This property 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/
2605
2606
  */
2606
2607
  insightsClient?: InsightsClient;
2608
+ future?: {
2609
+ /**
2610
+ * Changes the way `dispose` is used in InstantSearch lifecycle.
2611
+ *
2612
+ * If `false` (by default), each widget unmounting will remove its state as well, even if there are multiple widgets reading that UI State.
2613
+ *
2614
+ * If `true`, each widget unmounting will only remove its own state if it's the last of its type. This allows for dynamically adding and removing widgets without losing their state.
2615
+ *
2616
+ * @default false
2617
+ */
2618
+ preserveSharedStateOnUnmount?: boolean;
2619
+ };
2607
2620
  };
2608
2621
 
2609
2622
  declare type InstantSearchStatus = 'idle' | 'loading' | 'stalled' | 'error';
@@ -2363,6 +2363,7 @@ declare class InstantSearch<TUiState extends UiState = UiState, TRouteState = TU
2363
2363
  indexName: string;
2364
2364
  insightsClient: InsightsClient | null;
2365
2365
  onStateChange: InstantSearchOptions<TUiState>['onStateChange'] | null;
2366
+ future: NonNullable<InstantSearchOptions<TUiState>['future']>;
2366
2367
  helper: AlgoliaSearchHelper | null;
2367
2368
  mainHelper: AlgoliaSearchHelper | null;
2368
2369
  mainIndex: IndexWidget;
@@ -2604,6 +2605,18 @@ declare type InstantSearchOptions<TUiState extends UiState = UiState, TRouteStat
2604
2605
  * @deprecated This property 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/
2605
2606
  */
2606
2607
  insightsClient?: InsightsClient;
2608
+ future?: {
2609
+ /**
2610
+ * Changes the way `dispose` is used in InstantSearch lifecycle.
2611
+ *
2612
+ * If `false` (by default), each widget unmounting will remove its state as well, even if there are multiple widgets reading that UI State.
2613
+ *
2614
+ * If `true`, each widget unmounting will only remove its own state if it's the last of its type. This allows for dynamically adding and removing widgets without losing their state.
2615
+ *
2616
+ * @default false
2617
+ */
2618
+ preserveSharedStateOnUnmount?: boolean;
2619
+ };
2607
2620
  };
2608
2621
 
2609
2622
  declare type InstantSearchStatus = 'idle' | 'loading' | 'stalled' | 'error';