vviinn-widgets 2.218.0 → 2.220.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 (68) hide show
  1. package/dist/cjs/cssUrlHelper-BX9kngtZ.js +7 -0
  2. package/dist/cjs/{index-C2IFqNzB.js → index-FE9nOqQo.js} +1 -1
  3. package/dist/cjs/{openProductLink-BwHUGXtr.js → openProductLink-B3cy6uw_.js} +0 -5
  4. package/dist/cjs/{search.store-CEC5R32_.js → search.store-C6QU_D02.js} +3 -9
  5. package/dist/cjs/vviinn-button_6.cjs.entry.js +3 -2
  6. package/dist/cjs/vviinn-camera_12.cjs.entry.js +17 -16
  7. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +7 -6
  8. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +4 -3
  9. package/dist/cjs/vviinn-text-search.cjs.entry.js +27 -24
  10. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -2
  11. package/dist/collection/components/vviinn-text-search/helpers/autoSuggestDebounce.js +4 -4
  12. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +25 -22
  13. package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +2 -1
  14. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +4 -3
  15. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +12 -12
  16. package/dist/collection/store/search.store.js +2 -7
  17. package/dist/esm/cssUrlHelper-DsQD_dY6.js +5 -0
  18. package/dist/esm/{index-DT_CMr4r.js → index-ChtanA0O.js} +1 -1
  19. package/dist/esm/{openProductLink-CJ9Wo3Ye.js → openProductLink-C7_qzUNW.js} +1 -5
  20. package/dist/esm/{search.store-ClFXu6V6.js → search.store-BVRhMpHA.js} +4 -9
  21. package/dist/esm/vviinn-button_6.entry.js +3 -2
  22. package/dist/esm/vviinn-camera_12.entry.js +15 -14
  23. package/dist/esm/vviinn-carousel_10.entry.js +4 -3
  24. package/dist/esm/vviinn-shop-the-look.entry.js +3 -2
  25. package/dist/esm/vviinn-text-search.entry.js +27 -24
  26. package/dist/esm/vviinn-vps-button.entry.js +3 -2
  27. package/dist/types/components/vviinn-text-search/helpers/autoSuggestDebounce.d.ts +2 -1
  28. package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +2 -1
  29. package/dist/types/store/search.store.d.ts +1 -3
  30. package/dist/vviinn-widgets/p-1888506e.entry.js +1 -0
  31. package/dist/vviinn-widgets/p-55582bb6.entry.js +1 -0
  32. package/dist/vviinn-widgets/p-773cdbb0.entry.js +1 -0
  33. package/dist/vviinn-widgets/p-7f9e1cff.entry.js +1 -0
  34. package/dist/vviinn-widgets/p-C7_qzUNW.js +1 -0
  35. package/dist/vviinn-widgets/{p-BSSEWLP1.js → p-CU3f7I7a.js} +1 -1
  36. package/dist/vviinn-widgets/{p-BdbY-xGp.js → p-CZFFW_Cj.js} +1 -1
  37. package/dist/vviinn-widgets/p-D3wRLf2J.js +1 -0
  38. package/dist/vviinn-widgets/p-a145a231.entry.js +1 -0
  39. package/dist/vviinn-widgets/p-ffbd1062.entry.js +1 -0
  40. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  41. package/package.json +1 -1
  42. package/www/build/p-1888506e.entry.js +1 -0
  43. package/www/build/{p-5fc04ad1.js → p-1f41ab53.js} +1 -1
  44. package/www/build/p-55582bb6.entry.js +1 -0
  45. package/www/build/p-773cdbb0.entry.js +1 -0
  46. package/www/build/p-7f9e1cff.entry.js +1 -0
  47. package/www/build/p-C7_qzUNW.js +1 -0
  48. package/www/build/{p-BSSEWLP1.js → p-CU3f7I7a.js} +1 -1
  49. package/www/build/{p-BdbY-xGp.js → p-CZFFW_Cj.js} +1 -1
  50. package/www/build/p-D3wRLf2J.js +1 -0
  51. package/www/build/p-a145a231.entry.js +1 -0
  52. package/www/build/p-ffbd1062.entry.js +1 -0
  53. package/www/build/vviinn-widgets.esm.js +1 -1
  54. package/www/index.html +1 -1
  55. package/dist/vviinn-widgets/p-18d5ac42.entry.js +0 -1
  56. package/dist/vviinn-widgets/p-8d9c02d5.entry.js +0 -1
  57. package/dist/vviinn-widgets/p-CtSr754V.js +0 -1
  58. package/dist/vviinn-widgets/p-bb2f8c8f.entry.js +0 -1
  59. package/dist/vviinn-widgets/p-c4c7913e.entry.js +0 -1
  60. package/dist/vviinn-widgets/p-eff82269.entry.js +0 -1
  61. package/dist/vviinn-widgets/p-fbbf34ba.entry.js +0 -1
  62. package/www/build/p-18d5ac42.entry.js +0 -1
  63. package/www/build/p-8d9c02d5.entry.js +0 -1
  64. package/www/build/p-CtSr754V.js +0 -1
  65. package/www/build/p-bb2f8c8f.entry.js +0 -1
  66. package/www/build/p-c4c7913e.entry.js +0 -1
  67. package/www/build/p-eff82269.entry.js +0 -1
  68. package/www/build/p-fbbf34ba.entry.js +0 -1
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-D38ORu31.js');
4
+
5
+ const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? index.h("link", { href: cssUrl, rel: "stylesheet" }) : null;
6
+
7
+ exports.renderExternalCSS = renderExternalCSS;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D38ORu31.js');
4
- var search_store = require('./search.store-CEC5R32_.js');
4
+ var search_store = require('./search.store-C6QU_D02.js');
5
5
  var store = require('./store-jPZ4ROqV.js');
6
6
 
7
7
  const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
