@selwise/widget 0.0.1

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 (552) hide show
  1. package/dist/npm/cjs/constants.js +167 -0
  2. package/dist/npm/cjs/constants.js.map +1 -0
  3. package/dist/npm/cjs/core/conflict-resolver.js +203 -0
  4. package/dist/npm/cjs/core/conflict-resolver.js.map +1 -0
  5. package/dist/npm/cjs/core/event-batcher.js +977 -0
  6. package/dist/npm/cjs/core/event-batcher.js.map +1 -0
  7. package/dist/npm/cjs/core/experiment-overrides.js +178 -0
  8. package/dist/npm/cjs/core/experiment-overrides.js.map +1 -0
  9. package/dist/npm/cjs/core/experiments.js +317 -0
  10. package/dist/npm/cjs/core/experiments.js.map +1 -0
  11. package/dist/npm/cjs/core/frequency-caps.js +297 -0
  12. package/dist/npm/cjs/core/frequency-caps.js.map +1 -0
  13. package/dist/npm/cjs/core/index.js +27 -0
  14. package/dist/npm/cjs/core/index.js.map +1 -0
  15. package/dist/npm/cjs/core/indexeddb-queue.js +333 -0
  16. package/dist/npm/cjs/core/indexeddb-queue.js.map +1 -0
  17. package/dist/npm/cjs/core/journey-tracker.js +243 -0
  18. package/dist/npm/cjs/core/journey-tracker.js.map +1 -0
  19. package/dist/npm/cjs/core/page-targeting/index.js +72 -0
  20. package/dist/npm/cjs/core/page-targeting/index.js.map +1 -0
  21. package/dist/npm/cjs/core/script-executor.js +80 -0
  22. package/dist/npm/cjs/core/script-executor.js.map +1 -0
  23. package/dist/npm/cjs/core/segments.js +172 -0
  24. package/dist/npm/cjs/core/segments.js.map +1 -0
  25. package/dist/npm/cjs/core/tracker.js +798 -0
  26. package/dist/npm/cjs/core/tracker.js.map +1 -0
  27. package/dist/npm/cjs/datalayer/basket.js +385 -0
  28. package/dist/npm/cjs/datalayer/basket.js.map +1 -0
  29. package/dist/npm/cjs/datalayer/cart-association.js +226 -0
  30. package/dist/npm/cjs/datalayer/cart-association.js.map +1 -0
  31. package/dist/npm/cjs/datalayer/checkout.js +382 -0
  32. package/dist/npm/cjs/datalayer/checkout.js.map +1 -0
  33. package/dist/npm/cjs/datalayer/constants.js +163 -0
  34. package/dist/npm/cjs/datalayer/constants.js.map +1 -0
  35. package/dist/npm/cjs/datalayer/index.js +1010 -0
  36. package/dist/npm/cjs/datalayer/index.js.map +1 -0
  37. package/dist/npm/cjs/datalayer/listener.js +416 -0
  38. package/dist/npm/cjs/datalayer/listener.js.map +1 -0
  39. package/dist/npm/cjs/datalayer/page.js +343 -0
  40. package/dist/npm/cjs/datalayer/page.js.map +1 -0
  41. package/dist/npm/cjs/datalayer/product.js +517 -0
  42. package/dist/npm/cjs/datalayer/product.js.map +1 -0
  43. package/dist/npm/cjs/datalayer/reverse-mappings.js +139 -0
  44. package/dist/npm/cjs/datalayer/reverse-mappings.js.map +1 -0
  45. package/dist/npm/cjs/datalayer/search.js +363 -0
  46. package/dist/npm/cjs/datalayer/search.js.map +1 -0
  47. package/dist/npm/cjs/datalayer/types.js +134 -0
  48. package/dist/npm/cjs/datalayer/types.js.map +1 -0
  49. package/dist/npm/cjs/datalayer/user.js +372 -0
  50. package/dist/npm/cjs/datalayer/user.js.map +1 -0
  51. package/dist/npm/cjs/debug/index.js +679 -0
  52. package/dist/npm/cjs/debug/index.js.map +1 -0
  53. package/dist/npm/cjs/entries/cdn.js +72 -0
  54. package/dist/npm/cjs/entries/cdn.js.map +1 -0
  55. package/dist/npm/cjs/index.js +10 -0
  56. package/dist/npm/cjs/index.js.map +1 -0
  57. package/dist/npm/cjs/modules/contract/recommendation-contract.js +119 -0
  58. package/dist/npm/cjs/modules/contract/recommendation-contract.js.map +1 -0
  59. package/dist/npm/cjs/modules/contract/search-contract.js +18 -0
  60. package/dist/npm/cjs/modules/contract/search-contract.js.map +1 -0
  61. package/dist/npm/cjs/modules/contract/tracking-contract.js +16 -0
  62. package/dist/npm/cjs/modules/contract/tracking-contract.js.map +1 -0
  63. package/dist/npm/cjs/modules/contract/widget-contract.js +10 -0
  64. package/dist/npm/cjs/modules/contract/widget-contract.js.map +1 -0
  65. package/dist/npm/cjs/modules/products/tracking.js +214 -0
  66. package/dist/npm/cjs/modules/products/tracking.js.map +1 -0
  67. package/dist/npm/cjs/modules/recommendation/cart-handlers.js +52 -0
  68. package/dist/npm/cjs/modules/recommendation/cart-handlers.js.map +1 -0
  69. package/dist/npm/cjs/modules/recommendation/components/product-card-renderer.js +287 -0
  70. package/dist/npm/cjs/modules/recommendation/components/product-card-renderer.js.map +1 -0
  71. package/dist/npm/cjs/modules/recommendation/index.js +678 -0
  72. package/dist/npm/cjs/modules/recommendation/index.js.map +1 -0
  73. package/dist/npm/cjs/modules/recommendation/renderers/grid.js +21 -0
  74. package/dist/npm/cjs/modules/recommendation/renderers/grid.js.map +1 -0
  75. package/dist/npm/cjs/modules/recommendation/renderers/list.js +22 -0
  76. package/dist/npm/cjs/modules/recommendation/renderers/list.js.map +1 -0
  77. package/dist/npm/cjs/modules/recommendation/renderers/masonry.js +22 -0
  78. package/dist/npm/cjs/modules/recommendation/renderers/masonry.js.map +1 -0
  79. package/dist/npm/cjs/modules/recommendation/renderers/slider-renderer.js +145 -0
  80. package/dist/npm/cjs/modules/recommendation/renderers/slider-renderer.js.map +1 -0
  81. package/dist/npm/cjs/modules/recommendation/slider-controls.js +201 -0
  82. package/dist/npm/cjs/modules/recommendation/slider-controls.js.map +1 -0
  83. package/dist/npm/cjs/modules/recommendation/tracking.js +247 -0
  84. package/dist/npm/cjs/modules/recommendation/tracking.js.map +1 -0
  85. package/dist/npm/cjs/modules/recommendation/utils/dom.js +70 -0
  86. package/dist/npm/cjs/modules/recommendation/utils/dom.js.map +1 -0
  87. package/dist/npm/cjs/modules/recommendation/utils/format.js +13 -0
  88. package/dist/npm/cjs/modules/recommendation/utils/format.js.map +1 -0
  89. package/dist/npm/cjs/modules/recommendation/utils/index.js +22 -0
  90. package/dist/npm/cjs/modules/recommendation/utils/index.js.map +1 -0
  91. package/dist/npm/cjs/modules/renderer/helpers.js +16 -0
  92. package/dist/npm/cjs/modules/renderer/helpers.js.map +1 -0
  93. package/dist/npm/cjs/modules/renderer/index.js +52 -0
  94. package/dist/npm/cjs/modules/renderer/index.js.map +1 -0
  95. package/dist/npm/cjs/modules/renderer/style-resolver.js +11 -0
  96. package/dist/npm/cjs/modules/renderer/style-resolver.js.map +1 -0
  97. package/dist/npm/cjs/modules/renderer/styles/index.js +254 -0
  98. package/dist/npm/cjs/modules/renderer/styles/index.js.map +1 -0
  99. package/dist/npm/cjs/modules/renderer/styles.js +7 -0
  100. package/dist/npm/cjs/modules/renderer/styles.js.map +1 -0
  101. package/dist/npm/cjs/modules/renderer/utils/helpers.js +243 -0
  102. package/dist/npm/cjs/modules/renderer/utils/helpers.js.map +1 -0
  103. package/dist/npm/cjs/modules/renderer/utils/image-renderer.js +65 -0
  104. package/dist/npm/cjs/modules/renderer/utils/image-renderer.js.map +1 -0
  105. package/dist/npm/cjs/modules/renderer/utils/placement.js +34 -0
  106. package/dist/npm/cjs/modules/renderer/utils/placement.js.map +1 -0
  107. package/dist/npm/cjs/modules/renderer/utils.js +61 -0
  108. package/dist/npm/cjs/modules/renderer/utils.js.map +1 -0
  109. package/dist/npm/cjs/modules/renderer/widgets/announcement-bar.js +84 -0
  110. package/dist/npm/cjs/modules/renderer/widgets/announcement-bar.js.map +1 -0
  111. package/dist/npm/cjs/modules/renderer/widgets/cart-count.js +211 -0
  112. package/dist/npm/cjs/modules/renderer/widgets/cart-count.js.map +1 -0
  113. package/dist/npm/cjs/modules/renderer/widgets/cookie-consent.js +459 -0
  114. package/dist/npm/cjs/modules/renderer/widgets/cookie-consent.js.map +1 -0
  115. package/dist/npm/cjs/modules/renderer/widgets/countdown-timer.js +132 -0
  116. package/dist/npm/cjs/modules/renderer/widgets/countdown-timer.js.map +1 -0
  117. package/dist/npm/cjs/modules/renderer/widgets/custom.js +58 -0
  118. package/dist/npm/cjs/modules/renderer/widgets/custom.js.map +1 -0
  119. package/dist/npm/cjs/modules/renderer/widgets/embedded-card.js +97 -0
  120. package/dist/npm/cjs/modules/renderer/widgets/embedded-card.js.map +1 -0
  121. package/dist/npm/cjs/modules/renderer/widgets/exit-intent-popup.js +151 -0
  122. package/dist/npm/cjs/modules/renderer/widgets/exit-intent-popup.js.map +1 -0
  123. package/dist/npm/cjs/modules/renderer/widgets/floating-button.js +70 -0
  124. package/dist/npm/cjs/modules/renderer/widgets/floating-button.js.map +1 -0
  125. package/dist/npm/cjs/modules/renderer/widgets/helpers.js +87 -0
  126. package/dist/npm/cjs/modules/renderer/widgets/helpers.js.map +1 -0
  127. package/dist/npm/cjs/modules/renderer/widgets/index.js +39 -0
  128. package/dist/npm/cjs/modules/renderer/widgets/index.js.map +1 -0
  129. package/dist/npm/cjs/modules/renderer/widgets/inline-banner.js +124 -0
  130. package/dist/npm/cjs/modules/renderer/widgets/inline-banner.js.map +1 -0
  131. package/dist/npm/cjs/modules/renderer/widgets/newsletter.js +280 -0
  132. package/dist/npm/cjs/modules/renderer/widgets/newsletter.js.map +1 -0
  133. package/dist/npm/cjs/modules/renderer/widgets/product-view-count.js +197 -0
  134. package/dist/npm/cjs/modules/renderer/widgets/product-view-count.js.map +1 -0
  135. package/dist/npm/cjs/modules/renderer/widgets/slide-in.js +105 -0
  136. package/dist/npm/cjs/modules/renderer/widgets/slide-in.js.map +1 -0
  137. package/dist/npm/cjs/modules/renderer/widgets/sticky-footer.js +47 -0
  138. package/dist/npm/cjs/modules/renderer/widgets/sticky-footer.js.map +1 -0
  139. package/dist/npm/cjs/modules/search/cart/index.js +42 -0
  140. package/dist/npm/cjs/modules/search/cart/index.js.map +1 -0
  141. package/dist/npm/cjs/modules/search/components/index.js +13 -0
  142. package/dist/npm/cjs/modules/search/components/index.js.map +1 -0
  143. package/dist/npm/cjs/modules/search/components/search-box.js +28 -0
  144. package/dist/npm/cjs/modules/search/components/search-box.js.map +1 -0
  145. package/dist/npm/cjs/modules/search/components/search-item.js +197 -0
  146. package/dist/npm/cjs/modules/search/components/search-item.js.map +1 -0
  147. package/dist/npm/cjs/modules/search/components/suggestions.js +132 -0
  148. package/dist/npm/cjs/modules/search/components/suggestions.js.map +1 -0
  149. package/dist/npm/cjs/modules/search/index.js +646 -0
  150. package/dist/npm/cjs/modules/search/index.js.map +1 -0
  151. package/dist/npm/cjs/modules/search/renderers/position-renderers.js +229 -0
  152. package/dist/npm/cjs/modules/search/renderers/position-renderers.js.map +1 -0
  153. package/dist/npm/cjs/modules/search/renderers/results-renderer.js +180 -0
  154. package/dist/npm/cjs/modules/search/renderers/results-renderer.js.map +1 -0
  155. package/dist/npm/cjs/modules/search/services/api-service.js +121 -0
  156. package/dist/npm/cjs/modules/search/services/api-service.js.map +1 -0
  157. package/dist/npm/cjs/modules/search/services/tracking-service.js +263 -0
  158. package/dist/npm/cjs/modules/search/services/tracking-service.js.map +1 -0
  159. package/dist/npm/cjs/modules/search/styles.js +864 -0
  160. package/dist/npm/cjs/modules/search/styles.js.map +1 -0
  161. package/dist/npm/cjs/modules/search/utils/helpers.js +100 -0
  162. package/dist/npm/cjs/modules/search/utils/helpers.js.map +1 -0
  163. package/dist/npm/cjs/modules/search/utils/icons.js +41 -0
  164. package/dist/npm/cjs/modules/search/utils/icons.js.map +1 -0
  165. package/dist/npm/cjs/modules/search/utils/index.js +22 -0
  166. package/dist/npm/cjs/modules/search/utils/index.js.map +1 -0
  167. package/dist/npm/cjs/modules/search/utils/storage.js +58 -0
  168. package/dist/npm/cjs/modules/search/utils/storage.js.map +1 -0
  169. package/dist/npm/cjs/selwise.js +1160 -0
  170. package/dist/npm/cjs/selwise.js.map +1 -0
  171. package/dist/npm/cjs/sentry-test.js +118 -0
  172. package/dist/npm/cjs/sentry-test.js.map +1 -0
  173. package/dist/npm/cjs/sentry.js +451 -0
  174. package/dist/npm/cjs/sentry.js.map +1 -0
  175. package/dist/npm/cjs/shared/cart/handlers.js +259 -0
  176. package/dist/npm/cjs/shared/cart/handlers.js.map +1 -0
  177. package/dist/npm/cjs/shared/cart/index.js +23 -0
  178. package/dist/npm/cjs/shared/cart/index.js.map +1 -0
  179. package/dist/npm/cjs/shared/cart/types.js +7 -0
  180. package/dist/npm/cjs/shared/cart/types.js.map +1 -0
  181. package/dist/npm/cjs/shared/product-card/index.js +24 -0
  182. package/dist/npm/cjs/shared/product-card/index.js.map +1 -0
  183. package/dist/npm/cjs/shared/product-card/renderer.js +341 -0
  184. package/dist/npm/cjs/shared/product-card/renderer.js.map +1 -0
  185. package/dist/npm/cjs/shared/product-card/styles.js +195 -0
  186. package/dist/npm/cjs/shared/product-card/styles.js.map +1 -0
  187. package/dist/npm/cjs/shared/product-card/types.js +67 -0
  188. package/dist/npm/cjs/shared/product-card/types.js.map +1 -0
  189. package/dist/npm/cjs/types/config.js +6 -0
  190. package/dist/npm/cjs/types/config.js.map +1 -0
  191. package/dist/npm/cjs/types/experiments.js +17 -0
  192. package/dist/npm/cjs/types/experiments.js.map +1 -0
  193. package/dist/npm/cjs/types/global-api.js +3 -0
  194. package/dist/npm/cjs/types/global-api.js.map +1 -0
  195. package/dist/npm/cjs/types/index.js +27 -0
  196. package/dist/npm/cjs/types/index.js.map +1 -0
  197. package/dist/npm/cjs/types/recommendation.js +6 -0
  198. package/dist/npm/cjs/types/recommendation.js.map +1 -0
  199. package/dist/npm/cjs/types/renderer.js +6 -0
  200. package/dist/npm/cjs/types/renderer.js.map +1 -0
  201. package/dist/npm/cjs/types/search.js +6 -0
  202. package/dist/npm/cjs/types/search.js.map +1 -0
  203. package/dist/npm/cjs/utils/api-url.js +35 -0
  204. package/dist/npm/cjs/utils/api-url.js.map +1 -0
  205. package/dist/npm/cjs/utils/debounce.js +74 -0
  206. package/dist/npm/cjs/utils/debounce.js.map +1 -0
  207. package/dist/npm/cjs/utils/event-id.js +23 -0
  208. package/dist/npm/cjs/utils/event-id.js.map +1 -0
  209. package/dist/npm/cjs/utils/index.js +28 -0
  210. package/dist/npm/cjs/utils/index.js.map +1 -0
  211. package/dist/npm/cjs/utils/logger.js +74 -0
  212. package/dist/npm/cjs/utils/logger.js.map +1 -0
  213. package/dist/npm/cjs/utils/sanitize.js +159 -0
  214. package/dist/npm/cjs/utils/sanitize.js.map +1 -0
  215. package/dist/npm/cjs/utils/storage.js +285 -0
  216. package/dist/npm/cjs/utils/storage.js.map +1 -0
  217. package/dist/npm/cjs/utils/tracking-metadata.js +18 -0
  218. package/dist/npm/cjs/utils/tracking-metadata.js.map +1 -0
  219. package/dist/npm/cjs/utils/url-matcher.js +11 -0
  220. package/dist/npm/cjs/utils/url-matcher.js.map +1 -0
  221. package/dist/npm/esm/constants.d.ts +130 -0
  222. package/dist/npm/esm/constants.js +164 -0
  223. package/dist/npm/esm/constants.js.map +1 -0
  224. package/dist/npm/esm/core/conflict-resolver.d.ts +96 -0
  225. package/dist/npm/esm/core/conflict-resolver.js +198 -0
  226. package/dist/npm/esm/core/conflict-resolver.js.map +1 -0
  227. package/dist/npm/esm/core/event-batcher.d.ts +253 -0
  228. package/dist/npm/esm/core/event-batcher.js +973 -0
  229. package/dist/npm/esm/core/event-batcher.js.map +1 -0
  230. package/dist/npm/esm/core/experiment-overrides.d.ts +7 -0
  231. package/dist/npm/esm/core/experiment-overrides.js +172 -0
  232. package/dist/npm/esm/core/experiment-overrides.js.map +1 -0
  233. package/dist/npm/esm/core/experiments.d.ts +90 -0
  234. package/dist/npm/esm/core/experiments.js +313 -0
  235. package/dist/npm/esm/core/experiments.js.map +1 -0
  236. package/dist/npm/esm/core/frequency-caps.d.ts +124 -0
  237. package/dist/npm/esm/core/frequency-caps.js +292 -0
  238. package/dist/npm/esm/core/frequency-caps.js.map +1 -0
  239. package/dist/npm/esm/core/index.d.ts +10 -0
  240. package/dist/npm/esm/core/index.js +11 -0
  241. package/dist/npm/esm/core/index.js.map +1 -0
  242. package/dist/npm/esm/core/indexeddb-queue.d.ts +83 -0
  243. package/dist/npm/esm/core/indexeddb-queue.js +328 -0
  244. package/dist/npm/esm/core/indexeddb-queue.js.map +1 -0
  245. package/dist/npm/esm/core/journey-tracker.d.ts +102 -0
  246. package/dist/npm/esm/core/journey-tracker.js +237 -0
  247. package/dist/npm/esm/core/journey-tracker.js.map +1 -0
  248. package/dist/npm/esm/core/page-targeting/index.d.ts +8 -0
  249. package/dist/npm/esm/core/page-targeting/index.js +67 -0
  250. package/dist/npm/esm/core/page-targeting/index.js.map +1 -0
  251. package/dist/npm/esm/core/script-executor.d.ts +31 -0
  252. package/dist/npm/esm/core/script-executor.js +76 -0
  253. package/dist/npm/esm/core/script-executor.js.map +1 -0
  254. package/dist/npm/esm/core/segments.d.ts +39 -0
  255. package/dist/npm/esm/core/segments.js +168 -0
  256. package/dist/npm/esm/core/segments.js.map +1 -0
  257. package/dist/npm/esm/core/tracker.d.ts +182 -0
  258. package/dist/npm/esm/core/tracker.js +794 -0
  259. package/dist/npm/esm/core/tracker.js.map +1 -0
  260. package/dist/npm/esm/datalayer/basket.d.ts +104 -0
  261. package/dist/npm/esm/datalayer/basket.js +381 -0
  262. package/dist/npm/esm/datalayer/basket.js.map +1 -0
  263. package/dist/npm/esm/datalayer/cart-association.d.ts +65 -0
  264. package/dist/npm/esm/datalayer/cart-association.js +222 -0
  265. package/dist/npm/esm/datalayer/cart-association.js.map +1 -0
  266. package/dist/npm/esm/datalayer/checkout.d.ts +96 -0
  267. package/dist/npm/esm/datalayer/checkout.js +378 -0
  268. package/dist/npm/esm/datalayer/checkout.js.map +1 -0
  269. package/dist/npm/esm/datalayer/constants.d.ts +77 -0
  270. package/dist/npm/esm/datalayer/constants.js +160 -0
  271. package/dist/npm/esm/datalayer/constants.js.map +1 -0
  272. package/dist/npm/esm/datalayer/index.d.ts +212 -0
  273. package/dist/npm/esm/datalayer/index.js +991 -0
  274. package/dist/npm/esm/datalayer/index.js.map +1 -0
  275. package/dist/npm/esm/datalayer/listener.d.ts +108 -0
  276. package/dist/npm/esm/datalayer/listener.js +411 -0
  277. package/dist/npm/esm/datalayer/listener.js.map +1 -0
  278. package/dist/npm/esm/datalayer/page.d.ts +94 -0
  279. package/dist/npm/esm/datalayer/page.js +339 -0
  280. package/dist/npm/esm/datalayer/page.js.map +1 -0
  281. package/dist/npm/esm/datalayer/product.d.ts +133 -0
  282. package/dist/npm/esm/datalayer/product.js +513 -0
  283. package/dist/npm/esm/datalayer/product.js.map +1 -0
  284. package/dist/npm/esm/datalayer/reverse-mappings.d.ts +62 -0
  285. package/dist/npm/esm/datalayer/reverse-mappings.js +135 -0
  286. package/dist/npm/esm/datalayer/reverse-mappings.js.map +1 -0
  287. package/dist/npm/esm/datalayer/search.d.ts +108 -0
  288. package/dist/npm/esm/datalayer/search.js +359 -0
  289. package/dist/npm/esm/datalayer/search.js.map +1 -0
  290. package/dist/npm/esm/datalayer/types.d.ts +292 -0
  291. package/dist/npm/esm/datalayer/types.js +131 -0
  292. package/dist/npm/esm/datalayer/types.js.map +1 -0
  293. package/dist/npm/esm/datalayer/user.d.ts +104 -0
  294. package/dist/npm/esm/datalayer/user.js +368 -0
  295. package/dist/npm/esm/datalayer/user.js.map +1 -0
  296. package/dist/npm/esm/debug/index.d.ts +173 -0
  297. package/dist/npm/esm/debug/index.js +673 -0
  298. package/dist/npm/esm/debug/index.js.map +1 -0
  299. package/dist/npm/esm/entries/cdn.d.ts +1 -0
  300. package/dist/npm/esm/entries/cdn.js +35 -0
  301. package/dist/npm/esm/entries/cdn.js.map +1 -0
  302. package/dist/npm/esm/index.d.ts +4 -0
  303. package/dist/npm/esm/index.js +4 -0
  304. package/dist/npm/esm/index.js.map +1 -0
  305. package/dist/npm/esm/modules/contract/recommendation-contract.d.ts +5 -0
  306. package/dist/npm/esm/modules/contract/recommendation-contract.js +107 -0
  307. package/dist/npm/esm/modules/contract/recommendation-contract.js.map +1 -0
  308. package/dist/npm/esm/modules/contract/search-contract.d.ts +1 -0
  309. package/dist/npm/esm/modules/contract/search-contract.js +2 -0
  310. package/dist/npm/esm/modules/contract/search-contract.js.map +1 -0
  311. package/dist/npm/esm/modules/contract/tracking-contract.d.ts +1 -0
  312. package/dist/npm/esm/modules/contract/tracking-contract.js +2 -0
  313. package/dist/npm/esm/modules/contract/tracking-contract.js.map +1 -0
  314. package/dist/npm/esm/modules/contract/widget-contract.d.ts +1 -0
  315. package/dist/npm/esm/modules/contract/widget-contract.js +2 -0
  316. package/dist/npm/esm/modules/contract/widget-contract.js.map +1 -0
  317. package/dist/npm/esm/modules/products/tracking.d.ts +122 -0
  318. package/dist/npm/esm/modules/products/tracking.js +203 -0
  319. package/dist/npm/esm/modules/products/tracking.js.map +1 -0
  320. package/dist/npm/esm/modules/recommendation/cart-handlers.d.ts +10 -0
  321. package/dist/npm/esm/modules/recommendation/cart-handlers.js +49 -0
  322. package/dist/npm/esm/modules/recommendation/cart-handlers.js.map +1 -0
  323. package/dist/npm/esm/modules/recommendation/components/product-card-renderer.d.ts +37 -0
  324. package/dist/npm/esm/modules/recommendation/components/product-card-renderer.js +281 -0
  325. package/dist/npm/esm/modules/recommendation/components/product-card-renderer.js.map +1 -0
  326. package/dist/npm/esm/modules/recommendation/index.d.ts +11 -0
  327. package/dist/npm/esm/modules/recommendation/index.js +674 -0
  328. package/dist/npm/esm/modules/recommendation/index.js.map +1 -0
  329. package/dist/npm/esm/modules/recommendation/renderers/grid.d.ts +5 -0
  330. package/dist/npm/esm/modules/recommendation/renderers/grid.js +18 -0
  331. package/dist/npm/esm/modules/recommendation/renderers/grid.js.map +1 -0
  332. package/dist/npm/esm/modules/recommendation/renderers/list.d.ts +5 -0
  333. package/dist/npm/esm/modules/recommendation/renderers/list.js +19 -0
  334. package/dist/npm/esm/modules/recommendation/renderers/list.js.map +1 -0
  335. package/dist/npm/esm/modules/recommendation/renderers/masonry.d.ts +5 -0
  336. package/dist/npm/esm/modules/recommendation/renderers/masonry.js +19 -0
  337. package/dist/npm/esm/modules/recommendation/renderers/masonry.js.map +1 -0
  338. package/dist/npm/esm/modules/recommendation/renderers/slider-renderer.d.ts +10 -0
  339. package/dist/npm/esm/modules/recommendation/renderers/slider-renderer.js +140 -0
  340. package/dist/npm/esm/modules/recommendation/renderers/slider-renderer.js.map +1 -0
  341. package/dist/npm/esm/modules/recommendation/slider-controls.d.ts +17 -0
  342. package/dist/npm/esm/modules/recommendation/slider-controls.js +187 -0
  343. package/dist/npm/esm/modules/recommendation/slider-controls.js.map +1 -0
  344. package/dist/npm/esm/modules/recommendation/tracking.d.ts +28 -0
  345. package/dist/npm/esm/modules/recommendation/tracking.js +237 -0
  346. package/dist/npm/esm/modules/recommendation/tracking.js.map +1 -0
  347. package/dist/npm/esm/modules/recommendation/utils/dom.d.ts +10 -0
  348. package/dist/npm/esm/modules/recommendation/utils/dom.js +63 -0
  349. package/dist/npm/esm/modules/recommendation/utils/dom.js.map +1 -0
  350. package/dist/npm/esm/modules/recommendation/utils/format.d.ts +4 -0
  351. package/dist/npm/esm/modules/recommendation/utils/format.js +10 -0
  352. package/dist/npm/esm/modules/recommendation/utils/format.js.map +1 -0
  353. package/dist/npm/esm/modules/recommendation/utils/index.d.ts +5 -0
  354. package/dist/npm/esm/modules/recommendation/utils/index.js +6 -0
  355. package/dist/npm/esm/modules/recommendation/utils/index.js.map +1 -0
  356. package/dist/npm/esm/modules/renderer/helpers.d.ts +5 -0
  357. package/dist/npm/esm/modules/renderer/helpers.js +6 -0
  358. package/dist/npm/esm/modules/renderer/helpers.js.map +1 -0
  359. package/dist/npm/esm/modules/renderer/index.d.ts +8 -0
  360. package/dist/npm/esm/modules/renderer/index.js +48 -0
  361. package/dist/npm/esm/modules/renderer/index.js.map +1 -0
  362. package/dist/npm/esm/modules/renderer/style-resolver.d.ts +1 -0
  363. package/dist/npm/esm/modules/renderer/style-resolver.js +8 -0
  364. package/dist/npm/esm/modules/renderer/style-resolver.js.map +1 -0
  365. package/dist/npm/esm/modules/renderer/styles/index.d.ts +12 -0
  366. package/dist/npm/esm/modules/renderer/styles/index.js +250 -0
  367. package/dist/npm/esm/modules/renderer/styles/index.js.map +1 -0
  368. package/dist/npm/esm/modules/renderer/styles.d.ts +1 -0
  369. package/dist/npm/esm/modules/renderer/styles.js +2 -0
  370. package/dist/npm/esm/modules/renderer/styles.js.map +1 -0
  371. package/dist/npm/esm/modules/renderer/utils/helpers.d.ts +58 -0
  372. package/dist/npm/esm/modules/renderer/utils/helpers.js +225 -0
  373. package/dist/npm/esm/modules/renderer/utils/helpers.js.map +1 -0
  374. package/dist/npm/esm/modules/renderer/utils/image-renderer.d.ts +17 -0
  375. package/dist/npm/esm/modules/renderer/utils/image-renderer.js +60 -0
  376. package/dist/npm/esm/modules/renderer/utils/image-renderer.js.map +1 -0
  377. package/dist/npm/esm/modules/renderer/utils/placement.d.ts +6 -0
  378. package/dist/npm/esm/modules/renderer/utils/placement.js +31 -0
  379. package/dist/npm/esm/modules/renderer/utils/placement.js.map +1 -0
  380. package/dist/npm/esm/modules/renderer/utils.d.ts +11 -0
  381. package/dist/npm/esm/modules/renderer/utils.js +44 -0
  382. package/dist/npm/esm/modules/renderer/utils.js.map +1 -0
  383. package/dist/npm/esm/modules/renderer/widgets/announcement-bar.d.ts +5 -0
  384. package/dist/npm/esm/modules/renderer/widgets/announcement-bar.js +81 -0
  385. package/dist/npm/esm/modules/renderer/widgets/announcement-bar.js.map +1 -0
  386. package/dist/npm/esm/modules/renderer/widgets/cart-count.d.ts +6 -0
  387. package/dist/npm/esm/modules/renderer/widgets/cart-count.js +208 -0
  388. package/dist/npm/esm/modules/renderer/widgets/cart-count.js.map +1 -0
  389. package/dist/npm/esm/modules/renderer/widgets/cookie-consent.d.ts +18 -0
  390. package/dist/npm/esm/modules/renderer/widgets/cookie-consent.js +454 -0
  391. package/dist/npm/esm/modules/renderer/widgets/cookie-consent.js.map +1 -0
  392. package/dist/npm/esm/modules/renderer/widgets/countdown-timer.d.ts +5 -0
  393. package/dist/npm/esm/modules/renderer/widgets/countdown-timer.js +129 -0
  394. package/dist/npm/esm/modules/renderer/widgets/countdown-timer.js.map +1 -0
  395. package/dist/npm/esm/modules/renderer/widgets/custom.d.ts +5 -0
  396. package/dist/npm/esm/modules/renderer/widgets/custom.js +55 -0
  397. package/dist/npm/esm/modules/renderer/widgets/custom.js.map +1 -0
  398. package/dist/npm/esm/modules/renderer/widgets/embedded-card.d.ts +5 -0
  399. package/dist/npm/esm/modules/renderer/widgets/embedded-card.js +94 -0
  400. package/dist/npm/esm/modules/renderer/widgets/embedded-card.js.map +1 -0
  401. package/dist/npm/esm/modules/renderer/widgets/exit-intent-popup.d.ts +6 -0
  402. package/dist/npm/esm/modules/renderer/widgets/exit-intent-popup.js +147 -0
  403. package/dist/npm/esm/modules/renderer/widgets/exit-intent-popup.js.map +1 -0
  404. package/dist/npm/esm/modules/renderer/widgets/floating-button.d.ts +5 -0
  405. package/dist/npm/esm/modules/renderer/widgets/floating-button.js +67 -0
  406. package/dist/npm/esm/modules/renderer/widgets/floating-button.js.map +1 -0
  407. package/dist/npm/esm/modules/renderer/widgets/helpers.d.ts +29 -0
  408. package/dist/npm/esm/modules/renderer/widgets/helpers.js +82 -0
  409. package/dist/npm/esm/modules/renderer/widgets/helpers.js.map +1 -0
  410. package/dist/npm/esm/modules/renderer/widgets/index.d.ts +17 -0
  411. package/dist/npm/esm/modules/renderer/widgets/index.js +19 -0
  412. package/dist/npm/esm/modules/renderer/widgets/index.js.map +1 -0
  413. package/dist/npm/esm/modules/renderer/widgets/inline-banner.d.ts +5 -0
  414. package/dist/npm/esm/modules/renderer/widgets/inline-banner.js +121 -0
  415. package/dist/npm/esm/modules/renderer/widgets/inline-banner.js.map +1 -0
  416. package/dist/npm/esm/modules/renderer/widgets/newsletter.d.ts +6 -0
  417. package/dist/npm/esm/modules/renderer/widgets/newsletter.js +277 -0
  418. package/dist/npm/esm/modules/renderer/widgets/newsletter.js.map +1 -0
  419. package/dist/npm/esm/modules/renderer/widgets/product-view-count.d.ts +6 -0
  420. package/dist/npm/esm/modules/renderer/widgets/product-view-count.js +194 -0
  421. package/dist/npm/esm/modules/renderer/widgets/product-view-count.js.map +1 -0
  422. package/dist/npm/esm/modules/renderer/widgets/slide-in.d.ts +5 -0
  423. package/dist/npm/esm/modules/renderer/widgets/slide-in.js +102 -0
  424. package/dist/npm/esm/modules/renderer/widgets/slide-in.js.map +1 -0
  425. package/dist/npm/esm/modules/renderer/widgets/sticky-footer.d.ts +5 -0
  426. package/dist/npm/esm/modules/renderer/widgets/sticky-footer.js +44 -0
  427. package/dist/npm/esm/modules/renderer/widgets/sticky-footer.js.map +1 -0
  428. package/dist/npm/esm/modules/search/cart/index.d.ts +26 -0
  429. package/dist/npm/esm/modules/search/cart/index.js +39 -0
  430. package/dist/npm/esm/modules/search/cart/index.js.map +1 -0
  431. package/dist/npm/esm/modules/search/components/index.d.ts +6 -0
  432. package/dist/npm/esm/modules/search/components/index.js +7 -0
  433. package/dist/npm/esm/modules/search/components/index.js.map +1 -0
  434. package/dist/npm/esm/modules/search/components/search-box.d.ts +11 -0
  435. package/dist/npm/esm/modules/search/components/search-box.js +25 -0
  436. package/dist/npm/esm/modules/search/components/search-box.js.map +1 -0
  437. package/dist/npm/esm/modules/search/components/search-item.d.ts +20 -0
  438. package/dist/npm/esm/modules/search/components/search-item.js +193 -0
  439. package/dist/npm/esm/modules/search/components/search-item.js.map +1 -0
  440. package/dist/npm/esm/modules/search/components/suggestions.d.ts +10 -0
  441. package/dist/npm/esm/modules/search/components/suggestions.js +129 -0
  442. package/dist/npm/esm/modules/search/components/suggestions.js.map +1 -0
  443. package/dist/npm/esm/modules/search/index.d.ts +67 -0
  444. package/dist/npm/esm/modules/search/index.js +642 -0
  445. package/dist/npm/esm/modules/search/index.js.map +1 -0
  446. package/dist/npm/esm/modules/search/renderers/position-renderers.d.ts +23 -0
  447. package/dist/npm/esm/modules/search/renderers/position-renderers.js +221 -0
  448. package/dist/npm/esm/modules/search/renderers/position-renderers.js.map +1 -0
  449. package/dist/npm/esm/modules/search/renderers/results-renderer.d.ts +20 -0
  450. package/dist/npm/esm/modules/search/renderers/results-renderer.js +176 -0
  451. package/dist/npm/esm/modules/search/renderers/results-renderer.js.map +1 -0
  452. package/dist/npm/esm/modules/search/services/api-service.d.ts +18 -0
  453. package/dist/npm/esm/modules/search/services/api-service.js +115 -0
  454. package/dist/npm/esm/modules/search/services/api-service.js.map +1 -0
  455. package/dist/npm/esm/modules/search/services/tracking-service.d.ts +16 -0
  456. package/dist/npm/esm/modules/search/services/tracking-service.js +250 -0
  457. package/dist/npm/esm/modules/search/services/tracking-service.js.map +1 -0
  458. package/dist/npm/esm/modules/search/styles.d.ts +13 -0
  459. package/dist/npm/esm/modules/search/styles.js +860 -0
  460. package/dist/npm/esm/modules/search/styles.js.map +1 -0
  461. package/dist/npm/esm/modules/search/utils/helpers.d.ts +24 -0
  462. package/dist/npm/esm/modules/search/utils/helpers.js +93 -0
  463. package/dist/npm/esm/modules/search/utils/helpers.js.map +1 -0
  464. package/dist/npm/esm/modules/search/utils/icons.d.ts +16 -0
  465. package/dist/npm/esm/modules/search/utils/icons.js +36 -0
  466. package/dist/npm/esm/modules/search/utils/icons.js.map +1 -0
  467. package/dist/npm/esm/modules/search/utils/index.d.ts +6 -0
  468. package/dist/npm/esm/modules/search/utils/index.js +7 -0
  469. package/dist/npm/esm/modules/search/utils/index.js.map +1 -0
  470. package/dist/npm/esm/modules/search/utils/storage.d.ts +7 -0
  471. package/dist/npm/esm/modules/search/utils/storage.js +52 -0
  472. package/dist/npm/esm/modules/search/utils/storage.js.map +1 -0
  473. package/dist/npm/esm/package.json +1 -0
  474. package/dist/npm/esm/selwise.d.ts +209 -0
  475. package/dist/npm/esm/selwise.js +1123 -0
  476. package/dist/npm/esm/selwise.js.map +1 -0
  477. package/dist/npm/esm/sentry-test.d.ts +45 -0
  478. package/dist/npm/esm/sentry-test.js +109 -0
  479. package/dist/npm/esm/sentry-test.js.map +1 -0
  480. package/dist/npm/esm/sentry.d.ts +86 -0
  481. package/dist/npm/esm/sentry.js +441 -0
  482. package/dist/npm/esm/sentry.js.map +1 -0
  483. package/dist/npm/esm/shared/cart/handlers.d.ts +46 -0
  484. package/dist/npm/esm/shared/cart/handlers.js +249 -0
  485. package/dist/npm/esm/shared/cart/handlers.js.map +1 -0
  486. package/dist/npm/esm/shared/cart/index.d.ts +6 -0
  487. package/dist/npm/esm/shared/cart/index.js +7 -0
  488. package/dist/npm/esm/shared/cart/index.js.map +1 -0
  489. package/dist/npm/esm/shared/cart/types.d.ts +30 -0
  490. package/dist/npm/esm/shared/cart/types.js +6 -0
  491. package/dist/npm/esm/shared/cart/types.js.map +1 -0
  492. package/dist/npm/esm/shared/product-card/index.d.ts +7 -0
  493. package/dist/npm/esm/shared/product-card/index.js +8 -0
  494. package/dist/npm/esm/shared/product-card/index.js.map +1 -0
  495. package/dist/npm/esm/shared/product-card/renderer.d.ts +35 -0
  496. package/dist/npm/esm/shared/product-card/renderer.js +334 -0
  497. package/dist/npm/esm/shared/product-card/renderer.js.map +1 -0
  498. package/dist/npm/esm/shared/product-card/styles.d.ts +17 -0
  499. package/dist/npm/esm/shared/product-card/styles.js +190 -0
  500. package/dist/npm/esm/shared/product-card/styles.js.map +1 -0
  501. package/dist/npm/esm/shared/product-card/types.d.ts +84 -0
  502. package/dist/npm/esm/shared/product-card/types.js +63 -0
  503. package/dist/npm/esm/shared/product-card/types.js.map +1 -0
  504. package/dist/npm/esm/types/config.d.ts +26 -0
  505. package/dist/npm/esm/types/config.js +5 -0
  506. package/dist/npm/esm/types/config.js.map +1 -0
  507. package/dist/npm/esm/types/experiments.d.ts +47 -0
  508. package/dist/npm/esm/types/experiments.js +14 -0
  509. package/dist/npm/esm/types/experiments.js.map +1 -0
  510. package/dist/npm/esm/types/global-api.d.ts +40 -0
  511. package/dist/npm/esm/types/global-api.js +2 -0
  512. package/dist/npm/esm/types/global-api.js.map +1 -0
  513. package/dist/npm/esm/types/index.d.ts +9 -0
  514. package/dist/npm/esm/types/index.js +11 -0
  515. package/dist/npm/esm/types/index.js.map +1 -0
  516. package/dist/npm/esm/types/recommendation.d.ts +186 -0
  517. package/dist/npm/esm/types/recommendation.js +5 -0
  518. package/dist/npm/esm/types/recommendation.js.map +1 -0
  519. package/dist/npm/esm/types/renderer.d.ts +99 -0
  520. package/dist/npm/esm/types/renderer.js +5 -0
  521. package/dist/npm/esm/types/renderer.js.map +1 -0
  522. package/dist/npm/esm/types/search.d.ts +186 -0
  523. package/dist/npm/esm/types/search.js +5 -0
  524. package/dist/npm/esm/types/search.js.map +1 -0
  525. package/dist/npm/esm/utils/api-url.d.ts +1 -0
  526. package/dist/npm/esm/utils/api-url.js +32 -0
  527. package/dist/npm/esm/utils/api-url.js.map +1 -0
  528. package/dist/npm/esm/utils/debounce.d.ts +27 -0
  529. package/dist/npm/esm/utils/debounce.js +70 -0
  530. package/dist/npm/esm/utils/debounce.js.map +1 -0
  531. package/dist/npm/esm/utils/event-id.d.ts +5 -0
  532. package/dist/npm/esm/utils/event-id.js +20 -0
  533. package/dist/npm/esm/utils/event-id.js.map +1 -0
  534. package/dist/npm/esm/utils/index.d.ts +11 -0
  535. package/dist/npm/esm/utils/index.js +12 -0
  536. package/dist/npm/esm/utils/index.js.map +1 -0
  537. package/dist/npm/esm/utils/logger.d.ts +31 -0
  538. package/dist/npm/esm/utils/logger.js +66 -0
  539. package/dist/npm/esm/utils/logger.js.map +1 -0
  540. package/dist/npm/esm/utils/sanitize.d.ts +38 -0
  541. package/dist/npm/esm/utils/sanitize.js +148 -0
  542. package/dist/npm/esm/utils/sanitize.js.map +1 -0
  543. package/dist/npm/esm/utils/storage.d.ts +72 -0
  544. package/dist/npm/esm/utils/storage.js +271 -0
  545. package/dist/npm/esm/utils/storage.js.map +1 -0
  546. package/dist/npm/esm/utils/tracking-metadata.d.ts +1 -0
  547. package/dist/npm/esm/utils/tracking-metadata.js +15 -0
  548. package/dist/npm/esm/utils/tracking-metadata.js.map +1 -0
  549. package/dist/npm/esm/utils/url-matcher.d.ts +4 -0
  550. package/dist/npm/esm/utils/url-matcher.js +8 -0
  551. package/dist/npm/esm/utils/url-matcher.js.map +1 -0
  552. package/package.json +62 -0
