@coveo/headless 3.57.0 → 3.57.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.
@@ -1298,7 +1298,7 @@ function isBrowser2() {
1298
1298
  var import_toolkit = require("@reduxjs/toolkit");
1299
1299
 
1300
1300
  // src/utils/version.ts
1301
- var VERSION = "3.57.0";
1301
+ var VERSION = "3.57.1";
1302
1302
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1303
1303
 
1304
1304
  // src/api/analytics/analytics-selectors.ts
@@ -45,7 +45,10 @@ export interface EngineDefinition<TControllers extends ControllerDefinitionsMap<
45
45
  */
46
46
  build: Build<TEngineOptions, InferControllersMapFromDefinition<TControllers, TSolutionType>, InferControllerPropsMapFromDefinitions<TControllers>, TControllers, TSolutionType>;
47
47
  /**
48
- * @deprecated This method will be removed in a future major version. Navigator context should be provided directly when fetching the static state.
48
+ * @deprecated This method will be removed in a future major version. It mutates the shared engine
49
+ * definition, so on a server handling concurrent requests one request can overwrite another
50
+ * request's navigator context. Provide the navigator context directly when fetching the static
51
+ * state (`fetchStaticState({navigatorContext})`) so it applies to that request only.
49
52
  *
50
53
  * Sets the navigator context provider.
51
54
  * This provider is essential for retrieving navigation-related data such as referrer, userAgent, location, and clientId, which are crucial for handling both server-side and client-side API requests effectively.
@@ -27,7 +27,10 @@ export interface EngineDefinition<TEngine extends CoreEngine | CoreEngineNext, T
27
27
  */
28
28
  hydrateStaticState: HydrateStaticState<TEngine, InferControllersMapFromDefinition<TControllers>, AnyAction, InferControllerPropsMapFromDefinitions<TControllers>>;
29
29
  /**
30
- * @deprecated This method will be removed in a future major version. Navigator context should be provided directly when fetching the static state
30
+ * @deprecated This method will be removed in a future major version. It mutates the shared engine
31
+ * definition, so on a server handling concurrent requests one request can overwrite another
32
+ * request's navigator context. Provide the navigator context directly when fetching the static
33
+ * state (`fetchStaticState({navigatorContext})`) so it applies to that request only.
31
34
  *
32
35
  * Sets the navigator context provider.
33
36
  * This provider is essential for retrieving navigation-related data such as referrer, userAgent, location, and clientId, which are crucial for handling both server-side and client-side API requests effectively.
@@ -1,7 +1,7 @@
1
1
  import { createReducer } from '@reduxjs/toolkit';
2
2
  import { restoreProductListingParameters } from '../../product-listing-parameters/product-listing-parameters-actions.js';
3
3
  import { restoreSearchParameters } from '../../search-parameters/search-parameters-actions.js';
4
- import { clearAllCoreFacets, deselectAllValuesInCoreFacet, } from '../core-facet/core-facet-actions.js';
4
+ import { clearAllCoreFacets, deleteAllCoreFacets, deselectAllValuesInCoreFacet, } from '../core-facet/core-facet-actions.js';
5
5
  import { getManualNumericFacetInitialState, } from './manual-numeric-facet-state.js';
6
6
  import { toggleExcludeNumericFacetValue, toggleSelectNumericFacetValue, updateManualNumericFacetRange, } from './numeric-facet-actions.js';
7
7
  export const manualNumericFacetReducer = createReducer(getManualNumericFacetInitialState(), (builder) => builder
@@ -28,6 +28,11 @@ export const manualNumericFacetReducer = createReducer(getManualNumericFacetInit
28
28
  for (const facetId of Object.keys(state)) {
29
29
  clearManualRange(state, facetId);
30
30
  }
31
+ })
32
+ .addCase(deleteAllCoreFacets, (state) => {
33
+ for (const facetId of Object.keys(state)) {
34
+ clearManualRange(state, facetId);
35
+ }
31
36
  }));
32
37
  const clearManualRange = (state, facetId) => {
33
38
  if (state[facetId]) {
@@ -1,2 +1,2 @@
1
- export const VERSION = "3.57.0" || 'Test version';
1
+ export const VERSION = "3.57.1" || 'Test version';
2
2
  export const COVEO_FRAMEWORK = ['@coveo/atomic', '@coveo/quantic'];