vviinn-widgets 2.220.0 → 2.221.0

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 (114) hide show
  1. package/dist/cjs/{SecondaryActionIcon-Ng84u7-b.js → SecondaryActionIcon-CuNEBTWD.js} +1 -1
  2. package/dist/cjs/{cssUrlHelper-BX9kngtZ.js → cssUrlHelper-B5A2BBm7.js} +1 -1
  3. package/dist/cjs/{index-CvMi8_tX.js → index-BF9aENF8.js} +6 -2
  4. package/dist/cjs/{index-D38ORu31.js → index-BU8FMTXn.js} +3 -0
  5. package/dist/cjs/{index-CBteD3gC.js → index-CP1QUrJT.js} +11 -1
  6. package/dist/cjs/{index-FE9nOqQo.js → index-sL3iGA57.js} +2 -2
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{search.store-C6QU_D02.js → search.store-C-fS-eJR.js} +8 -3
  9. package/dist/cjs/vviinn-button_6.cjs.entry.js +13 -13
  10. package/dist/cjs/vviinn-camera_12.cjs.entry.js +112 -51
  11. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +9 -9
  12. package/dist/cjs/vviinn-detected-object_2.cjs.entry.js +2 -2
  13. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +6 -6
  14. package/dist/cjs/vviinn-text-search.cjs.entry.js +11 -9
  15. package/dist/cjs/vviinn-vps-button.cjs.entry.js +15 -6
  16. package/dist/cjs/vviinn-widgets.cjs.js +2 -2
  17. package/dist/collection/Image/error.js +6 -1
  18. package/dist/collection/components/customized-slots.js +2 -0
  19. package/dist/collection/components/vviinn-icons/icons/DragDropImageIcon.js +2 -0
  20. package/dist/collection/components/vviinn-icons/index.js +1 -0
  21. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.css +36 -1
  22. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +132 -21
  23. package/dist/collection/components/vviinn-modal/vviinn-modal.js +2 -2
  24. package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +1 -1
  25. package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +1 -1
  26. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +1 -1
  27. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +1 -1
  28. package/dist/collection/components/vviinn-product-card/vviinn-energy-label/vviinn-energy-label.js +2 -2
  29. package/dist/collection/components/vviinn-results/vviinn-results.js +3 -3
  30. package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.js +1 -1
  31. package/dist/collection/components/vviinn-skeleton/vviinn-skeleton.js +1 -1
  32. package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +1 -1
  33. package/dist/collection/components/vviinn-slider/vviinn-slider.js +1 -1
  34. package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +1 -1
  35. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +27 -5
  36. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +3 -3
  37. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +1 -1
  38. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +37 -4
  39. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +35 -1
  40. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +37 -14
  41. package/dist/collection/cssParts/index.js +2 -0
  42. package/dist/collection/dom/index.js +7 -0
  43. package/dist/collection/helpers/dragAndDrop/parseDroppedFile.js +2 -0
  44. package/dist/collection/locale/resources.js +4 -2
  45. package/dist/esm/{SecondaryActionIcon-FWFzrhba.js → SecondaryActionIcon-D4f3aMUD.js} +1 -1
  46. package/dist/esm/{cssUrlHelper-DsQD_dY6.js → cssUrlHelper-Byz4s-MD.js} +1 -1
  47. package/dist/esm/{index-RkvPN2Rk.js → index-B89nCb_F.js} +3 -0
  48. package/dist/esm/{index-BtnjaTty.js → index-BCrstDkj.js} +6 -2
  49. package/dist/esm/{index-OsoUj2Au.js → index-C1-PYhS4.js} +11 -2
  50. package/dist/esm/{index-ChtanA0O.js → index-D5yWioO8.js} +2 -2
  51. package/dist/esm/loader.js +3 -3
  52. package/dist/esm/{search.store-BVRhMpHA.js → search.store-C8LIDQfX.js} +8 -3
  53. package/dist/esm/vviinn-button_6.entry.js +13 -13
  54. package/dist/esm/vviinn-camera_12.entry.js +112 -51
  55. package/dist/esm/vviinn-carousel_10.entry.js +9 -9
  56. package/dist/esm/vviinn-detected-object_2.entry.js +2 -2
  57. package/dist/esm/vviinn-shop-the-look.entry.js +6 -6
  58. package/dist/esm/vviinn-text-search.entry.js +11 -9
  59. package/dist/esm/vviinn-vps-button.entry.js +15 -6
  60. package/dist/esm/vviinn-widgets.js +3 -3
  61. package/dist/types/components/vviinn-icons/icons/DragDropImageIcon.d.ts +1 -0
  62. package/dist/types/components/vviinn-icons/index.d.ts +1 -0
  63. package/dist/types/components/vviinn-image-selector/vviinn-image-selector.d.ts +11 -0
  64. package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +2 -0
  65. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +6 -0
  66. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -0
  67. package/dist/types/components.d.ts +32 -0
  68. package/dist/types/dom/index.d.ts +1 -0
  69. package/dist/types/helpers/dragAndDrop/parseDroppedFile.d.ts +2 -0
  70. package/dist/vviinn-widgets/p-07211a51.entry.js +1 -0
  71. package/dist/vviinn-widgets/{p-a8d88d55.entry.js → p-27b41f88.entry.js} +1 -1
  72. package/dist/vviinn-widgets/p-7411202d.entry.js +1 -0
  73. package/{www/build/p-a145a231.entry.js → dist/vviinn-widgets/p-95423f25.entry.js} +1 -1
  74. package/dist/vviinn-widgets/{p-RkvPN2Rk.js → p-B89nCb_F.js} +1 -1
  75. package/dist/vviinn-widgets/p-BadZr0hq.js +1 -0
  76. package/dist/vviinn-widgets/{p-D3wRLf2J.js → p-BfTXDLup.js} +1 -1
  77. package/dist/vviinn-widgets/{p-CU3f7I7a.js → p-BpHXy3Gg.js} +1 -1
  78. package/dist/vviinn-widgets/p-Bq5Hj7Kz.js +1 -0
  79. package/{www/build/p-CZFFW_Cj.js → dist/vviinn-widgets/p-DTASrq1W.js} +1 -1
  80. package/dist/vviinn-widgets/{p-6vxKTHCE.js → p-DvD16Fp_.js} +1 -1
  81. package/dist/vviinn-widgets/p-e7b0a5b9.entry.js +1 -0
  82. package/dist/vviinn-widgets/p-f46ad1fd.entry.js +1 -0
  83. package/{www/build/p-1888506e.entry.js → dist/vviinn-widgets/p-f48452fd.entry.js} +1 -1
  84. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  85. package/package.json +1 -2
  86. package/www/build/p-07211a51.entry.js +1 -0
  87. package/www/build/{p-a8d88d55.entry.js → p-27b41f88.entry.js} +1 -1
  88. package/www/build/{p-1f41ab53.js → p-2d5777fa.js} +1 -1
  89. package/www/build/p-7411202d.entry.js +1 -0
  90. package/{dist/vviinn-widgets/p-a145a231.entry.js → www/build/p-95423f25.entry.js} +1 -1
  91. package/www/build/{p-RkvPN2Rk.js → p-B89nCb_F.js} +1 -1
  92. package/www/build/p-BadZr0hq.js +1 -0
  93. package/www/build/{p-D3wRLf2J.js → p-BfTXDLup.js} +1 -1
  94. package/www/build/{p-CU3f7I7a.js → p-BpHXy3Gg.js} +1 -1
  95. package/www/build/p-Bq5Hj7Kz.js +1 -0
  96. package/{dist/vviinn-widgets/p-CZFFW_Cj.js → www/build/p-DTASrq1W.js} +1 -1
  97. package/www/build/{p-6vxKTHCE.js → p-DvD16Fp_.js} +1 -1
  98. package/www/build/p-e7b0a5b9.entry.js +1 -0
  99. package/www/build/p-f46ad1fd.entry.js +1 -0
  100. package/{dist/vviinn-widgets/p-1888506e.entry.js → www/build/p-f48452fd.entry.js} +1 -1
  101. package/www/build/vviinn-widgets.esm.js +1 -1
  102. package/www/index.html +1 -1
  103. package/dist/vviinn-widgets/p-55582bb6.entry.js +0 -1
  104. package/dist/vviinn-widgets/p-773cdbb0.entry.js +0 -1
  105. package/dist/vviinn-widgets/p-7f9e1cff.entry.js +0 -1
  106. package/dist/vviinn-widgets/p-CPTOq59a.js +0 -1
  107. package/dist/vviinn-widgets/p-DKHkeCw7.js +0 -1
  108. package/dist/vviinn-widgets/p-ffbd1062.entry.js +0 -1
  109. package/www/build/p-55582bb6.entry.js +0 -1
  110. package/www/build/p-773cdbb0.entry.js +0 -1
  111. package/www/build/p-7f9e1cff.entry.js +0 -1
  112. package/www/build/p-CPTOq59a.js +0 -1
  113. package/www/build/p-DKHkeCw7.js +0 -1
  114. package/www/build/p-ffbd1062.entry.js +0 -1
