vviinn-widgets 2.55.3 → 2.55.7
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/{package-03f79082.js → package-5a367e60.js} +1 -1
- package/dist/cjs/{resources-ad941ad8.js → resources-1a173128.js} +1 -1
- package/dist/cjs/search-filters_17.cjs.entry.js +1 -1
- package/dist/cjs/{search.store-3ea66a77.js → search.store-d6fff13b.js} +5 -5
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +14 -7
- package/dist/cjs/vviinn-preloader.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +3 -3
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +8 -2
- package/dist/collection/recommendation/index.js +3 -2
- package/dist/collection/store/search.store.js +5 -5
- package/dist/esm/{package-997f527d.js → package-4f93de66.js} +1 -1
- package/dist/esm/{resources-da0af18a.js → resources-64fb3e8d.js} +1 -1
- package/dist/esm/search-filters_17.entry.js +1 -1
- package/dist/esm/{search.store-5c685b20.js → search.store-4d95a8f8.js} +5 -5
- package/dist/esm/vviinn-carousel_4.entry.js +14 -7
- package/dist/esm/vviinn-preloader.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +3 -3
- package/dist/types/campaign/CampaignService.d.ts +22 -18
- package/dist/types/campaign/VCSCampaignService.d.ts +1 -1
- package/dist/types/campaign/VPRCampaignService.d.ts +1 -1
- package/dist/types/interfaces/generated.d.ts +32 -20
- package/dist/types/interfaces/recommendation.d.ts +4 -0
- package/dist/types/recommendation/index.d.ts +2 -9
- package/dist/types/store/search.store.d.ts +2 -2
- package/dist/vviinn-widgets/{p-823babd4.js → p-3985b62e.js} +1 -1
- package/{www/build/p-7aef8065.entry.js → dist/vviinn-widgets/p-583431e6.entry.js} +1 -1
- package/{www/build/p-885f58fe.js → dist/vviinn-widgets/p-98f4c68e.js} +1 -1
- package/dist/vviinn-widgets/{p-c2798926.entry.js → p-a10c25f7.entry.js} +1 -1
- package/dist/vviinn-widgets/p-b09ad131.js +1 -0
- package/dist/vviinn-widgets/{p-998eab91.entry.js → p-c09c2a29.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-e872fcb3.entry.js → p-c7bdec1a.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-49b1af86.entry.js → p-ca8d1e96.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-72db7357.entry.js → p-eb2e026b.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-823babd4.js → p-3985b62e.js} +1 -1
- package/{dist/vviinn-widgets/p-7aef8065.entry.js → www/build/p-583431e6.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-885f58fe.js → www/build/p-98f4c68e.js} +1 -1
- package/www/build/{p-c2798926.entry.js → p-a10c25f7.entry.js} +1 -1
- package/www/build/p-b09ad131.js +1 -0
- package/www/build/{p-998eab91.entry.js → p-c09c2a29.entry.js} +1 -1
- package/www/build/{p-e872fcb3.entry.js → p-c7bdec1a.entry.js} +1 -1
- package/www/build/{p-49b1af86.entry.js → p-ca8d1e96.entry.js} +1 -1
- package/www/build/{p-72db7357.entry.js → p-eb2e026b.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-c84e4374.js +0 -1
- package/www/build/p-c84e4374.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const search_store = require('./search.store-
|
|
3
|
+
const search_store = require('./search.store-d6fff13b.js');
|
|
4
4
|
|
|
5
5
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
6
6
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-d6fff13b.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
9
9
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
@@ -17321,12 +17321,12 @@ const uploadFile = (file) => {
|
|
|
17321
17321
|
return error;
|
|
17322
17322
|
}));
|
|
17323
17323
|
};
|
|
17324
|
-
const uploadText = (query,
|
|
17324
|
+
const uploadText = (query, dynamicFilters) => {
|
|
17325
17325
|
state.searchType = "text";
|
|
17326
17326
|
state.loading = true;
|
|
17327
|
-
const body = Object.assign(Object.assign({ query }, (
|
|
17327
|
+
const body = Object.assign(Object.assign({ query }, (dynamicFilters
|
|
17328
17328
|
? {
|
|
17329
|
-
|
|
17329
|
+
dynamicFilters,
|
|
17330
17330
|
}
|
|
17331
17331
|
: {})), (state.campaignId.length ? { campaign: state.campaignId } : {}));
|
|
17332
17332
|
const tokenWithBody = sequenceToEither(processBearerToken(state.token), right(JSON.stringify(body)));
|
|
@@ -17340,7 +17340,7 @@ const uploadText = (query, filters) => {
|
|
|
17340
17340
|
var _a, _b, _c, _d;
|
|
17341
17341
|
state.results = (_a = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data.products) !== null && _a !== void 0 ? _a : [];
|
|
17342
17342
|
state.textSearchFilters =
|
|
17343
|
-
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.
|
|
17343
|
+
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.dynamicFilters) !== null && _d !== void 0 ? _d : [];
|
|
17344
17344
|
state.loading = false;
|
|
17345
17345
|
return sessionResponse;
|
|
17346
17346
|
}), mapLeft((error) => {
|
|
@@ -17349,7 +17349,7 @@ const uploadText = (query, filters) => {
|
|
|
17349
17349
|
return error;
|
|
17350
17350
|
}));
|
|
17351
17351
|
};
|
|
17352
|
-
const processSelectedText = async (query,
|
|
17352
|
+
const processSelectedText = async (query, dynamicFilters) => await uploadText(query, dynamicFilters)();
|
|
17353
17353
|
onChange("activeIonLink", async (newLink) => {
|
|
17354
17354
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
17355
17355
|
if (!link)
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-d6fff13b.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const PlusIcon = require('./PlusIcon-835a5dcc.js');
|
|
10
|
-
const _package = require('./package-
|
|
11
|
-
const resources = require('./resources-
|
|
10
|
+
const _package = require('./package-5a367e60.js');
|
|
11
|
+
const resources = require('./resources-1a173128.js');
|
|
12
12
|
|
|
13
13
|
const BasketIcon = () => (index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
14
14
|
index.h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
|
|
@@ -1376,8 +1376,9 @@ const parseCampaigns = (campaigns) => campaigns.split(",").map((value) => {
|
|
|
1376
1376
|
? parseInt(trimmedValue)
|
|
1377
1377
|
: trimmedValue;
|
|
1378
1378
|
});
|
|
1379
|
-
const getRecommendationsBody = ({ productId, color
|
|
1380
|
-
|
|
1379
|
+
const getRecommendationsBody = ({ productId, campaigns, color, excluded, }) => {
|
|
1380
|
+
const staticFilters = Object.assign(Object.assign({}, (color.length ? { color } : {})), (excluded.length ? { excluded: parseExcluded(excluded) } : {}));
|
|
1381
|
+
return Object.assign(Object.assign({ productId }, (campaigns.length ? { campaigns: parseCampaigns(campaigns) } : {})), (Object.keys(staticFilters).length ? { staticFilters } : {}));
|
|
1381
1382
|
};
|
|
1382
1383
|
|
|
1383
1384
|
const vviinnVprWidgetCss = ":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #dddddd;width:100%}:host(.set) vviinn-carousel{overflow-x:auto}:host(.set) vviinn-carousel{scrollbar-width:thin}.widget-header{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center}.widget-header h3{margin-top:8px;margin-bottom:0;font-size:14px;font-weight:400;line-height:20px}.update-button{display:flex;align-items:center;justify-content:center;color:#525252;gap:8px;padding:8px 10px;background:rgb(244, 244, 244);border:none;cursor:pointer}.update-button:hover{background:rgb(234, 234, 234)}.update-button svg{color:#6f6f6f;width:24px;height:24px}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.no-result-text{font-size:20px}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";
|
|
@@ -1653,6 +1654,7 @@ const VviinnVprWidget = class {
|
|
|
1653
1654
|
async getRecommendations() {
|
|
1654
1655
|
if (this.productId === undefined || this.token === undefined)
|
|
1655
1656
|
return;
|
|
1657
|
+
search_store.searchState.loading = true;
|
|
1656
1658
|
const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
|
|
1657
1659
|
const headers = createBearAuthedHeader(this.token);
|
|
1658
1660
|
const body = getRecommendationsBody({
|
|
@@ -1667,7 +1669,11 @@ const VviinnVprWidget = class {
|
|
|
1667
1669
|
this.handleError(error);
|
|
1668
1670
|
this.vviinnNoResult.emit(this.getBasicEventData());
|
|
1669
1671
|
this.vviinnRecommendationsLoaded.emit();
|
|
1670
|
-
|
|
1672
|
+
search_store.searchState.loading = false;
|
|
1673
|
+
}, (data) => {
|
|
1674
|
+
this.handleRecommendationsSuccess(data);
|
|
1675
|
+
search_store.searchState.loading = false;
|
|
1676
|
+
}));
|
|
1671
1677
|
}
|
|
1672
1678
|
handleError(_) {
|
|
1673
1679
|
this.hasErrorOnLoad = true;
|
|
@@ -1704,7 +1710,8 @@ const VviinnVprWidget = class {
|
|
|
1704
1710
|
}, "aria-hidden": "false" }, index.h(index.Fragment, null, this.renderExternalCSS(), customizedSlots.SlotSkeleton("vpr"), index.h("style", null, search_store.state.fallbackStyles), index.h("div", { class: "widget-header" }, index.h("div", null, index.h("h2", { part: "recommendations-title" }, index.h("slot", { name: "vviinn-recommendations-title" }, this.isSetMode
|
|
1705
1711
|
? i18next.instance.t("setMode.widgetTitle")
|
|
1706
1712
|
: this.blockTitle)), this.isSetMode && (index.h("h3", { part: "recommendations-subtitle" }, index.h("slot", { name: "vviinn-recommendations-subtitle" }, i18next.instance.t("setMode.widgetSubtitle"))))), this.isSetMode && this.updateButtonLocation !== "onItem" ? (index.h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, index.h("slot", { name: "vviinn-update-button-icon" }, index.h(UpdateIcon, null)), index.h("slot", { name: "vviinn-update-button-text" }, index.h("span", null, i18next.instance.t("setMode.updateButtonText"))))) : null), this.recommendations.length > 0 &&
|
|
1707
|
-
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
1713
|
+
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
1714
|
+
!search_store.searchState.loading && (index.h("p", { class: "no-result-text" }, this.noResultText.length
|
|
1708
1715
|
? this.noResultText
|
|
1709
1716
|
: i18next.instance.t("noResultText"))))));
|
|
1710
1717
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-d6fff13b.js');
|
|
7
7
|
|
|
8
8
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-5a367e60.js');
|
|
7
7
|
const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.js');
|
|
8
8
|
|
|
9
9
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-5a367e60.js');
|
|
7
7
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
8
8
|
const constants = require('./constants-7684cbfc.js');
|
|
9
9
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4474431a.js');
|
|
6
|
-
const search_store = require('./search.store-
|
|
6
|
+
const search_store = require('./search.store-d6fff13b.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-5a367e60.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-8e27cac8.js');
|
|
10
|
-
const resources = require('./resources-
|
|
10
|
+
const resources = require('./resources-1a173128.js');
|
|
11
11
|
const constants = require('./constants-7684cbfc.js');
|
|
12
12
|
|
|
13
13
|
const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
@@ -310,6 +310,7 @@ export class VviinnVprWidget {
|
|
|
310
310
|
async getRecommendations() {
|
|
311
311
|
if (this.productId === undefined || this.token === undefined)
|
|
312
312
|
return;
|
|
313
|
+
searchState.loading = true;
|
|
313
314
|
const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
|
|
314
315
|
const headers = createBearAuthedHeader(this.token);
|
|
315
316
|
const body = getRecommendationsBody({
|
|
@@ -324,7 +325,11 @@ export class VviinnVprWidget {
|
|
|
324
325
|
this.handleError(error);
|
|
325
326
|
this.vviinnNoResult.emit(this.getBasicEventData());
|
|
326
327
|
this.vviinnRecommendationsLoaded.emit();
|
|
327
|
-
|
|
328
|
+
searchState.loading = false;
|
|
329
|
+
}, (data) => {
|
|
330
|
+
this.handleRecommendationsSuccess(data);
|
|
331
|
+
searchState.loading = false;
|
|
332
|
+
}));
|
|
328
333
|
}
|
|
329
334
|
handleError(_) {
|
|
330
335
|
this.hasErrorOnLoad = true;
|
|
@@ -361,7 +366,8 @@ export class VviinnVprWidget {
|
|
|
361
366
|
}, "aria-hidden": "false" }, h(Fragment, null, this.renderExternalCSS(), SlotSkeleton("vpr"), h("style", null, state.fallbackStyles), h("div", { class: "widget-header" }, h("div", null, h("h2", { part: "recommendations-title" }, h("slot", { name: "vviinn-recommendations-title" }, this.isSetMode
|
|
362
367
|
? i18next.t("setMode.widgetTitle")
|
|
363
368
|
: this.blockTitle)), this.isSetMode && (h("h3", { part: "recommendations-subtitle" }, h("slot", { name: "vviinn-recommendations-subtitle" }, i18next.t("setMode.widgetSubtitle"))))), this.isSetMode && this.updateButtonLocation !== "onItem" ? (h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, h("slot", { name: "vviinn-update-button-icon" }, h(UpdateIcon, null)), h("slot", { name: "vviinn-update-button-text" }, h("span", null, i18next.t("setMode.updateButtonText"))))) : null), this.recommendations.length > 0 &&
|
|
364
|
-
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
369
|
+
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
370
|
+
!searchState.loading && (h("p", { class: "no-result-text" }, this.noResultText.length
|
|
365
371
|
? this.noResultText
|
|
366
372
|
: i18next.t("noResultText"))))));
|
|
367
373
|
}
|
|
@@ -11,6 +11,7 @@ const parseCampaigns = (campaigns) => campaigns.split(",").map((value) => {
|
|
|
11
11
|
? parseInt(trimmedValue)
|
|
12
12
|
: trimmedValue;
|
|
13
13
|
});
|
|
14
|
-
export const getRecommendationsBody = ({ productId, color
|
|
15
|
-
|
|
14
|
+
export const getRecommendationsBody = ({ productId, campaigns, color, excluded, }) => {
|
|
15
|
+
const staticFilters = Object.assign(Object.assign({}, (color.length ? { color } : {})), (excluded.length ? { excluded: parseExcluded(excluded) } : {}));
|
|
16
|
+
return Object.assign(Object.assign({ productId }, (campaigns.length ? { campaigns: parseCampaigns(campaigns) } : {})), (Object.keys(staticFilters).length ? { staticFilters } : {}));
|
|
16
17
|
};
|
|
@@ -105,12 +105,12 @@ export const uploadFile = (file) => {
|
|
|
105
105
|
return error;
|
|
106
106
|
}));
|
|
107
107
|
};
|
|
108
|
-
const uploadText = (query,
|
|
108
|
+
const uploadText = (query, dynamicFilters) => {
|
|
109
109
|
state.searchType = "text";
|
|
110
110
|
state.loading = true;
|
|
111
|
-
const body = Object.assign(Object.assign({ query }, (
|
|
111
|
+
const body = Object.assign(Object.assign({ query }, (dynamicFilters
|
|
112
112
|
? {
|
|
113
|
-
|
|
113
|
+
dynamicFilters,
|
|
114
114
|
}
|
|
115
115
|
: {})), (state.campaignId.length ? { campaign: state.campaignId } : {}));
|
|
116
116
|
const tokenWithBody = sequenceToEither(processBearerToken(state.token), E.right(JSON.stringify(body)));
|
|
@@ -124,7 +124,7 @@ const uploadText = (query, filters) => {
|
|
|
124
124
|
var _a, _b, _c, _d;
|
|
125
125
|
state.results = (_a = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data.products) !== null && _a !== void 0 ? _a : [];
|
|
126
126
|
state.textSearchFilters =
|
|
127
|
-
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.
|
|
127
|
+
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.dynamicFilters) !== null && _d !== void 0 ? _d : [];
|
|
128
128
|
state.loading = false;
|
|
129
129
|
return sessionResponse;
|
|
130
130
|
}), TE.mapLeft((error) => {
|
|
@@ -133,7 +133,7 @@ const uploadText = (query, filters) => {
|
|
|
133
133
|
return error;
|
|
134
134
|
}));
|
|
135
135
|
};
|
|
136
|
-
export const processSelectedText = async (query,
|
|
136
|
+
export const processSelectedText = async (query, dynamicFilters) => await uploadText(query, dynamicFilters)();
|
|
137
137
|
onChange("activeIonLink", async (newLink) => {
|
|
138
138
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
139
139
|
if (!link)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as commonjsGlobal, i as createCommonjsModule } from './search.store-
|
|
1
|
+
import { e as commonjsGlobal, i as createCommonjsModule } from './search.store-4d95a8f8.js';
|
|
2
2
|
|
|
3
3
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
4
4
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldValueObject, o as scaleWithSized, q as center, r as makeRectangularSearchRequest, u as detectedObjectEq, v as toFile, w as processSelectedFile, E as Either, x as match, i as createCommonjsModule, e as commonjsGlobal, y as sequenceToOption, z as fromImage, B as dimensionsFromImage, C as scaleByLargestSide, N as NonEmptyArray } from './search.store-
|
|
2
|
+
import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldValueObject, o as scaleWithSized, q as center, r as makeRectangularSearchRequest, u as detectedObjectEq, v as toFile, w as processSelectedFile, E as Either, x as match, i as createCommonjsModule, e as commonjsGlobal, y as sequenceToOption, z as fromImage, B as dimensionsFromImage, C as scaleByLargestSide, N as NonEmptyArray } from './search.store-4d95a8f8.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
4
|
import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-f69bec7d.js';
|
|
5
5
|
import { P as PlusIcon } from './PlusIcon-8f8206c3.js';
|
|
@@ -17319,12 +17319,12 @@ const uploadFile = (file) => {
|
|
|
17319
17319
|
return error;
|
|
17320
17320
|
}));
|
|
17321
17321
|
};
|
|
17322
|
-
const uploadText = (query,
|
|
17322
|
+
const uploadText = (query, dynamicFilters) => {
|
|
17323
17323
|
state.searchType = "text";
|
|
17324
17324
|
state.loading = true;
|
|
17325
|
-
const body = Object.assign(Object.assign({ query }, (
|
|
17325
|
+
const body = Object.assign(Object.assign({ query }, (dynamicFilters
|
|
17326
17326
|
? {
|
|
17327
|
-
|
|
17327
|
+
dynamicFilters,
|
|
17328
17328
|
}
|
|
17329
17329
|
: {})), (state.campaignId.length ? { campaign: state.campaignId } : {}));
|
|
17330
17330
|
const tokenWithBody = sequenceToEither(processBearerToken(state.token), right(JSON.stringify(body)));
|
|
@@ -17338,7 +17338,7 @@ const uploadText = (query, filters) => {
|
|
|
17338
17338
|
var _a, _b, _c, _d;
|
|
17339
17339
|
state.results = (_a = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data.products) !== null && _a !== void 0 ? _a : [];
|
|
17340
17340
|
state.textSearchFilters =
|
|
17341
|
-
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.
|
|
17341
|
+
(_d = (_c = (_b = sessionResponse === null || sessionResponse === void 0 ? void 0 : sessionResponse.data) === null || _b === void 0 ? void 0 : _b.interactions) === null || _c === void 0 ? void 0 : _c.dynamicFilters) !== null && _d !== void 0 ? _d : [];
|
|
17342
17342
|
state.loading = false;
|
|
17343
17343
|
return sessionResponse;
|
|
17344
17344
|
}), mapLeft((error) => {
|
|
@@ -17347,7 +17347,7 @@ const uploadText = (query, filters) => {
|
|
|
17347
17347
|
return error;
|
|
17348
17348
|
}));
|
|
17349
17349
|
};
|
|
17350
|
-
const processSelectedText = async (query,
|
|
17350
|
+
const processSelectedText = async (query, dynamicFilters) => await uploadText(query, dynamicFilters)();
|
|
17351
17351
|
onChange("activeIonLink", async (newLink) => {
|
|
17352
17352
|
const link = newLink ? newLink : state.resetCategoryLink;
|
|
17353
17353
|
if (!link)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-abf408d8.js';
|
|
2
|
-
import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, E as Either, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither } from './search.store-
|
|
2
|
+
import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O as Option, S as Semigroup, E as Either, p as pipe, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitPostRequest, A as Apply, d as state, T as TaskEither } from './search.store-4d95a8f8.js';
|
|
3
3
|
import { c as campaignTypeNames, s as slotChangeListener, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
4
4
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
5
5
|
import { P as PlusIcon } from './PlusIcon-8f8206c3.js';
|
|
6
|
-
import { v as version } from './package-
|
|
7
|
-
import { v as v4, c as createTrackingApi, r as resources, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './resources-
|
|
6
|
+
import { v as version } from './package-4f93de66.js';
|
|
7
|
+
import { v as v4, c as createTrackingApi, r as resources, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './resources-64fb3e8d.js';
|
|
8
8
|
|
|
9
9
|
const BasketIcon = () => (h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
10
10
|
h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
|
|
@@ -1372,8 +1372,9 @@ const parseCampaigns = (campaigns) => campaigns.split(",").map((value) => {
|
|
|
1372
1372
|
? parseInt(trimmedValue)
|
|
1373
1373
|
: trimmedValue;
|
|
1374
1374
|
});
|
|
1375
|
-
const getRecommendationsBody = ({ productId, color
|
|
1376
|
-
|
|
1375
|
+
const getRecommendationsBody = ({ productId, campaigns, color, excluded, }) => {
|
|
1376
|
+
const staticFilters = Object.assign(Object.assign({}, (color.length ? { color } : {})), (excluded.length ? { excluded: parseExcluded(excluded) } : {}));
|
|
1377
|
+
return Object.assign(Object.assign({ productId }, (campaigns.length ? { campaigns: parseCampaigns(campaigns) } : {})), (Object.keys(staticFilters).length ? { staticFilters } : {}));
|
|
1377
1378
|
};
|
|
1378
1379
|
|
|
1379
1380
|
const vviinnVprWidgetCss = ":host{display:grid;grid-gap:1rem;width:100%}:host(:not(.loaded)){position:absolute;visibility:hidden}:host(.grid) vviinn-product-card::part(image){border:1px solid #dddddd;width:100%}:host(.set) vviinn-carousel{overflow-x:auto}:host(.set) vviinn-carousel{scrollbar-width:thin}.widget-header{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center}.widget-header h3{margin-top:8px;margin-bottom:0;font-size:14px;font-weight:400;line-height:20px}.update-button{display:flex;align-items:center;justify-content:center;color:#525252;gap:8px;padding:8px 10px;background:rgb(244, 244, 244);border:none;cursor:pointer}.update-button:hover{background:rgb(234, 234, 234)}.update-button svg{color:#6f6f6f;width:24px;height:24px}h2{margin:0}vviinn-product-card::part(price-container){align-self:flex-start;text-align:left;display:flex}.results{display:grid;grid-gap:1rem}.no-result-text{font-size:20px}.visually-hidden{position:absolute;top:0;left:0;z-index:-1;height:0;width:0}h2{margin:0}:host(.grid) h2{justify-content:center}:host(.grid) vviinn-product-card::part(image){min-width:100%}:host(.grid) vviinn-product-card::part(image-link){width:100%}:host(.grid) vviinn-product-card::part(title),:host(.grid) vviinn-product-card::part(brand),:host(.grid) vviinn-product-card::part(type){text-align:center}:host(.grid) vviinn-product-card::part(price-container){align-self:center}:host(.continuity) vviinn-product-card::part(title),:host(.continuity) vviinn-product-card::part(brand),:host(.continuity) vviinn-product-card::part(type),:host(.continuity) vviinn-product-card::part(deeplink){text-align:left;max-width:unset;align-self:start}";
|
|
@@ -1649,6 +1650,7 @@ const VviinnVprWidget = class {
|
|
|
1649
1650
|
async getRecommendations() {
|
|
1650
1651
|
if (this.productId === undefined || this.token === undefined)
|
|
1651
1652
|
return;
|
|
1653
|
+
searchState.loading = true;
|
|
1652
1654
|
const campaignType = this.campaignType.length > 0 ? this.campaignType : "VPR";
|
|
1653
1655
|
const headers = createBearAuthedHeader(this.token);
|
|
1654
1656
|
const body = getRecommendationsBody({
|
|
@@ -1663,7 +1665,11 @@ const VviinnVprWidget = class {
|
|
|
1663
1665
|
this.handleError(error);
|
|
1664
1666
|
this.vviinnNoResult.emit(this.getBasicEventData());
|
|
1665
1667
|
this.vviinnRecommendationsLoaded.emit();
|
|
1666
|
-
|
|
1668
|
+
searchState.loading = false;
|
|
1669
|
+
}, (data) => {
|
|
1670
|
+
this.handleRecommendationsSuccess(data);
|
|
1671
|
+
searchState.loading = false;
|
|
1672
|
+
}));
|
|
1667
1673
|
}
|
|
1668
1674
|
handleError(_) {
|
|
1669
1675
|
this.hasErrorOnLoad = true;
|
|
@@ -1700,7 +1706,8 @@ const VviinnVprWidget = class {
|
|
|
1700
1706
|
}, "aria-hidden": "false" }, h(Fragment, null, this.renderExternalCSS(), SlotSkeleton("vpr"), h("style", null, state.fallbackStyles), h("div", { class: "widget-header" }, h("div", null, h("h2", { part: "recommendations-title" }, h("slot", { name: "vviinn-recommendations-title" }, this.isSetMode
|
|
1701
1707
|
? instance.t("setMode.widgetTitle")
|
|
1702
1708
|
: this.blockTitle)), this.isSetMode && (h("h3", { part: "recommendations-subtitle" }, h("slot", { name: "vviinn-recommendations-subtitle" }, instance.t("setMode.widgetSubtitle"))))), this.isSetMode && this.updateButtonLocation !== "onItem" ? (h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, h("slot", { name: "vviinn-update-button-icon" }, h(UpdateIcon, null)), h("slot", { name: "vviinn-update-button-text" }, h("span", null, instance.t("setMode.updateButtonText"))))) : null), this.recommendations.length > 0 &&
|
|
1703
|
-
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
1709
|
+
(this.useCarousel ? this.renderCarousel() : this.renderResults()), (this.recommendations.length === 0 || this.hasErrorOnLoad) &&
|
|
1710
|
+
!searchState.loading && (h("p", { class: "no-result-text" }, this.noResultText.length
|
|
1704
1711
|
? this.noResultText
|
|
1705
1712
|
: instance.t("noResultText"))))));
|
|
1706
1713
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState } from './search.store-
|
|
2
|
+
import { s as searchState } from './search.store-4d95a8f8.js';
|
|
3
3
|
|
|
4
4
|
const vviinnPreloaderCss = ":host{--preloader-size:24px;--preloader-width:calc(var(--preloader-size) / 6);transform-origin:center;animation:rotate 3s linear infinite;border:var(--preloader-width) solid currentColor;border-radius:50%;border-top-color:transparent;display:none;outline:0;width:var(--preloader-size);height:var(--preloader-size);box-sizing:border-box}:host(.active){display:flex}@keyframes rotate{from{transform:rotate(-360deg)}to{transform:rotate(360deg)}}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4f93de66.js';
|
|
3
3
|
import { V as VisualSearchIcon } from './VisualSearchIcon-b301a1d4.js';
|
|
4
4
|
|
|
5
5
|
const vviinnVprButtonCss = ":host{display:block}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-4f93de66.js';
|
|
3
3
|
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
4
4
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
5
5
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
|
|
2
|
-
import { s as searchState, j as processSelectedText, d as state, k as parseExcludedToParams, O as Option } from './search.store-
|
|
2
|
+
import { s as searchState, j as processSelectedText, d as state, k as parseExcludedToParams, O as Option } from './search.store-4d95a8f8.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
|
-
import { v as version } from './package-
|
|
4
|
+
import { v as version } from './package-4f93de66.js';
|
|
5
5
|
import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-f69bec7d.js';
|
|
6
|
-
import { r as resources, j as createSearchEvent, k as createFilterEvent, v as v4, c as createTrackingApi, l as createWidgetVpsEvent, m as createProductVpsEventByType, n as createResultVpsEventByType } from './resources-
|
|
6
|
+
import { r as resources, j as createSearchEvent, k as createFilterEvent, v as v4, c as createTrackingApi, l as createWidgetVpsEvent, m as createProductVpsEventByType, n as createResultVpsEventByType } from './resources-64fb3e8d.js';
|
|
7
7
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
8
8
|
|
|
9
9
|
const CameraActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import * as C from "./Campaign";
|
|
2
2
|
export declare const getRecommendationsService: (campaignType: C.CampaignName) => ((body: {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
productId: string;
|
|
4
|
+
resultsCount?: number;
|
|
5
5
|
campaigns?: (string | number)[];
|
|
6
|
-
color?: string;
|
|
7
|
-
excluded?: {
|
|
8
|
-
column?: string;
|
|
9
|
-
values?: string[];
|
|
10
|
-
}[];
|
|
11
6
|
substitutions?: {
|
|
12
7
|
category?: string[];
|
|
13
8
|
price?: number;
|
|
14
9
|
};
|
|
15
|
-
|
|
10
|
+
staticFilters?: {
|
|
11
|
+
color?: string;
|
|
12
|
+
excluded?: {
|
|
13
|
+
column?: string;
|
|
14
|
+
values?: string[];
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
dynamicFilters?: {
|
|
16
18
|
column: string;
|
|
17
19
|
values: string[] | {
|
|
18
20
|
start?: number;
|
|
@@ -55,7 +57,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
55
57
|
}[];
|
|
56
58
|
};
|
|
57
59
|
interactions?: {
|
|
58
|
-
|
|
60
|
+
dynamicFilters: ({
|
|
59
61
|
column: string;
|
|
60
62
|
label: string;
|
|
61
63
|
values: ({
|
|
@@ -98,15 +100,17 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
98
100
|
}[];
|
|
99
101
|
}[];
|
|
100
102
|
}>) | ((body: {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
productId: string;
|
|
104
|
+
resultsCount?: number;
|
|
103
105
|
campaigns?: (string | number)[];
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
staticFilters?: {
|
|
107
|
+
color?: string;
|
|
108
|
+
excluded?: {
|
|
109
|
+
column?: string;
|
|
110
|
+
values?: string[];
|
|
111
|
+
}[];
|
|
112
|
+
};
|
|
113
|
+
dynamicFilters?: {
|
|
110
114
|
column: string;
|
|
111
115
|
values: string[] | {
|
|
112
116
|
start?: number;
|
|
@@ -149,7 +153,7 @@ export declare const getRecommendationsService: (campaignType: C.CampaignName) =
|
|
|
149
153
|
}[];
|
|
150
154
|
};
|
|
151
155
|
interactions?: {
|
|
152
|
-
|
|
156
|
+
dynamicFilters: ({
|
|
153
157
|
column: string;
|
|
154
158
|
label: string;
|
|
155
159
|
values: ({
|
|
@@ -91,7 +91,7 @@ export interface components {
|
|
|
91
91
|
* @description returns less than or equal to the campaign's defined results
|
|
92
92
|
* @example 8
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
resultsCount: number;
|
|
95
95
|
/** @example 2 */
|
|
96
96
|
"image-code": string;
|
|
97
97
|
/** @example 12ff21 */
|
|
@@ -361,13 +361,12 @@ export interface components {
|
|
|
361
361
|
detectedObjects?: components["schemas"]["ion-detected-object"][];
|
|
362
362
|
};
|
|
363
363
|
"similar-products-request": {
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
productId: components["schemas"]["product-id"];
|
|
365
|
+
resultsCount?: components["schemas"]["resultsCount"];
|
|
366
366
|
campaigns?: components["schemas"]["campaigns"];
|
|
367
|
-
color?: components["schemas"]["color"];
|
|
368
|
-
excluded?: components["schemas"]["excluded"];
|
|
369
367
|
substitutions?: components["schemas"]["request-substitutions"];
|
|
370
|
-
|
|
368
|
+
staticFilters?: components["schemas"]["request-static-filters"];
|
|
369
|
+
dynamicFilters?: components["schemas"]["request-dynamic-filters"];
|
|
371
370
|
};
|
|
372
371
|
"similar-products-response": {
|
|
373
372
|
data: {
|
|
@@ -378,12 +377,11 @@ export interface components {
|
|
|
378
377
|
substitutions?: components["schemas"]["response-substitutions"];
|
|
379
378
|
};
|
|
380
379
|
"cross-selling-request": {
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
productId: components["schemas"]["product-id"];
|
|
381
|
+
resultsCount?: components["schemas"]["resultsCount"];
|
|
383
382
|
campaigns?: components["schemas"]["campaigns"];
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
filters?: components["schemas"]["request-filters"];
|
|
383
|
+
staticFilters?: components["schemas"]["request-static-filters"];
|
|
384
|
+
dynamicFilters?: components["schemas"]["request-dynamic-filters"];
|
|
387
385
|
};
|
|
388
386
|
"cross-selling-response": {
|
|
389
387
|
data: {
|
|
@@ -395,11 +393,11 @@ export interface components {
|
|
|
395
393
|
"text-search-request": {
|
|
396
394
|
/** @example flowers */
|
|
397
395
|
query: string;
|
|
398
|
-
|
|
396
|
+
resultsCount?: components["schemas"]["resultsCount"];
|
|
399
397
|
/** @description overrides the default campaign */
|
|
400
398
|
campaign?: components["schemas"]["campaign-id"];
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
staticFilters?: components["schemas"]["request-static-filters"];
|
|
400
|
+
dynamicFilters?: components["schemas"]["request-dynamic-filters"];
|
|
403
401
|
};
|
|
404
402
|
"text-search-response": {
|
|
405
403
|
data?: {
|
|
@@ -439,15 +437,29 @@ export interface components {
|
|
|
439
437
|
full: components["schemas"]["interval"];
|
|
440
438
|
suggestions: components["schemas"]["interval-filter-value-item"][];
|
|
441
439
|
};
|
|
442
|
-
"request-filter-item": {
|
|
440
|
+
"request-dynamic-filter-item": {
|
|
443
441
|
/** @example product_type */
|
|
444
442
|
column: string;
|
|
445
443
|
values: components["schemas"]["category"] | components["schemas"]["string-list"] | components["schemas"]["interval-list"];
|
|
446
444
|
};
|
|
447
|
-
"response-filters": (components["schemas"]["response-categorical-filter-item"] | components["schemas"]["response-interval-filter-item"])[];
|
|
448
|
-
|
|
445
|
+
"response-dynamic-filters": (components["schemas"]["response-categorical-filter-item"] | components["schemas"]["response-interval-filter-item"])[];
|
|
446
|
+
/**
|
|
447
|
+
* @description The dynamic filters are parameters that refine the already narrowed down dataset from the `staticFilters`` based on real-time request criteria.
|
|
448
|
+
* These filters are flexible and can be adjusted dynamically to specific user queries or requirements, allowing for further granular filtering.
|
|
449
|
+
* They providing a more precise result based on the user’s immediate needs.
|
|
450
|
+
*/
|
|
451
|
+
"request-dynamic-filters": components["schemas"]["request-dynamic-filter-item"][];
|
|
452
|
+
/**
|
|
453
|
+
* @description The static filters are predefined parameters that set the initial scope for the data retrieval process.
|
|
454
|
+
* These filters are configured to extract a broad, meaningful set of results based on your criteria.
|
|
455
|
+
* Once applied, they help in reducing the dataset to a manageable and relevant subset before any further, more granular filtering occurs via `dynamicFilters`.
|
|
456
|
+
*/
|
|
457
|
+
"request-static-filters": {
|
|
458
|
+
color?: components["schemas"]["color"];
|
|
459
|
+
excluded?: components["schemas"]["excluded"];
|
|
460
|
+
};
|
|
449
461
|
interactions: {
|
|
450
|
-
|
|
462
|
+
dynamicFilters: components["schemas"]["response-dynamic-filters"];
|
|
451
463
|
};
|
|
452
464
|
"request-substitutions": {
|
|
453
465
|
category?: components["schemas"]["category"];
|
|
@@ -650,7 +662,7 @@ export interface operations {
|
|
|
650
662
|
"product-id": components["parameters"]["product-id"];
|
|
651
663
|
};
|
|
652
664
|
query: {
|
|
653
|
-
"similar-products-count"?: components["schemas"]["
|
|
665
|
+
"similar-products-count"?: components["schemas"]["resultsCount"];
|
|
654
666
|
campaigns?: components["parameters"]["campaigns"];
|
|
655
667
|
"image-code"?: components["parameters"]["image-code"];
|
|
656
668
|
color?: components["parameters"]["color"];
|
|
@@ -675,7 +687,7 @@ export interface operations {
|
|
|
675
687
|
"product-id": components["parameters"]["product-id"];
|
|
676
688
|
};
|
|
677
689
|
query: {
|
|
678
|
-
"cross-selling-products-count"?: components["schemas"]["
|
|
690
|
+
"cross-selling-products-count"?: components["schemas"]["resultsCount"];
|
|
679
691
|
campaigns?: components["parameters"]["campaigns"];
|
|
680
692
|
"image-code"?: components["parameters"]["image-code"];
|
|
681
693
|
color?: components["parameters"]["color"];
|