@coveo/headless 3.28.3-pre.71fbb06acc → 3.28.3-pre.737243f85a
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/dist/cjs/case-assist/headless.cjs +1 -1
- package/dist/cjs/commerce/headless.cjs +14 -36
- package/dist/cjs/commerce/node.cjs.stats.json +1 -1
- package/dist/cjs/headless.cjs +1 -1
- package/dist/cjs/insight/headless.cjs +1 -1
- package/dist/cjs/recommendation/headless.cjs +1 -1
- package/dist/cjs/ssr/headless.cjs +1 -1
- package/dist/cjs/ssr-commerce/headless.cjs +14 -36
- package/dist/cjs/ssr-commerce/node.cjs.stats.json +1 -1
- package/dist/cjs/ssr-commerce-next/headless.cjs +14 -36
- package/dist/cjs/ssr-commerce-next/node.cjs.stats.json +1 -1
- package/dist/cjs/ssr-next/headless.cjs +1 -1
- package/dist/definitions/api/commerce/common/product.d.ts +0 -4
- package/dist/esm/controllers/commerce/core/interactive-product/headless-core-interactive-product.js +1 -2
- package/dist/esm/features/commerce/product-listing/product-listing-slice.js +4 -7
- package/dist/esm/features/commerce/search/search-slice.js +4 -7
- package/dist/esm/utils/version.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/browser.cjs.stats.json +1 -1
- package/dist/quantic/commerce/headless.js +6 -6
- package/dist/quantic/commerce/headless.js.map +3 -3
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/package.json +1 -1
package/dist/cjs/headless.cjs
CHANGED
|
@@ -1374,7 +1374,7 @@ var import_toolkit2 = require("@reduxjs/toolkit");
|
|
|
1374
1374
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1375
1375
|
|
|
1376
1376
|
// src/utils/version.ts
|
|
1377
|
-
var VERSION = "3.28.3-pre.
|
|
1377
|
+
var VERSION = "3.28.3-pre.737243f85a";
|
|
1378
1378
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1379
1379
|
|
|
1380
1380
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -1278,7 +1278,7 @@ var import_toolkit2 = require("@reduxjs/toolkit");
|
|
|
1278
1278
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1279
1279
|
|
|
1280
1280
|
// src/utils/version.ts
|
|
1281
|
-
var VERSION = "3.28.3-pre.
|
|
1281
|
+
var VERSION = "3.28.3-pre.737243f85a";
|
|
1282
1282
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1283
1283
|
|
|
1284
1284
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -881,7 +881,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
|
|
|
881
881
|
};
|
|
882
882
|
|
|
883
883
|
// src/utils/version.ts
|
|
884
|
-
var VERSION = "3.28.3-pre.
|
|
884
|
+
var VERSION = "3.28.3-pre.737243f85a";
|
|
885
885
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
886
886
|
|
|
887
887
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -1306,7 +1306,7 @@ var import_toolkit2 = require("@reduxjs/toolkit");
|
|
|
1306
1306
|
var import_toolkit = require("@reduxjs/toolkit");
|
|
1307
1307
|
|
|
1308
1308
|
// src/utils/version.ts
|
|
1309
|
-
var VERSION = "3.28.3-pre.
|
|
1309
|
+
var VERSION = "3.28.3-pre.737243f85a";
|
|
1310
1310
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
1311
1311
|
|
|
1312
1312
|
// src/api/analytics/analytics-selectors.ts
|
|
@@ -468,7 +468,7 @@ var import_bueno8 = require("@coveo/bueno");
|
|
|
468
468
|
var import_toolkit3 = require("@reduxjs/toolkit");
|
|
469
469
|
|
|
470
470
|
// src/utils/version.ts
|
|
471
|
-
var VERSION = "3.28.3-pre.
|
|
471
|
+
var VERSION = "3.28.3-pre.737243f85a";
|
|
472
472
|
var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
|
|
473
473
|
|
|
474
474
|
// src/features/configuration/configuration-actions.ts
|
|
@@ -9086,11 +9086,7 @@ var productListingReducer = (0, import_toolkit39.createReducer)(
|
|
|
9086
9086
|
const paginationOffset = getPaginationOffset(action.payload);
|
|
9087
9087
|
handleFullfilled(state, action.payload.response);
|
|
9088
9088
|
state.products = action.payload.response.products.map(
|
|
9089
|
-
(product, index) => preprocessProduct(
|
|
9090
|
-
product,
|
|
9091
|
-
paginationOffset + index + 1,
|
|
9092
|
-
action.payload.response.responseId
|
|
9093
|
-
)
|
|
9089
|
+
(product, index) => preprocessProduct(product, paginationOffset + index + 1)
|
|
9094
9090
|
);
|
|
9095
9091
|
}).addCase(fetchMoreProducts.fulfilled, (state, action) => {
|
|
9096
9092
|
if (!action.payload) {
|
|
@@ -9100,11 +9096,7 @@ var productListingReducer = (0, import_toolkit39.createReducer)(
|
|
|
9100
9096
|
handleFullfilled(state, action.payload.response);
|
|
9101
9097
|
state.products = state.products.concat(
|
|
9102
9098
|
action.payload.response.products.map(
|
|
9103
|
-
(product, index) => preprocessProduct(
|
|
9104
|
-
product,
|
|
9105
|
-
paginationOffset + index + 1,
|
|
9106
|
-
action.payload?.response.responseId
|
|
9107
|
-
)
|
|
9099
|
+
(product, index) => preprocessProduct(product, paginationOffset + index + 1)
|
|
9108
9100
|
)
|
|
9109
9101
|
);
|
|
9110
9102
|
}).addCase(fetchProductListing.pending, (state, action) => {
|
|
@@ -9123,15 +9115,13 @@ var productListingReducer = (0, import_toolkit39.createReducer)(
|
|
|
9123
9115
|
if (currentParentIndex === -1 || childToPromote === void 0) {
|
|
9124
9116
|
return;
|
|
9125
9117
|
}
|
|
9126
|
-
const responseId = products[currentParentIndex].responseId;
|
|
9127
9118
|
const position = products[currentParentIndex].position;
|
|
9128
9119
|
const { children, totalNumberOfChildren } = products[currentParentIndex];
|
|
9129
9120
|
const newParent = {
|
|
9130
9121
|
...childToPromote,
|
|
9131
9122
|
children,
|
|
9132
9123
|
totalNumberOfChildren,
|
|
9133
|
-
position
|
|
9134
|
-
responseId
|
|
9124
|
+
position
|
|
9135
9125
|
};
|
|
9136
9126
|
products.splice(currentParentIndex, 1, newParent);
|
|
9137
9127
|
}).addCase(setView, () => getProductListingInitialState()).addCase(setContext, () => getProductListingInitialState()).addCase(setError, (state, action) => {
|
|
@@ -9157,12 +9147,12 @@ function getPaginationOffset(payload) {
|
|
|
9157
9147
|
const pagination = payload.response.pagination;
|
|
9158
9148
|
return pagination.page * pagination.perPage;
|
|
9159
9149
|
}
|
|
9160
|
-
function preprocessProduct(product, position
|
|
9150
|
+
function preprocessProduct(product, position) {
|
|
9161
9151
|
const isParentAlreadyInChildren = product.children.some(
|
|
9162
9152
|
(child) => child.permanentid === product.permanentid
|
|
9163
9153
|
);
|
|
9164
9154
|
if (product.children.length === 0 || isParentAlreadyInChildren) {
|
|
9165
|
-
return { ...product, position
|
|
9155
|
+
return { ...product, position };
|
|
9166
9156
|
}
|
|
9167
9157
|
const {
|
|
9168
9158
|
children,
|
|
@@ -9172,8 +9162,7 @@ function preprocessProduct(product, position, responseId) {
|
|
|
9172
9162
|
return {
|
|
9173
9163
|
...product,
|
|
9174
9164
|
children: [restOfProduct, ...children],
|
|
9175
|
-
position
|
|
9176
|
-
responseId
|
|
9165
|
+
position
|
|
9177
9166
|
};
|
|
9178
9167
|
}
|
|
9179
9168
|
|
|
@@ -12341,7 +12330,7 @@ Review the configuration of the above 'ec_'-prefixed fields in your index, and m
|
|
|
12341
12330
|
productId: props.options.product.ec_product_id ?? props.options.product.permanentid
|
|
12342
12331
|
},
|
|
12343
12332
|
position: props.options.product.position,
|
|
12344
|
-
responseId: props.
|
|
12333
|
+
responseId: props.responseIdSelector(engine[stateKey])
|
|
12345
12334
|
})
|
|
12346
12335
|
);
|
|
12347
12336
|
};
|
|
@@ -13834,11 +13823,7 @@ var commerceSearchReducer = (0, import_toolkit84.createReducer)(
|
|
|
13834
13823
|
action.payload.queryExecuted
|
|
13835
13824
|
);
|
|
13836
13825
|
state.products = action.payload.response.products.map(
|
|
13837
|
-
(product, index) => preprocessProduct2(
|
|
13838
|
-
product,
|
|
13839
|
-
paginationOffset + index + 1,
|
|
13840
|
-
action.payload.response.responseId
|
|
13841
|
-
)
|
|
13826
|
+
(product, index) => preprocessProduct2(product, paginationOffset + index + 1)
|
|
13842
13827
|
);
|
|
13843
13828
|
}).addCase(fetchMoreProducts2.fulfilled, (state, action) => {
|
|
13844
13829
|
if (!action.payload) {
|
|
@@ -13852,11 +13837,7 @@ var commerceSearchReducer = (0, import_toolkit84.createReducer)(
|
|
|
13852
13837
|
);
|
|
13853
13838
|
state.products = state.products.concat(
|
|
13854
13839
|
action.payload.response.products.map(
|
|
13855
|
-
(product, index) => preprocessProduct2(
|
|
13856
|
-
product,
|
|
13857
|
-
paginationOffset + index + 1,
|
|
13858
|
-
action.payload?.response.responseId
|
|
13859
|
-
)
|
|
13840
|
+
(product, index) => preprocessProduct2(product, paginationOffset + index + 1)
|
|
13860
13841
|
)
|
|
13861
13842
|
);
|
|
13862
13843
|
}).addCase(executeSearch3.pending, (state, action) => {
|
|
@@ -13875,15 +13856,13 @@ var commerceSearchReducer = (0, import_toolkit84.createReducer)(
|
|
|
13875
13856
|
if (currentParentIndex === -1 || childToPromote === void 0) {
|
|
13876
13857
|
return;
|
|
13877
13858
|
}
|
|
13878
|
-
const responseId = products[currentParentIndex].responseId;
|
|
13879
13859
|
const position = products[currentParentIndex].position;
|
|
13880
13860
|
const { children, totalNumberOfChildren } = products[currentParentIndex];
|
|
13881
13861
|
const newParent = {
|
|
13882
13862
|
...childToPromote,
|
|
13883
13863
|
children,
|
|
13884
13864
|
totalNumberOfChildren,
|
|
13885
|
-
position
|
|
13886
|
-
responseId
|
|
13865
|
+
position
|
|
13887
13866
|
};
|
|
13888
13867
|
products.splice(currentParentIndex, 1, newParent);
|
|
13889
13868
|
}).addCase(setView, () => getCommerceSearchInitialState()).addCase(setContext, () => getCommerceSearchInitialState()).addCase(setError, (state, action) => {
|
|
@@ -13911,12 +13890,12 @@ function getPaginationOffset2(payload) {
|
|
|
13911
13890
|
const pagination = payload.response.pagination;
|
|
13912
13891
|
return pagination.page * pagination.perPage;
|
|
13913
13892
|
}
|
|
13914
|
-
function preprocessProduct2(product, position
|
|
13893
|
+
function preprocessProduct2(product, position) {
|
|
13915
13894
|
const isParentAlreadyInChildren = product.children.some(
|
|
13916
13895
|
(child) => child.permanentid === product.permanentid
|
|
13917
13896
|
);
|
|
13918
13897
|
if (product.children.length === 0 || isParentAlreadyInChildren) {
|
|
13919
|
-
return { ...product, position
|
|
13898
|
+
return { ...product, position };
|
|
13920
13899
|
}
|
|
13921
13900
|
const {
|
|
13922
13901
|
children,
|
|
@@ -13926,8 +13905,7 @@ function preprocessProduct2(product, position, responseId) {
|
|
|
13926
13905
|
return {
|
|
13927
13906
|
...product,
|
|
13928
13907
|
children: [restOfProduct, ...children],
|
|
13929
|
-
position
|
|
13930
|
-
responseId
|
|
13908
|
+
position
|
|
13931
13909
|
};
|
|
13932
13910
|
}
|
|
13933
13911
|
|