@@ -432,13 +432,13 @@ export class VviinnResults {
432
432
  render() {
433
433
  var _a;
434
434
  const resultsLength = this.getResults().length;
435
- return (h(Host, { key: '2ba9c019be5e6d2a70f299ebd4827baefa671cad', id: "results-block", class: {
435
+ return (h(Host, { key: '0767d0c21dee72b9a0f09a80dfe2ca7c375e4d50', id: "results-block", class: {
436
436
  "show-in-widget": this.showInWidget,
437
437
  "matching-discovery": this.oneClickDiscoveryMode === "append-slider",
438
- }, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: '8521abb79a86723af8f18cd66558f8cd56d0d725', class: "nothing-found" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '030f376feaa161d598dc60e2deae0bcde368759a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), h("div", { key: '82a242f74f6a5481b40ec26a977d11465a5c58da', class: {
438
+ }, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: 'bfd01f2bf39be84501ce0cf42f5672acda3e500b', class: "nothing-found" }, this.getCurrentErrorType() && (h("vviinn-error", { key: 'ce077ad92253c7727a509567571d821ebda6dbd4', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), h("div", { key: 'dc63984664328f04abe6011aa0db856cb862f37c', class: {
439
439
  hidden: this.showAspectRatioError || resultsLength === 0,
440
440
  products: true,
441
- }, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: 'ed28c78ddfa0826f8ad8a70639e83386d9297c7c', id: "one-click-discovery-append", style: {
441
+ }, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: '2e39c5d65c5c7981c0b9a93dfe97ad62165a25b4', id: "one-click-discovery-append", style: {
442
442
  order: ((_a = this.oneClickDiscoveryAppendIndex) !== null && _a !== void 0 ? _a : resultsLength).toString(),
443
443
  } }))));
444
444
  }
@@ -849,7 +849,7 @@ export class VviinnShopTheLook {
849
849
  }, TIMING.SEARCH_DEBOUNCE_DELAY);
850
850
  }
851
851
  render() {
852
- return (h(Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: shopTheLookParts }, renderExternalCSS(this.cssUrl), h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, h("button", { key: '7cfa399b98e254bd12bff706cf6c4bea42dce684', class: "upload-button", part: "shop-the-look-upload-button", onClick: () => { var _a; return (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.showLoadingSpinner }, h("span", { key: '48b59d82816a50b6f98bbf68c8a6849679437852', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, h("slot", { key: '14f12cf7f44a39ba4f1d9cbecb6fa3558ae5fd5d', name: "vviinn-image-upload-icon" }, h(UploadActionIconVariant, { key: '1937cea6010c0a21182e88f365f188a65b0f3a70' }))), h("span", { key: 'd62a5ee1ac2c17a663dda26cb0debd83821510c0', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, h("slot", { key: '42a4910a590a2b258dccb2a3ace5da8f60099791', name: "upload-button-text" }))), h("input", { key: '242e2ed2e319428ebde6dff7df8c37b60d33a8f1', type: "file", class: "visually-hidden", accept: getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
852
+ return (h(Host, { key: '810afce8775ce69f39d3ddb19dbfafc081f90b95', exportparts: shopTheLookParts }, renderExternalCSS(this.cssUrl), h("div", { key: 'ab678e97ff5878b7d68fb63fa6ad0344f55e56eb', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, h("div", { key: '78fe26aa58f8c8da8a49a0a1f20d27025de4270e', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (h("div", { key: '02ee522ea4f2f60a5becae75834123f7f2059d31', class: "search-loader" }, h("vviinn-preloader", { key: '209d5b1caf48f57ef4ab0f143e77c83e9547403d' })))), this.renderModalWrapper(), h("div", { key: '8a92411b196592578c1811e88b20b5c79d955751', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (h("div", { key: '283494b6ed7e2279ebc12ba00bff48679bd84515', class: "upload-button-container" }, h("button", { key: '6843b123419ab70e75c38d2ef1fc6f95724198f6', class: "upload-button", part: "shop-the-look-upload-button", onClick: () => { var _a; return (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.showLoadingSpinner }, h("span", { key: '921d7b5487c68d1e5f3095415d7d195a76de5a53', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, h("slot", { key: 'c5a149403be172d546d34e4271a04b6bf7184cf2', name: "vviinn-image-upload-icon" }, h(UploadActionIconVariant, { key: '363804dec9e24cf917d8da7244285f14dd874e61' }))), h("span", { key: 'fde616b05fc029c9cc45e063483f0401efdf2ba5', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, h("slot", { key: '756831c7b944e0f651b7907bf522375a35acb247', name: "upload-button-text" }))), h("input", { key: '6489e9ccae6426f4a96d57c2bec5b9c41b77916b', type: "file", class: "visually-hidden", accept: getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
853
853
  renderNavigation(this.swiperActiveIndex, this.totalImages, this.handleNavigatePrev, this.handleNavigateNext)))));
854
854
  }
855
855
  static get is() { return "vviinn-shop-the-look"; }
@@ -4,7 +4,7 @@ export class VviinnSkeleton {
4
4
  this.halfWidth = false;
5
5
  }
6
6
  render() {
7
- return (h(Host, { key: '149fe2396c333fff4ff01e607a8f1b238ac12bdb' }, h("div", { key: '6a9e376f9955458af0c30c9df01ea7c2b8849196', class: {
7
+ return (h(Host, { key: '762b28b1619a152ca13d7f71c23ede1b8182bf8a' }, h("div", { key: '4509aa114dddccfaa65a5bb593f1dfecddb054ba', class: {
8
8
  "vviinn-skeleton": true,
9
9
  }, style: {
10
10
  height: this.height ? `${this.height.toString()}px` : "100%",
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  export class VviinnSlide {
3
3
  render() {
4
- return (h(Host, { key: '133a498cc9bacc4be222f7bc10aab41581e81f1a' }, h("slot", { key: '4c6793ca181403a57e378b9212d341cdfe2c529c' })));
4
+ return (h(Host, { key: '8740746256bbf7c374da17ff2bca8730108586c8' }, h("slot", { key: '2de442bb958c11b063b2d9d3a416e5a8df33d3cb' })));
5
5
  }
6
6
  static get is() { return "vviinn-slide"; }
7
7
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@ export class VviinnSlider {
38
38
  return this.isRTL ? position * -1 : position;
39
39
  }
40
40
  render() {
41
- return (h(Host, { key: 'cae995bbfc00ab993963b12e219ca9e7d1b88a10' }, h("div", { key: 'ef4812aaa71a522c8bd038596d5f3d4b8e068057', class: "items-wrapper" }, h("div", { key: '56796be36f776337632f02b6b0e3cf034e36c0a7', class: "items" }, h("slot", { key: '6f9d9f5a6d6a8abb27689e7d5c724bb0a696659d' })))));
41
+ return (h(Host, { key: '6ee307d2510c452af6a730498f67fa26324f2990' }, h("div", { key: '1e721a9e0da711a893d318a3536668362da3c2b7', class: "items-wrapper" }, h("div", { key: 'd48b29eb243c35ac655e0b784b7303e239b416b0', class: "items" }, h("slot", { key: 'dc63e964c8def5b7202377c0c9f75681e7220ad9' })))));
42
42
  }
43
43
  static get is() { return "vviinn-slider"; }
44
44
  static get encapsulation() { return "shadow"; }
@@ -6,7 +6,7 @@ export class VviinnTeaser {
6
6
  slotChangeListener(this, this.el);
7
7
  }
8
8
  render() {
9
- return (h(Host, { key: '8a000f0c33266514f8665f595f5de4e3be66a92a' }, h("slot", { key: '5d6f646a3efc56a7a8f69b299e550685763f3d58' }, h("span", { key: 'b044024aab57627bd5a7236c6cb8f170b6a18d9c', class: "vviinn-teaser-text" }, h("slot", { key: '41dbdef5be7ce19a88c34521b94332de7a2c0b21', name: "vviinn-teaser-text" }, i18next.t("teaserText"))))));
9
+ return (h(Host, { key: 'fe777d0460b338bc11c372b2ae6d1c75120484cd' }, h("slot", { key: '85b8c8777d91d0fe48e955a601bf5742e50a3f12' }, h("span", { key: '2f4033a65dac4820a1236e52a470cc0523a31745', class: "vviinn-teaser-text" }, h("slot", { key: '75f5fbc11611d5b12d996dbf9267cc47c59f0269', name: "vviinn-teaser-text" }, i18next.t("teaserText"))))));
10
10
  }
11
11
  static get is() { return "vviinn-teaser"; }
12
12
  static get encapsulation() { return "shadow"; }
@@ -47,6 +47,8 @@ export class VviinnTextSearch {
47
47
  this.placeholder = "";
48
48
  /** Show auto-suggest dropdown with search completions */
49
49
  this.autoSuggestShow = true;
50
+ /** Accept image files dropped from the OS onto the upload button (desktop only) */
51
+ this.useDragAndDrop = false;
50
52
  /** True, when used inside the widget */
51
53
  /** @internal */
52
54
  this.showInWidget = false;
@@ -270,7 +272,7 @@ export class VviinnTextSearch {
270
272
  }
271
273
  }
272
274
  render() {
273
- return (h(Host, { key: '0ac6e28c6631ea47c8e7c47b63fa2eb3af500087', exportparts: `${searchBarParts}, ${searchModalFirstScreenParts}` }, h("div", { key: '4b1d8edd675e91f4abd1a5933a1449b721a571c1', class: "text-search-container", part: "text-search-container" }, h("input", Object.assign({ key: '13e356c598ada0b70e9b5c99531563dae6c334b5', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
275
+ return (h(Host, { key: '1a6f096832c3cf72d92192e45633a4232ddcd16d', exportparts: `${searchBarParts}, ${searchModalFirstScreenParts}` }, h("div", { key: '7aa3981060a964959c714bf63bcc15d0e0c63250', class: "text-search-container", part: "text-search-container" }, h("input", Object.assign({ key: '21f53521ba84845aaaacc3a6ee80c42ebe1886e1', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
274
276
  role: "combobox",
275
277
  "aria-autocomplete": "list",
276
278
  "aria-expanded": this.autoSuggestCompletions.length > 0 &&
@@ -281,11 +283,11 @@ export class VviinnTextSearch {
281
283
  "aria-activedescendant": this.activeSuggestionIndex >= 0
282
284
  ? `suggestion-${this.activeSuggestionIndex}`
283
285
  : undefined,
284
- }))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: 'c3d89667ac1eaa2682a4e3c68481b06f9479e0d6', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
286
+ }))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: '5c30334834e202f2961c8b31b722755254e65509', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
285
287
  exampleImageSource: this.exampleImageSource,
286
- }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: 'c900b67d3dcffb64f3ca513c0475f64eb72ef495', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
287
- this.recognition && (h("button", { key: '99f75f77a43f618a45bd06124f283a5b97e422c3', class: "speech-button", part: "speech-button", "aria-label": i18next.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, h(MicIcon, { key: 'ab0676502accecbb25377737a595550ae96b19cc' }), this.isShowRecording() && (h("span", { key: 'ece24c838cabc64e9b045c5eb97bc47d7bd932ba', class: "recording-indicator" })))), h("button", { key: 'e986f20a8e3d02f38e58c6a6e6946795d6d29875', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": i18next.t("a11y.textSearchButton") }, this.isShowPreloader() ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))), this.autoSuggestShow &&
288
- renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: '470a0c67f9f310f775566a4e581be3dbb7a7cb95', class: "text-search-tooltip", part: "text-search-tooltip" }, i18next.t(this.tooltipText)))));
288
+ }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { useDragAndDrop: this.useDragAndDrop, parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: 'a5ab212b55f258c70fa0fbee172753614ef9c363', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
289
+ this.recognition && (h("button", { key: '251ac94cac8ae50af09ea450f66348faad27f347', class: "speech-button", part: "speech-button", "aria-label": i18next.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, h(MicIcon, { key: '3ee272b4696a78dbe8c8c4ecc915c3704fecb7a3' }), this.isShowRecording() && (h("span", { key: 'a0b2bcaeff31df8d27a2645da02dc00a78940735', class: "recording-indicator" })))), h("button", { key: '1639827b452ff09835eeee31736cd86d80036681', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": i18next.t("a11y.textSearchButton") }, this.isShowPreloader() ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))), this.autoSuggestShow &&
290
+ renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: '5cdc28a630f1d1e92444382e5c13da889b617e15', class: "text-search-tooltip", part: "text-search-tooltip" }, i18next.t(this.tooltipText)))));
289
291
  }
290
292
  static get is() { return "vviinn-text-search"; }
291
293
  static get encapsulation() { return "shadow"; }
@@ -550,6 +552,26 @@ export class VviinnTextSearch {
550
552
  "setter": false,
551
553
  "reflect": false
552
554
  },
555
+ "useDragAndDrop": {
556
+ "type": "boolean",
557
+ "attribute": "use-drag-and-drop",
558
+ "mutable": false,
559
+ "complexType": {
560
+ "original": "boolean",
561
+ "resolved": "boolean",
562
+ "references": {}
563
+ },
564
+ "required": false,
565
+ "optional": false,
566
+ "docs": {
567
+ "tags": [],
568
+ "text": "Accept image files dropped from the OS onto the upload button (desktop only)"
569
+ },
570
+ "getter": false,
571
+ "setter": false,
572
+ "reflect": false,
573
+ "defaultValue": "false"
574
+ },
553
575
  "showInWidget": {
554
576
  "type": "boolean",
555
577
  "attribute": "show-in-widget",
@@ -124,17 +124,17 @@ export class RecommendationsSidebar {
124
124
  }
125
125
  render() {
126
126
  var _a;
127
- return (h(Host, { key: '1da9acded2d47540c3a92ef4bfe6c1dfad7ba39b', class: this.getClassMap(), style: { display: this.hidden ? "none" : undefined }, exportparts: `body, close-sidebar, ${carouselParts}, ${productCardParts}, ${recommendationsParts}` }, h("div", { key: 'df6276e5001060d9a5b6507b351997eb8f3aab22', class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e), role: this.showInModal ? "dialog" : "region", "aria-modal": this.showInModal ? "true" : undefined, "aria-label": i18next.t("a11y.recommendations") }, h("div", { key: '81f8cb97127186a5ae51d69e6c9d815791f7c7c3', class: {
127
+ return (h(Host, { key: '1d8e4cd403128aab03e0944fc2e4a5b0233872d0', class: this.getClassMap(), style: { display: this.hidden ? "none" : undefined }, exportparts: `body, close-sidebar, ${carouselParts}, ${productCardParts}, ${recommendationsParts}` }, h("div", { key: 'b930c6fd2eb2af705b15fc6a06e87f674a7b4f8b', class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e), role: this.showInModal ? "dialog" : "region", "aria-modal": this.showInModal ? "true" : undefined, "aria-label": i18next.t("a11y.recommendations") }, h("div", { key: 'dd428f49ceb3a3b3ef6fa81419de0575df1323ec', class: {
128
128
  "sidebar-header": true,
129
129
  "contains-source-img": this.isSourceImageValid(),
130
- }, part: "sidebar-header" }, this.mode !== "set" && (h(Fragment, { key: '65f2c04676e8e75895030d117483a55cfe8431cd' }, this.renderSourceImage(), ((_a = this.sidebarTitle) === null || _a === void 0 ? void 0 : _a.length) !== 0 && (h("span", { key: '1a5949d7ef73e7d8fd54da8852b9f6ac3fb24b67', class: "title", part: "recommendations-title" }, this.sidebarTitle || i18next.t("discoveryWidgetTitle"))), !!this.sidebarSubtitle && (h("span", { key: 'b373c3999803fc4b53a40f0f31fb17488dfa7e31', class: "subtitle", part: "recommendations-subtitle" }, this.sidebarSubtitle)))), h("button", { key: 'a11032fd9b99cfecb9be506967714620e100cfd7', class: "close-sidebar", onClick: () => {
130
+ }, part: "sidebar-header" }, this.mode !== "set" && (h(Fragment, { key: '21fafcf398cf1f3edb25cbeffdc80ecc3edc4926' }, this.renderSourceImage(), ((_a = this.sidebarTitle) === null || _a === void 0 ? void 0 : _a.length) !== 0 && (h("span", { key: '1a35ffde2d9360bc50399919bb210f38df6bd906', class: "title", part: "recommendations-title" }, this.sidebarTitle || i18next.t("discoveryWidgetTitle"))), !!this.sidebarSubtitle && (h("span", { key: 'a97989a713840aabcf5e54ca2b7867a21bc3ddb4', class: "subtitle", part: "recommendations-subtitle" }, this.sidebarSubtitle)))), h("button", { key: 'c41bd72d0344559e9536c62981ffd3e9a123253c', class: "close-sidebar", onClick: () => {
131
131
  this.sidebarState = "closed";
132
132
  }, onKeyDown: (event) => {
133
133
  if (event.key === "Enter" || event.key === " ") {
134
134
  event.preventDefault();
135
135
  this.sidebarState = "closed";
136
136
  }
137
- }, part: "close-sidebar", "aria-label": i18next.t("a11y.closeButton") }, h(CrossIcon, { key: '94a609c658ca36192380ee232d956cfc9e77da15' }))), h("div", { key: '4f62b4e918a084cb7b02141df2bba3d612c382cd', class: "sidebar-content", part: "sidebar-content" }, h("vviinn-vpr-widget", { key: '2ca2caa3da08a59eb7e8d724369f2a8343fe1119', token: this.token, currencySign: this.currencySign, pricePrefix: this.pricePrefix, apiPath: this.apiPath, locale: this.locale, numberLocale: this.numberLocale, productId: this.productId, exportparts: `${carouselParts}, ${productCardParts}, ${recommendationsParts}`, imageWidth: this.imageWidth, showMultipleImages: this.showMultipleImages, setItemsAmount: this.setItemsAmount, blockTitle: this.mode !== "set" ? "" : this.sidebarTitle, blockSubtitle: this.mode === "set" ? this.sidebarSubtitle : undefined, mode: this.mode, "campaign-type": this.campaignType, useCarousel: this.useCarousel, onVviinnRecommendationsLoaded: () => {
137
+ }, part: "close-sidebar", "aria-label": i18next.t("a11y.closeButton") }, h(CrossIcon, { key: 'aaaee4b427d589ba8daacd323b3d3f249f1ac31c' }))), h("div", { key: '0b8861dffd567eb124e5bce8fc813f74227cdcb9', class: "sidebar-content", part: "sidebar-content" }, h("vviinn-vpr-widget", { key: 'bec924b0073e25b2f57ab3d05c532facd542b0a5', token: this.token, currencySign: this.currencySign, pricePrefix: this.pricePrefix, apiPath: this.apiPath, locale: this.locale, numberLocale: this.numberLocale, productId: this.productId, exportparts: `${carouselParts}, ${productCardParts}, ${recommendationsParts}`, imageWidth: this.imageWidth, showMultipleImages: this.showMultipleImages, setItemsAmount: this.setItemsAmount, blockTitle: this.mode !== "set" ? "" : this.sidebarTitle, blockSubtitle: this.mode === "set" ? this.sidebarSubtitle : undefined, mode: this.mode, "campaign-type": this.campaignType, useCarousel: this.useCarousel, onVviinnRecommendationsLoaded: () => {
138
138
  this.hidden = false;
139
139
  this.sidebarState = "open";
140
140
  }, showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, closed: this.sidebarState === "closed", opened: this.sidebarState === "open", addToBasketShow: this.addToBasketShow, cssUrl: this.cssUrl, showFilters: this.showFilters, setModeDiscounts: this.setModeDiscounts, updateButtonLocation: this.updateButtonLocation, addPriceContainer: this.addPriceContainer, favoriteShow: this.favoriteShow, isAppended: this.isAppended, showInWidget: this.showInWidget, recommendationsLoading: this.recommendationsLoading, setRecommendationsLoading: this.setRecommendationsLoading, imageResolutionWidth: this.imageResolutionWidth, uiSessionId: this.uiSessionId })))));
@@ -214,7 +214,7 @@ export class VviinnVprButton {
214
214
  }
215
215
  }
216
216
  render() {
217
- return (h(Host, { key: '2d6cd8ecdeadf7205ad1b9b7170dc5ad28d43c3b', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: 'f6852f2eb943f40d692bf5e0609a5ac1628f598f', addStyle: this.addStyle, part: "vviinn-button" }, h("slot", { key: '5f934ba1ef44cb5133dcf2a843429c5f92858514' }, this.campaignType === "VCS" ? (h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
217
+ return (h(Host, { key: '6edbdcb0f7dc456060d8a87cab4d347fca170165', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: '3dbb30111e60d51feb77a2ac9cbeb669f11dd620', addStyle: this.addStyle, part: "vviinn-button" }, h("slot", { key: '3dee5fa42088fb238db95b62b7a97aa6cff56b93' }, this.campaignType === "VCS" ? (h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
218
218
  }
219
219
  handleClick() {
220
220
  const sidebar = document.createElement("vviinn-recommendations-sidebar");
@@ -2,7 +2,7 @@ import { Host, h, } from "@stencil/core";
2
2
  import { SearchModalCameraIcon, SearchModalFullSearchIcon, SearchModalImageSearchIcon, } from "../vviinn-icons";
3
3
  import { SlotSkeleton } from "../customized-slots";
4
4
  import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
5
- import { findSlotElements } from "../../dom";
5
+ import { findSlotElements, hasDefaultSlotContent } from "../../dom";
6
6
  import { SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH } from "../../widget/constants";
7
7
  import { searchModalFirstScreenParts } from "../../cssParts";
8
8
  import { renderExternalCSS } from "../../utils/cssUrl/cssUrlHelper";
@@ -12,6 +12,8 @@ import { initializeLocale } from "../../locale";
12
12
  * @slot vviinn-teaser-text - Text on the widget's main screen.
13
13
  * @slot vviinn-image-upload-button-text - Title of Upload Button.
14
14
  * @slot vviinn-image-upload-icon - Icon of Upload Button.
15
+ * @slot vviinn-drag-drop-icon - Icon of the drag & drop zone.
16
+ * @slot vviinn-drag-drop-text - Hint text of the drag & drop zone.
15
17
  * @slot vviinn-camera-button-text-start - Title of Start Camera button.
16
18
  * @slot vviinn-camera-button-text-stop - Title of Stop Camera button (for Desktop).
17
19
  * @slot vviinn-camera-icon - Icon of Camera Button.
@@ -39,6 +41,7 @@ import { initializeLocale } from "../../locale";
39
41
  * @part secondary-action - Back Button in the modal's header.
40
42
  * @part results-title - Title on the results page.
41
43
  * @part upload-photo_button - Upload Photo Button.
44
+ * @part drop-zone - Drag & drop container (when useDragAndDrop is enabled).
42
45
  * @part start-camera_button - Start Camera Button.
43
46
  * @part products - Products container.
44
47
  * @part product-card - Product Card itself.
@@ -113,6 +116,8 @@ export class VviinnVpsButton {
113
116
  this.imageResolutionWidth = SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH;
114
117
  /** Show multiple images: swiper on mobile, hover on desktop in product cards */
115
118
  this.showMultipleImages = false;
119
+ /** Accept image files dropped from the OS onto the upload button (desktop only) */
120
+ this.useDragAndDrop = false;
116
121
  /** Example image source */
117
122
  this.exampleImageSource = DEFAULT_EXAMPLE_IMAGE;
118
123
  /** Show the text search */
@@ -139,6 +144,12 @@ export class VviinnVpsButton {
139
144
  this.parentSlots = [];
140
145
  this.buttonPressed = false;
141
146
  this.slots = [];
147
+ // True when the consumer projects real content into the default slot (custom
148
+ // trigger). Whitespace-only text and named-slot children don't count, so
149
+ // formatting newlines around named slots can't suppress the fallback icon.
150
+ // @State + the default slot's slotchange keep this reactive to light-DOM that
151
+ // is projected/removed after load (e.g. deferred hydration, async injection).
152
+ this.hasCustomTrigger = false;
142
153
  this.allSlots = () => [...this.parentSlots, ...this.slots];
143
154
  this.handleActivation = () => {
144
155
  this.buttonPressed = true;
@@ -166,6 +177,7 @@ export class VviinnVpsButton {
166
177
  async componentWillLoad() {
167
178
  await initializeLocale(this.locale);
168
179
  this.slots = findSlotElements(this.el);
180
+ this.hasCustomTrigger = hasDefaultSlotContent(this.el);
169
181
  }
170
182
  componentDidLoad() {
171
183
  this.replaceSlotsContent();
@@ -205,8 +217,8 @@ export class VviinnVpsButton {
205
217
  }
206
218
  render() {
207
219
  const { ariaLabel, buttonIcon } = this.getButtonConfig();
208
- return (h(Host, { key: '2d9e0e9860039f521305b3f25da2a6aa5fee5e37', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: '33bf0113ab55a6bf91cf25181fe8d863af84d264', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("slot", { key: '922d706ce5bf9418c3747fc69bf7920d2ad53c8b' }, buttonIcon)), SlotSkeleton("search"), h("vviinn-vps-widget", { key: 'd6735e7ff8e3ca9dca10f5546d7c4f9f97a8ffa7', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
209
- (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
220
+ return (h(Host, { key: '47a83c95c23f2450b3f298343577072c91d871e9', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: '42131f699f2808187d108e0089a3f1c423bffdeb', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("span", { key: '901c041c6a574f74276e8d345f228d7095b2be92', style: { display: this.hasCustomTrigger ? "contents" : "none" } }, h("slot", { key: '01dbb14f71554ccb92a7bd041be220d9fb4d6e1b', onSlotchange: () => (this.hasCustomTrigger = hasDefaultSlotContent(this.el)) })), !this.hasCustomTrigger && buttonIcon), SlotSkeleton("search"), h("vviinn-vps-widget", { key: '7ab197dbf91b01d64fbdf1aac1c5d6a88134c7bb', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
221
+ (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, useDragAndDrop: this.useDragAndDrop, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
210
222
  }
211
223
  static get is() { return "vviinn-vps-button"; }
212
224
  static get encapsulation() { return "shadow"; }
@@ -529,6 +541,26 @@ export class VviinnVpsButton {
529
541
  "reflect": false,
530
542
  "defaultValue": "false"
531
543
  },
544
+ "useDragAndDrop": {
545
+ "type": "boolean",
546
+ "attribute": "use-drag-and-drop",
547
+ "mutable": false,
548
+ "complexType": {
549
+ "original": "boolean",
550
+ "resolved": "boolean",
551
+ "references": {}
552
+ },
553
+ "required": false,
554
+ "optional": false,
555
+ "docs": {
556
+ "tags": [],
557
+ "text": "Accept image files dropped from the OS onto the upload button (desktop only)"
558
+ },
559
+ "getter": false,
560
+ "setter": false,
561
+ "reflect": false,
562
+ "defaultValue": "false"
563
+ },
532
564
  "exampleImageSource": {
533
565
  "type": "string",
534
566
  "attribute": "example-image-source",
@@ -843,7 +875,8 @@ export class VviinnVpsButton {
843
875
  }
844
876
  static get states() {
845
877
  return {
846
- "buttonPressed": {}
878
+ "buttonPressed": {},
879
+ "hasCustomTrigger": {}
847
880
  };
848
881
  }
849
882
  static get events() {
@@ -318,7 +318,7 @@ vviinn-overlayed-modal.first-screen::part(secondary-action) {
318
318
  height: 48px;
319
319
  justify-items: center;
320
320
  font-family: var(--font-family, var(--font-family-base));
321
- transition: background 0.1s ease-in-out;
321
+ transition: background 0.15s ease-in-out;
322
322
  color: var(--color-text-primary);
323
323
  background-color: #f4f4f4;
324
324
  }
@@ -359,6 +359,40 @@ vviinn-overlayed-modal.first-screen::part(secondary-action) {
359
359
  display: none;
360
360
  }
361
361
 
362
+ .upload-drop-zone {
363
+ display: flex;
364
+ flex-direction: column;
365
+ align-items: center;
366
+ gap: var(--spacing-150);
367
+ padding: var(--spacing-200);
368
+ box-sizing: border-box;
369
+ cursor: pointer;
370
+ background: var(--button-bg-color-secondary);
371
+ border: 1px dashed var(--color-border-02);
372
+ border-radius: var(--border-radius-50);
373
+ font-family: var(--font-family, var(--font-family-base));
374
+ transition:
375
+ border-color 0.1s ease-in-out,
376
+ background 0.1s ease-in-out;
377
+ }
378
+
379
+ .upload-drop-zone.drag-over {
380
+ border-color: var(--color-primary, var(--button-bg-color-primary));
381
+ background: color-mix(
382
+ in srgb,
383
+ var(--color-primary, var(--button-bg-color-primary)) 8%,
384
+ transparent
385
+ );
386
+ }
387
+
388
+ /* Slotted icon lives in this tree, so it must be sized here (not in the child). */
389
+ .upload-drop-zone [slot="drop-zone-icon"] svg {
390
+ display: block;
391
+ width: 32px;
392
+ height: 32px;
393
+ color: var(--color-text-secondary);
394
+ }
395
+
362
396
  .results-page {
363
397
  padding-top: 64px;
364
398
  display: grid;
@@ -21,7 +21,7 @@ import { createWidgetEvent, createFilterEvent, createImageSearchEvent, } from ".
21
21
  import { campaignTypeNames } from "../../campaign/Campaign";
22
22
  import { addIfNotEmpty, parseStringToExcluded, } from "../../utils/collections/collectionsUtils";
23
23
  import { initializeLocale } from "../../locale";
24
- import { CameraActionIcon, UploadActionIcon } from "../vviinn-icons";
24
+ import { CameraActionIcon, UploadActionIcon, DragDropImageIcon, } from "../vviinn-icons";
25
25
  import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
26
26
  import { videoStreamSettings } from "../../video/settings";
27
27
  import { checkDeviceType } from "../../helpers/device/checkDeviceType";
@@ -123,6 +123,8 @@ export class VviinnVpsWidget {
123
123
  this.imageResolutionWidth = SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH;
124
124
  /** Show multiple images: swiper on mobile, hover on desktop in product cards */
125
125
  this.showMultipleImages = false;
126
+ /** Accept image files dropped from the OS onto the upload button (desktop only) */
127
+ this.useDragAndDrop = false;
126
128
  /** Example image source */
127
129
  this.exampleImageSource = DEFAULT_EXAMPLE_IMAGE;
128
130
  /** Show the text search */
@@ -477,9 +479,10 @@ export class VviinnVpsWidget {
477
479
  this.state.searchType === "image" &&
478
480
  this.uploadSource === "startCamera") ||
479
481
  this.isCameraInitializing;
482
+ const isDropZone = this.useDragAndDrop && this.isDesktop;
480
483
  const buttons = [
481
484
  this.cameraAvailable && (h("button", { class: "action-button", part: "start-camera_button", onClick: this.handleStartCameraClick, onKeyDown: (e) => this.handleButtonKeyDown(e, this.handleStartCameraClick) }, isLoading && h("vviinn-preloader", null), h("span", { class: { "action-button-content": true, hidden: isLoading } }, h("slot", { name: "vviinn-camera-icon" }, h(CameraActionIcon, null)), h("span", { class: { hidden: !this.isCameraEnabled } }, h("slot", { name: "vviinn-camera-button-text-stop" }, i18next.t("cameraButtonTextStop"))), h("span", { class: { hidden: this.isCameraEnabled } }, h("slot", { name: "vviinn-camera-button-text-start" }, i18next.t("cameraButtonTextStart")))))),
482
- h("vviinn-image-selector", { class: "action-button", onClick: () => {
485
+ h("vviinn-image-selector", { class: isDropZone ? "upload-drop-zone" : "action-button", onClick: () => {
483
486
  if (this.mode !== "upload")
484
487
  this.uploadSource = "uploadPhoto";
485
488
  }, onKeyDown: (e) => this.handleButtonKeyDown(e, () => {
@@ -488,11 +491,11 @@ export class VviinnVpsWidget {
488
491
  }), onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
489
492
  this.uploadDialogOpened = true;
490
493
  this.handleVviinnImageUpload("uploadPhoto");
491
- }, token: this.token, apiPath: this.apiPath, storeName: this.storeName, state: this.state, onVviinnNoResult: ({ detail }) => this.handleVviinnNoResult(detail), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: "upload-photo_button", startUpload: this.buttonPressed &&
494
+ }, token: this.token, apiPath: this.apiPath, useDragAndDrop: isDropZone, storeName: this.storeName, state: this.state, onVviinnNoResult: ({ detail }) => this.handleVviinnNoResult(detail), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: isDropZone ? "drop-zone" : "upload-photo_button", startUpload: this.buttonPressed &&
492
495
  this.mode === "upload" &&
493
496
  !this.uploadDialogOpened, showInWidget: this.showInWidget, loading: this.state.searchStatus === "loading" &&
494
497
  this.state.searchType === "image" &&
495
- this.uploadSource === "uploadPhoto" }, h("span", { slot: "upload-button-text", class: "action-button-content" }, h("slot", { name: "vviinn-image-upload-icon" }, h(UploadActionIcon, null)), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, i18next.t("imageUploadButtonText"))))),
498
+ this.uploadSource === "uploadPhoto" }, h("span", { slot: "drop-zone-icon" }, h("slot", { name: "vviinn-drag-drop-icon" }, h(DragDropImageIcon, null))), h("span", { slot: "drop-zone-text" }, h("slot", { name: "vviinn-drag-drop-text" }, i18next.t("dragDropHintText"))), h("span", { slot: "upload-button-text", class: "action-button-content" }, !isDropZone && (h("slot", { name: "vviinn-image-upload-icon" }, h(UploadActionIcon, null))), h("slot", { name: "vviinn-image-upload-button-text" }, h("span", null, i18next.t("imageUploadButtonText"))))),
496
499
  ];
497
500
  return this.isDesktop ? buttons.reverse() : buttons;
498
501
  }
@@ -518,31 +521,31 @@ export class VviinnVpsWidget {
518
521
  }
519
522
  render() {
520
523
  var _a, _b, _c;
521
- return (h(Host, { key: '0ffc3a002f79fd6481c59a582561d00f5643c33a', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: 'af3589b5adc791a3d04c7fce56e6b9177af508da', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
524
+ return (h(Host, { key: '3d819edc5b1a3ce7fc05d343f80775a425077d26', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: '48a8934f201007aacb83a1436ceee773bc4e64c1', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
522
525
  if (detail.campaignTypeId !== "VPR")
523
526
  this.handleModalClose();
524
527
  }, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: version, hideBackButton: this.mode === "upload" ||
525
- (!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '1b98b36bde65dedc539bd49468db86a7317a74d4', position: this.slidePosition }, h("vviinn-slide", { key: 'd1b48094f57f9f34a808ee79f78875793cbde05f', class: {
528
+ (!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '2e010cd695fe00d065766973467d1eb59771a803', position: this.slidePosition }, h("vviinn-slide", { key: '71b5c21bbc37d62500ae28f5070d4ab98ab08663', class: {
526
529
  "start-page": true,
527
530
  "camera-enabled": this.isCameraEnabled,
528
- } }, h("vviinn-camera", { key: 'a8b4695f255d22f80a0980fa6f7e6ef62b9f6e33', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
531
+ } }, h("vviinn-camera", { key: 'f26d9576c072b36cfbe7594deae56388dec592bb', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
529
532
  this.handleVviinnImageUpload("startCamera");
530
- }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: 'b38d1c05099d04c7a8c22587e7c02bd93fce532d', class: {
533
+ }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: '475765308993fd599a6064fde186793059eb9069', class: {
531
534
  error: this.haveErrors(),
532
- }, id: "start-page_block" }, h("div", { key: 'c989f1cb41cced69828e4f24ea925922b92218ec', class: "start-page_main-content" }, (this.wrongImageFormat ||
533
- this.state.searchStatus === "error") && (h("div", { key: 'ed3feb471a4bbd2989800c9ab698ee8c9c3f8845', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: 'f859d178f1804136273faef22e5188fd51d07d4c', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: 'b137960307e69c1884da1258a4ccb7456da4be43' }, h("vviinn-teaser", { key: '9f13392722c88be790b4a2ceed67197a25c7ccdc' }), h("div", { key: '94640ebeec975c56bac6bf90197cd95f1cb99f95', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: '3c556fa2769f9ae91d7647e834aae3033c1131e9', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: 'a4021fb73a348f19e2401852d36e16b50f93506a', privacyBadgeText: i18next.t("privacyBadgeText", {
535
+ }, id: "start-page_block" }, h("div", { key: '1c3e3a20caa40a360e7133a300f36a138e09cb4e', class: "start-page_main-content" }, (this.wrongImageFormat ||
536
+ this.state.searchStatus === "error") && (h("div", { key: 'aed26307e98322b8355dc58f19f51079eb8f5939', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: 'af8b068c7ab554f66565e445a2562e5de1b1e70b', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: 'ff464606d3447e0feab7690c4aaffa1389adea38' }, h("vviinn-teaser", { key: '91043f95623cae0f7f39902612ea8e4056361c44' }), h("div", { key: '83bf07377aabb98372a5688b51b8fd92328c9ba2', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: 'e0a766d21276ecca7d075ff9fef2aa7ba0ebfc93', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: 'be525a2dc35924de5c73275939b61fc474fe0ce0', privacyBadgeText: i18next.t("privacyBadgeText", {
534
537
  interpolation: { escapeValue: false },
535
- }), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: 'e9fabc9d45efd4f621454b076f9508c3b79ce690', class: {
538
+ }), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: '73565ad9d70d0fa39bc7031a3cc0af988e70eb64', class: {
536
539
  "results-page": true,
537
540
  active: this.isResultSlide(),
538
- } }, this.isResultSlide() && (h("div", { key: '5240101a650b79c94b9c1e7a835f7061a328b41c', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '91c201e63dc2f01a4d00fe6f5a08e6627cfb7873', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: 'ba7917b428a626458ab0956c028ac6d7fc3310f0', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: '7954cbf976caf22a47d1b59cd242aad2546e4da5', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: 'ac42d53feaeb3af7bc3e916e5a4cee9a9ba4b395', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: 'f8869d18215c0d35196217efdad6501234cbbf97', class: {
541
+ } }, this.isResultSlide() && (h("div", { key: '439495970eb510e757737be0b95b8e6431ec705a', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '8bc91e68349913cb9eda6e6166825f32d7afeb5f', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: 'bdf8e645e389c39947ece8c0576adea23e40d80d', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: '5088ac4c87e0351f39743484b717b2233d1cd6cc', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: '64b97e027404482d52003d6fff076779d585f90e', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: '08dc0f036a9e27a62e688389118664ec6d38f5fe', class: {
539
542
  "filters-wrapper": true,
540
543
  hidden: this.showAspectRatioError,
541
- } }, h("vviinn-filters", { key: '87c6a34f3600b5c27bc0a9dc4e68239a5179593d', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: '2185ccdc5005da02c03562b290693390a6ecf2ff', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: '3b65d1435f512939444dcef95a4902c0f70a25f1', class: {
544
+ } }, h("vviinn-filters", { key: '0e0634bc3963b7f87e19fa5ef9814d1206368e5f', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: 'a12da4af4e2922904bc3acbaae517c5268385b61', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: '63ed9c068918f1915a84ab90af1a0d2e6eccd596', class: {
542
545
  "extended-filters-button": true,
543
546
  "has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
544
547
  .length > 0,
545
- }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '20234d1d8db73b4a0e7e3160ece10ec961623970' }, h("vviinn-results", { key: 'b66732f0a86a9e296e4fd6dbb1c75e4e4debe657', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: 'b08b5f73b3462169236f63aa2499940aa0898115', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
548
+ }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: 'f82ea6c8e9009241f94f70ec9512ede273db9052' }, h("vviinn-results", { key: '422e0d0c3b7f93bab6f6581a7c352107774f6c87', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: '203270237562c97f144ccce3ba364893a1ecafd5', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
546
549
  }
547
550
  static get is() { return "vviinn-vps-widget"; }
548
551
  static get encapsulation() { return "shadow"; }
@@ -858,6 +861,26 @@ export class VviinnVpsWidget {
858
861
  "reflect": false,
859
862
  "defaultValue": "false"
860
863
  },
864
+ "useDragAndDrop": {
865
+ "type": "boolean",
866
+ "attribute": "use-drag-and-drop",
867
+ "mutable": false,
868
+ "complexType": {
869
+ "original": "boolean",
870
+ "resolved": "boolean",
871
+ "references": {}
872
+ },
873
+ "required": false,
874
+ "optional": false,
875
+ "docs": {
876
+ "tags": [],
877
+ "text": "Accept image files dropped from the OS onto the upload button (desktop only)"
878
+ },
879
+ "getter": false,
880
+ "setter": false,
881
+ "reflect": false,
882
+ "defaultValue": "false"
883
+ },
861
884
  "exampleImageSource": {
862
885
  "type": "string",
863
886
  "attribute": "example-image-source",
@@ -16,12 +16,14 @@ export const searchWidgetFilterParts = makeExportPartsString(extendedFiltersPart
16
16
  export const searchWidgetButtonParts = makeExportPartsString([
17
17
  "upload-photo_button",
18
18
  "start-camera_button",
19
+ "drop-zone",
19
20
  ]);
20
21
  export const searchModalFirstScreenParts = makeExportPartsString([
21
22
  "close-button",
22
23
  "secondary-action",
23
24
  "upload-photo_button",
24
25
  "start-camera_button",
26
+ "drop-zone",
25
27
  ]);
26
28
  export const searchBarParts = makeExportPartsString([
27
29
  "text-search-input",
@@ -4,6 +4,13 @@ export const findTarget = (ev) => {
4
4
  };
5
5
  export const findSlotElements = (el) => Array.from(el.querySelectorAll("[slot]"));
6
6
  export const getSlotNames = (slotElements) => slotElements.map((el) => el.getAttribute("slot"));
7
+ // True when the element has real default-slot content: an element child with no
8
+ // `slot` attribute, or a non-whitespace text node. Whitespace and named-slot
9
+ // children don't count, so formatting newlines can't suppress a slot fallback.
10
+ export const hasDefaultSlotContent = (el) => Array.from(el.childNodes).some((node) => node.nodeType === Node.TEXT_NODE
11
+ ? node.textContent.trim() !== ""
12
+ : node.nodeType === Node.ELEMENT_NODE &&
13
+ !node.getAttribute("slot"));
7
14
  // Intersection Observer utilities
8
15
  export * from "./intersectionObserver";
9
16
  export function addEventListenersWithSignal(target, listeners, signal) {
@@ -0,0 +1,2 @@
1
+ /** Returns the first file from a drop's DataTransfer (no type validation). */
2
+ export const parseDroppedFile = (dataTransfer) => { var _a, _b; return (_b = (_a = dataTransfer === null || dataTransfer === void 0 ? void 0 : dataTransfer.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null; };
@@ -17,9 +17,10 @@ export const resources = {
17
17
  },
18
18
  exampleImagesTitle: "Mit den Beispielbildern die Suche direkt ausprobieren",
19
19
  imageUploadButtonText: "Bild hochladen",
20
+ dragDropHintText: "Bild per Drag & Drop hierhin ziehen",
20
21
  cameraButtonTextStart: "Kamera starten",
21
22
  cameraButtonTextStop: "Kamera stoppen",
22
- privacyBadgeText: `Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${VVIINN_LINK} ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.`,
23
+ privacyBadgeText: `Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner ${VVIINN_LINK} ein.`,
23
24
  teaserText: "Finde Dein Produkt",
24
25
  imageSearchModalTitle: "KI-Suche",
25
26
  textSearchPlaceholder: "mit Text suchen",
@@ -148,9 +149,10 @@ export const resources = {
148
149
  },
149
150
  exampleImagesTitle: "Try out the search with the example images",
150
151
  imageUploadButtonText: "Upload Photo",
152
+ dragDropHintText: "Drag and drop your image here",
151
153
  cameraButtonTextStart: "Start Camera",
152
154
  cameraButtonTextStop: "Stop Camera",
153
- privacyBadgeText: `By uploading a picture you agree to the processing by our partner ${VVIINN_LINK}. The image will be deleted after one hour of inactivity.`,
155
+ privacyBadgeText: `By uploading a picture you agree to the processing by our partner ${VVIINN_LINK}.`,
154
156
  teaserText: "Find Your Product",
155
157
  imageSearchModalTitle: "AI Search",
156
158
  textSearchPlaceholder: "Search by text",
@@ -1,4 +1,4 @@
1
- import { h } from './index-RkvPN2Rk.js';
1
+ import { h } from './index-B89nCb_F.js';
2
2
 
3
3
  const SecondaryActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
4
4
  h("path", { d: "M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z", fill: "currentColor" })));
@@ -1,4 +1,4 @@
1
- import { h } from './index-RkvPN2Rk.js';
1
+ import { h } from './index-B89nCb_F.js';
2
2
 
3
3
  const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? h("link", { href: cssUrl, rel: "stylesheet" }) : null;
4
4
 
@@ -1562,6 +1562,9 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1562
1562
  }
1563
1563
  };
1564
1564
  var getHostListenerTarget = (doc, elm, flags) => {
1565
+ if (flags & 4 /* TargetDocument */) {
1566
+ return doc;
1567
+ }
1565
1568
  if (flags & 8 /* TargetWindow */) {
1566
1569
  return win;
1567
1570
  }