@@ -0,0 +1,35 @@
1
+ import Selwise from '../selwise.js';
2
+ import { resolveApiUrl } from '../utils/api-url.js';
3
+ function isDevelopmentMode(scriptTag) {
4
+ if (scriptTag.getAttribute('data-env') === 'development') {
5
+ return true;
6
+ }
7
+ if (typeof process !== 'undefined') {
8
+ return process.env?.NODE_ENV === 'development';
9
+ }
10
+ return false;
11
+ }
12
+ function autoInitFromCurrentScript() {
13
+ if (typeof document === 'undefined')
14
+ return;
15
+ const scriptTag = document.currentScript;
16
+ if (!scriptTag)
17
+ return;
18
+ const siteKey = scriptTag.getAttribute('data-site-key');
19
+ const apiUrl = resolveApiUrl(scriptTag.getAttribute('data-api-url'));
20
+ if (!siteKey)
21
+ return;
22
+ const widget = new Selwise();
23
+ void widget.init({ siteKey, apiUrl });
24
+ if (isDevelopmentMode(scriptTag)) {
25
+ void import('../sentry-test.js')
26
+ .then(({ exposeSentryTests }) => {
27
+ exposeSentryTests();
28
+ })
29
+ .catch(() => {
30
+ // Silently fail if sentry-test module is not available
31
+ });
32
+ }
33
+ }
34
+ autoInitFromCurrentScript();
35
+ //# sourceMappingURL=cdn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdn.js","sourceRoot":"","sources":["../../../../src/entries/cdn.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,SAAS,iBAAiB,CAAC,SAA4B;IACrD,IAAI,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,aAAa,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,aAAa,CAAC;IACjD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,yBAAyB;IAChC,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAE5C,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAyC,CAAC;IACrE,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,OAAO,GAAG,SAAS,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC;IAErE,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtC,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC,gBAAgB,CAAC;aAC1B,IAAI,CAAC,CAAC,EAAE,iBAAiB,EAAE,EAAE,EAAE;YAC9B,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE;YACV,uDAAuD;QACzD,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC;AAED,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { Selwise } from './selwise';
2
+ export { resolveApiUrl } from './utils/api-url';
3
+ export type { WidgetConfig } from './types';
4
+ export { Selwise as default } from './selwise';
@@ -0,0 +1,4 @@
1
+ export { Selwise } from './selwise.js';
2
+ export { resolveApiUrl } from './utils/api-url.js';
3
+ export { Selwise as default } from './selwise.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { RECOMMENDATION_STRATEGIES, RECOMMENDATION_DISPLAY_TYPES, RECOMMENDATION_TRIGGERS, RECOMMENDATION_INSERT_POSITIONS, RECOMMENDATION_PLATFORMS, RECOMMENDATION_STYLE_CONFIGS, getDefaultRecommendationConfig, validateRecommendationConfig, sanitizeRecommendationConfig } from '@selwise/recommendation-contract';
2
+ import type { RecommendationStrategy, RecommendationDisplayType, RecommendationTrigger, RecommendationInsertPosition, RecommendationPlatform } from '@selwise/recommendation-contract';
3
+ import type { RecommendationWidget } from '../../types';
4
+ export declare function resolveRecommendationConfig(rawWidget: unknown): RecommendationWidget | null;
5
+ export { RECOMMENDATION_STRATEGIES, RECOMMENDATION_DISPLAY_TYPES, RECOMMENDATION_TRIGGERS, RECOMMENDATION_INSERT_POSITIONS, RECOMMENDATION_PLATFORMS, RECOMMENDATION_STYLE_CONFIGS, getDefaultRecommendationConfig, validateRecommendationConfig, sanitizeRecommendationConfig, type RecommendationStrategy, type RecommendationDisplayType, type RecommendationTrigger, type RecommendationInsertPosition, type RecommendationPlatform, };
@@ -0,0 +1,107 @@
1
+ import { RECOMMENDATION_STRATEGIES, RECOMMENDATION_DISPLAY_TYPES, RECOMMENDATION_TRIGGERS, RECOMMENDATION_INSERT_POSITIONS, RECOMMENDATION_PLATFORMS, RECOMMENDATION_STYLE_CONFIGS, getDefaultRecommendationConfig, validateRecommendationConfig, sanitizeRecommendationConfig, } from '@selwise/recommendation-contract';
2
+ function isRecord(value) {
3
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
4
+ }
5
+ export function resolveRecommendationConfig(rawWidget) {
6
+ if (!isRecord(rawWidget)) {
7
+ return null;
8
+ }
9
+ if (typeof rawWidget.id !== 'string' || rawWidget.id.trim().length === 0) {
10
+ return null;
11
+ }
12
+ if (typeof rawWidget.name !== 'string' || rawWidget.name.trim().length === 0) {
13
+ return null;
14
+ }
15
+ const validationInput = {
16
+ strategy: rawWidget.strategy,
17
+ displayType: rawWidget.displayType,
18
+ trigger: rawWidget.trigger,
19
+ insertPosition: rawWidget.insertPosition,
20
+ cartPlatform: rawWidget.cartPlatform,
21
+ maxProducts: rawWidget.maxProducts,
22
+ productsPerRow: rawWidget.productsPerRow,
23
+ autoplay: rawWidget.autoplay,
24
+ autoplaySpeed: rawWidget.autoplaySpeed,
25
+ loop: rawWidget.loop,
26
+ pauseOnHover: rawWidget.pauseOnHover,
27
+ slidesPerView: rawWidget.slidesPerView,
28
+ slidesPerViewTablet: rawWidget.slidesPerViewTablet,
29
+ slidesPerViewMobile: rawWidget.slidesPerViewMobile,
30
+ slideGap: rawWidget.slideGap,
31
+ title: rawWidget.title,
32
+ subtitle: rawWidget.subtitle,
33
+ showOnAllPages: rawWidget.showOnAllPages,
34
+ includeUrls: rawWidget.includeUrls,
35
+ excludeUrls: rawWidget.excludeUrls,
36
+ containerSelector: rawWidget.containerSelector,
37
+ addToCartEnabled: rawWidget.addToCartEnabled,
38
+ addToCartConfig: rawWidget.addToCartConfig,
39
+ triggerConfig: rawWidget.triggerConfig,
40
+ arrowStyles: rawWidget.arrowStyles,
41
+ dotStyles: rawWidget.dotStyles,
42
+ titleStyles: rawWidget.titleStyles,
43
+ subtitleStyles: rawWidget.subtitleStyles,
44
+ containerStyles: rawWidget.containerStyles,
45
+ };
46
+ const validation = validateRecommendationConfig(validationInput);
47
+ if (!validation.valid) {
48
+ return null;
49
+ }
50
+ const normalized = sanitizeRecommendationConfig(validationInput);
51
+ const pageTargetingJson = {
52
+ showOnAllPages: normalized.showOnAllPages,
53
+ includeUrls: normalized.includeUrls,
54
+ excludeUrls: normalized.excludeUrls,
55
+ containerSelector: normalized.containerSelector,
56
+ insertPosition: normalized.insertPosition,
57
+ };
58
+ return {
59
+ id: rawWidget.id,
60
+ name: rawWidget.name,
61
+ strategy: normalized.strategy,
62
+ displayType: normalized.displayType,
63
+ title: normalized.title,
64
+ subtitle: normalized.subtitle,
65
+ maxProducts: normalized.maxProducts,
66
+ slidesPerView: normalized.slidesPerView,
67
+ slidesPerViewMobile: normalized.slidesPerViewMobile,
68
+ slidesPerViewTablet: normalized.slidesPerViewTablet,
69
+ slideGap: normalized.slideGap,
70
+ autoplay: normalized.autoplay,
71
+ autoplaySpeed: normalized.autoplaySpeed,
72
+ loop: normalized.loop,
73
+ pauseOnHover: normalized.pauseOnHover,
74
+ arrowStyles: normalized.arrowStyles,
75
+ dotStyles: normalized.dotStyles,
76
+ titleStyles: normalized.titleStyles,
77
+ subtitleStyles: normalized.subtitleStyles,
78
+ containerStyles: normalized.containerStyles,
79
+ containerSelector: normalized.containerSelector,
80
+ insertPosition: normalized.insertPosition,
81
+ addToCartEnabled: normalized.addToCartEnabled,
82
+ cartPlatform: normalized.cartPlatform,
83
+ addToCartConfig: normalized.addToCartConfig,
84
+ cartButtonText: typeof normalized.addToCartConfig?.buttonText === 'string'
85
+ ? normalized.addToCartConfig.buttonText
86
+ : undefined,
87
+ customCartScript: typeof rawWidget.customCartScript === 'string'
88
+ ? rawWidget.customCartScript
89
+ : typeof normalized.addToCartConfig?.customScript === 'string'
90
+ ? normalized.addToCartConfig.customScript
91
+ : undefined,
92
+ customCSS: typeof rawWidget.customCSS === 'string' ? rawWidget.customCSS : undefined,
93
+ customJS: typeof rawWidget.customJS === 'string' ? rawWidget.customJS : undefined,
94
+ productCard: isRecord(rawWidget.productCard)
95
+ ? rawWidget.productCard
96
+ : undefined,
97
+ pageTargetingJson,
98
+ segmentTargetingMode: rawWidget.segmentTargetingMode === 'include' || rawWidget.segmentTargetingMode === 'exclude'
99
+ ? rawWidget.segmentTargetingMode
100
+ : 'all',
101
+ segmentIds: Array.isArray(rawWidget.segmentIds)
102
+ ? rawWidget.segmentIds.filter((segmentId) => typeof segmentId === 'string')
103
+ : [],
104
+ };
105
+ }
106
+ export { RECOMMENDATION_STRATEGIES, RECOMMENDATION_DISPLAY_TYPES, RECOMMENDATION_TRIGGERS, RECOMMENDATION_INSERT_POSITIONS, RECOMMENDATION_PLATFORMS, RECOMMENDATION_STYLE_CONFIGS, getDefaultRecommendationConfig, validateRecommendationConfig, sanitizeRecommendationConfig, };
107
+ //# sourceMappingURL=recommendation-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommendation-contract.js","sourceRoot":"","sources":["../../../../../src/modules/contract/recommendation-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAU1C,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,SAAkB;IAC5D,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,EAAE,KAAK,QAAQ,IAAI,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,eAAe,GAAG;QACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ;QAC5B,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,OAAO,EAAE,SAAS,CAAC,OAAO;QAC1B,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,YAAY,EAAE,SAAS,CAAC,YAAY;QACpC,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,cAAc,EAAE,SAAS,CAAC,cAAc;QAC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AllowedSuggestionStyleKeys, validateSearchConfig, validateSearchStyles, sanitizeSearchStyles, sanitizeSuggestionStyles, type SearchPosition, type SearchFloatingPosition, type CategoryDisplayMode, } from '@selwise/search-contract';
@@ -0,0 +1,2 @@
1
+ export { SEARCH_POSITIONS, SEARCH_FLOATING_POSITIONS, CATEGORY_DISPLAY_MODES, SEARCH_STYLE_CONFIGS, SUGGESTION_STYLE_CONFIGS, getDefaultSearchStyles, getDefaultSuggestionStyles, getAllowedSearchStyleKeys, getAllowedSuggestionStyleKeys, validateSearchConfig, validateSearchStyles, sanitizeSearchStyles, sanitizeSuggestionStyles, } from '@selwise/search-contract';
2
+ //# sourceMappingURL=search-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-contract.js","sourceRoot":"","sources":["../../../../../src/modules/contract/search-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EACzB,6BAA6B,EAC7B,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GAIzB,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1 @@
1
+ export { CANONICAL_EVENTS, EVENT_CATEGORIES, DEFAULT_PAGE_TYPE_PATTERNS, TRACKING_MODULES, COOKIE_CONSENT_DEFAULTS, FREQUENCY_CAP_INTERVALS, validateCanonicalEvent, validateDataLayerConfig, sanitizeDataLayerConfig, validateFrequencyInterval, validateFrequencyCapPayload, type CanonicalEventName, } from '@selwise/tracking-contract';
@@ -0,0 +1,2 @@
1
+ export { CANONICAL_EVENTS, EVENT_CATEGORIES, DEFAULT_PAGE_TYPE_PATTERNS, TRACKING_MODULES, COOKIE_CONSENT_DEFAULTS, FREQUENCY_CAP_INTERVALS, validateCanonicalEvent, validateDataLayerConfig, sanitizeDataLayerConfig, validateFrequencyInterval, validateFrequencyCapPayload, } from '@selwise/tracking-contract';
2
+ //# sourceMappingURL=tracking-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking-contract.js","sourceRoot":"","sources":["../../../../../src/modules/contract/tracking-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1 @@
1
+ export { TYPE_STYLE_CONFIGS, getDefaultStyles, sanitizeStyles, isWidgetType, resolveInlineBannerLayout, type WidgetType, type InlineBannerLayoutInput, type InlineBannerLayout, } from '@selwise/widget-contract';
@@ -0,0 +1,2 @@
1
+ export { TYPE_STYLE_CONFIGS, getDefaultStyles, sanitizeStyles, isWidgetType, resolveInlineBannerLayout, } from '@selwise/widget-contract';
2
+ //# sourceMappingURL=widget-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-contract.js","sourceRoot":"","sources":["../../../../../src/modules/contract/widget-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,yBAAyB,GAI1B,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,122 @@
1
+ import type { Product } from '../../types/recommendation';
2
+ /**
3
+ * Product Tracker - Standardized product event tracking
4
+ *
5
+ * Ensures consistent product identification across all tracking events.
6
+ * Always uses itemCode as the primary product identifier.
7
+ */
8
+ export type ProductEventSource = 'recommendation' | 'search' | 'category' | 'product_page' | 'cart' | 'organic';
9
+ export interface ProductEventContext {
10
+ /** Source of the product event */
11
+ source: ProductEventSource;
12
+ /** Widget ID for recommendation events */
13
+ widgetId?: string;
14
+ /** Position of product in list (for analytics) */
15
+ position?: number;
16
+ /** Search query (for search events) */
17
+ query?: string;
18
+ /** List type (e.g., 'bestsellers', 'new_arrivals') */
19
+ listType?: string;
20
+ /** Additional custom metadata */
21
+ customData?: Record<string, any>;
22
+ }
23
+ /**
24
+ * Extract itemCode from product object
25
+ * Uses canonical product identifier fields.
26
+ *
27
+ * @param product - Product object from API
28
+ * @returns The merchant's product ID (itemCode)
29
+ */
30
+ export declare function getProductItemCode(product: Product | string): string;
31
+ /**
32
+ * Extract product UUID (internal database ID)
33
+ * Only for internal use - never send in tracking events
34
+ *
35
+ * @param product - Product object from API
36
+ * @returns Internal UUID or undefined
37
+ */
38
+ export declare function getProductUuid(product: Product): string | undefined;
39
+ /**
40
+ * Track a product view/impression event
41
+ *
42
+ * @param product - Product object from API
43
+ * @param context - Event context (source, position, etc.)
44
+ * @returns Promise that resolves when event is tracked
45
+ */
46
+ export declare function trackProductView(product: Product | string, context: ProductEventContext): Promise<void>;
47
+ /**
48
+ * Track a product click event
49
+ *
50
+ * @param product - Product object from API
51
+ * @param context - Event context (source, position, etc.)
52
+ * @returns Promise that resolves when event is tracked
53
+ */
54
+ export declare function trackProductClick(product: Product | string, context: ProductEventContext): Promise<void>;
55
+ /**
56
+ * Track an add_to_cart event
57
+ *
58
+ * @param product - Product object from API
59
+ * @param quantity - Quantity added (default: 1)
60
+ * @param context - Event context (source, widgetId, etc.)
61
+ * @returns Promise that resolves when event is tracked
62
+ */
63
+ export declare function trackAddToCart(product: Product | string, quantity: number | undefined, context: ProductEventContext): Promise<void>;
64
+ /**
65
+ * Track product impression (for analytics/funnel)
66
+ *
67
+ * @param products - Array of products being viewed
68
+ * @param context - Event context (source, listType, etc.)
69
+ * @returns Promise that resolves when events are tracked
70
+ */
71
+ export declare function trackProductImpressions(products: (Product | string)[], context: ProductEventContext): Promise<void>;
72
+ /**
73
+ * Prepare product event data with normalized product identification
74
+ *
75
+ * @param product - Product object or itemCode
76
+ * @param eventName - Event type (view, click, add_to_cart, etc.)
77
+ * @param context - Event context
78
+ * @returns Normalized event data ready for tracking
79
+ */
80
+ export declare function prepareProductEventData(product: Product | string, eventName: string, context: ProductEventContext): {
81
+ name: string;
82
+ entityType: string;
83
+ entityId: string | null;
84
+ metadata: Record<string, any>;
85
+ };
86
+ /**
87
+ * Product Tracker class for OOP-style tracking
88
+ *
89
+ * Example usage:
90
+ * ```typescript
91
+ * const tracker = new ProductTracker();
92
+ * await tracker.trackView(product, { source: 'recommendation', widgetId: 'xxx' });
93
+ * ```
94
+ */
95
+ export declare class ProductTracker {
96
+ /**
97
+ * Track a product view/impression
98
+ */
99
+ static view(product: Product | string, context: ProductEventContext): Promise<void>;
100
+ /**
101
+ * Track a product click
102
+ */
103
+ static click(product: Product | string, context: ProductEventContext): Promise<void>;
104
+ /**
105
+ * Track add to cart
106
+ */
107
+ static addToCart(product: Product | string, quantity: number, context: ProductEventContext): Promise<void>;
108
+ /**
109
+ * Track product impressions (list view)
110
+ */
111
+ static impressions(products: (Product | string)[], context: ProductEventContext): Promise<void>;
112
+ /**
113
+ * Prepare event data (for custom tracking)
114
+ */
115
+ static prepareEvent(product: Product | string, eventName: string, context: ProductEventContext): {
116
+ name: string;
117
+ entityType: string;
118
+ entityId: string | null;
119
+ metadata: Record<string, any>;
120
+ };
121
+ }
122
+ export default ProductTracker;
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Extract itemCode from product object
3
+ * Uses canonical product identifier fields.
4
+ *
5
+ * @param product - Product object from API
6
+ * @returns The merchant's product ID (itemCode)
7
+ */
8
+ export function getProductItemCode(product) {
9
+ if (typeof product === 'string') {
10
+ return product;
11
+ }
12
+ // id is the canonical product identifier; itemCode mirrors id when present.
13
+ return product.itemCode || product.id;
14
+ }
15
+ /**
16
+ * Extract product UUID (internal database ID)
17
+ * Only for internal use - never send in tracking events
18
+ *
19
+ * @param product - Product object from API
20
+ * @returns Internal UUID or undefined
21
+ */
22
+ export function getProductUuid(product) {
23
+ return product._uuid;
24
+ }
25
+ /**
26
+ * Track a product view/impression event
27
+ *
28
+ * @param product - Product object from API
29
+ * @param context - Event context (source, position, etc.)
30
+ * @returns Promise that resolves when event is tracked
31
+ */
32
+ export async function trackProductView(product, context) {
33
+ const itemCode = getProductItemCode(product);
34
+ // Use the global tracking function from core tracker
35
+ if (typeof window !== 'undefined' && window.Selwise || window.Selwise) {
36
+ const Selwise = window.Selwise || window.Selwise;
37
+ // Check if batch tracking is enabled
38
+ if (Selwise.trackEvent) {
39
+ await Selwise.trackEvent('product_view', {
40
+ entityType: context.source,
41
+ entityId: context.widgetId || null,
42
+ metadata: {
43
+ productItemCode: itemCode,
44
+ position: context.position,
45
+ query: context.query,
46
+ listType: context.listType,
47
+ ...context.customData,
48
+ },
49
+ });
50
+ }
51
+ }
52
+ }
53
+ /**
54
+ * Track a product click event
55
+ *
56
+ * @param product - Product object from API
57
+ * @param context - Event context (source, position, etc.)
58
+ * @returns Promise that resolves when event is tracked
59
+ */
60
+ export async function trackProductClick(product, context) {
61
+ const itemCode = getProductItemCode(product);
62
+ if (typeof window !== 'undefined' && window.Selwise || window.Selwise) {
63
+ const Selwise = window.Selwise || window.Selwise;
64
+ if (Selwise.trackEvent) {
65
+ await Selwise.trackEvent('click', {
66
+ entityType: context.source,
67
+ entityId: context.widgetId || itemCode,
68
+ metadata: {
69
+ productItemCode: itemCode,
70
+ position: context.position,
71
+ query: context.query,
72
+ listType: context.listType,
73
+ ...context.customData,
74
+ },
75
+ });
76
+ }
77
+ }
78
+ }
79
+ /**
80
+ * Track an add_to_cart event
81
+ *
82
+ * @param product - Product object from API
83
+ * @param quantity - Quantity added (default: 1)
84
+ * @param context - Event context (source, widgetId, etc.)
85
+ * @returns Promise that resolves when event is tracked
86
+ */
87
+ export async function trackAddToCart(product, quantity = 1, context) {
88
+ const itemCode = getProductItemCode(product);
89
+ if (typeof window !== 'undefined' && window.Selwise || window.Selwise) {
90
+ const Selwise = window.Selwise || window.Selwise;
91
+ if (Selwise.trackEvent) {
92
+ await Selwise.trackEvent('add_to_cart', {
93
+ entityType: context.source,
94
+ entityId: context.widgetId || itemCode,
95
+ metadata: {
96
+ productItemCode: itemCode,
97
+ quantity,
98
+ price: typeof product === 'object' ? product.price : undefined,
99
+ ...context.customData,
100
+ },
101
+ });
102
+ }
103
+ }
104
+ }
105
+ /**
106
+ * Track product impression (for analytics/funnel)
107
+ *
108
+ * @param products - Array of products being viewed
109
+ * @param context - Event context (source, listType, etc.)
110
+ * @returns Promise that resolves when events are tracked
111
+ */
112
+ export async function trackProductImpressions(products, context) {
113
+ if (typeof window !== 'undefined' && window.Selwise || window.Selwise) {
114
+ const Selwise = window.Selwise || window.Selwise;
115
+ if (Selwise.trackEvent) {
116
+ // Track as a batch of impressions
117
+ const itemCodes = products.map(getProductItemCode);
118
+ await Selwise.trackEvent('product_impression', {
119
+ entityType: context.source,
120
+ entityId: context.widgetId || null,
121
+ metadata: {
122
+ productItemCodes: itemCodes,
123
+ count: itemCodes.length,
124
+ listType: context.listType,
125
+ query: context.query,
126
+ ...context.customData,
127
+ },
128
+ });
129
+ }
130
+ }
131
+ }
132
+ /**
133
+ * Prepare product event data with normalized product identification
134
+ *
135
+ * @param product - Product object or itemCode
136
+ * @param eventName - Event type (view, click, add_to_cart, etc.)
137
+ * @param context - Event context
138
+ * @returns Normalized event data ready for tracking
139
+ */
140
+ export function prepareProductEventData(product, eventName, context) {
141
+ const itemCode = getProductItemCode(product);
142
+ return {
143
+ name: eventName,
144
+ entityType: context.source,
145
+ entityId: context.widgetId || itemCode,
146
+ metadata: {
147
+ productItemCode: itemCode,
148
+ ...(typeof product === 'object' && {
149
+ _productUuid: product._uuid, // Only for internal use
150
+ price: product.price,
151
+ category: product.category,
152
+ }),
153
+ ...(context.position !== undefined && { position: context.position }),
154
+ ...(context.query && { query: context.query }),
155
+ ...(context.listType && { listType: context.listType }),
156
+ ...context.customData,
157
+ },
158
+ };
159
+ }
160
+ /**
161
+ * Product Tracker class for OOP-style tracking
162
+ *
163
+ * Example usage:
164
+ * ```typescript
165
+ * const tracker = new ProductTracker();
166
+ * await tracker.trackView(product, { source: 'recommendation', widgetId: 'xxx' });
167
+ * ```
168
+ */
169
+ export class ProductTracker {
170
+ /**
171
+ * Track a product view/impression
172
+ */
173
+ static async view(product, context) {
174
+ return trackProductView(product, context);
175
+ }
176
+ /**
177
+ * Track a product click
178
+ */
179
+ static async click(product, context) {
180
+ return trackProductClick(product, context);
181
+ }
182
+ /**
183
+ * Track add to cart
184
+ */
185
+ static async addToCart(product, quantity, context) {
186
+ return trackAddToCart(product, quantity, context);
187
+ }
188
+ /**
189
+ * Track product impressions (list view)
190
+ */
191
+ static async impressions(products, context) {
192
+ return trackProductImpressions(products, context);
193
+ }
194
+ /**
195
+ * Prepare event data (for custom tracking)
196
+ */
197
+ static prepareEvent(product, eventName, context) {
198
+ return prepareProductEventData(product, eventName, context);
199
+ }
200
+ }
201
+ // Export convenience functions
202
+ export default ProductTracker;
203
+ //# sourceMappingURL=tracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../../../src/modules/products/tracking.ts"],"names":[],"mappings":"AA0BA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAyB;IAC1D,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,4EAA4E;IAC5E,OAAO,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO,CAAC,KAAK,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAyB,EACzB,OAA4B;IAE5B,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE7C,qDAAqD;IACrD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,OAAO,IAAK,MAAc,CAAC,OAAO,EAAE,CAAC;QACxF,MAAM,OAAO,GAAI,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AAC,KAAK,CAAC,IAAI,CAAC,OAAyB,EAAE,OAA4B;QACvE,OAAO,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAyB,EAAE,OAA4B;QACxE,OAAO,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CACpB,OAAyB,EACzB,QAAgB,EAChB,OAA4B;QAE5B,OAAO,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,QAA8B,EAAE,OAA4B;QACnF,OAAO,uBAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CACjB,OAAyB,EACzB,SAAiB,EACjB,OAA4B;QAE5B,OAAO,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;CACF;AAED,+BAA+B;AAC/B,eAAe,cAAc,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Cart Handlers for Recommendation Module
3
+ * Uses shared cart module for platform-specific implementations
4
+ */
5
+ import type { Product, RecommendationWidget, RecommendationConfig } from '../../types';
6
+ export declare function handleAddToCart(product: Product, widget: RecommendationWidget, config: RecommendationConfig, trackEvent?: (type: 'add_to_cart', widgetId: string, productItemCode: string, config: RecommendationConfig) => void, trackBehavior?: (type: 'add_to_cart', product: {
7
+ itemCode: string;
8
+ category?: string;
9
+ price?: number;
10
+ }, config: RecommendationConfig) => void): void;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Cart Handlers for Recommendation Module
3
+ * Uses shared cart module for platform-specific implementations
4
+ */
5
+ import { addToCart, createButtonState, } from '../../shared/cart/index.js';
6
+ export function handleAddToCart(product, widget, config, trackEvent, trackBehavior) {
7
+ const productItemCode = product.itemCode || product.id;
8
+ // Track add to cart event
9
+ trackEvent?.('add_to_cart', widget.id, productItemCode, config);
10
+ // Track behavior for AI personalization
11
+ trackBehavior?.('add_to_cart', {
12
+ itemCode: productItemCode,
13
+ category: product.categories,
14
+ price: product.price,
15
+ }, config);
16
+ // Map to shared cart product type
17
+ const cartProduct = {
18
+ id: productItemCode,
19
+ title: product.title,
20
+ price: product.price,
21
+ variantId: product.variantId,
22
+ itemCode: productItemCode,
23
+ wooProductId: product.wooProductId,
24
+ magentoProductId: product.magentoProductId,
25
+ prestaProductId: product.prestaProductId,
26
+ attributeId: product.attributeId,
27
+ };
28
+ const platform = (widget.cartPlatform || 'custom');
29
+ // For Akinon, we need button state
30
+ if (platform === 'akinon') {
31
+ const button = document.querySelector(`[data-selwise-action="add-to-cart"][data-product-id="${productItemCode}"]`);
32
+ const buttonState = createButtonState(button, {
33
+ loading: 'Adding...',
34
+ success: 'Added!',
35
+ error: 'Hata',
36
+ default: widget.cartButtonText || 'Add to Cart',
37
+ });
38
+ addToCart(cartProduct, platform, { buttonState });
39
+ }
40
+ else {
41
+ addToCart(cartProduct, platform, {
42
+ customScript: widget.customCartScript ||
43
+ (typeof widget.addToCartConfig?.customScript === 'string'
44
+ ? widget.addToCartConfig.customScript
45
+ : undefined),
46
+ });
47
+ }
48
+ }
49
+ //# sourceMappingURL=cart-handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart-handlers.js","sourceRoot":"","sources":["../../../../../src/modules/recommendation/cart-handlers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,SAAS,EACT,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,UAAU,eAAe,CAC7B,OAAgB,EAChB,MAA4B,EAC5B,MAA4B,EAC5B,UAKS,EACT,aAIS;IAET,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,IAA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