vviinn-widgets 2.44.2 → 2.46.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 (151) hide show
  1. package/dist/cjs/VisualSearchIcon-1180d079.js +8 -0
  2. package/dist/cjs/{customized-slots-49c03dc1.js → customized-slots-1b59bd38.js} +1 -0
  3. package/dist/cjs/{index-7ff2ab5f.js → index-279a6a0f.js} +75 -75
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{package-5912f89d.js → package-3b910c03.js} +1 -1
  6. package/dist/cjs/{search-filters_16.cjs.entry.js → search-filters_17.cjs.entry.js} +116 -55
  7. package/dist/cjs/{imageSearch.store-dc4e98b3.js → search.store-0b319593.js} +55 -21
  8. package/dist/cjs/vviinn-button.cjs.entry.js +2 -2
  9. package/dist/cjs/vviinn-carousel_4.cjs.entry.js +60 -51
  10. package/dist/cjs/vviinn-preloader.cjs.entry.js +2 -2
  11. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +4 -2
  12. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +3 -3
  13. package/dist/cjs/vviinn-vps-button.cjs.entry.js +7 -4
  14. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +65 -40
  15. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  16. package/dist/collection/collection-manifest.json +1 -0
  17. package/dist/collection/components/customized-slots.js +1 -0
  18. package/dist/collection/components/image-search/search-filters/search-filters.js +5 -5
  19. package/dist/collection/components/vviinn-error/vviinn-empty-results/vviinn-empty-results.js +2 -1
  20. package/dist/collection/components/vviinn-example-image/vviinn-example-image.js +1 -1
  21. package/dist/collection/components/vviinn-icons/icons/ArrowIcon.js +2 -0
  22. package/dist/collection/components/vviinn-icons/icons/BasketIcon.js +2 -0
  23. package/dist/collection/components/vviinn-icons/icons/CameraActionIcon.js +2 -0
  24. package/dist/collection/components/vviinn-icons/icons/CameraIcon.js +2 -0
  25. package/dist/collection/components/vviinn-icons/icons/CheckCircleIcon.js +2 -0
  26. package/dist/collection/components/vviinn-icons/icons/CheckIcon.js +2 -0
  27. package/dist/collection/components/vviinn-icons/icons/ChevronIcon.js +2 -0
  28. package/dist/collection/components/vviinn-icons/icons/CloseIcon.js +2 -0
  29. package/dist/collection/components/vviinn-icons/icons/CrossIcon.js +2 -0
  30. package/dist/collection/components/vviinn-icons/icons/GalleryActionIcon.js +2 -0
  31. package/dist/collection/components/vviinn-icons/icons/LoaderIcon.js +2 -0
  32. package/dist/collection/components/vviinn-icons/icons/MinusIcon.js +2 -0
  33. package/dist/collection/components/vviinn-icons/icons/PlusIcon.js +2 -0
  34. package/dist/collection/components/vviinn-icons/icons/RoundCameraIcon.js +2 -0
  35. package/dist/collection/components/vviinn-icons/icons/SecondaryActionIcon.js +2 -0
  36. package/dist/collection/components/vviinn-icons/icons/TextSearchIcon.js +2 -0
  37. package/dist/collection/components/vviinn-icons/icons/UpdateIcon.js +2 -0
  38. package/dist/collection/components/vviinn-icons/icons/UploadActionIcon.js +2 -0
  39. package/dist/collection/components/vviinn-icons/icons/VisualSearchIcon.js +2 -0
  40. package/dist/collection/components/vviinn-icons/icons/WarningIcon.js +2 -0
  41. package/dist/collection/components/vviinn-icons/index.js +20 -18
  42. package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +1 -1
  43. package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.js +7 -7
  44. package/dist/collection/components/vviinn-image-view/vviinn-image-view.js +7 -8
  45. package/dist/collection/components/vviinn-modal/vviinn-modal.js +2 -2
  46. package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +2 -2
  47. package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.css +1 -0
  48. package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +2 -2
  49. package/dist/collection/components/vviinn-text-search/vviinn-text-search.css +63 -0
  50. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +118 -0
  51. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-vidget.js +7 -4
  52. package/dist/collection/components/vviinn-vps-button/stories/vviinn-vps-button.stories.js +2 -0
  53. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +20 -1
  54. package/dist/collection/components/vviinn-vps-widget/stories/vviinn-vps-widget.stories.js +2 -0
  55. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +15 -1
  56. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +77 -31
  57. package/dist/collection/locale/resources-vps.js +2 -0
  58. package/dist/collection/network/request.js +1 -1
  59. package/dist/collection/searchSession/searchSession.js +5 -10
  60. package/dist/collection/store/{imageSearch.store.js → search.store.js} +34 -5
  61. package/dist/esm/VisualSearchIcon-13f7da6a.js +6 -0
  62. package/dist/esm/{customized-slots-9a9f8c20.js → customized-slots-3bea41d2.js} +1 -0
  63. package/dist/esm/{index-53105ad4.js → index-9c15b8f1.js} +1 -1
  64. package/dist/esm/loader.js +1 -1
  65. package/dist/esm/{package-b2424850.js → package-cae9f186.js} +1 -1
  66. package/dist/esm/{search-filters_16.entry.js → search-filters_17.entry.js} +85 -25
  67. package/dist/esm/{imageSearch.store-c0f2a178.js → search.store-5eebcfbe.js} +54 -21
  68. package/dist/esm/vviinn-button.entry.js +1 -1
  69. package/dist/esm/vviinn-carousel_4.entry.js +19 -10
  70. package/dist/esm/vviinn-preloader.entry.js +2 -2
  71. package/dist/esm/vviinn-recommendations-sidebar.entry.js +4 -2
  72. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  73. package/dist/esm/vviinn-vps-button.entry.js +8 -5
  74. package/dist/esm/vviinn-vps-widget.entry.js +61 -36
  75. package/dist/esm/vviinn-widgets.js +1 -1
  76. package/dist/types/components/vviinn-icons/icons/ArrowIcon.d.ts +1 -0
  77. package/dist/types/components/vviinn-icons/icons/BasketIcon.d.ts +1 -0
  78. package/dist/types/components/vviinn-icons/icons/CameraActionIcon.d.ts +1 -0
  79. package/dist/types/components/vviinn-icons/icons/CameraIcon.d.ts +1 -0
  80. package/dist/types/components/vviinn-icons/icons/CheckCircleIcon.d.ts +1 -0
  81. package/dist/types/components/vviinn-icons/icons/CheckIcon.d.ts +1 -0
  82. package/dist/types/components/vviinn-icons/icons/ChevronIcon.d.ts +1 -0
  83. package/dist/types/components/vviinn-icons/icons/CloseIcon.d.ts +1 -0
  84. package/dist/types/components/vviinn-icons/icons/CrossIcon.d.ts +1 -0
  85. package/dist/types/components/vviinn-icons/icons/GalleryActionIcon.d.ts +1 -0
  86. package/dist/types/components/vviinn-icons/icons/LoaderIcon.d.ts +1 -0
  87. package/dist/types/components/vviinn-icons/icons/MinusIcon.d.ts +1 -0
  88. package/dist/types/components/vviinn-icons/icons/PlusIcon.d.ts +1 -0
  89. package/dist/types/components/vviinn-icons/icons/RoundCameraIcon.d.ts +1 -0
  90. package/dist/types/components/vviinn-icons/icons/SecondaryActionIcon.d.ts +1 -0
  91. package/dist/types/components/vviinn-icons/icons/TextSearchIcon.d.ts +1 -0
  92. package/dist/types/components/vviinn-icons/icons/UpdateIcon.d.ts +1 -0
  93. package/dist/types/components/vviinn-icons/icons/UploadActionIcon.d.ts +1 -0
  94. package/dist/types/components/vviinn-icons/icons/VisualSearchIcon.d.ts +1 -0
  95. package/dist/types/components/vviinn-icons/icons/WarningIcon.d.ts +1 -0
  96. package/dist/types/components/vviinn-icons/index.d.ts +20 -17
  97. package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +18 -0
  98. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -0
  99. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +2 -0
  100. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +9 -0
  101. package/dist/types/components.d.ts +37 -0
  102. package/dist/types/network/request.d.ts +1 -1
  103. package/dist/types/searchSession/searchSession.d.ts +17 -3
  104. package/dist/types/store/{imageSearch.store.d.ts → search.store.d.ts} +6 -4
  105. package/{www/build/p-987a8e9f.js → dist/vviinn-widgets/p-04cdf7c5.js} +1 -1
  106. package/dist/vviinn-widgets/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
  107. package/dist/vviinn-widgets/p-1a1d85b7.js +1 -0
  108. package/dist/vviinn-widgets/p-3d2759e3.entry.js +1 -0
  109. package/dist/vviinn-widgets/{p-da7273ce.js → p-41ab810c.js} +1 -1
  110. package/dist/vviinn-widgets/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
  111. package/dist/vviinn-widgets/p-ae471f24.entry.js +11 -0
  112. package/dist/vviinn-widgets/p-b21ebac9.js +1 -0
  113. package/dist/vviinn-widgets/p-c96f5909.entry.js +1 -0
  114. package/dist/vviinn-widgets/p-d1592ac5.entry.js +1 -0
  115. package/dist/vviinn-widgets/p-d162fe72.entry.js +1 -0
  116. package/dist/vviinn-widgets/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
  117. package/dist/vviinn-widgets/p-ed482314.js +1 -0
  118. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  119. package/package.json +1 -1
  120. package/{dist/vviinn-widgets/p-987a8e9f.js → www/build/p-04cdf7c5.js} +1 -1
  121. package/www/build/{p-7f2c9319.entry.js → p-185e2420.entry.js} +1 -1
  122. package/www/build/p-1a1d85b7.js +1 -0
  123. package/www/build/p-3d2759e3.entry.js +1 -0
  124. package/www/build/{p-da7273ce.js → p-41ab810c.js} +1 -1
  125. package/www/build/{p-ed082ecf.entry.js → p-4c726a51.entry.js} +1 -1
  126. package/www/build/p-ae471f24.entry.js +11 -0
  127. package/www/build/p-b21ebac9.js +1 -0
  128. package/www/build/p-c96f5909.entry.js +1 -0
  129. package/www/build/p-d1592ac5.entry.js +1 -0
  130. package/www/build/p-d162fe72.entry.js +1 -0
  131. package/www/build/{p-010b4979.entry.js → p-ec7b07a0.entry.js} +1 -1
  132. package/www/build/p-ed482314.js +1 -0
  133. package/www/build/vviinn-widgets.esm.js +1 -1
  134. package/dist/cjs/index-28052f80.js +0 -48
  135. package/dist/esm/index-ac58a953.js +0 -34
  136. package/dist/vviinn-widgets/p-044c5f45.entry.js +0 -1
  137. package/dist/vviinn-widgets/p-726774f9.js +0 -1
  138. package/dist/vviinn-widgets/p-7f19baa1.js +0 -1
  139. package/dist/vviinn-widgets/p-a7cc44b3.entry.js +0 -1
  140. package/dist/vviinn-widgets/p-ab938400.entry.js +0 -1
  141. package/dist/vviinn-widgets/p-b1e9dd46.entry.js +0 -1
  142. package/dist/vviinn-widgets/p-c8ef8d6c.js +0 -1
  143. package/dist/vviinn-widgets/p-ecd1c141.entry.js +0 -11
  144. package/www/build/p-044c5f45.entry.js +0 -1
  145. package/www/build/p-726774f9.js +0 -1
  146. package/www/build/p-7f19baa1.js +0 -1
  147. package/www/build/p-a7cc44b3.entry.js +0 -1
  148. package/www/build/p-ab938400.entry.js +0 -1
  149. package/www/build/p-b1e9dd46.entry.js +0 -1
  150. package/www/build/p-c8ef8d6c.js +0 -1
  151. package/www/build/p-ecd1c141.entry.js +0 -11
