vviinn-widgets 2.215.3 → 2.216.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.
- package/dist/cjs/{index-D9aqF1Pk.js → index-DvleNAFh.js} +3 -1
- package/dist/cjs/{search.store-B_zxc87K.js → search.store-DlrP4N8h.js} +11 -1
- package/dist/cjs/vviinn-button_6.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +10 -6
- package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +5 -17
- package/dist/cjs/vviinn-text-search.cjs.entry.js +1 -1
- package/dist/collection/components/vviinn-carousel/constants.js +1 -0
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.css +3 -3
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +8 -4
- package/dist/collection/components/vviinn-shop-the-look/helpers.js +5 -8
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.css +0 -1
- package/dist/collection/store/search.store.js +9 -0
- package/dist/esm/{index-D8FY9QQF.js → index-BsmArtOR.js} +3 -2
- package/dist/esm/{search.store-D4TKj1zR.js → search.store-Crmiihat.js} +11 -2
- package/dist/esm/vviinn-button_6.entry.js +2 -2
- package/dist/esm/vviinn-camera_12.entry.js +2 -2
- package/dist/esm/vviinn-carousel_10.entry.js +10 -6
- package/dist/esm/vviinn-shop-the-look.entry.js +5 -17
- package/dist/esm/vviinn-text-search.entry.js +1 -1
- package/dist/types/components/vviinn-carousel/constants.d.ts +1 -0
- package/dist/types/components/vviinn-shop-the-look/helpers.d.ts +0 -1
- package/dist/types/store/search.store.d.ts +8 -0
- package/dist/vviinn-widgets/p-0cec8974.entry.js +1 -0
- package/dist/vviinn-widgets/p-36453390.entry.js +1 -0
- package/{www/build/p-bd24634a.entry.js → dist/vviinn-widgets/p-4ab3fa9a.entry.js} +1 -1
- package/dist/vviinn-widgets/p-COXJ3Urb.js +1 -0
- package/{www/build/p-CtgJk7gu.js → dist/vviinn-widgets/p-DYkVwvAf.js} +1 -1
- package/dist/vviinn-widgets/p-a897bab6.entry.js +1 -0
- package/dist/vviinn-widgets/{p-e9e037a4.entry.js → p-d08add0b.entry.js} +1 -1
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-0cec8974.entry.js +1 -0
- package/www/build/p-36453390.entry.js +1 -0
- package/{dist/vviinn-widgets/p-bd24634a.entry.js → www/build/p-4ab3fa9a.entry.js} +1 -1
- package/www/build/{p-9a1a9983.js → p-62f19d50.js} +1 -1
- package/www/build/p-COXJ3Urb.js +1 -0
- package/{dist/vviinn-widgets/p-CtgJk7gu.js → www/build/p-DYkVwvAf.js} +1 -1
- package/www/build/p-a897bab6.entry.js +1 -0
- package/www/build/{p-e9e037a4.entry.js → p-d08add0b.entry.js} +1 -1
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/vviinn-widgets/p-5ffbf3c6.entry.js +0 -1
- package/dist/vviinn-widgets/p-93a7156b.entry.js +0 -1
- package/dist/vviinn-widgets/p-CUj1CE_I.js +0 -1
- package/dist/vviinn-widgets/p-df2564fa.entry.js +0 -1
- package/www/build/p-5ffbf3c6.entry.js +0 -1
- package/www/build/p-93a7156b.entry.js +0 -1
- package/www/build/p-CUj1CE_I.js +0 -1
- package/www/build/p-df2564fa.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
5
5
|
var store = require('./store-jPZ4ROqV.js');
|
|
6
6
|
|
|
7
7
|
const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -17,6 +17,7 @@ const CAROUSEL_CONTENT_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
|
17
17
|
const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
18
18
|
const SET_MODE_IMAGE_WIDTH_CSS_VAR = "--vviinn-set-mode-image-width";
|
|
19
19
|
const RESULTS_CALCULATED_COLUMNS_CSS_VAR = "--vviinn-results-calculated-columns";
|
|
20
|
+
const CAROUSEL_COLUMNS_CSS_VAR = "--vviinn-carousel-columns";
|
|
20
21
|
const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
21
22
|
const DEFAULT_COLUMNS_NUMBER = 4;
|
|
22
23
|
const SCROLL_POSITION_TOLERANCE = 2;
|
|
@@ -369,6 +370,7 @@ const createImageSearchEvent = createTrackingEvent({
|
|
|
369
370
|
typ: SEARCH_EVENT_TYPE,
|
|
370
371
|
});
|
|
371
372
|
|
|
373
|
+
exports.CAROUSEL_COLUMNS_CSS_VAR = CAROUSEL_COLUMNS_CSS_VAR;
|
|
372
374
|
exports.CAROUSEL_CONTENT_WIDTH_CSS_VAR = CAROUSEL_CONTENT_WIDTH_CSS_VAR;
|
|
373
375
|
exports.CAROUSEL_IMAGE_WIDTH_CSS_VAR = CAROUSEL_IMAGE_WIDTH_CSS_VAR;
|
|
374
376
|
exports.CONTENT_GROUP_CSS_CLASS = CONTENT_GROUP_CSS_CLASS;
|
|
@@ -8593,7 +8593,7 @@ const encodeToBase64UTF8 = (str) => {
|
|
|
8593
8593
|
return btoa(String.fromCharCode.apply(null, utf8Array));
|
|
8594
8594
|
};
|
|
8595
8595
|
|
|
8596
|
-
const version = "2.
|
|
8596
|
+
const version = "2.216.1";
|
|
8597
8597
|
|
|
8598
8598
|
const appStateGlobalDefaults = {
|
|
8599
8599
|
excluded: null,
|
|
@@ -8727,6 +8727,15 @@ const uploadImageFile = (store, token, imageType = "image", searchId, apiPath, c
|
|
|
8727
8727
|
inner: error,
|
|
8728
8728
|
})), Rectangle.chain$1((body) => processVisualSearch(store, body, token, apiPath, isHiResUpdate)))));
|
|
8729
8729
|
};
|
|
8730
|
+
const makeVisualSearchByUrlRequest = async (store, imageUrl, token, apiPath, campaignId) => {
|
|
8731
|
+
const state = useStore(store);
|
|
8732
|
+
const body = Object.assign(Object.assign({ query: {
|
|
8733
|
+
url: imageUrl,
|
|
8734
|
+
}, objectDetection: {
|
|
8735
|
+
include: true,
|
|
8736
|
+
} }, addNestedIfNotEmpty("staticFilters", Object.assign({}, addIfNotEmpty("excluded", state.excluded)))), addIfNotEmpty("campaign", campaignId || state.campaignIdVisualSearch || state.campaignId));
|
|
8737
|
+
return processVisualSearch(store, body, token, apiPath)();
|
|
8738
|
+
};
|
|
8730
8739
|
const makeUploadFileRequest = (store, token, apiPath, campaignId) => async (file) => {
|
|
8731
8740
|
var _a;
|
|
8732
8741
|
const state = useStore(store);
|
|
@@ -8894,6 +8903,7 @@ exports.makeAutoSuggestRequest = makeAutoSuggestRequest;
|
|
|
8894
8903
|
exports.makeProductListingPageRequest = makeProductListingPageRequest;
|
|
8895
8904
|
exports.makeTextSearchRequest = makeTextSearchRequest;
|
|
8896
8905
|
exports.makeUploadFileRequest = makeUploadFileRequest;
|
|
8906
|
+
exports.makeVisualSearchByUrlRequest = makeVisualSearchByUrlRequest;
|
|
8897
8907
|
exports.makeVisualSearchRequest = makeVisualSearchRequest;
|
|
8898
8908
|
exports.parseStringToExcluded = parseStringToExcluded;
|
|
8899
8909
|
exports.resetStore = resetStore;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var store = require('./store-jPZ4ROqV.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
6
6
|
var index$1 = require('./index-CBteD3gC.js');
|
|
7
7
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
8
8
|
var index$2 = require('./index-CvMi8_tX.js');
|
|
@@ -223,7 +223,7 @@ const VviinnOverlay = class {
|
|
|
223
223
|
};
|
|
224
224
|
VviinnOverlay.style = vviinnOverlayCss;
|
|
225
225
|
|
|
226
|
-
const recommendationsSidebarCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{
|
|
226
|
+
const recommendationsSidebarCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:flex;box-sizing:border-box;position:fixed;z-index:9999;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:flex-end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}.sidebar-header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}.sidebar-header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) .sidebar-header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}.sidebar-content{padding:0 var(--spacing-300)}:host(.right) .sidebar-content{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.subtitle{font-size:var(--font-size-body);font-family:var(--font-family, var(--font-family-base));text-align:center}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";
|
|
227
227
|
|
|
228
228
|
const RecommendationsSidebar = class {
|
|
229
229
|
constructor(hostRef) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-DvleNAFh.js');
|
|
8
8
|
var store = require('./store-jPZ4ROqV.js');
|
|
9
9
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
10
10
|
var openProductLink = require('./openProductLink-BwHUGXtr.js');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
5
5
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
6
6
|
var store = require('./store-jPZ4ROqV.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-DvleNAFh.js');
|
|
8
8
|
var constants = require('./constants-BlwqMvns.js');
|
|
9
9
|
var index$2 = require('./index-CBteD3gC.js');
|
|
10
10
|
var index$3 = require('./index-CvMi8_tX.js');
|
|
@@ -131,7 +131,7 @@ function sequenceT(F) {
|
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
const vviinnCarouselCss = ":host{
|
|
134
|
+
const vviinnCarouselCss = ":host{}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.body.append-slider{min-height:calc(var(--product-card-calculated-height) + 24px)}.body.append-slider.empty-results{min-height:unset}.bullets{display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content{display:flex;flex-direction:row;gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;scrollbar-width:thin}:host(.continuity) .content,:host(.grid) .content{padding-bottom:16px}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}content. .content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}@supports (scrollbar-color: unset){.content.continuity,:host(.set){scrollbar-color:transparent transparent}.content.continuity:hover,:host(.set:hover){scrollbar-color:initial}}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0;transition:opacity 0.2s ease-in-out}.next:disabled,.prev:disabled{opacity:0.5;cursor:not-allowed}.next.grid-arrows-dynamic:disabled,.prev.grid-arrows-dynamic:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns, 4), 1fr);min-width:100%}.body.set{max-width:100%;justify-content:space-between;margin-left:auto;display:flex;flex-direction:row;gap:112px}.body.set::-webkit-scrollbar{display:none}@media (max-width: 768px){.body.set{gap:40px}}@media (max-width: 480px){.items-group{grid-template-columns:repeat(2, 1fr)}}.content.set{grid-gap:20px;height:-moz-fit-content;height:fit-content;max-width:-moz-fit-content;max-width:fit-content;overflow:unset}";
|
|
135
135
|
|
|
136
136
|
const VviinnCarousel = class {
|
|
137
137
|
constructor(hostRef) {
|
|
@@ -425,7 +425,11 @@ const VviinnCarousel = class {
|
|
|
425
425
|
const styleSheet = getComputedStyle(this.el);
|
|
426
426
|
const calculatedColumnsAmount = parseInt(styleSheet.getPropertyValue(index$1.RESULTS_CALCULATED_COLUMNS_CSS_VAR));
|
|
427
427
|
if (!calculatedColumnsAmount || isNaN(calculatedColumnsAmount)) {
|
|
428
|
-
|
|
428
|
+
const cssColumnsAmount = parseInt(styleSheet.getPropertyValue(index$1.CAROUSEL_COLUMNS_CSS_VAR));
|
|
429
|
+
this.columns =
|
|
430
|
+
cssColumnsAmount >= 1
|
|
431
|
+
? cssColumnsAmount
|
|
432
|
+
: index$1.DEFAULT_COLUMNS_NUMBER;
|
|
429
433
|
}
|
|
430
434
|
else {
|
|
431
435
|
this.columns = calculatedColumnsAmount;
|
|
@@ -558,10 +562,10 @@ const VviinnCarousel = class {
|
|
|
558
562
|
}
|
|
559
563
|
render() {
|
|
560
564
|
var _a, _b, _c, _d, _e;
|
|
561
|
-
return (index.h(index.Host, { key: '
|
|
565
|
+
return (index.h(index.Host, { key: 'c5f34b585ae2cf1307d3011db185fcb038a807b6', class: this.getClassMap() }, index.h("div", { key: '098746eefad49ac0cf2bdac38e74fdc53d3b2313', class: Object.assign(Object.assign({}, this.getClassMap()), this.getBodyClassMap()) }, this.isSetMode && this.crossSellingRecommendations.length > 0 && (index.h("vviinn-product-card", { key: '3fe540bbe42a9fd21c5fb1a79d8f8949c9ef08a7', class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: (_b = (_a = this.sourceProduct.image) === null || _a === void 0 ? void 0 : _a.thumbnail) !== null && _b !== void 0 ? _b : (_c = this.sourceProduct.image) === null || _c === void 0 ? void 0 : _c.original, images: this.sourceProduct.images, showMultipleImages: this.showMultipleImages, disableMobileSwiper: true, entityType: this.sourceProduct.entityType, price: this.sourceProduct.price.actual, salePrice: this.sourceProduct.price.sale, basePrice: (_d = this.sourceProduct.basePrice) === null || _d === void 0 ? void 0 : _d.actual, baseSalePrice: (_e = this.sourceProduct.basePrice) === null || _e === void 0 ? void 0 : _e.sale, addPriceContainer: this.addPriceContainer, imageWidth: 300, imageResolutionWidth: this.imageResolutionWidth, isSourceProduct: true, currencySign: this.currencySign, pricePrefix: this.pricePrefix, isSetMode: this.isSetMode, locale: this.locale, numberLocale: this.numberLocale, favoriteShow: this.favoriteShow, customLabels: index$1.getCustomLabels(this.sourceProduct), responsive: true })), index.h("div", { key: 'f22aa5a751ee14cdd305193280ec61bbb8fffc8b', class: this.getContentClassMap() }, this.renderRecommendations(), this.showArrowButtons() && (index.h(index.Fragment, { key: 'e6a14ce9e7c409cac09d16a0d35b65e70cfff007' }, index.h("button", { key: '8fb9606e5ba9aecf18252422243f9c4072397a9f', class: {
|
|
562
566
|
prev: true,
|
|
563
567
|
"grid-arrows-dynamic": this.gridArrowsDynamic && this.isGridMode,
|
|
564
|
-
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": store.instance.t("buttons.previous") }, index.h(ChevronIcon, { key: '
|
|
568
|
+
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": store.instance.t("buttons.previous") }, index.h(ChevronIcon, { key: '70aeaed3d65ebb2344f964f8bfba34f67de1c97a' })), index.h("button", { key: 'edd35c95f6404725cdfe9548f24fc555efe5b21d', class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button carousel-button-next", disabled: this.isLast(), "aria-label": store.instance.t("buttons.next") }, index.h(ChevronIcon, { key: 'e5af48de0f6c1f95dfaaf577ca930a233f8eb488' })))))), this.showBullets() && (index.h("div", { key: 'b0957a0f30c6a43c71198780d650413c4c28c1d3', class: "bullets" }, this.renderBullets()))));
|
|
565
569
|
}
|
|
566
570
|
get el() { return index.getElement(this); }
|
|
567
571
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ var index = require('./index-D38ORu31.js');
|
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
5
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
6
6
|
var swiperElement = require('./swiper-element-DjtzojCR.js');
|
|
7
|
-
var search_store = require('./search.store-
|
|
7
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
8
8
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
9
9
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
10
10
|
var store = require('./store-jPZ4ROqV.js');
|
|
@@ -148,17 +148,6 @@ const calculateImageBounds = (imageElement) => {
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
/**
|
|
152
|
-
* Create a File object from an image URL for upload
|
|
153
|
-
*/
|
|
154
|
-
const createImageFile = async (imageUrl) => {
|
|
155
|
-
const imageResponse = await fetch(imageUrl);
|
|
156
|
-
const imageBlob = await imageResponse.blob();
|
|
157
|
-
return new File([imageBlob], "image.jpg", {
|
|
158
|
-
type: "image/jpeg",
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
|
|
162
151
|
const isDesktop = search_store.isDesktop;
|
|
163
152
|
const getVisibilityThreshold = (isDesktop) => {
|
|
164
153
|
return isDesktop
|
|
@@ -230,15 +219,14 @@ const calculateModalPosition = (imageElement, detectedObject, containerElement,
|
|
|
230
219
|
};
|
|
231
220
|
const performVisualSearch = async (params) => {
|
|
232
221
|
try {
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
return Rectangle.EitherExports.fold((error) => Rectangle.EitherExports.left(`Upload failed: ${error.inner}`), (uploadResponse) => {
|
|
222
|
+
const result = await search_store.makeVisualSearchByUrlRequest("shopTheLook", params.imageUrl, params.token, params.apiPath, params.campaignId);
|
|
223
|
+
return Rectangle.EitherExports.fold((error) => Rectangle.EitherExports.left(`Visual search failed: ${error.inner}`), (response) => {
|
|
236
224
|
var _a, _b;
|
|
237
|
-
const detectedObjects = ((_b = (_a =
|
|
225
|
+
const detectedObjects = ((_b = (_a = response.interactions) === null || _a === void 0 ? void 0 : _a.suggestedSearchAreas) === null || _b === void 0 ? void 0 : _b.map((area) => area.rectangle)) || [];
|
|
238
226
|
return Rectangle.EitherExports.right({
|
|
239
227
|
detectedObjects,
|
|
240
228
|
searchResults: [],
|
|
241
|
-
visualSearchId:
|
|
229
|
+
visualSearchId: response.requestId || null,
|
|
242
230
|
});
|
|
243
231
|
})(result);
|
|
244
232
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DlrP4N8h.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
7
|
var store = require('./store-jPZ4ROqV.js');
|
|
8
8
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
@@ -2,6 +2,7 @@ export const CAROUSEL_CONTENT_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
|
2
2
|
export const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
3
3
|
export const SET_MODE_IMAGE_WIDTH_CSS_VAR = "--vviinn-set-mode-image-width";
|
|
4
4
|
export const RESULTS_CALCULATED_COLUMNS_CSS_VAR = "--vviinn-results-calculated-columns";
|
|
5
|
+
export const CAROUSEL_COLUMNS_CSS_VAR = "--vviinn-carousel-columns";
|
|
5
6
|
export const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
6
7
|
export const DEFAULT_COLUMNS_NUMBER = 4;
|
|
7
8
|
export const SCROLL_POSITION_TOLERANCE = 2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
/**
|
|
3
|
-
|
|
3
|
+
* @prop --vviinn-carousel-columns: A number of items in grid mode.
|
|
4
|
+
* @prop --product-card-calculated-height: Calculated height of Product Card.
|
|
4
5
|
*/
|
|
5
|
-
--vviinn-carousel-columns-internal: var(--vviinn-carousel-columns, 4);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.body {
|
|
@@ -140,7 +140,7 @@ content. .content:not(.show-scrollbar)::-webkit-scrollbar,
|
|
|
140
140
|
.items-group {
|
|
141
141
|
display: grid;
|
|
142
142
|
grid-gap: 16px;
|
|
143
|
-
grid-template-columns: repeat(var(--vviinn-carousel-columns
|
|
143
|
+
grid-template-columns: repeat(var(--vviinn-carousel-columns, 4), 1fr);
|
|
144
144
|
min-width: 100%;
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -4,7 +4,7 @@ import { pipe } from "fp-ts/lib/function";
|
|
|
4
4
|
import i18next from "i18next";
|
|
5
5
|
import { ChevronIcon } from "../vviinn-icons";
|
|
6
6
|
import { campaignTypeNames } from "../../campaign/Campaign";
|
|
7
|
-
import { CAROUSEL_IMAGE_WIDTH_CSS_VAR, CAROUSEL_CONTENT_WIDTH_CSS_VAR, CONTENT_GROUP_CSS_CLASS, DEFAULT_COLUMNS_NUMBER, RESULTS_CALCULATED_COLUMNS_CSS_VAR, SET_MODE_IMAGE_WIDTH_CSS_VAR, SCROLL_POSITION_TOLERANCE, } from "./constants";
|
|
7
|
+
import { CAROUSEL_COLUMNS_CSS_VAR, CAROUSEL_IMAGE_WIDTH_CSS_VAR, CAROUSEL_CONTENT_WIDTH_CSS_VAR, CONTENT_GROUP_CSS_CLASS, DEFAULT_COLUMNS_NUMBER, RESULTS_CALCULATED_COLUMNS_CSS_VAR, SET_MODE_IMAGE_WIDTH_CSS_VAR, SCROLL_POSITION_TOLERANCE, } from "./constants";
|
|
8
8
|
import { calculateDiscount } from "../../utils/number";
|
|
9
9
|
import { getCustomLabels } from "../../recommendation";
|
|
10
10
|
import { addIfNotEmpty } from "../../utils/collections/collectionsUtils";
|
|
@@ -303,7 +303,11 @@ export class VviinnCarousel {
|
|
|
303
303
|
const styleSheet = getComputedStyle(this.el);
|
|
304
304
|
const calculatedColumnsAmount = parseInt(styleSheet.getPropertyValue(RESULTS_CALCULATED_COLUMNS_CSS_VAR));
|
|
305
305
|
if (!calculatedColumnsAmount || isNaN(calculatedColumnsAmount)) {
|
|
306
|
-
|
|
306
|
+
const cssColumnsAmount = parseInt(styleSheet.getPropertyValue(CAROUSEL_COLUMNS_CSS_VAR));
|
|
307
|
+
this.columns =
|
|
308
|
+
cssColumnsAmount >= 1
|
|
309
|
+
? cssColumnsAmount
|
|
310
|
+
: DEFAULT_COLUMNS_NUMBER;
|
|
307
311
|
}
|
|
308
312
|
else {
|
|
309
313
|
this.columns = calculatedColumnsAmount;
|
|
@@ -436,10 +440,10 @@ export class VviinnCarousel {
|
|
|
436
440
|
}
|
|
437
441
|
render() {
|
|
438
442
|
var _a, _b, _c, _d, _e;
|
|
439
|
-
return (h(Host, { key: '
|
|
443
|
+
return (h(Host, { key: 'c5f34b585ae2cf1307d3011db185fcb038a807b6', class: this.getClassMap() }, h("div", { key: '098746eefad49ac0cf2bdac38e74fdc53d3b2313', class: Object.assign(Object.assign({}, this.getClassMap()), this.getBodyClassMap()) }, this.isSetMode && this.crossSellingRecommendations.length > 0 && (h("vviinn-product-card", { key: '3fe540bbe42a9fd21c5fb1a79d8f8949c9ef08a7', class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: (_b = (_a = this.sourceProduct.image) === null || _a === void 0 ? void 0 : _a.thumbnail) !== null && _b !== void 0 ? _b : (_c = this.sourceProduct.image) === null || _c === void 0 ? void 0 : _c.original, images: this.sourceProduct.images, showMultipleImages: this.showMultipleImages, disableMobileSwiper: true, entityType: this.sourceProduct.entityType, price: this.sourceProduct.price.actual, salePrice: this.sourceProduct.price.sale, basePrice: (_d = this.sourceProduct.basePrice) === null || _d === void 0 ? void 0 : _d.actual, baseSalePrice: (_e = this.sourceProduct.basePrice) === null || _e === void 0 ? void 0 : _e.sale, addPriceContainer: this.addPriceContainer, imageWidth: 300, imageResolutionWidth: this.imageResolutionWidth, isSourceProduct: true, currencySign: this.currencySign, pricePrefix: this.pricePrefix, isSetMode: this.isSetMode, locale: this.locale, numberLocale: this.numberLocale, favoriteShow: this.favoriteShow, customLabels: getCustomLabels(this.sourceProduct), responsive: true })), h("div", { key: 'f22aa5a751ee14cdd305193280ec61bbb8fffc8b', class: this.getContentClassMap() }, this.renderRecommendations(), this.showArrowButtons() && (h(Fragment, { key: 'e6a14ce9e7c409cac09d16a0d35b65e70cfff007' }, h("button", { key: '8fb9606e5ba9aecf18252422243f9c4072397a9f', class: {
|
|
440
444
|
prev: true,
|
|
441
445
|
"grid-arrows-dynamic": this.gridArrowsDynamic && this.isGridMode,
|
|
442
|
-
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": i18next.t("buttons.previous") }, h(ChevronIcon, { key: '
|
|
446
|
+
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": i18next.t("buttons.previous") }, h(ChevronIcon, { key: '70aeaed3d65ebb2344f964f8bfba34f67de1c97a' })), h("button", { key: 'edd35c95f6404725cdfe9548f24fc555efe5b21d', class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button carousel-button-next", disabled: this.isLast(), "aria-label": i18next.t("buttons.next") }, h(ChevronIcon, { key: 'e5af48de0f6c1f95dfaaf577ca930a233f8eb488' })))))), this.showBullets() && (h("div", { key: 'b0957a0f30c6a43c71198780d650413c4c28c1d3', class: "bullets" }, this.renderBullets()))));
|
|
443
447
|
}
|
|
444
448
|
static get is() { return "vviinn-carousel"; }
|
|
445
449
|
static get originalStyleUrls() {
|
|
@@ -2,8 +2,7 @@ import * as E from "fp-ts/lib/Either";
|
|
|
2
2
|
import { INTERSECTION_THRESHOLDS } from "./constants";
|
|
3
3
|
import { isDesktop as sharedIsDesktop, isSmallMobile as sharedIsSmallMobile, } from "../../helpers/device/checkDeviceType";
|
|
4
4
|
import { calculateImageBounds } from "../../Image/bounds";
|
|
5
|
-
import {
|
|
6
|
-
import { makeUploadFileRequest, makeVisualSearchRequest, shopTheLookState, } from "../../store/search.store";
|
|
5
|
+
import { makeUploadFileRequest, makeVisualSearchByUrlRequest, makeVisualSearchRequest, shopTheLookState, } from "../../store/search.store";
|
|
7
6
|
import { imageFromFileTask } from "../../Image/fromFile";
|
|
8
7
|
export const isDesktop = sharedIsDesktop;
|
|
9
8
|
export const isSmallMobile = sharedIsSmallMobile;
|
|
@@ -83,7 +82,6 @@ export const calculateModalPosition = (imageElement, detectedObject, containerEl
|
|
|
83
82
|
return { x: screenX, y: screenY, anchor };
|
|
84
83
|
};
|
|
85
84
|
export { calculateImageBounds } from "../../Image/bounds";
|
|
86
|
-
export { createImageFile } from "../../Image/upload";
|
|
87
85
|
export { setupIntersectionObserver, } from "../../dom";
|
|
88
86
|
export const resetSearchState = () => ({
|
|
89
87
|
detectedObjects: [],
|
|
@@ -95,15 +93,14 @@ export const resetSearchState = () => ({
|
|
|
95
93
|
});
|
|
96
94
|
export const performVisualSearch = async (params) => {
|
|
97
95
|
try {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
return E.fold((error) => E.left(`Upload failed: ${error.inner}`), (uploadResponse) => {
|
|
96
|
+
const result = await makeVisualSearchByUrlRequest("shopTheLook", params.imageUrl, params.token, params.apiPath, params.campaignId);
|
|
97
|
+
return E.fold((error) => E.left(`Visual search failed: ${error.inner}`), (response) => {
|
|
101
98
|
var _a, _b;
|
|
102
|
-
const detectedObjects = ((_b = (_a =
|
|
99
|
+
const detectedObjects = ((_b = (_a = response.interactions) === null || _a === void 0 ? void 0 : _a.suggestedSearchAreas) === null || _b === void 0 ? void 0 : _b.map((area) => area.rectangle)) || [];
|
|
103
100
|
return E.right({
|
|
104
101
|
detectedObjects,
|
|
105
102
|
searchResults: [],
|
|
106
|
-
visualSearchId:
|
|
103
|
+
visualSearchId: response.requestId || null,
|
|
107
104
|
});
|
|
108
105
|
})(result);
|
|
109
106
|
}
|
|
@@ -147,6 +147,15 @@ const uploadImageFile = (store, token, imageType = "image", searchId, apiPath, c
|
|
|
147
147
|
inner: error,
|
|
148
148
|
})), TE.chain((body) => processVisualSearch(store, body, token, apiPath, isHiResUpdate)))));
|
|
149
149
|
};
|
|
150
|
+
export const makeVisualSearchByUrlRequest = async (store, imageUrl, token, apiPath, campaignId) => {
|
|
151
|
+
const state = useStore(store);
|
|
152
|
+
const body = Object.assign(Object.assign({ query: {
|
|
153
|
+
url: imageUrl,
|
|
154
|
+
}, objectDetection: {
|
|
155
|
+
include: true,
|
|
156
|
+
} }, addNestedIfNotEmpty("staticFilters", Object.assign({}, addIfNotEmpty("excluded", state.excluded)))), addIfNotEmpty("campaign", campaignId || state.campaignIdVisualSearch || state.campaignId));
|
|
157
|
+
return processVisualSearch(store, body, token, apiPath)();
|
|
158
|
+
};
|
|
150
159
|
export const makeUploadFileRequest = (store, token, apiPath, campaignId) => async (file) => {
|
|
151
160
|
var _a;
|
|
152
161
|
const state = useStore(store);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-RkvPN2Rk.js';
|
|
2
|
-
import {
|
|
2
|
+
import { j as addIfNotEmpty, p as parseStringToExcluded, o as isValueMatch, q as isIntervalMatch, r as valueToString, t as extractFilterValue } from './search.store-Crmiihat.js';
|
|
3
3
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
4
4
|
|
|
5
5
|
const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -15,6 +15,7 @@ const CAROUSEL_CONTENT_WIDTH_CSS_VAR = "--vviinn-carousel-content-width";
|
|
|
15
15
|
const CAROUSEL_IMAGE_WIDTH_CSS_VAR = "--vviinn-carousel-image-width";
|
|
16
16
|
const SET_MODE_IMAGE_WIDTH_CSS_VAR = "--vviinn-set-mode-image-width";
|
|
17
17
|
const RESULTS_CALCULATED_COLUMNS_CSS_VAR = "--vviinn-results-calculated-columns";
|
|
18
|
+
const CAROUSEL_COLUMNS_CSS_VAR = "--vviinn-carousel-columns";
|
|
18
19
|
const CONTENT_GROUP_CSS_CLASS = "items-group";
|
|
19
20
|
const DEFAULT_COLUMNS_NUMBER = 4;
|
|
20
21
|
const SCROLL_POSITION_TOLERANCE = 2;
|
|
@@ -367,4 +368,4 @@ const createImageSearchEvent = createTrackingEvent({
|
|
|
367
368
|
typ: SEARCH_EVENT_TYPE,
|
|
368
369
|
});
|
|
369
370
|
|
|
370
|
-
export { CONTENT_GROUP_CSS_CLASS as C, DEFAULT_COLUMNS_NUMBER as D, FilterIconClose as F, PlusIcon as P, RESULTS_CALCULATED_COLUMNS_CSS_VAR as R, SET_MODE_IMAGE_WIDTH_CSS_VAR as S, createFilterEvent as a, createAddToBasketEvent as b, createWidgetEvent as c, createAddToWishlistEvent as d, createResultEventByType as e, createProductEventByType as f, getRemoveFilterAriaLabel as g, getCustomLabels as h, getIntervalLabel as i, triggerRemoveIntervalFilter as j, announceToScreenReader as k, isSubFilterActive as l, RenderFilterButton as m, createImageSearchEvent as n, CAROUSEL_IMAGE_WIDTH_CSS_VAR as o, CAROUSEL_CONTENT_WIDTH_CSS_VAR as p,
|
|
371
|
+
export { CONTENT_GROUP_CSS_CLASS as C, DEFAULT_COLUMNS_NUMBER as D, FilterIconClose as F, PlusIcon as P, RESULTS_CALCULATED_COLUMNS_CSS_VAR as R, SET_MODE_IMAGE_WIDTH_CSS_VAR as S, createFilterEvent as a, createAddToBasketEvent as b, createWidgetEvent as c, createAddToWishlistEvent as d, createResultEventByType as e, createProductEventByType as f, getRemoveFilterAriaLabel as g, getCustomLabels as h, getIntervalLabel as i, triggerRemoveIntervalFilter as j, announceToScreenReader as k, isSubFilterActive as l, RenderFilterButton as m, createImageSearchEvent as n, CAROUSEL_IMAGE_WIDTH_CSS_VAR as o, CAROUSEL_CONTENT_WIDTH_CSS_VAR as p, CAROUSEL_COLUMNS_CSS_VAR as q, SCROLL_POSITION_TOLERANCE as r, syncRequestFilters as s, triggerFilter as t, triggerResetFilters as u, v4 as v, isPriceFilter as w, CUSTOM_LABELS_DELIMITER as x, getRecommendationsBody as y };
|
|
@@ -8591,7 +8591,7 @@ const encodeToBase64UTF8 = (str) => {
|
|
|
8591
8591
|
return btoa(String.fromCharCode.apply(null, utf8Array));
|
|
8592
8592
|
};
|
|
8593
8593
|
|
|
8594
|
-
const version = "2.
|
|
8594
|
+
const version = "2.216.1";
|
|
8595
8595
|
|
|
8596
8596
|
const appStateGlobalDefaults = {
|
|
8597
8597
|
excluded: null,
|
|
@@ -8725,6 +8725,15 @@ const uploadImageFile = (store, token, imageType = "image", searchId, apiPath, c
|
|
|
8725
8725
|
inner: error,
|
|
8726
8726
|
})), chain$1((body) => processVisualSearch(store, body, token, apiPath, isHiResUpdate)))));
|
|
8727
8727
|
};
|
|
8728
|
+
const makeVisualSearchByUrlRequest = async (store, imageUrl, token, apiPath, campaignId) => {
|
|
8729
|
+
const state = useStore(store);
|
|
8730
|
+
const body = Object.assign(Object.assign({ query: {
|
|
8731
|
+
url: imageUrl,
|
|
8732
|
+
}, objectDetection: {
|
|
8733
|
+
include: true,
|
|
8734
|
+
} }, addNestedIfNotEmpty("staticFilters", Object.assign({}, addIfNotEmpty("excluded", state.excluded)))), addIfNotEmpty("campaign", campaignId || state.campaignIdVisualSearch || state.campaignId));
|
|
8735
|
+
return processVisualSearch(store, body, token, apiPath)();
|
|
8736
|
+
};
|
|
8728
8737
|
const makeUploadFileRequest = (store, token, apiPath, campaignId) => async (file) => {
|
|
8729
8738
|
var _a;
|
|
8730
8739
|
const state = useStore(store);
|
|
@@ -8871,4 +8880,4 @@ const clearAutoSuggestCompletions = (store) => {
|
|
|
8871
8880
|
state.autoSuggestCompletions = [];
|
|
8872
8881
|
};
|
|
8873
8882
|
|
|
8874
|
-
export {
|
|
8883
|
+
export { makeProductListingPageRequest as A, checkDeviceType as B, isMobile as C, fromString as D, fold as E, _ArrayExports as _, makeVisualSearchByUrlRequest as a, imageFromFileTask as b, makeUploadFileRequest as c, setTextSearchQuery as d, clearAutoSuggestCompletions as e, makeAutoSuggestRequest as f, getAcceptableFileFormats as g, campaignTypeNames as h, isDesktop as i, addIfNotEmpty as j, makeTextSearchRequest as k, getAcceptableFileFormatsForDisplay as l, makeVisualSearchRequest as m, searchState as n, isValueMatch as o, parseStringToExcluded as p, isIntervalMatch as q, valueToString as r, shopTheLookState as s, extractFilterValue as t, useSearchStore as u, version as v, toFile as w, getImageSizes as x, checkImageType as y, resetStore as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, H as Host, c as createEvent, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
3
|
-
import {
|
|
3
|
+
import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-Crmiihat.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-OsoUj2Au.js';
|
|
5
5
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
|
|
6
6
|
import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BtnjaTty.js';
|
|
@@ -221,7 +221,7 @@ const VviinnOverlay = class {
|
|
|
221
221
|
};
|
|
222
222
|
VviinnOverlay.style = vviinnOverlayCss;
|
|
223
223
|
|
|
224
|
-
const recommendationsSidebarCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{
|
|
224
|
+
const recommendationsSidebarCss = ":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:flex;box-sizing:border-box;position:fixed;z-index:9999;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:flex-end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}.sidebar-header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}.sidebar-header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) .sidebar-header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}.sidebar-content{padding:0 var(--spacing-300)}:host(.right) .sidebar-content{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.subtitle{font-size:var(--font-size-body);font-family:var(--font-family, var(--font-family-base));text-align:center}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";
|
|
225
225
|
|
|
226
226
|
const RecommendationsSidebar = class {
|
|
227
227
|
constructor(hostRef) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { _ as _functionExports, E as EitherExports, f as fold, b as fromImage, a as divideOnSized, e as isLeft, m as match, O as OptionExports } from './Rectangle-dmgo4KMB.js';
|
|
3
|
-
import {
|
|
3
|
+
import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-Crmiihat.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal, p as productCardSlotNames, v as vprIconSlotName, f as findSlotElements, g as getSlotNames, b as setElementInteractivity, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
5
|
-
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as getIntervalLabel, j as triggerRemoveIntervalFilter, k as announceToScreenReader, s as syncRequestFilters, l as isSubFilterActive, m as RenderFilterButton, n as createImageSearchEvent } from './index-
|
|
5
|
+
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as getIntervalLabel, j as triggerRemoveIntervalFilter, k as announceToScreenReader, s as syncRequestFilters, l as isSubFilterActive, m as RenderFilterButton, n as createImageSearchEvent } from './index-BsmArtOR.js';
|
|
6
6
|
import { i as instance, t as trackEvent, a as isTrackingEnabled, d as defaultConfig } from './store-BJxQCbNV.js';
|
|
7
7
|
import { M as MIN_SEARCH_AREA_SIZE, S as SUPPORTED_ASPECT_RATIO, a as MIN_IMAGE_SIDE_FOR_CROPPER, C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal, D as DEFAULT_IMAGE_SIZE } from './cropperUtils-CkB6bG3L.js';
|
|
8
8
|
import { r as renderExternalCSS, o as openProductLink } from './openProductLink-CJ9Wo3Ye.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, F as Fragment, H as Host, g as getElement } from './index-RkvPN2Rk.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-Crmiihat.js';
|
|
3
3
|
import { X as has, Y as tuple, _ as _functionExports, g as requireSemigroup, O as OptionExports, v as pipe$1, N as chainW, Z as makeRequest, L as fromEither, $ as resolveApiPath, a0 as createInitPostRequest, a1 as Apply, a2 as TaskEitherExports, E as EitherExports } from './Rectangle-dmgo4KMB.js';
|
|
4
4
|
import { i as instance, d as defaultConfig, t as trackEvent, a as isTrackingEnabled } from './store-BJxQCbNV.js';
|
|
5
|
-
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels,
|
|
5
|
+
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, k as announceToScreenReader, i as getIntervalLabel, w as isPriceFilter, l as isSubFilterActive, m as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-BsmArtOR.js';
|
|
6
6
|
import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, c as PRODUCT_CARD_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
|
|
7
7
|
import { s as slotChangeListener, a as addEventListenersWithSignal, i as isElementInSelector, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
8
8
|
import { o as energyLabelParts, i as initializeLocale, j as extendedFiltersParts, h as filtersParts, q as imageParts, e as contentCardParts, l as listCardParts, p as productCardParts, t as priceRangeParts } from './index-BtnjaTty.js';
|
|
@@ -129,7 +129,7 @@ function sequenceT(F) {
|
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
const vviinnCarouselCss = ":host{
|
|
132
|
+
const vviinnCarouselCss = ":host{}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.body.append-slider{min-height:calc(var(--product-card-calculated-height) + 24px)}.body.append-slider.empty-results{min-height:unset}.bullets{display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content{display:flex;flex-direction:row;gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;scrollbar-width:thin}:host(.continuity) .content,:host(.grid) .content{padding-bottom:16px}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}content. .content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}@supports (scrollbar-color: unset){.content.continuity,:host(.set){scrollbar-color:transparent transparent}.content.continuity:hover,:host(.set:hover){scrollbar-color:initial}}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0;transition:opacity 0.2s ease-in-out}.next:disabled,.prev:disabled{opacity:0.5;cursor:not-allowed}.next.grid-arrows-dynamic:disabled,.prev.grid-arrows-dynamic:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns, 4), 1fr);min-width:100%}.body.set{max-width:100%;justify-content:space-between;margin-left:auto;display:flex;flex-direction:row;gap:112px}.body.set::-webkit-scrollbar{display:none}@media (max-width: 768px){.body.set{gap:40px}}@media (max-width: 480px){.items-group{grid-template-columns:repeat(2, 1fr)}}.content.set{grid-gap:20px;height:-moz-fit-content;height:fit-content;max-width:-moz-fit-content;max-width:fit-content;overflow:unset}";
|
|
133
133
|
|
|
134
134
|
const VviinnCarousel = class {
|
|
135
135
|
constructor(hostRef) {
|
|
@@ -423,7 +423,11 @@ const VviinnCarousel = class {
|
|
|
423
423
|
const styleSheet = getComputedStyle(this.el);
|
|
424
424
|
const calculatedColumnsAmount = parseInt(styleSheet.getPropertyValue(RESULTS_CALCULATED_COLUMNS_CSS_VAR));
|
|
425
425
|
if (!calculatedColumnsAmount || isNaN(calculatedColumnsAmount)) {
|
|
426
|
-
|
|
426
|
+
const cssColumnsAmount = parseInt(styleSheet.getPropertyValue(CAROUSEL_COLUMNS_CSS_VAR));
|
|
427
|
+
this.columns =
|
|
428
|
+
cssColumnsAmount >= 1
|
|
429
|
+
? cssColumnsAmount
|
|
430
|
+
: DEFAULT_COLUMNS_NUMBER;
|
|
427
431
|
}
|
|
428
432
|
else {
|
|
429
433
|
this.columns = calculatedColumnsAmount;
|
|
@@ -556,10 +560,10 @@ const VviinnCarousel = class {
|
|
|
556
560
|
}
|
|
557
561
|
render() {
|
|
558
562
|
var _a, _b, _c, _d, _e;
|
|
559
|
-
return (h(Host, { key: '
|
|
563
|
+
return (h(Host, { key: 'c5f34b585ae2cf1307d3011db185fcb038a807b6', class: this.getClassMap() }, h("div", { key: '098746eefad49ac0cf2bdac38e74fdc53d3b2313', class: Object.assign(Object.assign({}, this.getClassMap()), this.getBodyClassMap()) }, this.isSetMode && this.crossSellingRecommendations.length > 0 && (h("vviinn-product-card", { key: '3fe540bbe42a9fd21c5fb1a79d8f8949c9ef08a7', class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: (_b = (_a = this.sourceProduct.image) === null || _a === void 0 ? void 0 : _a.thumbnail) !== null && _b !== void 0 ? _b : (_c = this.sourceProduct.image) === null || _c === void 0 ? void 0 : _c.original, images: this.sourceProduct.images, showMultipleImages: this.showMultipleImages, disableMobileSwiper: true, entityType: this.sourceProduct.entityType, price: this.sourceProduct.price.actual, salePrice: this.sourceProduct.price.sale, basePrice: (_d = this.sourceProduct.basePrice) === null || _d === void 0 ? void 0 : _d.actual, baseSalePrice: (_e = this.sourceProduct.basePrice) === null || _e === void 0 ? void 0 : _e.sale, addPriceContainer: this.addPriceContainer, imageWidth: 300, imageResolutionWidth: this.imageResolutionWidth, isSourceProduct: true, currencySign: this.currencySign, pricePrefix: this.pricePrefix, isSetMode: this.isSetMode, locale: this.locale, numberLocale: this.numberLocale, favoriteShow: this.favoriteShow, customLabels: getCustomLabels(this.sourceProduct), responsive: true })), h("div", { key: 'f22aa5a751ee14cdd305193280ec61bbb8fffc8b', class: this.getContentClassMap() }, this.renderRecommendations(), this.showArrowButtons() && (h(Fragment, { key: 'e6a14ce9e7c409cac09d16a0d35b65e70cfff007' }, h("button", { key: '8fb9606e5ba9aecf18252422243f9c4072397a9f', class: {
|
|
560
564
|
prev: true,
|
|
561
565
|
"grid-arrows-dynamic": this.gridArrowsDynamic && this.isGridMode,
|
|
562
|
-
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": instance.t("buttons.previous") }, h(ChevronIcon, { key: '
|
|
566
|
+
}, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": instance.t("buttons.previous") }, h(ChevronIcon, { key: '70aeaed3d65ebb2344f964f8bfba34f67de1c97a' })), h("button", { key: 'edd35c95f6404725cdfe9548f24fc555efe5b21d', class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button carousel-button-next", disabled: this.isLast(), "aria-label": instance.t("buttons.next") }, h(ChevronIcon, { key: 'e5af48de0f6c1f95dfaaf577ca930a233f8eb488' })))))), this.showBullets() && (h("div", { key: 'b0957a0f30c6a43c71198780d650413c4c28c1d3', class: "bullets" }, this.renderBullets()))));
|
|
563
567
|
}
|
|
564
568
|
get el() { return getElement(this); }
|
|
565
569
|
static get watchers() { return {
|