@@ -1,9 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-D38ORu31.js');
4
-
5
- const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? index.h("link", { href: cssUrl, rel: "stylesheet" }) : null;
6
-
7
3
  const openProductLink = (deeplink, event, productDetailsRedirect = true, productDetailsNewTab = false) => {
8
4
  if (!productDetailsRedirect)
9
5
  return;
@@ -17,4 +13,3 @@ const openProductLink = (deeplink, event, productDetailsRedirect = true, product
17
13
  };
18
14
 
19
15
  exports.openProductLink = openProductLink;
20
- exports.renderExternalCSS = renderExternalCSS;
@@ -8593,7 +8593,7 @@ const encodeToBase64UTF8 = (str) => {
8593
8593
  return btoa(String.fromCharCode.apply(null, utf8Array));
8594
8594
  };
8595
8595
 
8596
- const version = "2.218.0";
8596
+ const version = "2.220.0";
8597
8597
 
8598
8598
  const appStateGlobalDefaults = {
8599
8599
  excluded: null,
@@ -8623,7 +8623,6 @@ const receivedDataDefaults = {
8623
8623
  detectedObjects: [],
8624
8624
  stream: null,
8625
8625
  redirect: null,
8626
- autoSuggestCompletions: [],
8627
8626
  };
8628
8627
  const storeDefaults = Object.assign(Object.assign(Object.assign({}, appStateGlobalDefaults), appStateDefaults), receivedDataDefaults);
8629
8628
  const widgetStore = createStore(storeDefaults);
@@ -8867,7 +8866,7 @@ const useSearchStore = (showInWidget) => showInWidget
8867
8866
  onChange: onChangeComponentsState,
8868
8867
  storeName: "components",
8869
8868
  };
8870
- const makeAutoSuggestRequest = async (store, query, token, apiPath) => {
8869
+ const makeAutoSuggestRequest = async (store, query, token, apiPath, onCompletions) => {
8871
8870
  const state = useStore(store);
8872
8871
  const body = {
8873
8872
  query,
@@ -8878,7 +8877,7 @@ const makeAutoSuggestRequest = async (store, query, token, apiPath) => {
8878
8877
  ((_a = state.textSearchQuery) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()))
8879
8878
  return response;
8880
8879
  const completions = (_b = response.data.completions) !== null && _b !== void 0 ? _b : [];
8881
- state.autoSuggestCompletions = completions;
8880
+ onCompletions === null || onCompletions === void 0 ? void 0 : onCompletions(completions);
8882
8881
  const matchingCompletion = completions.find((completion) => completion.suggestion.trim().toLowerCase() ===
8883
8882
  query.trim().toLowerCase() && (completion === null || completion === void 0 ? void 0 : completion.url));
8884
8883
  if (matchingCompletion === null || matchingCompletion === void 0 ? void 0 : matchingCompletion.url) {
@@ -8890,17 +8889,12 @@ const makeAutoSuggestRequest = async (store, query, token, apiPath) => {
8890
8889
  return response;
8891
8890
  }), Rectangle.mapLeft((error) => error))();
8892
8891
  };
8893
- const clearAutoSuggestCompletions = (store) => {
8894
- const state = useStore(store);
8895
- state.autoSuggestCompletions = [];
8896
- };
8897
8892
 
8898
8893
  exports._ArrayExports = _ArrayExports;
8899
8894
  exports.addIfNotEmpty = addIfNotEmpty;
8900
8895
  exports.campaignTypeNames = campaignTypeNames;
8901
8896
  exports.checkDeviceType = checkDeviceType;
8902
8897
  exports.checkImageType = checkImageType;
8903
- exports.clearAutoSuggestCompletions = clearAutoSuggestCompletions;
8904
8898
  exports.extractFilterValue = extractFilterValue;
8905
8899
  exports.fold = fold;
8906
8900
  exports.fromString = fromString;
@@ -2,12 +2,13 @@
2
2
 
3
3
  var index = require('./index-D38ORu31.js');
4
4
  var store = require('./store-jPZ4ROqV.js');
5
- var search_store = require('./search.store-CEC5R32_.js');
5
+ var search_store = require('./search.store-C6QU_D02.js');
6
6
  var index$1 = require('./index-CBteD3gC.js');
7
7
  var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
8
8
  var index$2 = require('./index-CvMi8_tX.js');
9
9
  var constants = require('./constants-BlwqMvns.js');
10
10
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
11
+ var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
11
12
 
12
13
  const CrossIcon = () => (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
14
  index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "currentColor" })));
@@ -526,7 +527,7 @@ const VviinnVprButton = class {
526
527
  }
527
528
  }
