vviinn-widgets 2.16.1 → 2.16.3

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.
Files changed (58) hide show
  1. package/dist/cjs/cropper-handler_27.cjs.entry.js +4 -4
  2. package/dist/cjs/{customized-slots-84e1c444.js → customized-slots-6b38279f.js} +1 -1
  3. package/dist/cjs/{index-1077e27c.js → index-0bda22ec.js} +2 -0
  4. package/dist/cjs/{index-b2b8f092.js → index-5ce4918b.js} +1 -1
  5. package/dist/cjs/{index-4ea3a37f.js → index-8e47383c.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/vviinn-button.cjs.entry.js +2 -2
  8. package/dist/cjs/vviinn-carousel_2.cjs.entry.js +9 -6
  9. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  10. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  11. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  12. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  13. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +5 -2
  14. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +3 -3
  15. package/dist/esm/cropper-handler_27.entry.js +4 -4
  16. package/dist/esm/{customized-slots-01387ced.js → customized-slots-aa123817.js} +1 -1
  17. package/dist/esm/{index-65670ecf.js → index-769ffb3c.js} +2 -1
  18. package/dist/esm/{index-492f97b7.js → index-8de7d584.js} +1 -1
  19. package/dist/esm/{index-84a46578.js → index-dfe874ac.js} +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/vviinn-button.entry.js +2 -2
  22. package/dist/esm/vviinn-carousel_2.entry.js +9 -6
  23. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  24. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  25. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  26. package/dist/esm/vviinn-widgets.js +1 -1
  27. package/dist/vviinn-widgets/{p-249af9d5.entry.js → p-10226f87.entry.js} +1 -1
  28. package/dist/vviinn-widgets/p-1c4b1a2b.entry.js +1 -0
  29. package/dist/vviinn-widgets/{p-90742d1c.js → p-24be993d.js} +1 -1
  30. package/dist/vviinn-widgets/{p-af5be84d.entry.js → p-294c56c4.entry.js} +1 -1
  31. package/dist/vviinn-widgets/p-312fcfe7.js +1 -0
  32. package/dist/vviinn-widgets/{p-9194527e.js → p-7a773bb6.js} +1 -1
  33. package/dist/vviinn-widgets/{p-99a98699.entry.js → p-9b99c7b7.entry.js} +1 -1
  34. package/dist/vviinn-widgets/{p-3e92671c.entry.js → p-c4a15f15.entry.js} +1 -1
  35. package/dist/vviinn-widgets/{p-d57f4a28.entry.js → p-e441f87f.entry.js} +1 -1
  36. package/dist/vviinn-widgets/{p-2573d0c3.js → p-fa5b5f3e.js} +1 -1
  37. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  38. package/package.json +1 -1
  39. package/www/build/{p-249af9d5.entry.js → p-10226f87.entry.js} +1 -1
  40. package/www/build/p-1c4b1a2b.entry.js +1 -0
  41. package/www/build/{p-90742d1c.js → p-24be993d.js} +1 -1
  42. package/www/build/{p-af5be84d.entry.js → p-294c56c4.entry.js} +1 -1
  43. package/www/build/p-312fcfe7.js +1 -0
  44. package/www/build/{p-9194527e.js → p-7a773bb6.js} +1 -1
  45. package/www/build/{p-99a98699.entry.js → p-9b99c7b7.entry.js} +1 -1
  46. package/www/build/p-bc12e9c4.js +125 -0
  47. package/www/build/{p-3e92671c.entry.js → p-c4a15f15.entry.js} +1 -1
  48. package/www/build/p-e0153ae2.css +6 -0
  49. package/www/build/{p-d57f4a28.entry.js → p-e441f87f.entry.js} +1 -1
  50. package/www/build/{p-2573d0c3.js → p-fa5b5f3e.js} +1 -1
  51. package/www/build/vviinn-widgets.esm.js +1 -1
  52. package/www/index.html +1 -1
  53. package/dist/vviinn-widgets/p-18bb4ada.entry.js +0 -1
  54. package/dist/vviinn-widgets/p-af321db4.js +0 -1
  55. package/www/build/p-001a9e47.js +0 -1
  56. package/www/build/p-18bb4ada.entry.js +0 -1
  57. package/www/build/p-a67898be.css +0 -1
  58. package/www/build/p-af321db4.js +0 -1
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-4ea3a37f.js');
7
- const index$2 = require('./index-b2b8f092.js');
8
- const customizedSlots = require('./customized-slots-84e1c444.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-8e47383c.js');
7
+ const index$2 = require('./index-5ce4918b.js');
8
+ const customizedSlots = require('./customized-slots-6b38279f.js');
9
9
 
10
10
  const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
11
11
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-1077e27c.js');
3
+ const index = require('./index-0bda22ec.js');
4
4
 
5
5
  const defaultSlotsNames = [
6
6
  "vviinn-onboarding-title",
@@ -1270,6 +1270,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1270
1270
  // Fallback appLoad event
1271
1271
  endBootstrap();
1272
1272
  };
1273
+ const Fragment = (_, children) => children;
1273
1274
  const hostRefs = new WeakMap();
1274
1275
  const getHostRef = (ref) => hostRefs.get(ref);
1275
1276
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1354,6 +1355,7 @@ const flush = () => {
1354
1355
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1355
1356
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1356
1357
 
1358
+ exports.Fragment = Fragment;
1357
1359
  exports.Host = Host;
1358
1360
  exports.bootstrapLazy = bootstrapLazy;
1359
1361
  exports.createEvent = createEvent;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-1077e27c.js');
3
+ const index = require('./index-0bda22ec.js');
4
4
 
5
5
  const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
6
6
  index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-1077e27c.js');
3
+ const index = require('./index-0bda22ec.js');
4
4
 
5
5
  // -------------------------------------------------------------------------------------
6
6
  /**
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
5
+ const index = require('./index-0bda22ec.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-b2b8f092.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-5ce4918b.js');
7
7
 
8
8
  const vviinnButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.raw-open-button{background:none;border:none;cursor:pointer}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
9
9
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-4ea3a37f.js');
7
- const index$2 = require('./index-b2b8f092.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-8e47383c.js');
7
+ const index$2 = require('./index-5ce4918b.js');
8
8
 
9
9
  const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;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:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.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-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
10
10
 
@@ -117,7 +117,8 @@ let VviinnCarousel = class {
117
117
  getColumnsNumber() {
118
118
  const styleSheet = getComputedStyle(this.el);
119
119
  const columnsInCss = styleSheet.getPropertyValue(COLUMNS_NUMBER_CSS_VAR);
120
- return parseInt(columnsInCss);
120
+ const columnsNumber = parseInt(columnsInCss);
121
+ return columnsNumber && !isNaN(columnsNumber) ? columnsNumber : 4;
121
122
  }
122
123
  getContentGroups() {
123
124
  return Array.from(this.el.querySelectorAll(`.${CONTENT_GROUP_CSS_CLASS}`));
@@ -156,6 +157,8 @@ let VviinnCarousel = class {
156
157
  }
157
158
  processScrollbarWidth() {
158
159
  const target = this.getContentNode();
160
+ if (!target)
161
+ return;
159
162
  const scrollRatio = (target.scrollLeft + target.clientWidth) / target.scrollWidth;
160
163
  const scrolledWidth = target.clientWidth * scrollRatio;
161
164
  this.el.style.setProperty("--vviinn-progressbar-width", `${scrolledWidth}px`);
@@ -204,7 +207,7 @@ let VviinnCarousel = class {
204
207
  }, onClick: () => this.scroll(index$1) })));
205
208
  }
206
209
  render() {
207
- return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, index.h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, index.h(index$2.ChevronIcon, null)), index.h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), index.h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, index.h(index$2.ChevronIcon, null))), this.showBullets() ? (index.h("div", { class: "bullets" }, this.renderBullets())) : ("")));
210
+ return (index.h(index.Host, { class: this.getClassMap() }, index.h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, index.h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, index.h(index$2.ChevronIcon, null)), index.h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), index.h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, index.h(index$2.ChevronIcon, null))), this.showBullets() && (index.h("div", { class: "bullets" }, this.renderBullets()))));
208
211
  }
209
212
  get el() { return index.getElement(this); }
210
213
  };
@@ -994,7 +997,7 @@ let VviinnVprWidget = class {
994
997
  loaded: this.loaded,
995
998
  empty: this.recommendations.length == 0,
996
999
  [this.mode]: true,
997
- }, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), index.h("style", null, index$1.state.fallbackStyles), index.h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults()));
1000
+ }, "aria-hidden": this.loaded ? "false" : "true" }, this.recommendations.length ? (index.h(index.Fragment, null, this.renderExternalCSS(), index.h("style", null, index$1.state.fallbackStyles), index.h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults())) : ("")));
998
1001
  }
999
1002
  renderRecommendation(recommendation, index$1) {
1000
1003
  return (index.h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), index: index$1 }));
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-b2b8f092.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-5ce4918b.js');
7
7
 
8
8
  const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:4;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";
9
9
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-b2b8f092.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-5ce4918b.js');
7
7
 
8
8
  const vviinnVprButtonCss = ":host{display:block}";
9
9
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1077e27c.js');
6
- const index$1 = require('./index-b2b8f092.js');
7
- const customizedSlots = require('./customized-slots-84e1c444.js');
5
+ const index = require('./index-0bda22ec.js');
6
+ const index$1 = require('./index-5ce4918b.js');
7
+ const customizedSlots = require('./customized-slots-6b38279f.js');
8
8
 
9
9
  const vviinnVpsButtonCss = ":host{display:block}";
10
10
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-1077e27c.js');
3
+ const index = require('./index-0bda22ec.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -112,7 +112,8 @@ export class VviinnCarousel {
112
112
  getColumnsNumber() {
113
113
  const styleSheet = getComputedStyle(this.el);
114
114
  const columnsInCss = styleSheet.getPropertyValue(COLUMNS_NUMBER_CSS_VAR);
115
- return parseInt(columnsInCss);
115
+ const columnsNumber = parseInt(columnsInCss);
116
+ return columnsNumber && !isNaN(columnsNumber) ? columnsNumber : 4;
116
117
  }
117
118
  getContentGroups() {
118
119
  return Array.from(this.el.querySelectorAll(`.${CONTENT_GROUP_CSS_CLASS}`));
@@ -151,6 +152,8 @@ export class VviinnCarousel {
151
152
  }
152
153
  processScrollbarWidth() {
153
154
  const target = this.getContentNode();
155
+ if (!target)
156
+ return;
154
157
  const scrollRatio = (target.scrollLeft + target.clientWidth) / target.scrollWidth;
155
158
  const scrolledWidth = target.clientWidth * scrollRatio;
156
159
  this.el.style.setProperty("--vviinn-progressbar-width", `${scrolledWidth}px`);
@@ -206,7 +209,7 @@ export class VviinnCarousel {
206
209
  h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()),
207
210
  h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" },
208
211
  h(ChevronIcon, null))),
209
- this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
212
+ this.showBullets() && (h("div", { class: "bullets" }, this.renderBullets()))));
210
213
  }
211
214
  static get is() { return "vviinn-carousel"; }
212
215
  static get originalStyleUrls() { return {
@@ -1,4 +1,4 @@
1
- import { Component, Host, h, Prop, State, Element, Watch, Event, Listen, } from "@stencil/core";
1
+ import { Component, Host, h, Prop, State, Element, Watch, Event, Listen, Fragment, } from "@stencil/core";
2
2
  import { pipe } from "fp-ts/lib/function";
3
3
  import * as TE from "fp-ts/lib/TaskEither";
4
4
  import * as E from "fp-ts/lib/Either";
@@ -166,11 +166,11 @@ export class VviinnVprWidget {
166
166
  loaded: this.loaded,
167
167
  empty: this.recommendations.length == 0,
168
168
  [this.mode]: true,
169
- }, "aria-hidden": this.loaded ? "false" : "true" },
169
+ }, "aria-hidden": this.loaded ? "false" : "true" }, this.recommendations.length ? (h(Fragment, null,
170
170
  this.renderExternalCSS(),
171
171
  h("style", null, state.fallbackStyles),
172
172
  h("h2", { part: "recommendations-title" }, this.blockTitle),
173
- this.useCarousel ? this.renderCarousel() : this.renderResults()));
173
+ this.useCarousel ? this.renderCarousel() : this.renderResults())) : ("")));
174
174
  }
175
175
  renderRecommendation(recommendation, index) {
176
176
  return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), index: index }));
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-65670ecf.js';
2
- import { g as getCursorValue, p as pipe, O as Option, s as sequenceToOption, i as imageSearchState, a as pointDiffSemigroup, _ as _function, t as transform, m as move, f as fromMouseEvent, b as makeRectangularSearchRequest, c as fromAlt, d as foldValueObject, e as scaleWithSized, h as center, j as detectedObjectEq, k as toFile, l as processSelectedFile, E as Either, n as match, o as fromImage, q as dimensionsFromImage, r as scaleByLargestSide, S as Semigroup, u as state, N as NonEmptyArray, v as createProductViewVpsEvent, w as createProductClickVpsEvent, x as createSearchEvent, y as createFilterEvent, z as v4, A as createTrackingApi, B as createWidgetVpsEvent, C as isEmpty } from './index-492f97b7.js';
3
- import { C as CheckIcon, O as OnboardingCard1Icon, a as OnboardingCard2Icon, b as OnboardingCard3Icon, A as ArrowIcon } from './index-84a46578.js';
4
- import { s as slotChangeListener } from './customized-slots-01387ced.js';
1
+ import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-769ffb3c.js';
2
+ import { g as getCursorValue, p as pipe, O as Option, s as sequenceToOption, i as imageSearchState, a as pointDiffSemigroup, _ as _function, t as transform, m as move, f as fromMouseEvent, b as makeRectangularSearchRequest, c as fromAlt, d as foldValueObject, e as scaleWithSized, h as center, j as detectedObjectEq, k as toFile, l as processSelectedFile, E as Either, n as match, o as fromImage, q as dimensionsFromImage, r as scaleByLargestSide, S as Semigroup, u as state, N as NonEmptyArray, v as createProductViewVpsEvent, w as createProductClickVpsEvent, x as createSearchEvent, y as createFilterEvent, z as v4, A as createTrackingApi, B as createWidgetVpsEvent, C as isEmpty } from './index-8de7d584.js';
3
+ import { C as CheckIcon, O as OnboardingCard1Icon, a as OnboardingCard2Icon, b as OnboardingCard3Icon, A as ArrowIcon } from './index-dfe874ac.js';
4
+ import { s as slotChangeListener } from './customized-slots-aa123817.js';
5
5
 
6
6
  const cropperHandlerCss = ":host{--size:20px;background:transparent;border:4px solid white;box-sizing:content-box;display:block;height:var(--size);touch-action:none;position:absolute;width:var(--size);z-index:4;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.disabled){opacity:0.25}:host(.nw-resize){border-bottom:none;border-right:none;top:0;left:0}:host(.ne-resize){border-left:none;border-bottom:none;right:0;top:0}:host(.sw-resize){border-right:none;border-top:none;left:0;bottom:0}:host(.se-resize){border-left:none;border-top:none;bottom:0;right:0}";
7
7
 
@@ -1,4 +1,4 @@
1
- import { h } from './index-65670ecf.js';
1
+ import { h } from './index-769ffb3c.js';
2
2
 
3
3
  const defaultSlotsNames = [
4
4
  "vviinn-onboarding-title",
@@ -1248,6 +1248,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
1248
1248
  // Fallback appLoad event
1249
1249
  endBootstrap();
1250
1250
  };
1251
+ const Fragment = (_, children) => children;
1251
1252
  const hostRefs = new WeakMap();
1252
1253
  const getHostRef = (ref) => hostRefs.get(ref);
1253
1254
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
@@ -1332,4 +1333,4 @@ const flush = () => {
1332
1333
  const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
1333
1334
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
1334
1335
 
1335
- export { Host as H, getRenderingRef as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
1336
+ export { Fragment as F, Host as H, getRenderingRef as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r };
@@ -1,4 +1,4 @@
1
- import { a as getRenderingRef, f as forceUpdate } from './index-65670ecf.js';
1
+ import { a as getRenderingRef, f as forceUpdate } from './index-769ffb3c.js';
2
2
 
3
3
  // -------------------------------------------------------------------------------------
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { h } from './index-65670ecf.js';
1
+ import { h } from './index-769ffb3c.js';
2
2
 
3
3
  const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
4
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-65670ecf.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-769ffb3c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-65670ecf.js';
2
- import { V as VisualSearchIcon } from './index-84a46578.js';
1
+ import { r as registerInstance, h, H as Host } from './index-769ffb3c.js';
2
+ import { V as VisualSearchIcon } from './index-dfe874ac.js';
3
3
 
4
4
  const vviinnButtonCss = ":host{display:block}.open-button{align-items:center;background:rgba(255, 255, 255, 0.8);border-radius:50%;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);box-sizing:border-box;cursor:pointer;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:all 0.25s ease-in-out}.raw-open-button{background:none;border:none;cursor:pointer}.open-button:hover{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.25)}.open-button:focus{border:2px solid rgba(15, 98, 254, 0.5);outline:none}.open-button:active{background:#F4F4F4;outline:none}";
5
5
 
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-65670ecf.js';
2
- import { D as _Array, _ as _function, p as pipe, F as chainW, G as makeRequest, H as fromEither, I as getApiPath, J as createInitGetRequest, K as sequenceT, L as Apply, M as map, P as match, u as state, Q as createProductViewVprEvent, R as createProductClickVprEvent, z as v4, A as createTrackingApi, T as createWidgetVprEvent, U as TaskEither, V as checkEmpryString, E as Either, i as imageSearchState } from './index-492f97b7.js';
3
- import { e as ChevronIcon } from './index-84a46578.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, F as Fragment } from './index-769ffb3c.js';
2
+ import { D as _Array, _ as _function, p as pipe, F as chainW, G as makeRequest, H as fromEither, I as getApiPath, J as createInitGetRequest, K as sequenceT, L as Apply, M as map, P as match, u as state, Q as createProductViewVprEvent, R as createProductClickVprEvent, z as v4, A as createTrackingApi, T as createWidgetVprEvent, U as TaskEither, V as checkEmpryString, E as Either, i as imageSearchState } from './index-8de7d584.js';
3
+ import { e as ChevronIcon } from './index-dfe874ac.js';
4
4
 
5
5
  const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;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:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) button{border-radius:2px}:host(.grid) button{border-radius:50%}button{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}button{fill:#525252}button.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-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
6
6
 
@@ -113,7 +113,8 @@ let VviinnCarousel = class {
113
113
  getColumnsNumber() {
114
114
  const styleSheet = getComputedStyle(this.el);
115
115
  const columnsInCss = styleSheet.getPropertyValue(COLUMNS_NUMBER_CSS_VAR);
116
- return parseInt(columnsInCss);
116
+ const columnsNumber = parseInt(columnsInCss);
117
+ return columnsNumber && !isNaN(columnsNumber) ? columnsNumber : 4;
117
118
  }
118
119
  getContentGroups() {
119
120
  return Array.from(this.el.querySelectorAll(`.${CONTENT_GROUP_CSS_CLASS}`));
@@ -152,6 +153,8 @@ let VviinnCarousel = class {
152
153
  }
153
154
  processScrollbarWidth() {
154
155
  const target = this.getContentNode();
156
+ if (!target)
157
+ return;
155
158
  const scrollRatio = (target.scrollLeft + target.clientWidth) / target.scrollWidth;
156
159
  const scrolledWidth = target.clientWidth * scrollRatio;
157
160
  this.el.style.setProperty("--vviinn-progressbar-width", `${scrolledWidth}px`);
@@ -200,7 +203,7 @@ let VviinnCarousel = class {
200
203
  }, onClick: () => this.scroll(index) })));
201
204
  }
202
205
  render() {
203
- return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, h(ChevronIcon, null)), h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, h(ChevronIcon, null))), this.showBullets() ? (h("div", { class: "bullets" }, this.renderBullets())) : ("")));
206
+ return (h(Host, { class: this.getClassMap() }, h("div", { class: Object.assign({ body: true }, this.getClassMap()) }, h("button", { class: "prev", onClick: () => this.showPrev(), part: "carousel-button" }, h(ChevronIcon, null)), h("div", { class: this.getContentClassMap(), onScroll: () => this.processScrollbarWidth() }, this.renderRecommendations()), h("button", { class: "next", onClick: () => this.showNext(), part: "carousel-button" }, h(ChevronIcon, null))), this.showBullets() && (h("div", { class: "bullets" }, this.renderBullets()))));
204
207
  }
205
208
  get el() { return getElement(this); }
206
209
  };
@@ -990,7 +993,7 @@ let VviinnVprWidget = class {
990
993
  loaded: this.loaded,
991
994
  empty: this.recommendations.length == 0,
992
995
  [this.mode]: true,
993
- }, "aria-hidden": this.loaded ? "false" : "true" }, this.renderExternalCSS(), h("style", null, state.fallbackStyles), h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults()));
996
+ }, "aria-hidden": this.loaded ? "false" : "true" }, this.recommendations.length ? (h(Fragment, null, this.renderExternalCSS(), h("style", null, state.fallbackStyles), h("h2", { part: "recommendations-title" }, this.blockTitle), this.useCarousel ? this.renderCarousel() : this.renderResults())) : ("")));
994
997
  }
995
998
  renderRecommendation(recommendation, index) {
996
999
  return (h("vviinn-product-card", { part: "product-part", productId: recommendation.productId, productTitle: recommendation.title, deeplink: recommendation.deeplink, image: recommendation.image.thumbnail, brand: recommendation.brand, imageWidth: this.imageWidth, imageRatio: 1, price: recommendation.price.actual, salePrice: recommendation.price.sale, responsive: this.mode === "grid", dimmedBackground: this.useDimmedBackgroundInCard(), index: index }));
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-65670ecf.js';
2
- import { d as CrossIcon } from './index-84a46578.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-769ffb3c.js';
2
+ import { d as CrossIcon } from './index-dfe874ac.js';
3
3
 
4
4
  const recommendationsSidebarCss = ":host{--vviinn-carousel-columns:4;box-sizing:border-box;display:block;display:flex;height:100vh;left:0;position:fixed;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.open){background:rgba(0, 0, 0, 0.2)}:host(.bottom){flex-direction:column;justify-content:end}:host(.right){flex-direction:row;justify-content:flex-end}header{position:relative;text-align:center;padding:32px}header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;box-shadow:0px 2px 4px rgba(0, 0, 0, 0.15);padding:8px}:host(.right) header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}main{padding:0 24px}:host(.right) main{overflow:auto}.sidebar{background:white;box-sizing:border-box;display:flex;flex-direction:column}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.bottom.closed) .sidebar{-webkit-animation-name:slideOutFromBottom;animation-name:slideOutFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.bottom.open) .sidebar{-webkit-animation-name:slideInFromBottom;animation-name:slideInFromBottom;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{-webkit-animation-name:slideOutFromRight;animation-name:slideOutFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right.open) .sidebar{-webkit-animation-name:slideInFromRight;animation-name:slideInFromRight;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-grid){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:24px}:host(.right) vviinn-vpr-widget{overflow:auto}:host(.right) vviinn-vpr-widget::part(image){border:none}.title{font-style:normal;font-weight:500;font-size:28px;line-height:40px;text-align:center;color:#000000}vviinn-vpr-widget::part(title),vviinn-vpr-widget::part(brand),vviinn-vpr-widget::part(type){text-align:left}vviinn-vpr-widget::part(price-container){align-self:start}.close-sidebar{background:transparent;border:none;cursor:pointer;margin:0;padding:0;position:absolute;right:24px;top:24px}@-webkit-keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@-webkit-keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@-webkit-keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";
5
5
 
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, H as Host } from './index-65670ecf.js';
2
- import { V as VisualSearchIcon } from './index-84a46578.js';
1
+ import { r as registerInstance, h, H as Host } from './index-769ffb3c.js';
2
+ import { V as VisualSearchIcon } from './index-dfe874ac.js';
3
3
 
4
4
  const vviinnVprButtonCss = ":host{display:block}";
5
5
 
@@ -1,6 +1,6 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-65670ecf.js';
2
- import { c as CameraIcon } from './index-84a46578.js';
3
- import { S as SlotSkeleton } from './customized-slots-01387ced.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-769ffb3c.js';
2
+ import { c as CameraIcon } from './index-dfe874ac.js';
3
+ import { S as SlotSkeleton } from './customized-slots-aa123817.js';
4
4
 
5
5
  const vviinnVpsButtonCss = ":host{display:block}";
6
6
 
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-65670ecf.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-769ffb3c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com