@@ -17,7 +17,7 @@ import { isEmpty } from "fp-ts/string";
17
17
  import { v4 as uuidv4 } from "uuid";
18
18
  import i18next from "i18next";
19
19
  import { version } from "../../../package.json";
20
- import { imageSearchState } from "../../store/imageSearch.store";
20
+ import { searchState } from "../../store/search.store";
21
21
  import { state } from "../../store/store";
22
22
  import { slotChangeListener } from "../customized-slots";
23
23
  import { createTrackingApi } from "../../openApi";
@@ -64,6 +64,7 @@ const checkDeviceType = () => {
64
64
  * @part price-sale - Block for sale price. Rendered only if the sale price is presented.
65
65
  * @part price-prefix - Block rendered before each price element (for ex. "from").
66
66
  * @part title - Title inside Product Card.
67
+ * @part text-search-input - Text search input.
67
68
 
68
69
  * @slot vviinn-onboarding-title - Title of onboarding section.
69
70
  * @slot onboarding-card-1-icon - Icon (or other graphics) on the first onboarding slide.
@@ -81,6 +82,7 @@ const checkDeviceType = () => {
81
82
  * @slot vviinn-camera-icon - Icon of Camera Button.
82
83
  * @slot vviinn-privacy-badge-text - Text content of privacy notification block.
83
84
  * @slot vviinn-image-search-modal-title - Image search modal title.
85
+ * @slot vviinn-text-search-icon - Icon of text search block.
84
86
  *
85
87
  */
86
88
  export class VviinnVpsWidget {
@@ -188,6 +190,7 @@ export class VviinnVpsWidget {
188
190
  this.productDetailNewTab = true;
189
191
  this.imageResolutionWidth = 250;
190
192
  this.exampleImageSource = DEFAULT_EXAMPLE_IMAGE;
193
+ this.textSearchShow = false;
191
194
  this.apiPath = "https://api.vviinn.com";
192
195
  this.showingInButton = false;
193
196
  this.buttonElementId = undefined;
@@ -203,6 +206,8 @@ export class VviinnVpsWidget {
203
206
  this.cameraButtonClicked = false;
204
207
  this.uploadSource = undefined;
205
208
  this.showAspectRatioError = false;
209
+ this.products = [];
210
+ this.initialSearchQuery = "";
206
211
  }
207
212
  initResultEvents() {
208
213
  this.resultLoaded = false;
@@ -220,6 +225,9 @@ export class VviinnVpsWidget {
220
225
  isResultSlide() {
221
226
  return this.slidePosition === 1;
222
227
  }
228
+ findProductById(id) {
229
+ return searchState.results.find((r) => r.productId === id);
230
+ }
223
231
  handleOpenLink(deeplink, event) {
224
232
  if (this.productDetailNewTab || event.ctrlKey || event.metaKey) {
225
233
  let newTab = window.open();
@@ -284,7 +292,7 @@ export class VviinnVpsWidget {
284
292
  async trackProductClick({ detail }) {
285
293
  const { productId, clickEvent } = detail;
286
294
  const productClickEvent = this.getProductTrackEvent(detail, "click");
287
- const product = imageSearchState.results.find((r) => r.productId === productId);
295
+ const product = this.findProductById(productId);
288
296
  if (!product || !product.deeplink)
289
297
  return;
290
298
  if (!this.trackingDeactivated) {
@@ -302,7 +310,7 @@ export class VviinnVpsWidget {
302
310
  async trackAuxClick({ detail }) {
303
311
  const { productId } = detail;
304
312
  const productClickEvent = this.getProductTrackEvent(detail, "click");
305
- const product = imageSearchState.results.find((r) => r.productId === productId);
313
+ const product = this.findProductById(productId);
306
314
  if (!product || !product.deeplink)
307
315
  return;
308
316
  if (!this.trackingDeactivated) {
@@ -335,6 +343,10 @@ export class VviinnVpsWidget {
335
343
  const searchEvent = createFilterEvent(Object.assign({ session_id: this.uiSessionId, source: this.imageSource, kind: detail.kind, action: detail.action }, rest));
336
344
  this.trackingApi.trackEvent(searchEvent).then(this.setTrackingDeactivated);
337
345
  }
346
+ async trackTextSearchFinished({ detail }) {
347
+ this.initialSearchQuery = detail;
348
+ this.slidePosition = 1;
349
+ }
338
350
  connectedCallback() {
339
351
  this.isDesktop = checkDeviceType() === "desktop";
340
352
  state.apiPath = this.apiPath;
@@ -342,12 +354,13 @@ export class VviinnVpsWidget {
342
354
  state.locale = this.locale;
343
355
  this.cameraAvailable =
344
356
  !!navigator.mediaDevices && !!navigator.mediaDevices.getUserMedia;
345
- imageSearchState.token = this.token;
346
- imageSearchState.campaignId = pipe(this.campaignId, O.fromNullable, O.chain(O.fromPredicate(notEmptyString)), O.map(filterInt), O.chain(O.fromPredicate(notNan)), O.map((s) => `${s}`));
357
+ const campaignId = pipe(this.campaignId, O.fromNullable, O.chain(O.fromPredicate(notEmptyString)), O.map(filterInt), O.chain(O.fromPredicate(notNan)), O.map((s) => `${s}`));
347
358
  if (this.excluded) {
348
359
  this.excluded = parseExcluded(this.excluded);
349
360
  }
350
- imageSearchState.excluded = this.excluded;
361
+ searchState.token = this.token;
362
+ searchState.campaignId = campaignId;
363
+ searchState.excluded = this.excluded;
351
364
  this.uiSessionId = uuidv4();
352
365
  this.trackingApi = createTrackingApi(this.apiPath, this.token);
353
366
  this.id = this.el.id;
@@ -407,22 +420,26 @@ export class VviinnVpsWidget {
407
420
  this.cameraAvailable && (h("button", { class: "action-button", part: "start-camera_button", onClick: () => {
408
421
  this.handleStartCameraClick();
409
422
  this.uploadSource = "startCamera";
410
- } }, imageSearchState.loading && this.uploadSource === "startCamera" ? (h("vviinn-preloader", null)) : (h("span", { class: "action-button-content" }, h("slot", { name: "vviinn-camera-icon" }, h(CameraActionIcon, null)), this.cameraEnabled ? (h("slot", { name: "vviinn-camera-button-text-stop" }, h("span", null, i18next.t("cameraButtonTextStop")))) : (h("slot", { name: "vviinn-camera-button-text-start" }, h("span", null, i18next.t("cameraButtonTextStart")))))))),
423
+ } }, searchState.loading &&
424
+ searchState.searchType === "image" &&
425
+ this.uploadSource === "startCamera" ? (h("vviinn-preloader", null)) : (h("span", { class: "action-button-content" }, h("slot", { name: "vviinn-camera-icon" }, h(CameraActionIcon, null)), this.cameraEnabled ? (h("slot", { name: "vviinn-camera-button-text-stop" }, h("span", null, i18next.t("cameraButtonTextStop")))) : (h("slot", { name: "vviinn-camera-button-text-start" }, h("span", null, i18next.t("cameraButtonTextStart")))))))),
411
426
  h("vviinn-image-selector", { class: "action-button", onClick: () => (this.uploadSource = "uploadPhoto"), onVviinnImageUploadFinished: this.handleVviinnImageUploadFinished, onVviinnImageUpload: () => {
412
427
  this.handleVviinnImageUpload("uploadPhoto");
413
- }, onVviinnNoResult: ({ detail }) => this.handleVviinnNoResult(detail), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: "upload-photo_button", startUpload: this.buttonPressed && this.showingInButton && this.mode === "upload", loading: imageSearchState.loading && 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"))))),
428
+ }, onVviinnNoResult: ({ detail }) => this.handleVviinnNoResult(detail), resetVpsButton: this.resetVpsButton, basicEventData: this.getBasicEventData(), part: "upload-photo_button", startUpload: this.buttonPressed && this.showingInButton && this.mode === "upload", loading: searchState.loading &&
429
+ searchState.searchType === "image" &&
430
+ 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"))))),
414
431
  ];
415
432
  return this.isDesktop ? buttons.reverse() : buttons;
416
433
  }
417
434
  renderResults() {
418
- if (imageSearchState.results.length === 0)
435
+ if (searchState.results.length === 0)
419
436
  return null;
420
437
  if (!this.resultLoaded) {
421
438
  this.vviinnResultLoad.emit(this.getBasicEventData());
422
439
  this.trackResultEvent("load");
423
440
  this.resultLoaded = true;
424
441
  }
425
- return imageSearchState.results.map((p, i) => {
442
+ return searchState.results.map((p, i) => {
426
443
  var _a;
427
444
  return (h("vviinn-product-card", { key: p.productId, hidden: true, productTitle: p.title, productId: p.productId, productType: p.productType, brand: p.brand, deeplink: p.deeplink, price: p.price.actual, salePrice: p.price.sale, responsive: true, imageWidth: this.imageResolutionWidth, image: (_a = p.image.thumbnail) !== null && _a !== void 0 ? _a : p.image.original, part: "product-card", campaignTypeId: "VPS", index: i, widgetElementId: this.id, buttonElementId: this.buttonElementId, widgetVersion: version }));
428
445
  });
@@ -430,18 +447,19 @@ export class VviinnVpsWidget {
430
447
  resetState() {
431
448
  this.resetScroll("start-page_block");
432
449
  this.slidePosition = 0;
433
- imageSearchState.resetCategoryLink = undefined;
434
- imageSearchState.activeIonLink = undefined;
435
- imageSearchState.image = O.none;
436
- imageSearchState.imageUrl = O.none;
437
- imageSearchState.imageBounds = O.none;
438
- imageSearchState.searchArea = O.none;
439
- imageSearchState.results = [];
440
- imageSearchState.filters = [];
441
- imageSearchState.detectedObjects = [];
442
- imageSearchState.rectangleSearchForm = undefined;
443
- imageSearchState.loading = false;
444
- imageSearchState.serverError = false;
450
+ searchState.resetCategoryLink = undefined;
451
+ searchState.activeIonLink = undefined;
452
+ searchState.image = O.none;
453
+ searchState.imageUrl = O.none;
454
+ searchState.imageBounds = O.none;
455
+ searchState.searchArea = O.none;
456
+ searchState.results = [];
457
+ searchState.filters = [];
458
+ searchState.detectedObjects = [];
459
+ searchState.rectangleSearchForm = undefined;
460
+ searchState.loading = false;
461
+ searchState.serverError = false;
462
+ searchState.searchType = undefined;
445
463
  this.wrongImageFormat = false;
446
464
  this.resetScroll("results-block");
447
465
  this.stopStreamTracks();
@@ -452,7 +470,7 @@ export class VviinnVpsWidget {
452
470
  this.setShowAspectRatioError(false);
453
471
  }
454
472
  haveErrors() {
455
- return this.wrongImageFormat || imageSearchState.serverError;
473
+ return this.wrongImageFormat || searchState.serverError;
456
474
  }
457
475
  resetScroll(elementId, behavior = "auto") {
458
476
  const element = this.el.shadowRoot.getElementById(elementId);
@@ -467,7 +485,7 @@ export class VviinnVpsWidget {
467
485
  }
468
486
  render() {
469
487
  var _a;
470
- return (h(Host, null, !this.showingInButton && h(SlotSkeleton, null), h("vviinn-overlayed-modal", { class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState.bind(this), onVviinnWidgetClose: () => this.handleModalClose(), buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id, widgetVersion: version, hideBackButton: (this.mode === "upload" && this.showingInButton) ||
488
+ return (h(Host, { exportparts: "text-search-input" }, !this.showingInButton && h(SlotSkeleton, null), h("vviinn-overlayed-modal", { class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState.bind(this), onVviinnWidgetClose: () => this.handleModalClose(), buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.id, widgetVersion: version, hideBackButton: (this.mode === "upload" && this.showingInButton) ||
471
489
  (!this.cameraEnabled && this.isOnboardingSlide()), exportparts: "secondary-action, title, close-button" }, h("vviinn-slider", { showBullets: false, position: this.slidePosition }, h("vviinn-slide", { class: {
472
490
  "start-page": true,
473
491
  "camera-enabled": this.cameraEnabled,
@@ -477,21 +495,23 @@ export class VviinnVpsWidget {
477
495
  error: this.haveErrors(),
478
496
  }, id: "start-page_block" }, h("div", { class: "start-page_main-content" }, h("div", { class: {
479
497
  "start-page_errors-block": true,
480
- hidden: !this.wrongImageFormat && !imageSearchState.serverError,
481
- } }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), h("vviinn-server-error", { class: { hidden: !imageSearchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && h("vviinn-teaser", null), !this.haveErrors() && (h("div", { class: "buttons-group" }, this.renderButtons()))), h("vviinn-privacy-badge", { privacyBadgeText: i18next.t("privacyBadgeText"), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { class: {
498
+ hidden: !this.wrongImageFormat && !searchState.serverError,
499
+ } }, h("vviinn-wrong-format", { class: { hidden: !this.wrongImageFormat }, handler: () => this.resetState() }), h("vviinn-server-error", { class: { hidden: !searchState.serverError }, handler: () => this.resetState() })), !this.haveErrors() && h("vviinn-teaser", null), !this.haveErrors() && (h("div", { class: "buttons-group" }, this.renderButtons())), this.textSearchShow && !this.haveErrors() && (h("vviinn-text-search", { clearSearchQuery: true }))), h("vviinn-privacy-badge", { privacyBadgeText: i18next.t("privacyBadgeText"), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { class: {
482
500
  "results-page": true,
483
501
  active: this.isResultSlide(),
484
- } }, h("div", { class: "image-wrapper" }, this.isResultSlide() && (h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError })), h("div", { class: {
502
+ } }, this.isResultSlide() && searchState.searchType === "image" && (h("div", { class: "image-wrapper" }, h("vviinn-image-view", { basicEventData: this.getBasicEventData(), setShowAspectRatioError: this.setShowAspectRatioError, showAspectRatioError: this.showAspectRatioError }), h("div", { class: {
485
503
  "filters-wrapper": true,
486
504
  hidden: this.showAspectRatioError,
487
- } }, h("div", { class: "filters" }, imageSearchState.filters.map((filter) => (h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() })))))), h("div", { id: "results-block", class: "products-wrapper" }, h("div", { class: {
505
+ } }, h("div", { class: "filters" }, searchState.filters.map((filter) => (h("search-filters", { filter: filter, basicEventData: this.getBasicEventData() }))))))), this.textSearchShow &&
506
+ this.isResultSlide() &&
507
+ searchState.searchType === "text" && (h("div", { class: "text-search-wrapper" }, h("vviinn-text-search", { initialSearchQuery: this.initialSearchQuery }))), h("div", { id: "results-block", class: "products-wrapper" }, h("div", { class: {
488
508
  "nothing-found": true,
489
- hidden: imageSearchState.results.length > 0,
509
+ hidden: searchState.results.length > 0,
490
510
  } }, h("vviinn-empty-results", { handler: () => this.resetState() })), h("div", { class: {
491
511
  "nothing-found": true,
492
512
  hidden: !this.showAspectRatioError,
493
513
  } }, h("vviinn-wrong-aspect-ratio", { handler: () => this.resetState() })), h("div", { class: {
494
- hidden: imageSearchState.results.length <= 0 ||
514
+ hidden: searchState.results.length <= 0 ||
495
515
  this.showAspectRatioError,
496
516
  products: true,
497
517
  } }, this.active && this.renderResults())))))));
@@ -676,6 +696,24 @@ export class VviinnVpsWidget {
676
696
  "reflect": false,
677
697
  "defaultValue": "DEFAULT_EXAMPLE_IMAGE"
678
698
  },
699
+ "textSearchShow": {
700
+ "type": "boolean",
701
+ "mutable": false,
702
+ "complexType": {
703
+ "original": "boolean",
704
+ "resolved": "boolean",
705
+ "references": {}
706
+ },
707
+ "required": false,
708
+ "optional": false,
709
+ "docs": {
710
+ "tags": [],
711
+ "text": "Show the text search"
712
+ },
713
+ "attribute": "text-search-show",
714
+ "reflect": false,
715
+ "defaultValue": "false"
716
+ },
679
717
  "apiPath": {
680
718
  "type": "string",
681
719
  "mutable": false,
@@ -809,7 +847,9 @@ export class VviinnVpsWidget {
809
847
  "cameraEnabled": {},
810
848
  "cameraButtonClicked": {},
811
849
  "uploadSource": {},
812
- "showAspectRatioError": {}
850
+ "showAspectRatioError": {},
851
+ "products": {},
852
+ "initialSearchQuery": {}
813
853
  };
814
854
  }
815
855
  static get events() {
@@ -1152,6 +1192,12 @@ export class VviinnVpsWidget {
1152
1192
  "target": undefined,
1153
1193
  "capture": false,
1154
1194
  "passive": false
1195
+ }, {
1196
+ "name": "vviinnTextSearchFinished",
1197
+ "method": "trackTextSearchFinished",
1198
+ "target": undefined,
1199
+ "capture": false,
1200
+ "passive": false
1155
1201
  }];
1156
1202
  }
1157
1203
  }
@@ -8,6 +8,7 @@ export const resources = {
8
8
  privacyBadgeText: "Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.",
9
9
  teaserText: "Finde Produkte auf \n einem Foto",
10
10
  imageSearchModalTitle: "Bildsuche",
11
+ textSearchPlaceholder: "mit Text suchen",
11
12
  emptyResultsBlock: {
12
13
  title: "Leider nichts gefunden",
13
14
  button: "Neues Bild hochladen",
@@ -36,6 +37,7 @@ export const resources = {
36
37
  privacyBadgeText: "By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",
37
38
  teaserText: "Find Product by Photo",
38
39
  imageSearchModalTitle: "Visual Search",
40
+ textSearchPlaceholder: "Search by text",
39
41
  emptyResultsBlock: {
40
42
  title: "Sorry, nothing found",
41
43
  button: "Upload another image",
@@ -12,7 +12,7 @@ function getJson(x) {
12
12
  }
13
13
  export const request = (url, request = {}) => pipe(safeRequest(url, request), TE.chain(processResponce), TE.chain((x) => getJson(x)));
14
14
  const initRequestSemigroup = mergeInitRequests;
15
- export const makeRequest = (path, init) => ([apiPath, options,]) => {
15
+ export const makeRequest = (path, init) => ([apiPath, options]) => {
16
16
  const url = new URL(path, apiPath);
17
17
  const fullOptions = initRequestSemigroup.concat(options, init);
18
18
  return pipe(request(url.toString(), fullOptions), TE.mapLeft(basicErrorFromResponse));
@@ -1,12 +1,9 @@
1
1
  import { pipe } from "fp-ts/lib/function";
2
2
  import { makeRequest } from "../network/request";
3
3
  import { createInitPostRequest, getApiPath } from "../network/utils";
4
- import * as E from "fp-ts/Either";
5
4
  import * as TE from "fp-ts/TaskEither";
6
5
  import * as O from "fp-ts/Option";
7
- import { processBearerToken } from "../utils/token/tokenUtils";
8
6
  import { sequenceToEither } from "../utils/either";
9
- import { imageFormFromFile } from "../Image/form";
10
7
  import { arrayToQueryString } from "../utils/collections/collectionsUtils";
11
8
  export const readFilters = (filters) => Object.entries(filters).map(([name, filters]) => {
12
9
  return { name, filters };
@@ -19,7 +16,7 @@ export const detectedObjectEq = {
19
16
  x.rectangle.height === y.rectangle.height &&
20
17
  x.rectangle.width === y.rectangle.width,
21
18
  };
22
- export const searchSessionClient = (initialData, campaignId = O.none, excludedFilters) => {
19
+ export const imageSearchSessionClient = (initialData, campaignId = O.none, excludedFilters) => {
23
20
  const searchUrl = "search/session";
24
21
  const requestUrl = pipe(campaignId, O.fold(() => {
25
22
  const params = [];
@@ -38,9 +35,7 @@ export const searchSessionClient = (initialData, campaignId = O.none, excludedFi
38
35
  }));
39
36
  return pipe(sequenceToEither(getApiPath(), createInitPostRequest), TE.fromEither, TE.chainW(makeRequest(requestUrl, initialData)));
40
37
  };
41
- export const makeRequestFromFile = (token, file) => pipe(sequenceToEither(processBearerToken(token), E.right(imageFormFromFile(file))), E.map(([headers, body]) => {
42
- return {
43
- headers,
44
- body,
45
- };
46
- }));
38
+ export const textSearchSessionClient = (initialData) => {
39
+ const requestUrl = "multi-search";
40
+ return pipe(sequenceToEither(getApiPath(), createInitPostRequest), TE.fromEither, TE.chainW(makeRequest(requestUrl, initialData)));
41
+ };
@@ -3,7 +3,7 @@ import * as O from "fp-ts/lib/Option";
3
3
  import * as E from "fp-ts/Either";
4
4
  import * as TE from "fp-ts/TaskEither";
5
5
  import { pipe } from "fp-ts/function";
6
- import { readFilters, searchSessionClient, } from "../searchSession/searchSession";
6
+ import { readFilters, imageSearchSessionClient, textSearchSessionClient, } from "../searchSession/searchSession";
7
7
  import { foldValueObject } from "../network/ion/ValueObject";
8
8
  import { linkRequest, getLink } from "../network/ion/Link";
9
9
  import { divideOnSized } from "../geometry/Rectangle";
@@ -39,6 +39,7 @@ const { state, onChange } = createStore({
39
39
  serverError: false,
40
40
  loading: false,
41
41
  });
42
+ export const searchState = state;
42
43
  const updateState = async (response) => {
43
44
  var _a;
44
45
  state.results = response.value;
@@ -81,6 +82,7 @@ export const makeRectangularSearchRequest = async () => {
81
82
  }));
82
83
  };
83
84
  export const uploadFile = (file) => {
85
+ state.searchType = "image";
84
86
  state.loading = true;
85
87
  const fileForm = imageFormFromFile(file);
86
88
  const tokenWithFile = sequenceToEither(processBearerToken(state.token), E.right(fileForm));
@@ -89,7 +91,7 @@ export const uploadFile = (file) => {
89
91
  headers,
90
92
  body,
91
93
  };
92
- }), TE.fromEither, TE.chain((request) => searchSessionClient(request, state.campaignId, state.excluded)), TE.map((sessionResponse) => {
94
+ }), TE.fromEither, TE.chain((request) => imageSearchSessionClient(request, state.campaignId, state.excluded)), TE.map((sessionResponse) => {
93
95
  updateState(sessionResponse);
94
96
  detectObjects(sessionResponse);
95
97
  state.loading = false;
@@ -100,7 +102,34 @@ export const uploadFile = (file) => {
100
102
  return error;
101
103
  }));
102
104
  };
103
- export const imageSearchState = state;
105
+ const uploadText = (query) => {
106
+ state.searchType = "text";
107
+ state.loading = true;
108
+ const body = JSON.stringify({
109
+ query,
110
+ campaign: O.getOrElse(() => "")(state.campaignId),
111
+ });
112
+ const tokenWithBody = sequenceToEither(processBearerToken(state.token), E.right(body));
113
+ return pipe(tokenWithBody, E.map(([headers, body]) => {
114
+ headers.set("Content-Type", "application/json");
115
+ return {
116
+ headers,
117
+ body,
118
+ };
119
+ }), TE.fromEither, TE.chain((request) => textSearchSessionClient(request)), TE.map((sessionResponse) => {
120
+ var _a, _b;
121
+ state.results = (_b = (_a = sessionResponse.data) === null || _a === void 0 ? void 0 : _a.products) !== null && _b !== void 0 ? _b : [];
122
+ state.loading = false;
123
+ return sessionResponse;
124
+ }), TE.mapLeft((error) => {
125
+ state.serverError = true;
126
+ state.loading = false;
127
+ return error;
128
+ }));
129
+ };
130
+ export const processSelectedText = async (query) => {
131
+ return await uploadText(query)();
132
+ };
104
133
  onChange("activeIonLink", async (newLink) => {
105
134
  const link = newLink ? newLink : state.resetCategoryLink;
106
135
  if (!link)
@@ -122,8 +151,8 @@ onChange("serverError", () => {
122
151
  state.loading = false;
123
152
  });
124
153
  const setSelectedImage = (image) => {
125
- imageSearchState.image = O.some(image);
126
- imageSearchState.imageUrl = O.some(image.src);
154
+ searchState.image = O.some(image);
155
+ searchState.imageUrl = O.some(image.src);
127
156
  };
128
157
  export const processSelectedFile = async (file) => {
129
158
  const originFile = checkFileWithExtention(file);
@@ -0,0 +1,6 @@
1
+ import { h } from './index-1f3eaf12.js';
2
+
3
+ const VisualSearchIcon = () => (h("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
4
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z", fill: "#161616" })));
5
+
6
+ export { VisualSearchIcon as V };
@@ -25,6 +25,7 @@ const defaultSlotsNames = [
25
25
  "vviinn-privacy-badge-text",
26
26
  "vviinn-image-search-modal-title",
27
27
  "vviinn-basket-button-text",
28
+ "vviinn-text-search-icon",
28
29
  ];
29
30
  const renderNamedSlot = (name) => h("slot", { name: name });
30
31
  const SlotSkeleton = () => defaultSlotsNames.map(renderNamedSlot);
@@ -1,4 +1,4 @@
1
- import { n as commonjsGlobal, o as createCommonjsModule } from './imageSearch.store-c0f2a178.js';
1
+ import { n as commonjsGlobal, o as createCommonjsModule } from './search.store-5eebcfbe.js';
2
2
 
3
3
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
4
4
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -11,7 +11,7 @@ const patchEsm = () => {
11
11
  const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
- return bootstrapLazy([["vviinn-button",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-carousel_4",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_16",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
14
+ return bootstrapLazy([["vviinn-button",[[1,"vviinn-button",{"addStyle":[4,"add-style"]}]]],["vviinn-preloader",[[1,"vviinn-preloader"]]],["vviinn-error",[[1,"vviinn-error"]]],["vviinn-carousel_4",[[1,"vviinn-vpr-widget",{"blockTitle":[1,"block-title"],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"productId":[1,"product-id"],"token":[1],"currencySign":[1,"currency-sign"],"pricePrefix":[1,"price-prefix"],"mode":[1],"campaignType":[1,"campaign-type"],"locale":[1],"campaigns":[1],"color":[1],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"showScroll":[4,"show-scroll"],"cssUrl":[1,"css-url"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"apiPath":[1,"api-path"],"useCarousel":[4,"use-carousel"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"closed":[4],"opened":[4],"recommendations":[32],"trackingDeactivated":[32],"hasErrorOnLoad":[32],"updatingAllCards":[32]},[[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnAddToBasket","trackAddToBasket"],[0,"vviinnUpdatingAllCardsFinished","updatingAllCardsFinishedListener"]]],[0,"vviinn-carousel",{"mode":[1],"imageWidth":[2,"image-width"],"showScroll":[4,"show-scroll"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"recommendations":[16],"widgetVersion":[1,"widget-version"],"addToBasketShow":[4,"add-to-basket-show"],"updatingAllCards":[4,"updating-all-cards"],"updateButtonLocation":[1,"update-button-location"],"moveDirection":[32],"contentGroups":[32],"activeContentGroup":[32],"isRTL":[32],"crossSellingRecommendations":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-product-card",{"brand":[1],"currency":[1],"deeplink":[1],"image":[1],"imageRatio":[2,"image-ratio"],"imageWidth":[2,"image-width"],"locale":[1],"price":[2],"pricePrefix":[1,"price-prefix"],"productId":[1,"product-id"],"productTitle":[1,"product-title"],"productType":[1,"product-type"],"salePrice":[2,"sale-price"],"responsive":[4],"dimmedBackground":[4,"dimmed-background"],"mode":[1],"addToBasketShow":[4,"add-to-basket-show"],"updateButtonLocation":[1,"update-button-location"],"campaignTypeId":[1,"campaign-type-id"],"widgetElementId":[1,"widget-element-id"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"index":[2],"updatingAllCards":[4,"updating-all-cards"],"defaultAnimationInterval":[2,"default-animation-interval"],"imageLoaded":[32],"isTransitioning":[32]},[[0,"vviinnCrossSellingClick","crossSellingClickListener"]]],[1,"vviinn-skeleton",{"height":[2],"halfWidth":[4,"half-width"]}]]],["search-filters_17",[[1,"vviinn-image-view",{"basicEventData":[16],"setShowAspectRatioError":[16],"showAspectRatioError":[4,"show-aspect-ratio-error"],"cropper":[32],"hidePreloader":[32]},[[0,"vviinnSelectObject","selectDetectedObject"]]],[1,"vviinn-overlayed-modal",{"active":[4],"resetState":[16],"buttonElementId":[1,"button-element-id"],"hideBackButton":[4,"hide-back-button"],"widgetVersion":[1,"widget-version"],"isFirstScreen":[4,"is-first-screen"]}],[1,"vviinn-empty-results",{"handler":[16]}],[1,"vviinn-image-selector",{"basicEventData":[16],"startUpload":[4,"start-upload"],"loading":[4],"accept":[1],"resetVpsButton":[16],"capture":[1]}],[1,"vviinn-server-error",{"handler":[16]}],[1,"vviinn-text-search",{"clearSearchQuery":[4,"clear-search-query"],"initialSearchQuery":[1,"initial-search-query"],"searchQuery":[32]}],[1,"vviinn-wrong-aspect-ratio",{"handler":[16]}],[1,"vviinn-wrong-format",{"handler":[16]}],[1,"search-filters",{"filter":[16],"basicEventData":[16],"selectedFilter":[32],"hideFilters":[32]}],[1,"vviinn-example-image",{"exampleImageSource":[1,"example-image-source"],"width":[2],"height":[2],"basicEventData":[16],"srcObject":[16],"cameraButtonClicked":[4,"camera-button-clicked"],"selected":[32],"videoInitialized":[32],"zoomCapabilities":[32]}],[1,"vviinn-privacy-badge",{"privacyBadgeText":[1,"privacy-badge-text"]}],[1,"vviinn-slide"],[1,"vviinn-slider",{"showBullets":[4,"show-bullets"],"position":[514],"showArrows":[4,"show-arrows"],"elementsCount":[32],"internalPosition":[32],"swipeStartPosition":[32],"isRTL":[32]}],[1,"vviinn-teaser"],[1,"vviinn-detected-object",{"detectedObject":[16],"basicEventData":[16],"position":[32]}],[1,"vviinn-modal",{"active":[1540],"resetState":[16],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"hideBackButton":[4,"hide-back-button"],"isFirstScreen":[4,"is-first-screen"],"slider":[32]}],[1,"vviinn-overlay"]]],["vviinn-vps-widget",[[1,"vviinn-vps-widget",{"token":[1],"active":[1028],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"showingInButton":[4,"showing-in-button"],"buttonElementId":[1,"button-element-id"],"buttonPressed":[4,"button-pressed"],"mode":[1],"resetVpsButton":[16],"slidePosition":[32],"width":[32],"wrongImageFormat":[32],"trackingDeactivated":[32],"stream":[32],"cameraEnabled":[32],"cameraButtonClicked":[32],"uploadSource":[32],"showAspectRatioError":[32],"products":[32],"initialSearchQuery":[32]},[[0,"vviinnCameraEnabled","trackCameraEnabled"],[0,"vviinnProductLoad","trackProductLoad"],[0,"vviinnProductView","trackProductView"],[0,"vviinnProductClick","trackProductClick"],[0,"vviinnAuxClick","trackAuxClick"],[0,"vviinnImageCrop","trachSearchAreaChanges"],[0,"vviinnSelectObject","trackDetectedObject"],[0,"vviinnSelectFilter","trackFilter"],[0,"vviinnTextSearchFinished","trackTextSearchFinished"]]]]],["vviinn-vps-button",[[1,"vviinn-vps-button",{"token":[1],"currencySign":[1,"currency-sign"],"locale":[1],"campaignId":[1,"campaign-id"],"addStyle":[4,"add-style"],"mode":[1],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"imageResolutionWidth":[2,"image-resolution-width"],"exampleImageSource":[1,"example-image-source"],"textSearchShow":[4,"text-search-show"],"apiPath":[1,"api-path"],"buttonPressed":[32]},[[0,"vviinnWidgetClose","handleModalClosed"]]]]],["vviinn-recommendations-sidebar",[[1,"vviinn-recommendations-sidebar",{"sidebarTitle":[1,"sidebar-title"],"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"widgetScrollbar":[4,"widget-scrollbar"],"mode":[1],"campaigns":[1],"campaignType":[1,"campaign-type"],"color":[1],"locale":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"buttonChildren":[16],"apiPath":[1,"api-path"],"buttonElementId":[1,"button-element-id"],"widgetVersion":[1,"widget-version"],"showingInButton":[4,"showing-in-button"],"state":[32]},[[16,"click","bodyClickListener"]]]]],["vviinn-vpr-button",[[1,"vviinn-vpr-button",{"token":[1],"productId":[1,"product-id"],"position":[1],"sourceImage":[1,"source-image"],"sidebarTitle":[1,"sidebar-title"],"modalScrollbar":[4,"modal-scrollbar"],"campaigns":[1],"campaignType":[1,"campaign-type"],"locale":[1],"color":[1],"addStyle":[4,"add-style"],"mode":[1],"imageWidth":[2,"image-width"],"currencySign":[1,"currency-sign"],"noResultText":[1,"no-result-text"],"noResultShow":[4,"no-result-show"],"gridArrowsDynamic":[4,"grid-arrows-dynamic"],"excluded":[1],"productDetailNewTab":[4,"product-detail-new-tab"],"addToBasketShow":[4,"add-to-basket-show"],"apiPath":[1,"api-path"]}]]]], options);
15
15
  });
16
16
  };
17
17
 
@@ -1,3 +1,3 @@
1
- const version = "2.44.2";
1
+ const version = "2.46.0";
2
2
 
3
3
  export { version as v };