528
529
  render() {
529
- return (index.h(index.Host, { key: 'e1d8ff31a915dc5aef78838bd4f84e2e416b0953', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, index.h("vviinn-button", { key: 'b5178a6135d508c7b1f04ab159e7c8117ee986af', addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", { key: '882bd8cfa3a809e99bb4a1162e8988d49b327113' }, this.campaignType === "VCS" ? (index.h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (index.h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
530
+ return (index.h(index.Host, { key: '2d6cd8ecdeadf7205ad1b9b7170dc5ad28d43c3b', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("vviinn-button", { key: 'f6852f2eb943f40d692bf5e0609a5ac1628f598f', addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", { key: '5f934ba1ef44cb5133dcf2a843429c5f92858514' }, this.campaignType === "VCS" ? (index.h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (index.h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
530
531
  }
531
532
  handleClick() {
532
533
  const sidebar = document.createElement("vviinn-recommendations-sidebar");
@@ -2,15 +2,16 @@
2
2
 
3
3
  var index = require('./index-D38ORu31.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
- var search_store = require('./search.store-CEC5R32_.js');
5
+ var search_store = require('./search.store-C6QU_D02.js');
6
6
  var index$2 = require('./index-CBteD3gC.js');
7
- var index$1 = require('./index-C2IFqNzB.js');
7
+ var index$1 = require('./index-FE9nOqQo.js');
8
8
  var store = require('./store-jPZ4ROqV.js');
9
9
  var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
10
- var openProductLink = require('./openProductLink-BwHUGXtr.js');
10
+ var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
11
11
  var index$3 = require('./index-CvMi8_tX.js');
12
12
  var resultsPageUrl = require('./resultsPageUrl-Cki7CFQz.js');
13
13
  var constants = require('./constants-BlwqMvns.js');
14
+ var openProductLink = require('./openProductLink-B3cy6uw_.js');
14
15
  var constants$1 = require('./constants-DHaugTOE.js');
15
16
 
16
17
  const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
@@ -435,7 +436,7 @@ const VviinnCropper = class {
435
436
  return (index.h(index.Host, { key: 'ae2656d0782e723ffe5c8ba9ad6074db55e219c0', class: {
436
437
  "show-in-widget": this.showInWidget,
437
438
  active: !!this.state.image,
438
- } }, openProductLink.renderExternalCSS(this.cssUrl), index.h("div", { key: '0c547762649ddc68aa2755681c6637ec1556b315', class: "container" }, this.state.image && (index.h("div", { key: '811e79aaf4ee1144c8c6ce0017300ba9aeda8803', class: "image-container", style: {
439
+ } }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '0c547762649ddc68aa2755681c6637ec1556b315', class: "container" }, this.state.image && (index.h("div", { key: '811e79aaf4ee1144c8c6ce0017300ba9aeda8803', class: "image-container", style: {
439
440
  width: `${this.width.toString()}px`,
440
441
  overflow: "hidden",
441
442
  } }, index.h("img", { key: '458474fa006a1397daa335fb9ee50477ab0e62ce', decoding: "async", width: this.width, height: this.height, src: this.state.image.src, draggable: false, onLoad: this.loadImage, alt: store.instance.t("a11y.cropperImage") }), (_a = this.state.detectedObjects) === null || _a === void 0 ? void 0 :
@@ -984,7 +985,7 @@ const VviinnResults = class {
984
985
  return (index.h(index.Host, { key: '2ba9c019be5e6d2a70f299ebd4827baefa671cad', id: "results-block", class: {
985
986
  "show-in-widget": this.showInWidget,
986
987
  "matching-discovery": this.oneClickDiscoveryMode === "append-slider",
987
- }, exportparts: `${index$3.productCardParts}, ${index$3.listCardParts}, ${index$3.contentCardParts}, ${index$3.productCardsGridPart}` }, openProductLink.renderExternalCSS(this.cssUrl), index.h("div", { key: '8521abb79a86723af8f18cd66558f8cd56d0d725', class: "nothing-found" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '030f376feaa161d598dc60e2deae0bcde368759a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), index.h("div", { key: '82a242f74f6a5481b40ec26a977d11465a5c58da', class: {
988
+ }, exportparts: `${index$3.productCardParts}, ${index$3.listCardParts}, ${index$3.contentCardParts}, ${index$3.productCardsGridPart}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '8521abb79a86723af8f18cd66558f8cd56d0d725', class: "nothing-found" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '030f376feaa161d598dc60e2deae0bcde368759a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), index.h("div", { key: '82a242f74f6a5481b40ec26a977d11465a5c58da', class: {
988
989
  hidden: this.showAspectRatioError || resultsLength === 0,
989
990
  products: true,
990
991
  }, part: index$3.productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), index.h("div", { key: 'ed28c78ddfa0826f8ad8a70639e83386d9297c7c', id: "one-click-discovery-append", style: {
@@ -1757,7 +1758,7 @@ const VviinnVpsWidget = class {
1757
1758
  /** Show the text search */
1758
1759
  this.textSearchShow = false;
1759
1760
  /** Show auto-suggest dropdown with search completions */
1760
- this.autoSuggestShow = false;
1761
+ this.autoSuggestShow = true;
1761
1762
  /** Show or hide Add to Basket buttons */
1762
1763
  this.addToBasketShow = false;
1763
1764
  /** Show or hide Favorite button */
@@ -2147,31 +2148,31 @@ const VviinnVpsWidget = class {
2147
2148
  }
2148
2149
  render() {
2149
2150
  var _a, _b, _c;
2150
- return (index.h(index.Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${index$3.modalParts}, ${index$3.productCardParts}, ${index$3.searchBarParts}, ${index$3.searchWidgetFilterParts}, ${index$3.searchWidgetButtonParts}, ${index$3.productCardsGridPart}, ${index$3.suggestionsParts}` }, openProductLink.renderExternalCSS(this.cssUrl), !this.showingInButton && index$2.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: '42c48cf9f6414ccd23705ad4a1ca2dcccf6aa65f', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
2151
+ return (index.h(index.Host, { key: '0ffc3a002f79fd6481c59a582561d00f5643c33a', exportparts: `${index$3.modalParts}, ${index$3.productCardParts}, ${index$3.searchBarParts}, ${index$3.searchWidgetFilterParts}, ${index$3.searchWidgetButtonParts}, ${index$3.productCardsGridPart}, ${index$3.suggestionsParts}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), !this.showingInButton && index$2.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: 'af3589b5adc791a3d04c7fce56e6b9177af508da', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
2151
2152
  if (detail.campaignTypeId !== "VPR")
2152
2153
  this.handleModalClose();
2153
2154
  }, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: search_store.version, hideBackButton: this.mode === "upload" ||
2154
- (!this.isCameraEnabled && this.isOnboardingSlide()) }, index.h("vviinn-slider", { key: '399dac9c2c005efad3c3506dd84f7bcf9c550eaf', position: this.slidePosition }, index.h("vviinn-slide", { key: '832f2287e46f4edaeade004325106fecbdb3e618', class: {
2155
+ (!this.isCameraEnabled && this.isOnboardingSlide()) }, index.h("vviinn-slider", { key: '1b98b36bde65dedc539bd49468db86a7317a74d4', position: this.slidePosition }, index.h("vviinn-slide", { key: 'd1b48094f57f9f34a808ee79f78875793cbde05f', class: {
2155
2156
  "start-page": true,
2156
2157
  "camera-enabled": this.isCameraEnabled,
2157
- } }, index.h("vviinn-camera", { key: 'fee0491b5660c7f4c61796bfc647edf6c1121ed6', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
2158
+ } }, index.h("vviinn-camera", { key: 'a8b4695f255d22f80a0980fa6f7e6ef62b9f6e33', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
2158
2159
  this.handleVviinnImageUpload("startCamera");
2159
- }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: 'f5e463f64ac999e3b7bded376a0f12406ad3869d', class: {
2160
+ }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), index.h("div", { key: 'b38d1c05099d04c7a8c22587e7c02bd93fce532d', class: {
2160
2161
  error: this.haveErrors(),
2161
- }, id: "start-page_block" }, index.h("div", { key: '155a80658288afe387d77f1140819fa72134a42e', class: "start-page_main-content" }, (this.wrongImageFormat ||
2162
- this.state.searchStatus === "error") && (index.h("div", { key: '3c948759b2b3b264008d814d8c711cba759f0042', class: "start-page_errors-block" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '6ded7b63230680c53893a571100ad63787db36e8', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (index.h(index.Fragment, { key: '14c56d10d2df3af3f32b37aa10bc687bc4a52617' }, index.h("vviinn-teaser", { key: '99092cc741e26cb2f1101fa4bb5ff219017c7be9' }), index.h("div", { key: '77cf9e9e82a38e9fc9de074c3d02dda473d604ac', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (index.h("vviinn-text-search", { key: '9393d8afb3ae1bbc3ed1d6f4f6461356dd3be912', 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" }))))), index.h("vviinn-privacy-badge", { key: '4c381e57c33d18a5736af7ad54a3512ba1ace512', privacyBadgeText: store.instance.t("privacyBadgeText", {
2162
+ }, id: "start-page_block" }, index.h("div", { key: 'c989f1cb41cced69828e4f24ea925922b92218ec', class: "start-page_main-content" }, (this.wrongImageFormat ||
2163
+ this.state.searchStatus === "error") && (index.h("div", { key: 'ed3feb471a4bbd2989800c9ab698ee8c9c3f8845', class: "start-page_errors-block" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: 'f859d178f1804136273faef22e5188fd51d07d4c', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (index.h(index.Fragment, { key: 'b137960307e69c1884da1258a4ccb7456da4be43' }, index.h("vviinn-teaser", { key: '9f13392722c88be790b4a2ceed67197a25c7ccdc' }), index.h("div", { key: '94640ebeec975c56bac6bf90197cd95f1cb99f95', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (index.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" }))))), index.h("vviinn-privacy-badge", { key: 'a4021fb73a348f19e2401852d36e16b50f93506a', privacyBadgeText: store.instance.t("privacyBadgeText", {
2163
2164
  interpolation: { escapeValue: false },
2164
- }), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: 'c3f7ea7984ce33f702153878f378be802adb8258', class: {
2165
+ }), class: { invisible: this.haveErrors() } }))), index.h("vviinn-slide", { key: 'e9fabc9d45efd4f621454b076f9508c3b79ce690', class: {
2165
2166
  "results-page": true,
2166
2167
  active: this.isResultSlide(),
2167
- } }, this.isResultSlide() && (index.h("div", { key: 'cd8ec6519b09395d2b4926301bfeec3dc91d2ac6', class: "source-wrapper" }, this.isTextSearch() && (index.h("vviinn-text-search", { key: '96e71f8fb6f1c682f872e76f2b9dd5616d767934', 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() && (index.h("vviinn-cropper", { key: '4aabf6d68425e50b277c15c881c40bea2e4d38b1', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), index.h("vviinn-suggestions", { key: 'ca8f970dbd2f3b1824f80feb7477b3d34b8b5ed1', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), index.h("vviinn-selected-filters", { key: '44ff0a2c8dea93a3b5c2cd593b34dc20a4b115b4', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: index$3.filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { key: 'dbf0b1c1a240f60931b1b75d8b76806e071f359f', class: {
2168
+ } }, this.isResultSlide() && (index.h("div", { key: '5240101a650b79c94b9c1e7a835f7061a328b41c', class: "source-wrapper" }, this.isTextSearch() && (index.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() && (index.h("vviinn-cropper", { key: 'ba7917b428a626458ab0956c028ac6d7fc3310f0', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), index.h("vviinn-suggestions", { key: '7954cbf976caf22a47d1b59cd242aad2546e4da5', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), index.h("vviinn-selected-filters", { key: 'ac42d53feaeb3af7bc3e916e5a4cee9a9ba4b395', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: index$3.filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { key: 'f8869d18215c0d35196217efdad6501234cbbf97', class: {
2168
2169
  "filters-wrapper": true,
2169
2170
  hidden: this.showAspectRatioError,
2170
- } }, index.h("vviinn-filters", { key: '801f6aab643da44e564f062fddeb14811eca70bd', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters", { key: '36a32875a0532cbf7148720df7a743bb0159e51e', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters-button", { key: '148bf202a89af93e8cd88a612d585d0849a3d7de', class: {
2171
+ } }, index.h("vviinn-filters", { key: '87c6a34f3600b5c27bc0a9dc4e68239a5179593d', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters", { key: '2185ccdc5005da02c03562b290693390a6ecf2ff', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), index.h("vviinn-extended-filters-button", { key: '3b65d1435f512939444dcef95a4902c0f70a25f1', class: {
2171
2172
  "extended-filters-button": true,
2172
2173
  "has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
2173
2174
  .length > 0,
2174
- }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (index.h(index.Fragment, { key: '263743fba6b324f47a1fae12648995bdef73aa25' }, index.h("vviinn-results", { key: '977140130b3b8dafaac6ae428c2b9f013de37d00', 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 }))))), index.h("vviinn-extended-filters", { key: '24d12faff2641fd61a4d13d7303734f1770120b2', class: "modal-extended-filters", mode: "modal", exportparts: index$3.extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
2175
+ }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (index.h(index.Fragment, { key: '20234d1d8db73b4a0e7e3160ece10ec961623970' }, index.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 }))))), index.h("vviinn-extended-filters", { key: 'b08b5f73b3462169236f63aa2499940aa0898115', class: "modal-extended-filters", mode: "modal", exportparts: index$3.extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
2175
2176
  }
2176
2177
  get el() { return index.getElement(this); }
2177
2178
  static get watchers() { return {
@@ -1,15 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D38ORu31.js');
4
- var search_store = require('./search.store-CEC5R32_.js');
4
+ var search_store = require('./search.store-C6QU_D02.js');
5
5
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
6
6
  var store = require('./store-jPZ4ROqV.js');
7
- var index$1 = require('./index-C2IFqNzB.js');
7
+ var index$1 = require('./index-FE9nOqQo.js');
8
8
  var constants = require('./constants-BlwqMvns.js');
9
9
  var index$2 = require('./index-CBteD3gC.js');
10
10
  var index$3 = require('./index-CvMi8_tX.js');
11
11
  var swiperElement = require('./swiper-element-DjtzojCR.js');
12
- var openProductLink = require('./openProductLink-BwHUGXtr.js');
12
+ var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
13
+ var openProductLink = require('./openProductLink-B3cy6uw_.js');
13
14
 
14
15
  const BasketIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
15
16
  index.h("g", { id: "shopping-bag" },
@@ -1857,7 +1858,7 @@ const VviinnProductCard = class {
1857
1858
  render() {
1858
1859
  var _a, _b, _c;
1859
1860
  if (this.isContentCard || this.isListCard) {
1860
- return (index.h(index.Host, { part: `product-card ${this.entityType}-card`, class: `${this.entityType}-card`, exportparts: this.isContentCard ? index$3.contentCardParts : index$3.listCardParts, "data-id": this.productId }, openProductLink.renderExternalCSS(this.cssUrl), index.h("div", { class: `image-container ${this.entityType}-card-image-container`, part: "image-container" }, renderProductCardImage({
1861
+ return (index.h(index.Host, { part: `product-card ${this.entityType}-card`, class: `${this.entityType}-card`, exportparts: this.isContentCard ? index$3.contentCardParts : index$3.listCardParts, "data-id": this.productId }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { class: `image-container ${this.entityType}-card-image-container`, part: "image-container" }, renderProductCardImage({
1861
1862
  src: this.imageProps.src,
1862
1863
  width: this.imageProps.width,
1863
1864
  title: this.imageProps.title,
@@ -1881,7 +1882,7 @@ const VviinnProductCard = class {
1881
1882
  animated: this.isTransitioning,
1882
1883
  "product-card--source": this.isSourceProduct,
1883
1884
  "set-mode": this.isSetMode,
1884
- }, exportparts: index$3.productCardParts, "data-id": this.productId }, openProductLink.renderExternalCSS(this.cssUrl), index.h("div", { class: "content-container", part: "content-container" }, this.showSkeleton() ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 40 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }), index.h("vviinn-skeleton", { height: 40 }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink", tabindex: 0 }, index.h("span", { class: "title", part: "title" }, this.productTitle)), ((_a = this.brand) === null || _a === void 0 ? void 0 : _a.length) > 0 && (index.h("span", { class: "brand", part: "brand" }, this.brand)), ((_b = this.productType) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("span", { class: "product-type", part: "product-type" }, this.productType)), ((_c = this === null || this === void 0 ? void 0 : this.energyCertifications) !== null && _c !== void 0 ? _c : []).map((energyCertification) => (index.h("vviinn-energy-label", { classIconUrls: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classIconUrls, classDataSheetUrl: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classDataSheetUrl, productType: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.productType, certificationClass: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.certificationClass, classRange: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classRange }))), index.h(Price, { prefix: this.pricePrefix, currency: this.effectiveCurrencySign, numberLocale: this.effectiveNumberLocale, price: this.price, basePrice: parseBasePrice(this.basePrice), salePrice: this.salePrice, baseSalePrice: parseBasePrice(this.baseSalePrice), showInContainer: this.addPriceContainer }), renderCustomLabels(this.customLabels.split(index$1.CUSTOM_LABELS_DELIMITER), "content")))), index.h("div", { class: {
1885
+ }, exportparts: index$3.productCardParts, "data-id": this.productId }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { class: "content-container", part: "content-container" }, this.showSkeleton() ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 40 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }), index.h("vviinn-skeleton", { height: 40 }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink", tabindex: 0 }, index.h("span", { class: "title", part: "title" }, this.productTitle)), ((_a = this.brand) === null || _a === void 0 ? void 0 : _a.length) > 0 && (index.h("span", { class: "brand", part: "brand" }, this.brand)), ((_b = this.productType) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("span", { class: "product-type", part: "product-type" }, this.productType)), ((_c = this === null || this === void 0 ? void 0 : this.energyCertifications) !== null && _c !== void 0 ? _c : []).map((energyCertification) => (index.h("vviinn-energy-label", { classIconUrls: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classIconUrls, classDataSheetUrl: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classDataSheetUrl, productType: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.productType, certificationClass: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.certificationClass, classRange: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classRange }))), index.h(Price, { prefix: this.pricePrefix, currency: this.effectiveCurrencySign, numberLocale: this.effectiveNumberLocale, price: this.price, basePrice: parseBasePrice(this.basePrice), salePrice: this.salePrice, baseSalePrice: parseBasePrice(this.baseSalePrice), showInContainer: this.addPriceContainer }), renderCustomLabels(this.customLabels.split(index$1.CUSTOM_LABELS_DELIMITER), "content")))), index.h("div", { class: {
1885
1886
  "basket-button-container": true,
1886
1887
  hidden: !this.isShowBasketButton() || this.showSkeleton(),
1887
1888
  }, part: "basket-button-container" }, index.h("button", { class: {
@@ -11954,7 +11955,7 @@ const VviinnVprWidget = class {
11954
11955
  empty: this.recommendations.length == 0,
11955
11956
  [this.mode]: true,
11956
11957
  "show-in-widget": this.showInWidget,
11957
- }, role: "region", "aria-label": !this.showingInButton ? store.instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, index.h(index.Fragment, null, openProductLink.renderExternalCSS(this.cssUrl), index$2.SlotSkeleton("discovery"), (this.isSetMode ||
11958
+ }, role: "region", "aria-label": !this.showingInButton ? store.instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, index.h(index.Fragment, null, cssUrlHelper.renderExternalCSS(this.cssUrl), index$2.SlotSkeleton("discovery"), (this.isSetMode ||
11958
11959
  this.blockTitle !== "" ||
11959
11960
  !!this.blockSubtitle) && (index.h("div", { class: "widget-header" }, index.h("div", null, this.blockTitle !== "" && (index.h("h2", { part: "recommendations-title" }, index.h("slot", { name: "vviinn-recommendations-title" }, (_a = this.blockTitle) !== null && _a !== void 0 ? _a : (this.isSetMode
11960
11961
  ? store.instance.t("setMode.widgetTitle")
@@ -4,11 +4,12 @@ var index = require('./index-D38ORu31.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
5
  var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
6
6
  var swiperElement = require('./swiper-element-DjtzojCR.js');
7
- var search_store = require('./search.store-CEC5R32_.js');
7
+ var search_store = require('./search.store-C6QU_D02.js');
8
8
  var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
9
9
  var index$1 = require('./index-CvMi8_tX.js');
10
10
  var store = require('./store-jPZ4ROqV.js');
11
- var openProductLink = require('./openProductLink-BwHUGXtr.js');
11
+ var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
12
+ var openProductLink = require('./openProductLink-B3cy6uw_.js');
12
13
 
13
14
  const UploadActionIconVariant = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
14
15
  index.h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "white" })));
@@ -1379,7 +1380,7 @@ const VviinnShopTheLook = class {
1379
1380
  }, TIMING.SEARCH_DEBOUNCE_DELAY);
1380
1381
  }
1381
1382
  render() {
1382
- return (index.h(index.Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: index$1.shopTheLookParts }, openProductLink.renderExternalCSS(this.cssUrl), index.h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, index.h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (index.h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, index.h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), index.h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (index.h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, index.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 }, index.h("span", { key: '48b59d82816a50b6f98bbf68c8a6849679437852', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, index.h("slot", { key: '14f12cf7f44a39ba4f1d9cbecb6fa3558ae5fd5d', name: "vviinn-image-upload-icon" }, index.h(UploadActionIconVariant, { key: '1937cea6010c0a21182e88f365f188a65b0f3a70' }))), index.h("span", { key: 'd62a5ee1ac2c17a663dda26cb0debd83821510c0', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, index.h("slot", { key: '42a4910a590a2b258dccb2a3ace5da8f60099791', name: "upload-button-text" }))), index.h("input", { key: '242e2ed2e319428ebde6dff7df8c37b60d33a8f1', type: "file", class: "visually-hidden", accept: search_store.getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
1383
+ return (index.h(index.Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: index$1.shopTheLookParts }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, index.h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (index.h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, index.h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), index.h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (index.h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, index.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 }, index.h("span", { key: '48b59d82816a50b6f98bbf68c8a6849679437852', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, index.h("slot", { key: '14f12cf7f44a39ba4f1d9cbecb6fa3558ae5fd5d', name: "vviinn-image-upload-icon" }, index.h(UploadActionIconVariant, { key: '1937cea6010c0a21182e88f365f188a65b0f3a70' }))), index.h("span", { key: 'd62a5ee1ac2c17a663dda26cb0debd83821510c0', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, index.h("slot", { key: '42a4910a590a2b258dccb2a3ace5da8f60099791', name: "upload-button-text" }))), index.h("input", { key: '242e2ed2e319428ebde6dff7df8c37b60d33a8f1', type: "file", class: "visually-hidden", accept: search_store.getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
1383
1384
  renderNavigation(this.swiperActiveIndex, this.totalImages, this.handleNavigatePrev, this.handleNavigateNext)))));
1384
1385
  }
1385
1386
  get el() { return index.getElement(this); }
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-D38ORu31.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
- var search_store = require('./search.store-CEC5R32_.js');
5
+ var search_store = require('./search.store-C6QU_D02.js');
6
6
  var index$2 = require('./index-CBteD3gC.js');
7
7
  var store = require('./store-jPZ4ROqV.js');
8
8
  var index$1 = require('./index-CvMi8_tX.js');
@@ -16,17 +16,17 @@ const MicIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", vie
16
16
  index.h("path", { d: "M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z", fill: "#161616" })));
17
17
 
18
18
  const AUTO_SUGGEST_DEBOUNCE_MS = 300;
19
- const createAutoSuggestHandler = (storeName, token, apiPath) => {
19
+ const createAutoSuggestHandler = (storeName, token, apiPath, onCompletions) => {
20
20
  let debounceTimer;
21
21
  const handleInputChange = (value) => {
22
22
  search_store.setTextSearchQuery(storeName, value);
23
23
  clearTimeout(debounceTimer);
24
24
  if (!value) {
25
- search_store.clearAutoSuggestCompletions(storeName);
25
+ onCompletions([]);
26
26
  return;
27
27
  }
28
28
  debounceTimer = setTimeout(() => {
29
- search_store.makeAutoSuggestRequest(storeName, value, token, apiPath);
29
+ search_store.makeAutoSuggestRequest(storeName, value, token, apiPath, onCompletions);
30
30
  }, AUTO_SUGGEST_DEBOUNCE_MS);
31
31
  };
32
32
  const cancelPending = () => clearTimeout(debounceTimer);
@@ -184,7 +184,7 @@ const VviinnTextSearch = class {
184
184
  /** Custom placeholder for the text search input */
185
185
  this.placeholder = "";
186
186
  /** Show auto-suggest dropdown with search completions */
187
- this.autoSuggestShow = false;
187
+ this.autoSuggestShow = true;
188
188
  /** True, when used inside the widget */
189
189
  /** @internal */
190
190
  this.showInWidget = false;
@@ -197,6 +197,7 @@ const VviinnTextSearch = class {
197
197
  this.activeSuggestionIndex = -1;
198
198
  this.originalQuery = "";
199
199
  this.searchSubmitted = false;
200
+ this.isDisconnected = false;
200
201
  this.slots = [];
201
202
  this.isShowPreloader = () => this.state.searchStatus === "loading" && this.state.searchType === "text";
202
203
  this.isShowRecording = () => this.isRecording;
@@ -212,6 +213,14 @@ const VviinnTextSearch = class {
212
213
  ? this.placeholder
213
214
  : store.instance.t("textSearchPlaceholder");
214
215
  this.recognition = null;
216
+ this.setAutoSuggestCompletions = (completions) => {
217
+ if (this.isDisconnected)
218
+ return;
219
+ if (this.searchSubmitted && completions.length > 0)
220
+ return;
221
+ this.autoSuggestCompletions = completions;
222
+ this.activeSuggestionIndex = -1;
223
+ };
215
224
  this.trackTextSearch = () => this.vviinnFilterTriggered.emit({
216
225
  kind: this.state.textSearchQuery,
217
226
  action: "select",
@@ -246,7 +255,8 @@ const VviinnTextSearch = class {
246
255
  }
247
256
  };
248
257
  this.hideSuggestions = () => {
249
- search_store.clearAutoSuggestCompletions(this.storeName);
258
+ this.autoSuggestCompletions = [];
259
+ this.activeSuggestionIndex = -1;
250
260
  };
251
261
  this.selectSuggestion = (completion) => {
252
262
  search_store.setTextSearchQuery(this.storeName, completion.suggestion);
@@ -304,7 +314,7 @@ const VviinnTextSearch = class {
304
314
  }
305
315
  };
306
316
  this.checkAutoSuggest = async (query) => {
307
- Rectangle._functionExports.pipe(await search_store.makeAutoSuggestRequest(this.storeName, query, this.token, this.apiPath), Rectangle.fold(
317
+ Rectangle._functionExports.pipe(await search_store.makeAutoSuggestRequest(this.storeName, query, this.token, this.apiPath, this.setAutoSuggestCompletions), Rectangle.fold(
308
318
  // Intentionally ignore errors for auto-suggest
309
319
  () => { }, () => { }));
310
320
  };
@@ -335,24 +345,17 @@ const VviinnTextSearch = class {
335
345
  };
336
346
  }
337
347
  connectedCallback() {
338
- const { state, storeName, onChange } = search_store.useSearchStore(this.showInWidget);
348
+ const { state, storeName } = search_store.useSearchStore(this.showInWidget);
339
349
  this.state = state;
340
350
  this.storeName = storeName;
341
- if (this.autoSuggestShow) {
342
- this.disposeOnChange = onChange("autoSuggestCompletions", (completions) => {
343
- if (this.searchSubmitted && completions.length > 0)
344
- return;
345
- this.autoSuggestCompletions = completions;
346
- this.activeSuggestionIndex = -1;
347
- });
348
- }
351
+ this.isDisconnected = false;
349
352
  }
350
353
  disconnectedCallback() {
351
- var _a, _b;
354
+ var _a;
355
+ this.isDisconnected = true;
352
356
  clearTimeout(this.triggerTooltipStart);
353
357
  clearTimeout(this.triggerTooltipEnd);
354
358
  (_a = this.autoSuggestHandler) === null || _a === void 0 ? void 0 : _a.cleanup();
355
- (_b = this.disposeOnChange) === null || _b === void 0 ? void 0 : _b.call(this);
356
359
  }
357
360
  async componentWillLoad() {
358
361
  var _a, _b, _c;
@@ -360,7 +363,7 @@ const VviinnTextSearch = class {
360
363
  index$2.slotChangeListener(this, this.el);
361
364
  this.slots = index$2.findSlotElements(this.el);
362
365
  if (this.autoSuggestShow) {
363
- this.autoSuggestHandler = createAutoSuggestHandler(this.storeName, this.token, this.apiPath);
366
+ this.autoSuggestHandler = createAutoSuggestHandler(this.storeName, this.token, this.apiPath, this.setAutoSuggestCompletions);
364
367
  }
365
368
  this.recognition = initializeRecognition((_a = this.locale) !== null && _a !== void 0 ? _a : store.defaultConfig.locale, () => {
366
369
  this.showRecording();
@@ -405,7 +408,7 @@ const VviinnTextSearch = class {
405
408
  }
406
409
  }
407
410
  render() {
408
- return (index.h(index.Host, { key: 'a97f9685f46a30ca9ab12396ee1aa01482731370', exportparts: `${index$1.searchBarParts}, ${index$1.searchModalFirstScreenParts}` }, index.h("div", { key: '384e2cc006c0c66b2e50d56631beb538cbaa4f07', class: "text-search-container", part: "text-search-container" }, index.h("input", Object.assign({ key: '5e571ee58eab698531946a19c5e92fb970340d33', 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 && {
411
+ return (index.h(index.Host, { key: '0ac6e28c6631ea47c8e7c47b63fa2eb3af500087', exportparts: `${index$1.searchBarParts}, ${index$1.searchModalFirstScreenParts}` }, index.h("div", { key: '4b1d8edd675e91f4abd1a5933a1449b721a571c1', class: "text-search-container", part: "text-search-container" }, index.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 && {
409
412
  role: "combobox",
410
413
  "aria-autocomplete": "list",
411
414
  "aria-expanded": this.autoSuggestCompletions.length > 0 &&
@@ -416,11 +419,11 @@ const VviinnTextSearch = class {
416
419
  "aria-activedescendant": this.activeSuggestionIndex >= 0
417
420
  ? `suggestion-${this.activeSuggestionIndex}`
418
421
  : undefined,
419
- }))), this.mode === "extended" && (index.h("vviinn-vps-button", Object.assign({ key: 'a92908b647b3f07546bfa3e3a15f7306374cd59d', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
422
+ }))), this.mode === "extended" && (index.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 && {
420
423
  exampleImageSource: this.exampleImageSource,
421
- }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (index.h("slot", { key: '06e20a8744dea22ee8bd51d5a1e37b5e29b0b7f4', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
422
- this.recognition && (index.h("button", { key: '1ab2f0acb7137c36231a542234a717e34430474f', class: "speech-button", part: "speech-button", "aria-label": store.instance.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, index.h(MicIcon, { key: 'eb97b29086e9e5ad18b1ff6ac9637b760ae2c83a' }), this.isShowRecording() && (index.h("span", { key: 'dc8cecbb91eaa4a5195727b50919022898630a23', class: "recording-indicator" })))), index.h("button", { key: 'ebd39b8d86ab47cd4fadda6a5ad30c8001bd8c5a', 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": store.instance.t("a11y.textSearchButton") }, this.isShowPreloader() ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null))))), this.autoSuggestShow &&
423
- renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (index.h("p", { key: 'd59b3a49c6bda6b2992e3b0aa7bffb4ef674d3b6', class: "text-search-tooltip", part: "text-search-tooltip" }, store.instance.t(this.tooltipText)))));
424
+ }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (index.h("slot", { key: 'c900b67d3dcffb64f3ca513c0475f64eb72ef495', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
425
+ this.recognition && (index.h("button", { key: '99f75f77a43f618a45bd06124f283a5b97e422c3', class: "speech-button", part: "speech-button", "aria-label": store.instance.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, index.h(MicIcon, { key: 'ab0676502accecbb25377737a595550ae96b19cc' }), this.isShowRecording() && (index.h("span", { key: 'ece24c838cabc64e9b045c5eb97bc47d7bd932ba', class: "recording-indicator" })))), index.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": store.instance.t("a11y.textSearchButton") }, this.isShowPreloader() ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null))))), this.autoSuggestShow &&
426
+ renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (index.h("p", { key: '470a0c67f9f310f775566a4e581be3dbb7a7cb95', class: "text-search-tooltip", part: "text-search-tooltip" }, store.instance.t(this.tooltipText)))));
424
427
  }
425
428
  get el() { return index.getElement(this); }
426
429
  };
@@ -5,6 +5,7 @@ var index$2 = require('./index-CBteD3gC.js');
5
5
  var constants$1 = require('./constants-DHaugTOE.js');
6
6
  var constants = require('./constants-BlwqMvns.js');
7
7
  var index$1 = require('./index-CvMi8_tX.js');
8
+ var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
8
9
  var store = require('./store-jPZ4ROqV.js');
9
10
 
10
11
  const SearchModalCameraIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" },
@@ -67,7 +68,7 @@ const VviinnVpsButton = class {
67
68
  /** Show the text search */
68
69
  this.textSearchShow = false;
69
70
  /** Show auto-suggest dropdown with search completions */
70
- this.autoSuggestShow = false;
71
+ this.autoSuggestShow = true;
71
72
  /** Show or hide Add to Basket buttons */
72
73
  this.addToBasketShow = false;
73
74
  /** Show or hide Favorite button */
@@ -154,7 +155,7 @@ const VviinnVpsButton = class {
154
155
  }
155
156
  render() {
156
157
  const { ariaLabel, buttonIcon } = this.getButtonConfig();
157
- return (index.h(index.Host, { key: 'b5274974a697ae4d65dc7204c5c35de228625b89', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${index$1.searchModalFirstScreenParts}` }, index.h("vviinn-button", { key: '7e7f103a1dacc33b385da58fa1e3d33c10369e09', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, index.h("slot", { key: 'e23e07b5789a62e7d3cadf407adf2b65a376947b' }, buttonIcon)), index$2.SlotSkeleton("search"), index.h("vviinn-vps-widget", { key: 'd092bd2fc87aaba40cc44a13d050cb309b0cd50c', 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 &&
158
+ return (index.h(index.Host, { key: '2d9e0e9860039f521305b3f25da2a6aa5fee5e37', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${index$1.searchModalFirstScreenParts}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.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 }, index.h("slot", { key: '922d706ce5bf9418c3747fc69bf7920d2ad53c8b' }, buttonIcon)), index$2.SlotSkeleton("search"), index.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 &&
158
159
  (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 })));
159
160
  }
160
161
  get el() { return index.getElement(this); }
@@ -1,16 +1,16 @@
1
- import { clearAutoSuggestCompletions, makeAutoSuggestRequest, setTextSearchQuery, } from "../../../store/search.store";
1
+ import { makeAutoSuggestRequest, setTextSearchQuery, } from "../../../store/search.store";
2
2
  const AUTO_SUGGEST_DEBOUNCE_MS = 300;
3
- export const createAutoSuggestHandler = (storeName, token, apiPath) => {
3
+ export const createAutoSuggestHandler = (storeName, token, apiPath, onCompletions) => {
4
4
  let debounceTimer;
5
5
  const handleInputChange = (value) => {
6
6
  setTextSearchQuery(storeName, value);
7
7
  clearTimeout(debounceTimer);
8
8
  if (!value) {
9
- clearAutoSuggestCompletions(storeName);
9
+ onCompletions([]);
10
10
  return;
11
11
  }
12
12
  debounceTimer = setTimeout(() => {
13
- makeAutoSuggestRequest(storeName, value, token, apiPath);
13
+ makeAutoSuggestRequest(storeName, value, token, apiPath, onCompletions);
14
14
  }, AUTO_SUGGEST_DEBOUNCE_MS);
15
15
  };
16
16
  const cancelPending = () => clearTimeout(debounceTimer);