@coveo/headless 3.28.3-pre.71fbb06acc → 3.28.3-pre.759e858f1a

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.
@@ -800,7 +800,7 @@ var import_bueno5 = require("@coveo/bueno");
800
800
  var import_toolkit7 = require("@reduxjs/toolkit");
801
801
 
802
802
  // src/utils/version.ts
803
- var VERSION = "3.28.3-pre.71fbb06acc";
803
+ var VERSION = "3.28.3-pre.759e858f1a";
804
804
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
805
805
 
806
806
  // src/features/configuration/configuration-actions.ts
@@ -1148,7 +1148,7 @@ var import_bueno6 = require("@coveo/bueno");
1148
1148
  var import_toolkit4 = require("@reduxjs/toolkit");
1149
1149
 
1150
1150
  // src/utils/version.ts
1151
- var VERSION = "3.28.3-pre.71fbb06acc";
1151
+ var VERSION = "3.28.3-pre.759e858f1a";
1152
1152
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1153
1153
 
1154
1154
  // src/features/configuration/configuration-actions.ts
@@ -10355,11 +10355,7 @@ var productListingReducer = (0, import_toolkit62.createReducer)(
10355
10355
  const paginationOffset = getPaginationOffset(action.payload);
10356
10356
  handleFullfilled(state, action.payload.response);
10357
10357
  state.products = action.payload.response.products.map(
10358
- (product, index) => preprocessProduct(
10359
- product,
10360
- paginationOffset + index + 1,
10361
- action.payload.response.responseId
10362
- )
10358
+ (product, index) => preprocessProduct(product, paginationOffset + index + 1)
10363
10359
  );
10364
10360
  }).addCase(fetchMoreProducts2.fulfilled, (state, action) => {
10365
10361
  if (!action.payload) {
@@ -10369,11 +10365,7 @@ var productListingReducer = (0, import_toolkit62.createReducer)(
10369
10365
  handleFullfilled(state, action.payload.response);
10370
10366
  state.products = state.products.concat(
10371
10367
  action.payload.response.products.map(
10372
- (product, index) => preprocessProduct(
10373
- product,
10374
- paginationOffset + index + 1,
10375
- action.payload?.response.responseId
10376
- )
10368
+ (product, index) => preprocessProduct(product, paginationOffset + index + 1)
10377
10369
  )
10378
10370
  );
10379
10371
  }).addCase(fetchProductListing.pending, (state, action) => {
@@ -10392,15 +10384,13 @@ var productListingReducer = (0, import_toolkit62.createReducer)(
10392
10384
  if (currentParentIndex === -1 || childToPromote === void 0) {
10393
10385
  return;
10394
10386
  }
10395
- const responseId = products[currentParentIndex].responseId;
10396
10387
  const position = products[currentParentIndex].position;
10397
10388
  const { children, totalNumberOfChildren } = products[currentParentIndex];
10398
10389
  const newParent = {
10399
10390
  ...childToPromote,
10400
10391
  children,
10401
10392
  totalNumberOfChildren,
10402
- position,
10403
- responseId
10393
+ position
10404
10394
  };
10405
10395
  products.splice(currentParentIndex, 1, newParent);
10406
10396
  }).addCase(setView, () => getProductListingInitialState()).addCase(setContext, () => getProductListingInitialState()).addCase(setError, (state, action) => {
@@ -10426,12 +10416,12 @@ function getPaginationOffset(payload) {
10426
10416
  const pagination = payload.response.pagination;
10427
10417
  return pagination.page * pagination.perPage;
10428
10418
  }
10429
- function preprocessProduct(product, position, responseId) {
10419
+ function preprocessProduct(product, position) {
10430
10420
  const isParentAlreadyInChildren = product.children.some(
10431
10421
  (child) => child.permanentid === product.permanentid
10432
10422
  );
10433
10423
  if (product.children.length === 0 || isParentAlreadyInChildren) {
10434
- return { ...product, position, responseId };
10424
+ return { ...product, position };
10435
10425
  }
10436
10426
  const {
10437
10427
  children,
@@ -10441,8 +10431,7 @@ function preprocessProduct(product, position, responseId) {
10441
10431
  return {
10442
10432
  ...product,
10443
10433
  children: [restOfProduct, ...children],
10444
- position,
10445
- responseId
10434
+ position
10446
10435
  };
10447
10436
  }
10448
10437
 
@@ -10644,11 +10633,7 @@ var commerceSearchReducer = (0, import_toolkit65.createReducer)(
10644
10633
  action.payload.queryExecuted
10645
10634
  );
10646
10635
  state.products = action.payload.response.products.map(
10647
- (product, index) => preprocessProduct3(
10648
- product,
10649
- paginationOffset + index + 1,
10650
- action.payload.response.responseId
10651
- )
10636
+ (product, index) => preprocessProduct3(product, paginationOffset + index + 1)
10652
10637
  );
10653
10638
  }).addCase(fetchMoreProducts.fulfilled, (state, action) => {
10654
10639
  if (!action.payload) {
@@ -10662,11 +10647,7 @@ var commerceSearchReducer = (0, import_toolkit65.createReducer)(
10662
10647
  );
10663
10648
  state.products = state.products.concat(
10664
10649
  action.payload.response.products.map(
10665
- (product, index) => preprocessProduct3(
10666
- product,
10667
- paginationOffset + index + 1,
10668
- action.payload?.response.responseId
10669
- )
10650
+ (product, index) => preprocessProduct3(product, paginationOffset + index + 1)
10670
10651
  )
10671
10652
  );
10672
10653
  }).addCase(executeSearch.pending, (state, action) => {
@@ -10685,15 +10666,13 @@ var commerceSearchReducer = (0, import_toolkit65.createReducer)(
10685
10666
  if (currentParentIndex === -1 || childToPromote === void 0) {
10686
10667
  return;
10687
10668
  }
10688
- const responseId = products[currentParentIndex].responseId;
10689
10669
  const position = products[currentParentIndex].position;
10690
10670
  const { children, totalNumberOfChildren } = products[currentParentIndex];
10691
10671
  const newParent = {
10692
10672
  ...childToPromote,
10693
10673
  children,
10694
10674
  totalNumberOfChildren,
10695
- position,
10696
- responseId
10675
+ position
10697
10676
  };
10698
10677
  products.splice(currentParentIndex, 1, newParent);
10699
10678
  }).addCase(setView, () => getCommerceSearchInitialState()).addCase(setContext, () => getCommerceSearchInitialState()).addCase(setError, (state, action) => {
@@ -10721,12 +10700,12 @@ function getPaginationOffset3(payload) {
10721
10700
  const pagination = payload.response.pagination;
10722
10701
  return pagination.page * pagination.perPage;
10723
10702
  }
10724
- function preprocessProduct3(product, position, responseId) {
10703
+ function preprocessProduct3(product, position) {
10725
10704
  const isParentAlreadyInChildren = product.children.some(
10726
10705
  (child) => child.permanentid === product.permanentid
10727
10706
  );
10728
10707
  if (product.children.length === 0 || isParentAlreadyInChildren) {
10729
- return { ...product, position, responseId };
10708
+ return { ...product, position };
10730
10709
  }
10731
10710
  const {
10732
10711
  children,
@@ -10736,8 +10715,7 @@ function preprocessProduct3(product, position, responseId) {
10736
10715
  return {
10737
10716
  ...product,
10738
10717
  children: [restOfProduct, ...children],
10739
- position,
10740
- responseId
10718
+ position
10741
10719
  };
10742
10720
  }
10743
10721
 
@@ -15698,7 +15676,7 @@ Review the configuration of the above 'ec_'-prefixed fields in your index, and m
15698
15676
  productId: props.options.product.ec_product_id ?? props.options.product.permanentid
15699
15677
  },
15700
15678
  position: props.options.product.position,
15701
- responseId: props.options.product.responseId ?? props.responseIdSelector(engine[stateKey])
15679
+ responseId: props.responseIdSelector(engine[stateKey])
15702
15680
  })
15703
15681
  );
15704
15682
  };