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
@@ -1,18 +1,20 @@
1
- import { h } from "@stencil/core";
2
- export const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
3
- export const CloseIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M12 13.3892L6.91958 18.4696C6.72248 18.6667 6.49095 18.7653 6.225 18.7653C5.95905 18.7653 5.72753 18.6667 5.53043 18.4696C5.33333 18.2725 5.23478 18.041 5.23478 17.775C5.23478 17.5091 5.33333 17.2776 5.53043 17.0805L10.6109 12L5.53043 6.9196C5.33333 6.7225 5.23478 6.49098 5.23478 6.22503C5.23478 5.95908 5.33333 5.72755 5.53043 5.53045C5.72753 5.33335 5.95905 5.2348 6.225 5.2348C6.49095 5.2348 6.72248 5.33335 6.91958 5.53045L12 10.6109L17.0804 5.53045C17.2775 5.33335 17.5091 5.2348 17.775 5.2348C18.041 5.2348 18.2725 5.33335 18.4696 5.53045C18.6667 5.72755 18.7652 5.95908 18.7652 6.22503C18.7652 6.49098 18.6667 6.7225 18.4696 6.9196L13.3892 12L18.4696 17.0805C18.6667 17.2776 18.7652 17.5091 18.7652 17.775C18.7652 18.041 18.6667 18.2725 18.4696 18.4696C18.2725 18.6667 18.041 18.7653 17.775 18.7653C17.5091 18.7653 17.2775 18.6667 17.0804 18.4696L12 13.3892Z", fill: "currentColor" })));
4
- export const SecondaryActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z", fill: "currentColor" })));
5
- export const CameraIcon = () => (h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z", fill: "#161616" })));
6
- export const CheckIcon = () => (h("svg", { width: "14", height: "11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M5 10.414 0 5.413 1.413 4 5 7.586 12.585 0 14 1.415l-9 8.999Z", fill: "var(--color-primary, var(--color-primary-system))" })));
7
- export const LoaderIcon = () => (h("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 28 28" }, h("path", { fill: "#fff", d: "M23,14a9,9,0,1,1-9-9V2A12,12,0,1,0,26,14Z" })));
8
- export const ChevronIcon = () => (h("svg", { width: "9", height: "16", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "m9 8-7.895 8L0 14.88 6.79 8 0 1.12 1.105 0 9 8Z" })));
9
- export const VisualSearchIcon = () => (h("svg", { width: "20", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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" })));
10
- export const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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: "#161616" })));
11
- export const UploadActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z", fill: "currentColor" })));
12
- export const UpdateIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M23.5998 4.57C20.3898 4.19 19.8798 3.68 19.4198 0.37C19.3798 0.15 19.2198 0 19.0098 0C18.7998 0 18.6298 0.15 18.5898 0.37C18.1198 3.66 17.6298 4.13 14.4098 4.57C14.1698 4.61 14.0098 4.77 14.0098 5C14.0098 5.23 14.1698 5.39 14.4098 5.42C17.6298 5.81 18.1398 6.31 18.5898 9.62C18.6298 9.84 18.7998 10 19.0098 10C19.2198 10 19.3898 9.84 19.4198 9.62C19.8898 6.31 20.3898 5.81 23.5998 5.42C23.8398 5.38 23.9998 5.22 23.9998 5C23.9998 4.78 23.8298 4.6 23.5998 4.57Z", fill: "currentColor" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M19.93 13C19.43 13 19.01 13.37 18.95 13.86C18.52 17.36 15.51 20.06 11.89 20C8.24 19.94 5.15 16.92 5.01 13.27C4.92 10.79 6.13 8.58 8.01 7.27V11C8.01 11.55 8.46 12 9.01 12C9.56 12 10.01 11.55 10.01 11V5C10.01 4.45 9.56 4 9.01 4H3C2.45 4 2 4.45 2 5C2 5.55 2.45 6 3 6H6.35C4.24 7.71 2.91 10.35 3 13.3C3.15 17.98 7.06 21.87 11.74 22C16.45 22.13 20.37 18.65 20.93 14.13C21 13.53 20.53 13.01 19.93 13.01V13Z", fill: "currentColor" })));
13
- export const GalleryActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "24", viewBox: "0 0 25 24", fill: "none" }, h("path", { d: "M5.5 21H8.175V16.325H3.5V19C3.5 19.55 3.69583 20.0208 4.0875 20.4125C4.47917 20.8042 4.95 21 5.5 21ZM10.175 21H14.825V16.325H10.175V21ZM16.825 21H19.5C20.05 21 20.5208 20.8042 20.9125 20.4125C21.3042 20.0208 21.5 19.55 21.5 19V16.325H16.825V21ZM3.5 14.325H8.175V9.675H3.5V14.325ZM10.175 14.325H14.825V9.675H10.175V14.325ZM16.825 14.325H21.5V9.675H16.825V14.325ZM3.5 7.675H8.175V3H5.5C4.95 3 4.47917 3.19583 4.0875 3.5875C3.69583 3.97917 3.5 4.45 3.5 5V7.675ZM10.175 7.675H14.825V3H10.175V7.675ZM16.825 7.675H21.5V5C21.5 4.45 21.3042 3.97917 20.9125 3.5875C20.5208 3.19583 20.05 3 19.5 3H16.825V7.675Z", fill: "currentColor" })));
14
- export const CameraActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M12 17.5C13.25 17.5 14.3125 17.0625 15.1875 16.1875C16.0625 15.3125 16.5 14.25 16.5 13C16.5 11.75 16.0625 10.6875 15.1875 9.8125C14.3125 8.9375 13.25 8.5 12 8.5C10.75 8.5 9.6875 8.9375 8.8125 9.8125C7.9375 10.6875 7.5 11.75 7.5 13C7.5 14.25 7.9375 15.3125 8.8125 16.1875C9.6875 17.0625 10.75 17.5 12 17.5ZM12 15.5C11.3 15.5 10.7083 15.2583 10.225 14.775C9.74167 14.2917 9.5 13.7 9.5 13C9.5 12.3 9.74167 11.7083 10.225 11.225C10.7083 10.7417 11.3 10.5 12 10.5C12.7 10.5 13.2917 10.7417 13.775 11.225C14.2583 11.7083 14.5 12.3 14.5 13C14.5 13.7 14.2583 14.2917 13.775 14.775C13.2917 15.2583 12.7 15.5 12 15.5ZM4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V7C2 6.45 2.19583 5.97917 2.5875 5.5875C2.97917 5.19583 3.45 5 4 5H7.15L8.4 3.65C8.58333 3.45 8.80417 3.29167 9.0625 3.175C9.32083 3.05833 9.59167 3 9.875 3H14.125C14.4083 3 14.6792 3.05833 14.9375 3.175C15.1958 3.29167 15.4167 3.45 15.6 3.65L16.85 5H20C20.55 5 21.0208 5.19583 21.4125 5.5875C21.8042 5.97917 22 6.45 22 7V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4Z", fill: "currentColor" })));
15
- export const RoundCameraIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "80", height: "80", viewBox: "0 0 80 80", fill: "none" }, h("circle", { cx: "40", cy: "40", r: "36", fill: "white" }), h("circle", { cx: "40", cy: "40", r: "39", fill: "white", "fill-opacity": "0.16", stroke: "white", "stroke-width": "2" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M48 29.3333H50.6667C53.6133 29.3333 56 31.72 56 34.6667V45.3333H53.3333V34.6667C53.3333 33.2 52.1333 32 50.6667 32H46.5733L45.7867 30.8133L43.9067 28H36.0933L34.2133 30.8133L33.4267 32H29.3333C27.8667 32 26.6667 33.2 26.6667 34.6667V48C26.6667 49.4667 27.8667 50.6667 29.3333 50.6667H36V53.3333H29.3333C26.3867 53.3333 24 50.9467 24 48V34.6667C24 31.72 26.3867 29.3333 29.3333 29.3333H32L34.6667 25.3333H45.3333L48 29.3333ZM40 34.6667C43.68 34.6667 46.6667 37.6533 46.6667 41.3333L46.6533 41.3467C46.6533 42.6933 46.24 43.96 45.5467 45.0133L51.6 51.0667L49.72 52.9467L43.6667 46.8933C42.6133 47.5867 41.36 48 40 48C36.32 48 33.3333 45.0133 33.3333 41.3333C33.3333 37.6533 36.32 34.6667 40 34.6667ZM36 41.3333C36 43.5333 37.8 45.3333 40 45.3333C42.2 45.3333 44 43.5333 44 41.3333C44 39.1333 42.2 37.3333 40 37.3333C37.8 37.3333 36 39.1333 36 41.3333Z", fill: "#161616" })));
16
- export const WarningIcon = () => (h("svg", { slot: "icon", class: "icon", width: "32", height: "32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z", fill: "#525252" }), h("path", { d: "M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z", fill: "#525252" })));
17
- export const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M14.6667 17.3333H8.00001C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H14.6667V8.00001C14.6667 7.62223 14.7944 7.30556 15.05 7.05001C15.3056 6.79445 15.6222 6.66667 16 6.66667C16.3778 6.66667 16.6944 6.79445 16.95 7.05001C17.2056 7.30556 17.3333 7.62223 17.3333 8.00001V14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H17.3333V24C17.3333 24.3778 17.2056 24.6944 16.95 24.95C16.6944 25.2056 16.3778 25.3333 16 25.3333C15.6222 25.3333 15.3056 25.2056 15.05 24.95C14.7944 24.6944 14.6667 24.3778 14.6667 24V17.3333Z", fill: "white" })));
18
- export const MinusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z", fill: "white" })));
1
+ export { ArrowIcon } from "./icons/ArrowIcon";
2
+ export { BasketIcon } from "./icons/BasketIcon";
3
+ export { CameraActionIcon } from "./icons/CameraActionIcon";
4
+ export { CameraIcon } from "./icons/CameraIcon";
5
+ export { CheckCircleIcon } from "./icons/CheckCircleIcon";
6
+ export { CheckIcon } from "./icons/CheckIcon";
7
+ export { ChevronIcon } from "./icons/ChevronIcon";
8
+ export { CloseIcon } from "./icons/CloseIcon";
9
+ export { CrossIcon } from "./icons/CrossIcon";
10
+ export { GalleryActionIcon } from "./icons/GalleryActionIcon";
11
+ export { LoaderIcon } from "./icons/LoaderIcon";
12
+ export { MinusIcon } from "./icons/MinusIcon";
13
+ export { PlusIcon } from "./icons/PlusIcon";
14
+ export { RoundCameraIcon } from "./icons/RoundCameraIcon";
15
+ export { SecondaryActionIcon } from "./icons/SecondaryActionIcon";
16
+ export { TextSearchIcon } from "./icons/TextSearchIcon";
17
+ export { UpdateIcon } from "./icons/UpdateIcon";
18
+ export { UploadActionIcon } from "./icons/UploadActionIcon";
19
+ export { VisualSearchIcon } from "./icons/VisualSearchIcon";
20
+ export { WarningIcon } from "./icons/WarningIcon";
@@ -1,7 +1,7 @@
1
1
  import { Host, h, } from "@stencil/core";
2
2
  import * as E from "fp-ts/Either";
3
3
  import { pipe } from "fp-ts/lib/function";
4
- import { processSelectedFile } from "../../store/imageSearch.store";
4
+ import { processSelectedFile } from "../../store/search.store";
5
5
  /**
6
6
  * @part button - button look and feel
7
7
  */
@@ -4,7 +4,7 @@ import * as O from "fp-ts/lib/Option";
4
4
  import { foldValueObject } from "../../../network/ion/ValueObject";
5
5
  import { detectedObjectEq, } from "../../../searchSession/searchSession";
6
6
  import { fromAlt, scaleWithSized, center } from "../../../geometry/Rectangle";
7
- import { imageSearchState, makeRectangularSearchRequest, } from "../../../store/imageSearch.store";
7
+ import { searchState, makeRectangularSearchRequest, } from "../../../store/search.store";
8
8
  export class VviinnDetectedObject {
9
9
  constructor() {
10
10
  this.detectedObject = undefined;
@@ -12,19 +12,19 @@ export class VviinnDetectedObject {
12
12
  this.position = ["0", "0"];
13
13
  }
14
14
  getObjectPosition() {
15
- return pipe(imageSearchState.imageBounds, O.map((bounds) => {
15
+ return pipe(searchState.imageBounds, O.map((bounds) => {
16
16
  const objectRectangle = fromAlt(foldValueObject(this.detectedObject).rectangle);
17
17
  const { x, y } = pipe(objectRectangle, scaleWithSized(bounds), center);
18
18
  return [`${x}px`, `${y}px`];
19
19
  }), O.getOrElse(() => ["0", "0"]));
20
20
  }
21
21
  selectDetectedObject() {
22
- pipe(imageSearchState.imageBounds, O.map((bounds) => {
22
+ pipe(searchState.imageBounds, O.map((bounds) => {
23
23
  const rectangle = foldValueObject(this.detectedObject).rectangle;
24
24
  const transformedRect = fromAlt(rectangle);
25
25
  const scaledRect = scaleWithSized(bounds)(transformedRect);
26
- imageSearchState.detectedObject = this.detectedObject;
27
- imageSearchState.searchArea = O.some(scaledRect);
26
+ searchState.detectedObject = this.detectedObject;
27
+ searchState.searchArea = O.some(scaledRect);
28
28
  }));
29
29
  makeRectangularSearchRequest();
30
30
  this.vviinnSelectObject.emit(Object.assign(Object.assign({}, this.basicEventData), { detectedObject: this.detectedObject }));
@@ -32,10 +32,10 @@ export class VviinnDetectedObject {
32
32
  isActive() {
33
33
  if (!this.detectedObject)
34
34
  return false;
35
- if (!imageSearchState.detectedObject)
35
+ if (!searchState.detectedObject)
36
36
  return false;
37
37
  const thisObject = foldValueObject(this.detectedObject);
38
- const savedObject = foldValueObject(imageSearchState.detectedObject);
38
+ const savedObject = foldValueObject(searchState.detectedObject);
39
39
  return detectedObjectEq.equals(thisObject, savedObject);
40
40
  }
41
41
  render() {
@@ -2,7 +2,7 @@ import { Host, h, } from "@stencil/core";
2
2
  import { pipe } from "fp-ts/lib/function";
3
3
  import * as O from "fp-ts/lib/Option";
4
4
  import Cropper from "cropperjs";
5
- import { imageSearchState, makeRectangularSearchRequest, } from "../../store/imageSearch.store";
5
+ import { searchState, makeRectangularSearchRequest, } from "../../store/search.store";
6
6
  import { sequenceToOption } from "../../utils/option/option";
7
7
  import { fromImage } from "../../geometry/Rectangle";
8
8
  import { dimensionsFromImage, scaleByLargestSide } from "../../Image/sizing";
@@ -59,9 +59,9 @@ const ValidateCropBoxData = (cropBoxData) => {
59
59
  export class VviinnImageView {
60
60
  constructor() {
61
61
  this.cropEnd = () => {
62
- imageSearchState.searchArea = O.some(this.getCropboxData());
62
+ searchState.searchArea = O.some(this.getCropboxData());
63
63
  makeRectangularSearchRequest();
64
- imageSearchState.detectedObject = undefined;
64
+ searchState.detectedObject = undefined;
65
65
  this.vviinnImageCrop.emit(this.basicEventData);
66
66
  };
67
67
  this.basicEventData = undefined;
@@ -110,8 +110,8 @@ export class VviinnImageView {
110
110
  width: width - width * INITIAL_CROP_AREA_OFFSET,
111
111
  height: height - height * INITIAL_CROP_AREA_OFFSET,
112
112
  };
113
- imageSearchState.imageBounds = O.some(imageBounds);
114
- imageSearchState.searchArea = O.some(searchArea);
113
+ searchState.imageBounds = O.some(imageBounds);
114
+ searchState.searchArea = O.some(searchArea);
115
115
  if (width / height < SUPPORTED_ASPECT_RATIO ||
116
116
  height / width < SUPPORTED_ASPECT_RATIO) {
117
117
  this.setShowAspectRatioError(true);
@@ -131,14 +131,13 @@ export class VviinnImageView {
131
131
  return (h("vviinn-detected-object", { detectedObject: object, basicEventData: this.basicEventData }));
132
132
  }
133
133
  renderImage() {
134
- return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), O.map(([url, refImage]) => {
134
+ return pipe(sequenceToOption(searchState.imageUrl, searchState.image), O.map(([url, refImage]) => {
135
135
  const [width, height] = getImageSizes(refImage);
136
136
  return (h("img", { decoding: "async", width: width, height: height, src: url, draggable: false, onLoad: () => this.loadImage() }));
137
137
  }), O.getOrElse(() => null));
138
138
  }
139
139
  render() {
140
- return (h(Host, null, h("div", { class: "container" }, h("div", { class: "image-container" }, this.renderImage(), imageSearchState.detectedObjects.map((o) => this.renderDetectedObject(o))), (imageSearchState.loading ||
141
- imageSearchState.objectDetectionInProgress) &&
140
+ return (h(Host, null, h("div", { class: "container" }, h("div", { class: "image-container" }, this.renderImage(), searchState.detectedObjects.map((o) => this.renderDetectedObject(o))), (searchState.loading || searchState.objectDetectionInProgress) &&
142
141
  !this.showAspectRatioError &&
143
142
  !this.hidePreloader ? (h("div", { class: "image-preloader" }, h("vviinn-preloader", null))) : null)));
144
143
  }
@@ -2,7 +2,7 @@ import { Host, h, } from "@stencil/core";
2
2
  import i18next from "i18next";
3
3
  import { slotChangeListener } from "../customized-slots";
4
4
  import { campaignTypeNames } from "../../campaign/Campaign";
5
- import { imageSearchState } from "../../store/imageSearch.store";
5
+ import { searchState } from "../../store/search.store";
6
6
  import * as O from "fp-ts/lib/Option";
7
7
  import { pipe } from "fp-ts/lib/function";
8
8
  import { sequenceToOption } from "../../utils/option/option";
@@ -43,7 +43,7 @@ export class VviinnModal {
43
43
  this.slider = true;
44
44
  }
45
45
  renderImage() {
46
- return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), O.map(([url]) => {
46
+ return pipe(sequenceToOption(searchState.imageUrl, searchState.image), O.map(([url]) => {
47
47
  const image = (h("img", { width: "28", height: "28", src: url, class: "title-image" }));
48
48
  return image;
49
49
  }), O.getOrElse(() => null));
@@ -1,8 +1,8 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { imageSearchState } from "../../store/imageSearch.store";
2
+ import { searchState } from "../../store/search.store";
3
3
  export class VviinnPreloader {
4
4
  isActive() {
5
- return (imageSearchState.loading || imageSearchState.objectDetectionInProgress);
5
+ return searchState.loading || searchState.objectDetectionInProgress;
6
6
  }
7
7
  render() {
8
8
  return (h(Host, { class: {
@@ -3,6 +3,7 @@
3
3
  font-size: 12px;
4
4
  line-height: 16px;
5
5
  text-align: center;
6
+ margin-top: 24px;
6
7
  }
7
8
 
8
9
  :host(.invisible) {
@@ -4,7 +4,7 @@ import { getAnalyticsModule } from "../../analytics/GeneralAnalytics";
4
4
  import * as O from "fp-ts/lib/Option";
5
5
  import i18next from "i18next";
6
6
  import { state } from "../../store/store";
7
- import { imageSearchState } from "../../store/imageSearch.store";
7
+ import { searchState } from "../../store/search.store";
8
8
  import { Linked, Price, ResponsiveImage, Image, } from "./render-helpers";
9
9
  import styles from "./vviinn-product-card.css";
10
10
  import { campaignTypeNames, } from "../../campaign/Campaign";
@@ -133,7 +133,7 @@ export class VviinnProductCard {
133
133
  });
134
134
  }
135
135
  getProduct() {
136
- return imageSearchState.results.find((r) => r.productId === this.productId);
136
+ return searchState.results.find((r) => r.productId === this.productId);
137
137
  }
138
138
  renderImage() {
139
139
  const props = {
@@ -0,0 +1,63 @@
1
+ :host {
2
+ display: block;
3
+ position: relative;
4
+ width: 100%;
5
+ }
6
+
7
+ .text-search-input {
8
+ width: 100%;
9
+ height: 48px;
10
+ padding: 0 16px;
11
+ font-size: 16px;
12
+ box-sizing: border-box;
13
+ font-style: normal;
14
+ font-weight: 400;
15
+ border-radius: 8px;
16
+ border: 1px solid #e0e0e0;
17
+ transition: border-color 0.2s;
18
+ outline: none;
19
+ overflow: hidden;
20
+ }
21
+
22
+ .text-search-input::-moz-placeholder {
23
+ color: #a8a8a8;
24
+ }
25
+
26
+ .text-search-input::placeholder {
27
+ color: #a8a8a8;
28
+ }
29
+
30
+ .text-search-input:focus,
31
+ .text-search-input:active {
32
+ border-color: #8d8d8d;
33
+ }
34
+
35
+ .text-search-button {
36
+ position: absolute;
37
+ right: 1px;
38
+ top: 1px;
39
+ border: none;
40
+ border-radius: 0 7px 7px 0;
41
+ width: 46px;
42
+ height: 46px;
43
+ display: flex;
44
+ justify-content: center;
45
+ align-items: center;
46
+ background-color: #f4f4f4;
47
+ transition: background-color 0.2s;
48
+ cursor: pointer;
49
+ }
50
+
51
+ .text-search-button:not(:disabled):hover {
52
+ background-color: #e0e0e0;
53
+ }
54
+
55
+ .text-search-button:disabled {
56
+ cursor: unset;
57
+ }
58
+
59
+ vviinn-preloader {
60
+ --preloader-size: 16px;
61
+ display: flex;
62
+ color: #525252;
63
+ }
@@ -0,0 +1,118 @@
1
+ import { Host, h, } from "@stencil/core";
2
+ import { processSelectedText, searchState } from "../../store/search.store";
3
+ import { TextSearchIcon } from "../vviinn-icons";
4
+ import { slotChangeListener } from "../customized-slots";
5
+ import i18next from "i18next";
6
+ /**
7
+ * @part text-search-input - Text search input.
8
+ * @slot vviinn-text-search-icon - Icon of text search block.
9
+ */
10
+ export class VviinnTextSearch {
11
+ constructor() {
12
+ this.clearSearchQuery = false;
13
+ this.initialSearchQuery = "";
14
+ this.searchQuery = this.initialSearchQuery;
15
+ }
16
+ componentWillLoad() {
17
+ slotChangeListener(this, this.el);
18
+ }
19
+ handleInputChange(event) {
20
+ this.searchQuery = event.target.value;
21
+ }
22
+ handleKeyPress(event) {
23
+ if (event.key === "Enter") {
24
+ this.handleSearch();
25
+ }
26
+ }
27
+ async handleSearch() {
28
+ if (!this.searchQuery)
29
+ return;
30
+ await processSelectedText(this.searchQuery);
31
+ this.vviinnTextSearchFinished.emit(this.searchQuery);
32
+ if (this.clearSearchQuery) {
33
+ this.searchQuery = "";
34
+ }
35
+ }
36
+ render() {
37
+ return (h(Host, { exportparts: "text-search-input" }, h("input", { class: "text-search-input", part: "text-search-input", type: "text", placeholder: i18next.t("textSearchPlaceholder"), value: this.searchQuery, onInput: (event) => this.handleInputChange(event), onKeyUp: (event) => this.handleKeyPress(event) }), h("button", { class: "text-search-button", onClick: () => this.handleSearch(), disabled: searchState.loading }, searchState.loading && searchState.searchType === "text" ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))));
38
+ }
39
+ static get is() { return "vviinn-text-search"; }
40
+ static get encapsulation() { return "shadow"; }
41
+ static get originalStyleUrls() {
42
+ return {
43
+ "$": ["vviinn-text-search.css"]
44
+ };
45
+ }
46
+ static get styleUrls() {
47
+ return {
48
+ "$": ["vviinn-text-search.css"]
49
+ };
50
+ }
51
+ static get properties() {
52
+ return {
53
+ "clearSearchQuery": {
54
+ "type": "boolean",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "boolean",
58
+ "resolved": "boolean",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "clear-search-query",
68
+ "reflect": false,
69
+ "defaultValue": "false"
70
+ },
71
+ "initialSearchQuery": {
72
+ "type": "string",
73
+ "mutable": false,
74
+ "complexType": {
75
+ "original": "string",
76
+ "resolved": "string",
77
+ "references": {}
78
+ },
79
+ "required": false,
80
+ "optional": false,
81
+ "docs": {
82
+ "tags": [],
83
+ "text": ""
84
+ },
85
+ "attribute": "initial-search-query",
86
+ "reflect": false,
87
+ "defaultValue": "\"\""
88
+ }
89
+ };
90
+ }
91
+ static get states() {
92
+ return {
93
+ "searchQuery": {}
94
+ };
95
+ }
96
+ static get events() {
97
+ return [{
98
+ "method": "vviinnTextSearchFinished",
99
+ "name": "vviinnTextSearchFinished",
100
+ "bubbles": true,
101
+ "cancelable": true,
102
+ "composed": true,
103
+ "docs": {
104
+ "tags": [{
105
+ "name": "internal",
106
+ "text": undefined
107
+ }],
108
+ "text": ""
109
+ },
110
+ "complexType": {
111
+ "original": "any",
112
+ "resolved": "any",
113
+ "references": {}
114
+ }
115
+ }];
116
+ }
117
+ static get elementRef() { return "el"; }
118
+ }
@@ -22,7 +22,7 @@ import { createBearAuthedHeader } from "./token-helpers";
22
22
  import { state } from "../../store/store";
23
23
  import { campaignTypeNames } from "../../campaign/Campaign";
24
24
  import { getRecommendationsService } from "../../campaign/CampaignService";
25
- import { imageSearchState } from "../../store/imageSearch.store";
25
+ import { searchState } from "../../store/search.store";
26
26
  import { SlotSkeleton } from "../customized-slots";
27
27
  import { createTrackingApi } from "../../openApi";
28
28
  import { createWidgetVprEvent, createWidgetVpcEvent, createProductVpcEventByType, createProductVprEventByType, createAddToBasketVpcEvent, createAddToBasketVprEvent, createResultVpcEventByType, createResultVprEventByType, } from "../../tracking";
@@ -122,6 +122,9 @@ export class VviinnVprWidget {
122
122
  window.location.href = deeplink;
123
123
  }
124
124
  }
125
+ findProductById(id) {
126
+ return this.recommendations.find((r) => r.productId === id);
127
+ }
125
128
  handleProductIdChange() {
126
129
  this.getRecommendations();
127
130
  }
@@ -200,7 +203,7 @@ export class VviinnVprWidget {
200
203
  }
201
204
  async trackProductClick({ detail }) {
202
205
  const { productId, clickEvent } = detail;
203
- const product = this.recommendations.find((r) => r.productId === productId);
206
+ const product = this.findProductById(productId);
204
207
  if (!product || !product.deeplink)
205
208
  return;
206
209
  const productClickEvent = this.getProductTrackEvent(detail, "click");
@@ -218,7 +221,7 @@ export class VviinnVprWidget {
218
221
  }
219
222
  async trackAuxClick({ detail }) {
220
223
  const { productId } = detail;
221
- const product = this.recommendations.find((r) => r.productId === productId);
224
+ const product = this.findProductById(productId);
222
225
  if (!product || !product.deeplink)
223
226
  return;
224
227
  const productClickEvent = this.getProductTrackEvent(detail, "click");
@@ -310,7 +313,7 @@ export class VviinnVprWidget {
310
313
  this.vviinnResultLoad.emit(this.getBasicEventData());
311
314
  this.trackResultEvent("load");
312
315
  this.recommendations = (_a = data === null || data === void 0 ? void 0 : data.extended) !== null && _a !== void 0 ? _a : data;
313
- imageSearchState.results = this.recommendations;
316
+ searchState.results = this.recommendations;
314
317
  this.productIds = this.recommendations.map((r) => r.productId);
315
318
  this.productImageLoadedSubject.subscribe((id) => {
316
319
  this.productIds = this.productIds.filter((x) => x !== id);
@@ -33,6 +33,7 @@ const Template = (args) => `
33
33
  product-detail-new-tab="${args.productDetailNewTab}"
34
34
  api-path="${args.apiPath}"
35
35
  image-resolution-width="${args.imageResolutionWidth}"
36
+ text-search-show="${args.textSearchShow}"
36
37
  ></vviinn-vps-button>`;
37
38
  export const Modal = Template.bind({});
38
39
  Modal.storyName = "Modal";
@@ -47,6 +48,7 @@ Modal.args = {
47
48
  addStyle: true,
48
49
  apiPath: "https://api.vviinn.com",
49
50
  imageResolutionWidth: 250,
51
+ textSearchShow: false,
50
52
  };
51
53
  export const Upload = Template.bind({});
52
54
  Upload.args = {
@@ -56,6 +56,7 @@ export class VviinnVpsButton {
56
56
  this.productDetailNewTab = true;
57
57
  this.imageResolutionWidth = 250;
58
58
  this.exampleImageSource = DEFAULT_EXAMPLE_IMAGE;
59
+ this.textSearchShow = false;
59
60
  this.apiPath = undefined;
60
61
  this.buttonPressed = false;
61
62
  }
@@ -75,7 +76,7 @@ export class VviinnVpsButton {
75
76
  render() {
76
77
  return (h(Host, { tabindex: "0", role: "button" }, h("vviinn-button", { onClick: () => {
77
78
  this.handleClick();
78
- }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), h(SlotSkeleton, null), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed && this.mode === "modal", excluded: this.excluded, productDetailNewTab: this.productDetailNewTab, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource })));
79
+ }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), h(SlotSkeleton, null), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, exportparts: "brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button", campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed && this.mode === "modal", excluded: this.excluded, productDetailNewTab: this.productDetailNewTab, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow })));
79
80
  }
80
81
  static get is() { return "vviinn-vps-button"; }
81
82
  static get encapsulation() { return "shadow"; }
@@ -275,6 +276,24 @@ export class VviinnVpsButton {
275
276
  "reflect": false,
276
277
  "defaultValue": "DEFAULT_EXAMPLE_IMAGE"
277
278
  },
279
+ "textSearchShow": {
280
+ "type": "boolean",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "boolean",
284
+ "resolved": "boolean",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "Show the text search"
292
+ },
293
+ "attribute": "text-search-show",
294
+ "reflect": false,
295
+ "defaultValue": "false"
296
+ },
278
297
  "apiPath": {
279
298
  "type": "string",
280
299
  "mutable": false,
@@ -17,6 +17,7 @@ const Template = (args) => `
17
17
  product-detail-new-tab="${args.productDetailNewTab}"
18
18
  api-path="${args.apiPath}"
19
19
  image-resolution-width="${args.imageResolutionWidth}"
20
+ text-search-show="${args.textSearchShow}"
20
21
  >
21
22
  </vviinn-vps-widget>`;
22
23
  export const Default = Template.bind({});
@@ -30,6 +31,7 @@ Default.args = {
30
31
  active: true,
31
32
  apiPath: "https://api.vviinn.com",
32
33
  imageResolutionWidth: 250,
34
+ textSearchShow: false,
33
35
  };
34
36
  Default.storyName = "Main";
35
37
  Default.decorators = [
@@ -59,11 +59,15 @@ vviinn-overlayed-modal.first-screen::part(secondary-action) {
59
59
  gap: 12px;
60
60
  }
61
61
 
62
+ #start-page_block vviinn-text-search {
63
+ margin-top: 12px;
64
+ }
65
+
62
66
  .buttons-group {
63
67
  display: flex;
64
68
  flex-direction: column;
65
69
  gap: 12px;
66
- margin: 24px 0;
70
+ margin-top: 24px;
67
71
  }
68
72
 
69
73
  .action-button {
@@ -120,6 +124,11 @@ vviinn-overlayed-modal.first-screen::part(secondary-action) {
120
124
  box-sizing: border-box;
121
125
  }
122
126
 
127
+ .results-page .text-search-wrapper {
128
+ width: 100%;
129
+ padding: 24px;
130
+ }
131
+
123
132
  .products {
124
133
  width: 100%;
125
134
  align-content: center;
@@ -231,6 +240,11 @@ search-filters::part(filter active) {
231
240
  width: 60%;
232
241
  }
233
242
 
243
+ vviinn-preloader {
244
+ --preloader-size: 24px;
245
+ display: flex;
246
+ }
247
+
234
248
  @media (max-width: 1080px) {
235
249
  #start-page_block {
236
250
  padding: 24px 36px;